From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kyle Meyer Subject: Re: [RFC] Simplify `org-show-context' configuration Date: Mon, 16 Feb 2015 18:15:44 -0500 Message-ID: <87d25930tb.fsf@kyleam.com> References: <87lhjxh8q4.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:41282) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YNUtM-0000z4-GU for emacs-orgmode@gnu.org; Mon, 16 Feb 2015 18:15:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YNUtH-0007qy-G3 for emacs-orgmode@gnu.org; Mon, 16 Feb 2015 18:15:52 -0500 Received: from mail-qg0-f54.google.com ([209.85.192.54]:58766) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YNUtH-0007qa-D6 for emacs-orgmode@gnu.org; Mon, 16 Feb 2015 18:15:47 -0500 Received: by mail-qg0-f54.google.com with SMTP id z60so25553246qgd.13 for ; Mon, 16 Feb 2015 15:15:46 -0800 (PST) Received: from localhost (nat-130-132-173-5.central.yale.edu. [130.132.173.5]) by mx.google.com with ESMTPSA id s2sm10102748qan.25.2015.02.16.15.15.44 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 16 Feb 2015 15:15:45 -0800 (PST) In-Reply-To: <87lhjxh8q4.fsf@nicolasgoaziou.fr> (Nicolas Goaziou's message of "Mon, 16 Feb 2015 22:01:07 +0100") 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: Org Mode List Nicolas Goaziou wrote: > As explained in its commit message, the following patch is an attempt at > simplifying `org-show-context' configuration by offering a set of > 5 predefined views to choose from instead of setting 4 different > variables (`org-show-following-heading', `org-show-siblings', > `org-show-entry-below' and `org-show-hierarchy-above'). These views are > > minimal show current headline, and entry below if needed > local show current headline, entry below and next headline > lineage show direct ancestors and all siblings of current headline; > show entry only if required > canonical show direct ancestors and all of their siblings; show entry > only if required > full show direct ancestors, all their siblings and entry [...] > > I think this is enough, but I can add more views if needed. > > WDYT? I prefer this to the old setup. From a configuration standpoint, it's much nicer to have all the relevant information in one variable. [...] > +As a special case, a nil (respectively t) value means > +`minimal' (respectively `full') detail level for all contexts. Minor: It took me some extra effort to parse this sentence because I'm not used to seeing 'respectively' used in this way. I think something like below is more common. As special cases, a nil or t value means show all contexts in `minimal' or `full' view, respectively. [...] > (defun org-reveal (&optional siblings) > "Show current entry, hierarchy above it, and the following headline. > -This can be used to show a consistent set of context around locations > -exposed with `org-show-hierarchy-above' or `org-show-following-heading' > -not t for the search context. > + > +This can be used to show a consistent set of context around > +locations exposed with `org-show-context'. > > With optional argument SIBLINGS, on each level of the hierarchy all > siblings are shown. This repairs the tree structure to what it would Does a single C-u serve a purpose anymore? -- Kyle