From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: org-link minor mode Date: Tue, 14 Aug 2012 09:49:33 +0200 Message-ID: <87pq6tx69e.fsf@gnu.org> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:58049) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T1BsB-00012R-FE for emacs-orgmode@gnu.org; Tue, 14 Aug 2012 03:49:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T1BsA-0008JS-9a for emacs-orgmode@gnu.org; Tue, 14 Aug 2012 03:49:07 -0400 Received: from mail-we0-f169.google.com ([74.125.82.169]:38553) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T1BsA-0008JM-2d for emacs-orgmode@gnu.org; Tue, 14 Aug 2012 03:49:06 -0400 Received: by weys10 with SMTP id s10so77357wey.0 for ; Tue, 14 Aug 2012 00:49:05 -0700 (PDT) In-Reply-To: (Sean O'Halpin's message of "Sun, 12 Aug 2012 21:25:05 +0100") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Sean O'Halpin Cc: Org Mode "Sean O'Halpin" 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