caiorss / org-wiki

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

Is there any way for automatically recognizing if a page exists #10

Open mbrockman1 opened 7 years ago

mbrockman1 commented 7 years ago

For example, if I am writing a page about the sun.

The Sun
The sun emits photons.

and I already have a page called "photons", is there any way for org to automatically link the word photon to the page?

caiorss commented 7 years ago

and I already have a page called "photons", is there any way for org to automatically link the word photon to the page?

I am sorry for the delay. I would be very hard to implement and would be ambiguous to Emacs if you had a page "photons", "photons captured by algae" and another page "photons and photoelectric effect".

There is a very fast command to insert a link at point to a given page. Just enter the command M-x org-wiki-insert and it will show you all pages available and it narrows them when you type and then you select the page you want, let's say phontons. It will insert a link to the page phontons at point like this:

  [[wiki:Date Time calculations in computer programming][Date Time calculations in computer programming]]

That will be displayed as:

Date Time calculations in computer programming

WillForan commented 7 years ago

https://github.com/gregdetre/emacs-freex has this, but apparently doesn't play well with orgmode

caiorss commented 7 years ago

This feature would be broken if the you had some page with name containing spaces or some theme containing spaces like 'date computer programming'. The command M-x org-wiki-insert is more reliable and not always you would want a hyperlink to the word.