From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [PROPOSAL] Use prefix arg to control scope of org-narrow-to-subtree. Date: Thu, 25 Apr 2019 10:42:11 +0200 Message-ID: <878svyqxwc.fsf@nicolasgoaziou.fr> References: <87ftq7kyvt.fsf@red-bean.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([209.51.188.92]:57177) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hJZxQ-0003jt-V0 for emacs-orgmode@gnu.org; Thu, 25 Apr 2019 04:42:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hJZxP-0002r5-Sk for emacs-orgmode@gnu.org; Thu, 25 Apr 2019 04:42:16 -0400 Received: from relay11.mail.gandi.net ([217.70.178.231]:42967) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hJZxP-0002pu-Mk for emacs-orgmode@gnu.org; Thu, 25 Apr 2019 04:42:15 -0400 In-Reply-To: <87ftq7kyvt.fsf@red-bean.com> (Karl Fogel's message of "Wed, 24 Apr 2019 14:05:10 -0500") 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" To: Karl Fogel Cc: Org Mode Hello, Karl Fogel writes: > My proposal is for each raw prefix arg (each `C-u' prefix) to expand > the narrowing level outward/upward by one. So in the above situation: I suggest to use a numeric argument for that. M-1 for one level, M-2 for two levels, maybe M-0 equivalent to current behaviour. C-u can be a shortcut for M-1. > If you offer too many `C-u's, such that the narrowing would be wider than the current surrounding first-level subtree, then there are two possible ways we could handle it: > > 1) Extra `C-u's are ignored -- just narrow to surrounding 1st-level subtree. > > 2) Throw an error. > > I prefer (1), because it would be the more useful behavior, even > though (2) would be easier to implement (since `org-back-to-heading' > already throws the error). However, I'd welcome others' feedback on > that question, or on any other aspect of this proposal. 1 sounds good. I think it is a good idea. Thank you. Regards, -- Nicolas Goaziou