Nicolas Goaziou <m...@nicolasgoaziou.fr> writes:
> `org-narrow-to-subtree' is an Org function. I don't think it should
> bother about non Org mode buffers.

It's an Org function that grafts itself to narrow-map, which is globally
available.

I think it should try to have at least a sensible error message. The
current "Before first headline" isn't quite clear (my patch doesn't
address this, btw).

>> It looked pretty easy to fix, so here is my suggestion, below. It should
>> be rather harmless since it only affects non-Org buffers (and might have
>> the nice side effect of allowing other commands to run in those buffers
>> -- but I haven't checked.)
>
> There was a discussion recently about making it easier to use some Org
> features outside of Org.

I guess you're talking about
http://thread.gmane.org/gmane.emacs.orgmode/84782

> IIRC, the conclusion was that should not happen
> at the core level, but as an external layer (e.g., a minor mode).

If core Org functions only care about org-mode buffers, I guess it is
hard to make a minor mode that reuses some of Org to do its job. Unless
that mode is itself in the core of course. e.g. orgstruct-mode does that
and it needs some "core support".

Anyway, my goal isn't to discuss a whole org minor mode.

-- 
Nico.

Reply via email to