[Feature Request] Automatic linking by tags/names
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Zim |
Incomplete
|
Undecided
|
Frank Uebel |
Bug Description
This is probably related to #575118 and #528313 (and #426771).
I constantly write transcripts with lots of links to other pages. It is cumbersome to link them all by hand afterwards (same notebook, but different namespaces etc, lots ok clicking and typing). The links sometimes are sometimes called different names even when they link to the same page.
The target is to have pages linked automatically by keywords. A page might be tagged with certain titles/
This should work globally within a notebook and always create links from the top level ":...".
Example:
====== :group1:pageA =====
Here be some text. And some other text.
Followed by even more text.
#NAME["pageA"]
#NAME["stupid"]
===================
====== :group2:pageB =====
This is a second page.
It still has some text in it.
#NAME["example"]
#NAME["
===================
So, pageA is linked to the keywords "pageA" and "stupid" while being in the group1 leaf, while pageB is known as "example" and "codesnipped" and in the group2 namespace
When page c is create like this:
====== page c (before autoresolution) =====
Oh look at pageA, there is a stupid example of a codesnipped there.
=======
it becomes this:
====== page c (after autoresolution) =====
Oh look at [[:group1:
=======
It doesn't need to be instantaneous, it would be ok if it works after CTRL-R or manually calling the tool.
The benefit for this would be that multiple names might be assigned to a single page and one does not have to add a link and then manually change the name of the link.
The tool/function might first scan all pages in the current notebook and collect all "name"->"page" links (or keeping them in an index). If a name/alias occurs more than once, an error is raised and the tool stops. Otherwise it might scan all pages again and replace all keywords with the [[$pagename|
I am not yet sure how to handle updates, if maybe a keyword is moved from one page to another, the existing links to it might need to be updated as well. Not yet decided.
Please ignore the typos in the example and in the text, it went through several stages of rewriting before I submitted it....