-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature Request] Please support org-roam style link concealing in the taskpaper syntax #15
Comments
What should happen when you click on such link in a TaskPaper file? |
Hey @saf-dmitry You should simply go to the org-roam page indicated. Though it would be nice if the |
@wakatara TaskPaper mode already supports inline Markdown links in form You can delegate opening (defun my-org-open-uri (uri)
(when (string-prefix-p "id:" uri)
(org-open-link-from-string (format "[[%s]]" uri))
t))
(add-hook 'taskpaper-open-uri-hook 'my-org-open-uri) Now you can write something like this in your TaskPaper documents:
Clicking on the link should take you to the corresponding Org-roam node (assuming Org-roam is already installed and configured). See the corresponding example in the Scripting Guide and the documentation string of |
Hey! Thanks for the quick response. The link opening works great once you insert that function. Very helpful. Ah, I think I must have miscommunicated my intent with the links though. Org-roam links use org-mode style so are of the form |
I understand that you suggest supporting Org mode link syntax. However, honestly I don't see any good reason to support Org links (as many other link syntaxes) in the TaskPaper mode. Why are Markdown links not working for you?
Could you elaborate this a bit more? What does |
Completely understand your position. If it wasn't for tools like org-roam and org-journal in emacs and a few others in the ecosystem, I'd strongly prefer markdown everywhere myself (in fact, trying to see if I can get md-roam with org-roam working.). I'm a much bigger proponent of markdown myself. But... in using emacs, it feel like org-mode has a special place even if you choose not to use it for org-agenda (which I'm obviously doing if using taskpaper mode), so I'd assert that supporting the org-mode link protocol is about as important as markdown's. In org-roam, C-c n i calls org-roam-node-insert which brings up minibuffer you can type into to fuzzy search a node (mine's integrated with ivy) or it create an org-capture buffer with a templated org-mode file to allow you to create a new entry. The insert also then inserts an org-mode link to the document in question into your existing buffer. If you've ever seen Roam Research or Logseq, the idea with org-roam is that it creates bidrectional links that you can then traverse to navigate or surface your information or see the backlinks to it (which is the handy feature) in order to understand it in your collections of documents and "knowledge graph" better. It's pretty handy. |
You can convert an Org-roam link at point to Markdown syntax using the following function: (defun my-org-convert-link ()
(interactive)
(require 'thingatpt)
(let ((re "\\[\\[\\(.*?\\)\\]\\(?:\\[\\(.*?\\)\\]\\)?\\]"))
(when (and (derived-mode-p 'taskpaper-mode)
(thing-at-point-looking-at re))
(let* ((uri (match-string-no-properties 1))
(desc (or (match-string-no-properties 2) uri)))
(delete-region (match-beginning 0) (match-end 0))
(insert (format "[%s](%s)" desc uri)))))) You could probably advise the (advice-add 'org-roam-node-insert :after #'my-org-convert-link) |
Using org-roam installed and Taskpaper, you can insert org-roam links of the style
This is nicely inserted with
C-n i
and a handy ivy narrowing to the thing you select.In org-roam, these links use concealing special characters to appear simply as highlighted link
Boss
.Is there a way we can support that in the Taskpaper syntax (perhaps optionally) as it is way to be able to connect people and topics into each todo item?
thanks!
Daryl.
The text was updated successfully, but these errors were encountered: