Gnus development mailing list
 help / color / mirror / Atom feed
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: Sat, 10 Nov 2018 07:15:35 +0100	[thread overview]
Message-ID: <87efbtzce0.fsf@web.de> (raw)
In-Reply-To: <875zx6njfj.fsf@ericabrahamsen.net> (Eric Abrahamsen's message of "Fri, 09 Nov 2018 11:24:16 -0800")

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> > (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...)
> >

> Huh. That looks like a lot of work

Not really.  What is really nontrivial work is to find out all places
where you need to bind `org-refile-use-outline-path'.

Then factor the

(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)

part into a defun `gnorb-get-gnus-refile-use-outline-path', and all you
have to do is to bind `org-refile-use-outline-path' to
(gnorb-get-gnus-refile-use-outline-path) instead of
gnorb-gnus-refile-use-outline-path in all those places.

If you had to treat several variables this way, it would be better to
define a macro `gnorb-with-org-bindings' that expands into a `let'.  But
that's still a small and trivial change.


Michael.



  reply	other threads:[~2018-11-10  6:15 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
2018-11-09 19:24                   ` Eric Abrahamsen
2018-11-10  6:15                     ` Michael Heerdegen [this message]
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=87efbtzce0.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).