From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Sean O'Halpin" Subject: Re: org-link minor mode Date: Sat, 18 Aug 2012 05:07:56 +0100 Message-ID: References: <87pq6tx69e.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Return-path: Received: from eggs.gnu.org ([208.118.235.92]:37444) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T2aKN-0002JX-K3 for emacs-orgmode@gnu.org; Sat, 18 Aug 2012 00:08:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T2aKM-0005dg-Hz for emacs-orgmode@gnu.org; Sat, 18 Aug 2012 00:07:59 -0400 In-Reply-To: <87pq6tx69e.fsf@gnu.org> 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: Bastien Cc: Org Mode On Tue, Aug 14, 2012 at 8:49 AM, Bastien wrote: > "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. [snip] > 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. I see it as orthogonal to orgstruct - they could happily co-exist side by side. I've just tested that though and it seems they don't. I'll try to fix that. >> I'm not sure how to prevent turning on org-link-minor-mode >> from an org-mode buffer > Simply use > > (unless (derived-mode-p 'org-mode) > > on the top of your function? Thanks - I used your suggestion as you can see here: https://github.com/seanohalpin/org-link-minor-mode/blob/master/org-link-minor-mode.el I realised the problem I had was that I can't prevent entering the minor mode because by the time I check for org-mode, the minor mode has already been entered so I have to turn it off again. BTW, I've refactored the code to simplify it and added more link types. Regards, Sean