unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Phil Sainty <psainty@orcon.net.nz>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 34657@debbugs.gnu.org
Subject: bug#34657: 26.1; Some erc hook names lack the expected suffix
Date: Thu, 28 Feb 2019 00:01:02 +1300	[thread overview]
Message-ID: <bce823e2-dd4f-0d04-6402-be97cef6b307@orcon.net.nz> (raw)
In-Reply-To: <83imx7mdhi.fsf@gnu.org>

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	other threads:[~2019-02-27 11:01 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-25 23:54 bug#34657: 26.1; Some erc hook names lack the expected suffix Phil Sainty
2019-02-26  3:32 ` Eli Zaretskii
2019-02-27 11:01   ` Phil Sainty [this message]
2019-02-27 16:30     ` Eli Zaretskii
2019-02-27 19:30       ` Phil Sainty
2020-08-03  8:34         ` Lars Ingebrigtsen
2020-08-31  9:55           ` Stefan Kangas
2020-09-01 14:31             ` Lars Ingebrigtsen
2021-02-27  4:43               ` Lars Ingebrigtsen

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=bce823e2-dd4f-0d04-6402-be97cef6b307@orcon.net.nz \
    --to=psainty@orcon.net.nz \
    --cc=34657@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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