From: Michael Heerdegen <michael_heerdegen@web.de>
To: Eric Abrahamsen <eric@ericabrahamsen.net>
Cc: ding@gnus.org
Subject: Re: Gnorb and org-refile-use-outline-path
Date: Fri, 09 Nov 2018 03:43:58 +0100 [thread overview]
Message-ID: <87in17nf69.fsf@web.de> (raw)
In-Reply-To: <874lcrsbw8.fsf@ericabrahamsen.net> (Eric Abrahamsen's message of "Thu, 08 Nov 2018 09:43:35 -0800")
Eric Abrahamsen <eric@ericabrahamsen.net> writes:
> > So like this?
> >
> > (eval-after-load 'org
> > (unless gnorb-gnus-refile-use-outline-path
> > (setq gnorb-gnus-refile-use-outline-path
> > org-refile-use-outline-path)))
>
> Quoted, of course....
(or just `with-eval-after-load'?).
You can do that, but of course only if
gnorb-gnus-refile-use-outline-path -> nil is not a significant value.
Which, I guess, is in your case. There should still be a way for the
user to set gnorb-gnus-refile-use-outline-path nil while having
org-refile-use-outline-path non-nil.
What I often do in my code instead is: I make such options have an extra
dedicated value, say 'use-org-value-maybe, to mean, in this case, use
the org value or 'file, for example And in the code, whenever the
variable is referenced, I would use
(let ((org-refile-use-outline-path
(if (eq gnorb-gnus-refile-use-outline-path 'use-org-value-maybe)
(or org-refile-use-outline-path 'file)
gnorb-gnus-refile-use-outline-path)))
code...)
That's cleaner than silently changing values of options which can lead
to confusion. You would want to make that dedicated value the default,
obviously.
Michael.
next prev parent reply other threads:[~2018-11-09 2:43 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-06 5:02 Michael Heerdegen
2018-11-06 6:19 ` Eric Abrahamsen
2018-11-06 23:45 ` Michael Heerdegen
2018-11-07 4:45 ` Eric Abrahamsen
2018-11-07 5:39 ` Michael Heerdegen
2018-11-07 6:32 ` Eric Abrahamsen
2018-11-07 6:57 ` Michael Heerdegen
2018-11-08 17:35 ` Eric Abrahamsen
2018-11-08 17:43 ` Eric Abrahamsen
2018-11-09 2:43 ` Michael Heerdegen [this message]
2018-11-09 19:24 ` Eric Abrahamsen
2018-11-10 6:15 ` Michael Heerdegen
2018-11-12 19:46 ` Eric Abrahamsen
2018-11-13 5:57 ` Michael Heerdegen
2018-11-13 19:22 ` Eric Abrahamsen
2018-11-14 6:03 ` Michael Heerdegen
2018-11-16 21:39 ` Eric Abrahamsen
2018-11-17 14:43 ` Michael Heerdegen
2018-11-17 18:50 ` Eric Abrahamsen
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87in17nf69.fsf@web.de \
--to=michael_heerdegen@web.de \
--cc=ding@gnus.org \
--cc=eric@ericabrahamsen.net \
/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.
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 NNTP newsgroup(s).