From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Phil Sainty Newsgroups: gmane.emacs.bugs Subject: bug#34657: 26.1; Some erc hook names lack the expected suffix Date: Thu, 28 Feb 2019 00:01:02 +1300 Message-ID: References: <42f6bffbb0e6eb71f87c375a31948970@webmail.orcon.net.nz> <83imx7mdhi.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="227149"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 Cc: 34657@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Feb 27 12:04:15 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gywyo-000tWW-Jf for geb-bug-gnu-emacs@m.gmane.org; Wed, 27 Feb 2019 12:02:26 +0100 Original-Received: from localhost ([127.0.0.1]:41998 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gywyn-0005DB-FB for geb-bug-gnu-emacs@m.gmane.org; Wed, 27 Feb 2019 06:02:25 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:33609) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gywyY-0005Bd-2T for bug-gnu-emacs@gnu.org; Wed, 27 Feb 2019 06:02:13 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gywyW-0005l3-M0 for bug-gnu-emacs@gnu.org; Wed, 27 Feb 2019 06:02:09 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:40016) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gywyR-0005ha-U1 for bug-gnu-emacs@gnu.org; Wed, 27 Feb 2019 06:02:05 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gywyR-0000ds-Az for bug-gnu-emacs@gnu.org; Wed, 27 Feb 2019 06:02:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Phil Sainty Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 27 Feb 2019 11:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34657 X-GNU-PR-Package: emacs Original-Received: via spool by 34657-submit@debbugs.gnu.org id=B34657.15512652672404 (code B ref 34657); Wed, 27 Feb 2019 11:02:02 +0000 Original-Received: (at 34657) by debbugs.gnu.org; 27 Feb 2019 11:01:07 +0000 Original-Received: from localhost ([127.0.0.1]:53560 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gywxX-0000ci-HQ for submit@debbugs.gnu.org; Wed, 27 Feb 2019 06:01:07 -0500 Original-Received: from smtp-2.orcon.net.nz ([60.234.4.43]:43009) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gywxV-0000cZ-E0 for 34657@debbugs.gnu.org; Wed, 27 Feb 2019 06:01:06 -0500 Original-Received: from [150.107.172.32] (port=22222 helo=[192.168.20.103]) by smtp-2.orcon.net.nz with esmtpa (Exim 4.86_2) (envelope-from ) id 1gywxS-0006JE-Oy; Thu, 28 Feb 2019 00:01:03 +1300 In-Reply-To: <83imx7mdhi.fsf@gnu.org> Content-Language: en-GB X-GeoIP: NZ X-Spam_score: -2.9 X-Spam_score_int: -28 X-Spam_bar: -- X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:155839 Archived-At: 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 >> >> `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. >