From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: org-hide-leading-stars-before-indent-mode Date: Wed, 19 Feb 2020 22:42:50 +0100 Message-ID: <87v9o245k5.fsf@gnu.org> References: <9408b6f4-2180-98bd-92b7-415f739d99a4@posteo.net> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:59398) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j4X7M-0005WO-Or for emacs-orgmode@gnu.org; Wed, 19 Feb 2020 16:42:54 -0500 In-Reply-To: <9408b6f4-2180-98bd-92b7-415f739d99a4@posteo.net> (D.'s message of "Wed, 19 Feb 2020 21:59:05 +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-mx.org@gnu.org Sender: "Emacs-orgmode" To: D Cc: emacs-orgmode@gnu.org Hi, D writes: > 1) Wouldn't it be clearer to use defvar-local for > org-hide-leading-stars-before-indent-mode and replace the docstring with > something like "Holds the original value of `org-hide-leading-stars' > before Org indent." Yes, patch welcome. > 2) Considering that org-hide-leading-stars is global by default, > wouldn't it be even better to dispose of the temp variable entirely? > One could either use (kill-local-variable 'org-hide-leading-stars) or > (setq-local org-hide-leading-stars (default-value > 'org-hide-leading-stars)) for the same effect. IIUC, it would be "and", not "or": first use (setq-local org-hide-leading-stars (default-value 'org-hide-leading-stars)) to set org-hide-leading-stars to a temporary value *and* (kill-local-variable 'org-hide-leading-stars) to restore the global value. If you can make something that works, please send a patch. Thanks! -- Bastien