emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Bastien <bzg@gnu.org>
To: D <d.williams@posteo.net>
Cc: emacs-orgmode@gnu.org
Subject: Re: org-hide-leading-stars-before-indent-mode
Date: Wed, 19 Feb 2020 22:42:50 +0100	[thread overview]
Message-ID: <87v9o245k5.fsf@gnu.org> (raw)
In-Reply-To: <9408b6f4-2180-98bd-92b7-415f739d99a4@posteo.net> (D.'s message of "Wed, 19 Feb 2020 21:59:05 +0100")

Hi,

D <d.williams@posteo.net> 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

  reply	other threads:[~2020-02-19 21:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-19 20:59 org-hide-leading-stars-before-indent-mode D
2020-02-19 21:42 ` Bastien [this message]
2020-02-19 22:59   ` [PATCH] Re: org-hide-eading-stars-before-indent-mode D
2020-02-20  0:07     ` Bastien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87v9o245k5.fsf@gnu.org \
    --to=bzg@gnu.org \
    --cc=d.williams@posteo.net \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).