"Sean O'Halpin" <sean.ohal...@gmail.com> writes: > I've been hacking this weekend to try to create a minor mode that > enables org-mode bracket links in modes other than org-mode. > > I believe this has been mooted before > (e.g. http://lists.gnu.org/archive/html/emacs-orgmode/2009-08/msg00573.html).
Yes. This might especially be useful in modes where people use orgstruct as well -- and could well end up being part of orgstruct, if that's not too invasive. > The following codes works for me but I'm sure it could be improved. > > I'm an elisp noob so I'd very much appreciate feedback on the approach > I'm taking. For example, I'm not sure how to prevent turning on > org-link-minor-mode from an org-mode buffer - advice would be welcome. Simply use (unless (derived-mode-p 'org-mode) on the top of your function? Also, you might want to check `org-fontify-like-in-org-mode': for any regexp (including links) that you find in your buffer, you can fontify it like in org-mode. HTH, -- Bastien