caiorss / org-wiki

Wiki for Emacs org-mode built on top of Emacs org-mode.
https://caiorss.github.io/org-wiki/
The Unlicense
364 stars 31 forks source link

Automatic mutual (2-way) links between files? #2

Closed rsuhada closed 8 years ago

rsuhada commented 8 years ago

Dear Caio,

I find org-wiki really intriguing and thinking about adopting it. Thank you very much!

I have a question: On your screenshots you have lines like in Linux.org "Related: Bash Script, Nix, ..." Would it be hard to make the adding of links to be mutual between the files, i.e. whenever I link to a target file A from a file B, can the file A get a automatically a back-link to file B too?

For example: I'm in Linux.org, I create from there a new link Ubuntu.org (which maybe exists already), I'd like Ubuntu.org to automatically have a Related: Linux link in it.

What is your opinion?

Best wishes, Robert

caiorss commented 8 years ago

Am glad you liked it.

It seems to be hard to implement. I guess it is better insert manually using M-x org-wiki/insert that inserts a org-wiki page link such as you saw. Using this command you don't need to remember the name of all pages.

The link related in Linux.org was generated with this markdown:

Realated: [[wiki:Bash_Script][Bash_Script]], [[wiki:Nix][Nix]], [[wiki:Encryption][Encryption]], [[wiki:Docker][Docker]], [[wiki:MsWindows][Windows]]

In the page Bash_Script.org I have the following

Related: wiki:Linux

When I need cross link I insert it manually using M-x org-wiki/insert that shows a helm menu with all page, then when I select one it is inserted at current cursor location. It is a very fast way to insert cross link.

For example: I use M-x org-wiki/insert and write bash and hit return. It will insert at current cursor position (aka point) the markdown: [[wiki:Bash_Script][Bash_Script]].

I updated the repository and the documentation.

rsuhada commented 8 years ago

Thank you for the reply! Using org-wiki/insert seems comfortable and fast enough so maybe one can live without automatic linking.