From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: help-gnu-emacs@gnu.org
Cc: Michael Heerdegen <michael_heerdegen@web.de>
Subject: Re: Gnus: Thread notes?
Date: Thu, 28 Dec 2017 12:30:35 -0800 [thread overview]
Message-ID: <87lghm1tp0.fsf@ericabrahamsen.net> (raw)
In-Reply-To: 87wp1nmccy.fsf@ericabrahamsen.net
Eric Abrahamsen <eric@ericabrahamsen.net> writes:
> Michael Heerdegen <michael_heerdegen@web.de> writes:
>
>> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>>
>>> The only remaining issue is, I think it would be confusing to allow
>>> `gnus-alter-articles-to-read-function' to be either a single function
>>> value, or a list of functions. That makes it harder for consumers to
>>> manipulate, as they have to check its current value first. What do
>>> you think about requiring a list?
>>
>> I wouldn't find that good (it would be an unnecessary restriction for
>> users ability to configure stuff), and I think then also the variable
>> name would really not fit anymore the semantics. I think it would then
>> be cleaner to introduce a new variable
>> `gnus-alter-articles-to-read-functions' (note the added "s"). Make it
>> so that
>>
>> - gnus-alter-articles-to-read-function (without "s") defaults to a new
>> named function that would process the elements of the new variable
>> which should be bound to a list (of functions), default nil. That
>> would be backward compatible.
>>
>> - People like me could use `add-function' on
>> `gnus-alter-articles-to-read-function'.
>>
>> - People preferring a list could add their functions to the new
>> variable binding.
>>
>> I would still prefer a solution with only one variable, but given what
>> we currently have, and what you want, two variables may be better. But
>> it's not really nice.
>>
>> If I were you, I would tell people to use `add-function', it's not that
>> hard, and I heard most of Gnus users even use Emacs ;-)
>>
>> BTW, I would expect that when the default value of
>> `gnus-alter-articles-to-read-function' is changed to a no-op function,
>> most people would just setq that variable to a function defined in their
>> config, there is no need to use `add-function' to configure things. So
>> for users who don't like to use `add-function', nothing would change.
>> But OTOH, packages would be able to use `add-function' to change the
>> behavior (though, with a certain risk that the user inadvertently erases
>> that when setting the variable after a package has used `add-function'
>> on the binding).
>>
>> Anyway, I expect that we are talking about very few users here. But I
>> would hate a solution where I have to redefine a Gnus function just
>> because the provided means of configuration don't suffice.
>
> Okay, you've convinced me. The only thing that seems weird is having it
> run as as a no-op function by default, but I guess that's what
> docstrings are for. I agree it would be a bad idea to change the
> variable name (or make it inaccurate), or to introduce another variable
> that does nearly the same thing as the first. I'll push this at some
> point soon.
Okay, there it goes.
next prev parent reply other threads:[~2017-12-28 20:30 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-12 12:44 Gnus: Thread notes? Michael Heerdegen
2017-10-12 12:56 ` Danny YUE
2017-10-12 16:36 ` Göktuğ Kayaalp
2017-10-12 19:25 ` Robert Pluim
2017-10-13 2:21 ` Eric Abrahamsen
2017-10-16 19:33 ` Michael Heerdegen
2017-10-16 20:14 ` Eric Abrahamsen
2017-10-18 12:18 ` Michael Heerdegen
2017-10-18 14:53 ` Eric Abrahamsen
2017-11-25 2:42 ` Michael Heerdegen
2017-11-25 6:35 ` Eric Abrahamsen
2017-11-26 5:30 ` Michael Heerdegen
2017-11-28 2:19 ` Eric Abrahamsen
2017-11-28 6:02 ` Michael Heerdegen
2017-11-28 16:44 ` Eric Abrahamsen
2017-11-29 8:10 ` Michael Heerdegen
2017-11-29 17:43 ` Eric Abrahamsen
2017-12-12 12:26 ` Michael Heerdegen
2017-12-12 17:17 ` Eric Abrahamsen
2017-12-13 12:42 ` Michael Heerdegen
2017-12-13 18:03 ` Eric Abrahamsen
2017-12-14 11:31 ` Michael Heerdegen
2017-12-14 23:41 ` Eric Abrahamsen
2017-12-15 11:38 ` Michael Heerdegen
2017-12-15 17:58 ` Eric Abrahamsen
2017-12-15 19:54 ` Michael Heerdegen
2017-12-16 6:10 ` Eric Abrahamsen
2017-12-28 20:30 ` Eric Abrahamsen [this message]
2017-12-14 15:30 ` Michael Heerdegen
2017-12-14 16:05 ` Michael Heerdegen
2017-12-14 16:59 ` Eric Abrahamsen
2017-12-14 17:25 ` Michael Heerdegen
2017-12-14 17:54 ` Eric Abrahamsen
2017-12-16 12:21 ` Michael Heerdegen
2017-12-16 21:08 ` Eric Abrahamsen
2017-12-18 11:40 ` Michael Heerdegen
2017-12-18 19:04 ` Eric Abrahamsen
2017-12-19 14:27 ` Michael Heerdegen
2017-12-19 16:14 ` Eric Abrahamsen
2017-11-28 7:44 ` Michael Heerdegen
2017-11-26 5:49 ` Michael Heerdegen
2017-10-15 15:43 ` Narendra Joshi
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.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87lghm1tp0.fsf@ericabrahamsen.net \
--to=eric@ericabrahamsen.net \
--cc=help-gnu-emacs@gnu.org \
--cc=michael_heerdegen@web.de \
/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 read-only IMAP folder(s) and NNTP newsgroup(s).