Apply function (org-tiddly-link) for a region
Closed this issue · 4 comments
Hi! I think this exporter is an amazing utility especially when you use Tiddlywiki and Emacs (as an editor). Since my (e)Lisp skills are very limited I wanted to know if it's possible to call a function (let's say org-tiddly-link
) for a list of ORG links and convert them automatically to Tiddlywiki syntax?
To be more precise, let's say I have following ORG content
* [[link1][desc1]]
* [[link2][desc2]]
* ...
What I'd like to do is to mark those lines call M-x
and then org-tiddly-link
and that function will create a new buffer with the links in Tiddlywiki syntax:
* [[desc1|link1]]
* [[desc2|link2]]
* ...
Thanks in advance.
Hi,
actually the present exporter functionality already should allow you to do that. If you mark the area of these links and then call org-tiddly-export-as-tiddly
on it, then you'll get an export buffer with just that content.
Hi,
that's true. I've just realized that. Sorry for the inconvenience.
I hope there will be more integrations between Tiddlywiki and Emacs in the future.
KR,
Victor
Hi Victor,
I have not used TiddlyWiki since a long time, I just keep my old ones as read only records of my notes from more than 10 years ago. TiddlyWiki was what I had used before discovering Emacs Org Mode, and I ended up migrating almost everything to Org. One of the main triggers for looking for anew solution at that time had been the introduction of security features in browsers that made it harder and harder to run Tiddly.
My current workflow is Org files, and some of them I export using the nice HTML exporter functions by Fabrice Niessen
https://github.com/fniessen/org-html-themes. In case it's useful to you, I post here an old function (far from perfect, from my beginning elisp days) for converting Tiddly to org.
(defun my-tiddly-to-org (beg end)
"Convert buffer or region from tiddlywiki to org format into a
new buffer"
(interactive "r")
(when (not (use-region-p)) (setq beg (point-min))
(setq end (point-max)))
(let ((src (buffer-substring-no-properties beg end)))
(with-current-buffer (get-buffer-create "*Tiddly To Org*")
(erase-buffer)
(insert src)
(replace-regexp "^\\*\\*\\* *"
" - " nil (point-min) (point-max))
(replace-regexp "^\\*\\* *"
" - " nil (point-min) (point-max))
(replace-regexp "^\\* *"
" - " nil (point-min) (point-max))
(replace-regexp "^\\#\\#\\# *"
" 1. " nil (point-min) (point-max))
(replace-regexp "^\\#\\# *"
" 1. " nil (point-min) (point-max))
(replace-regexp "^\\# *"
" 1. " nil (point-min) (point-max))
(replace-regexp "^!!! *"
"*** " nil (point-min) (point-max))
(replace-regexp "^!! *"
"** " nil (point-min) (point-max))
(replace-regexp "^! *"
"* " nil (point-min) (point-max))
(replace-regexp "\\[\\[\\([^]|]+\\)|\\([^\]]+\\)\\]\\]"
"[[\\2][\\1]]" nil (point-min) (point-max))
))
(split-window-sensibly)
(switch-to-buffer "*Tiddly To Org*")
(org-mode)
)
Closing this feature request.
One of the main triggers for looking for anew solution at that time had been the introduction of security features in browsers that made it harder and harder to run Tiddly.
Ohh.. I guess that's not the case anymore. You have browsers addons for single HTML pages but there is also the nodejs version which can run on your local machine (or inside a docker container).
Myself too I run a local instance and I use nodeJS tiddlywiki commands to export to https://brainfck.org (my personal Zettelkasten). At the moment I use emacs/org to actually edit stuff and collect bookmarks/ideas and then export/copy to Tiddlywiki.
Thanks for the link. I'll have a look.