emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] org-link minor mode


From: Bastien
Subject: Re: [O] org-link minor mode
Date: Tue, 14 Aug 2012 09:49:33 +0200
User-agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.1.50 (gnu/linux)

"Sean O'Halpin" <address@hidden> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]