emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Sean O'Halpin" <sean.ohalpin@gmail.com>
To: Bastien <bzg@gnu.org>
Cc: Org Mode <emacs-orgmode@gnu.org>
Subject: Re: org-link minor mode
Date: Sat, 18 Aug 2012 05:07:56 +0100	[thread overview]
Message-ID: <CAOXM+eX5w_6MA3_9rKkMWNgan65qXn_LJwPDSz5=R5Q-L01XXw@mail.gmail.com> (raw)
In-Reply-To: <87pq6tx69e.fsf@gnu.org>

On Tue, Aug 14, 2012 at 8:49 AM, Bastien <bzg@gnu.org> wrote:
> "Sean O'Halpin" <sean.ohalpin@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.
[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

  reply	other threads:[~2012-08-18  4:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-12 20:25 org-link minor mode Sean O'Halpin
2012-08-14  7:49 ` Bastien
2012-08-18  4:07   ` Sean O'Halpin [this message]
2012-08-18 15:07     ` Bastien
2012-08-19 12:16       ` Sean O'Halpin
2012-08-14 10:57 ` Christopher J. White
2012-08-18  0:02   ` Sean O'Halpin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAOXM+eX5w_6MA3_9rKkMWNgan65qXn_LJwPDSz5=R5Q-L01XXw@mail.gmail.com' \
    --to=sean.ohalpin@gmail.com \
    --cc=bzg@gnu.org \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).