bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#34657: 26.1; Some erc hook names lack the expected suffix


From: Phil Sainty
Subject: bug#34657: 26.1; Some erc hook names lack the expected suffix
Date: Thu, 28 Feb 2019 00:01:02 +1300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1

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@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.
> 






reply via email to

[Prev in Thread] Current Thread [Next in Thread]