GNU bug report logs -
#34657
26.1; Some erc hook names lack the expected suffix
Previous Next
Reported by: Phil Sainty <psainty <at> orcon.net.nz>
Date: Mon, 25 Feb 2019 23:56:01 UTC
Severity: wishlist
Tags: fixed
Found in version 26.1
Fixed in version 28.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
I've pushed branch fix/bug-34657-erc-hooks for this, and I've used
define-obsolete-variable-alias, but there are problems with the
customize behaviour.
The first annoyance is that in customize-group erc-hooks the alias
is displayed (albeit slightly differently) as well as the renamed
option. I feel that it would be cleaner if the alias did not appear
in the customize UI, as otherwise it can lead to a weird state where
the user edits both of them in the customize UI with different
values, and one value clobbers the other.
The latter aspect is really a more general problem, though, which
we can arrive at more simply:
1. The user has previously customized `erc-before-connect'
(for example) such that their custom file contains a value.
2. They NOW customize the option under its new name, and this
`erc-before-connect-functions' value is saved *separately* to
the custom file.
3. We are now in the same situation as before -- *both* option
names exist in the custom file, potentially with different
values.
4. When starting Emacs, the first(?) value processed is the
one which sticks for both names, which can mean that the user's
customization of the new name didn't work in practice.
I can think of a possible reason for not deleting the old option
from the custom file (being that the user *potentially* uses their
config with Emacs 27 and Emacs 26, and 26 would only use the old
name). I'm not sure whether switching back and forth like that is
a supported case, though?
Regardless of that, allowing both options to be written with
*different* values seems like a definite bug?
-Phil
On 26/02/19 4:32 PM, Eli Zaretskii wrote:
>> Date: Tue, 26 Feb 2019 12:54:57 +1300
>> From: Phil Sainty <psainty <at> orcon.net.nz>
>>
>> `erc-before-connect' and `erc-after-connect' are abnormal hooks,
>> so I think they should each have the suffix "-functions" for
>> consistency, and so that they are easier to discover.
>>
>> Is is ok to rename them and defvaralias the old names?
>
> Yes, thanks.
>
This bug report was last modified 4 years and 87 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.