From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Richard Subject: Re: Bug: [PATCH] Make org-narrow-to-subtree usable out of Org mode [8.2.7b (release_8.2.7b-6-g07d470 @ /home/youngfrog/sourcetrees/org-mode/lisp/)] Date: Thu, 24 Jul 2014 15:28:52 +0200 Message-ID: <878uni7unf.fsf@geodiff-mac3.ulb.ac.be> References: <87fvht9tdo.fsf@yahoo.fr> <87bnsfrycn.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:34492) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XAJ3G-00032x-Pv for emacs-orgmode@gnu.org; Thu, 24 Jul 2014 09:27:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XAJ3A-0001Jm-M9 for emacs-orgmode@gnu.org; Thu, 24 Jul 2014 09:27:18 -0400 Received: from mxin.ulb.ac.be ([164.15.128.112]:18039) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XAJ3A-0001Jh-Gf for emacs-orgmode@gnu.org; Thu, 24 Jul 2014 09:27:12 -0400 In-Reply-To: <87bnsfrycn.fsf@nicolasgoaziou.fr> (Nicolas Goaziou's message of "Thu, 24 Jul 2014 09:48:40 +0200") 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: Nicolas Richard Cc: emacs-orgmode@gnu.org Nicolas Goaziou 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.