GNU bug report logs - #18300
erc-format-target-and/or-network: do not rename server buffers unconditionally

Previous Next

Package: emacs;

Reported by: Ivan Shmakov <ivan <at> siamics.net>

Date: Wed, 20 Aug 2014 14:51:01 UTC

Severity: wishlist

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 18300 in the body.
You can then email your comments to 18300 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to kwhite <at> gnu.org, bug-gnu-emacs <at> gnu.org:
bug#18300; Package emacs. (Wed, 20 Aug 2014 14:51:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ivan Shmakov <ivan <at> siamics.net>:
New bug report received and forwarded. Copy sent to kwhite <at> gnu.org, bug-gnu-emacs <at> gnu.org. (Wed, 20 Aug 2014 14:51:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Ivan Shmakov <ivan <at> siamics.net>
To: submit <at> debbugs.gnu.org
Subject: erc-format-target-and/or-network: do not rename server buffers
 unconditionally 
Date: Wed, 20 Aug 2014 14:49:49 +0000
[Message part 1 (text/plain, inline)]
Package:  emacs
Severity: wishlist
X-Debbugs-Cc: Kelvin White <kwhite <at> gnu.org>

	Some two weeks ago, erc-format-target-and/or-network was patched
	to unconditionally rename server buffers according to the name
	of the associated IRC network (see below.)

	I find this new behavior mildly confusing, and would rather
	prefer an option to turn it off; or the change be reverted
	altogether.  An option may allow for a function value, to be
	used as in the following cond clause:

          ((and network-name
                (if (functionp erc-XXX-new-option)
                    (funcall erc-XXX-new-option)
                  erc-XXX-new-option)
                (not (get-buffer (or (funcall erc-XXX-new-option)
                                     network-name))))
           (rename-buffer (or (funcall erc-XXX-new-option)
                              network-name))
           network-name)

	Naturally, the result of (funcall erc-XXX-new-option) should be
	preserved rather than recomputed thrice.

	(FWIW, I’ve simply commented out this part of the code to get
	the old behavior.)

	TIA.

PS.  JFTR, these few new ERC patches have added a few trailing blanks to
	the code for no good reason.

-- 
FSF associate member #7257  http://boycottsystemd.org/  … 3013 B6A0 230E 334A
[Message part 2 (text/plain, inline)]
commit 342b156cbe06c099a982d1e2fd9a01b074dff222
Author:     Kelvin White <kwhite <at> gnu.org>
AuthorDate: Thu Aug 7 12:44:19 2014 -0400

    * lisp/erc/erc.el: rename server buffers and fix variable names

@@ -6233,7 +6233,10 @@ shortened server name instead."
     (cond ((erc-default-target)
            (concat (erc-string-no-properties (erc-default-target))
                    "@" network-name))
-          (network-name network-name)
+          ((and network-name 
+                (not (string-equal network-name (buffer-name))))
+           (rename-buffer network-name)
+           network-name)
           (t (buffer-name (current-buffer))))))
 
 (defun erc-format-away-status ()

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18300; Package emacs. (Wed, 20 Aug 2014 15:14:02 GMT) Full text and rfc822 format available.

Message #8 received at 18300 <at> debbugs.gnu.org (full text, mbox):

From: Kelvin White <kwhite <at> gnu.org>
To: 18300 <at> debbugs.gnu.org
Cc: Ivan Shmakov <ivan <at> siamics.net>
Subject: Re: bug#18300: erc-format-target-and/or-network: do not rename server
 buffers unconditionally
Date: Wed, 20 Aug 2014 11:13:20 -0400
> I find this new behavior mildly confusing, and would rather
> prefer an option to turn it off; or the change be reverted
> altogether. 

TBH I had the same thoughts in hindsight regarding it being optional,
or but I am not sure I understand how the server buffer name being
named to match the network name would be confusing, or unwanted
behavior. Thanks for the feedback, I will add the neccesary code.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18300; Package emacs. (Sun, 27 Dec 2015 20:45:02 GMT) Full text and rfc822 format available.

Message #11 received at 18300 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Kelvin White <kwhite <at> gnu.org>
Cc: 18300 <at> debbugs.gnu.org, Ivan Shmakov <ivan <at> siamics.net>
Subject: Re: bug#18300: erc-format-target-and/or-network: do not rename server
 buffers unconditionally
Date: Sun, 27 Dec 2015 21:43:56 +0100
Kelvin White <kwhite <at> gnu.org> writes:

>> I find this new behavior mildly confusing, and would rather
>> prefer an option to turn it off; or the change be reverted
>> altogether. 
>
> TBH I had the same thoughts in hindsight regarding it being optional,
> or but I am not sure I understand how the server buffer name being
> named to match the network name would be confusing, or unwanted
> behavior. Thanks for the feedback, I will add the neccesary code.

Was this code added?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18300; Package emacs. (Mon, 28 Dec 2015 04:26:01 GMT) Full text and rfc822 format available.

Message #14 received at 18300 <at> debbugs.gnu.org (full text, mbox):

From: Kelvin White <kwhite <at> gnu.org>
To: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
Cc: 18300 <at> debbugs.gnu.org, Ivan Shmakov <ivan <at> siamics.net>
Subject: Re: bug#18300: erc-format-target-and/or-network: do not rename server
 buffers unconditionally
Date: Sun, 27 Dec 2015 23:25:22 -0500
[Message part 1 (text/plain, inline)]
On Dec 27, 2015 3:44 PM, "Lars Ingebrigtsen" <larsi <at> gnus.org> wrote:
>
> Kelvin White <kwhite <at> gnu.org> writes:
>
> >> I find this new behavior mildly confusing, and would rather
> >> prefer an option to turn it off; or the change be reverted
> >> altogether.
> >
> > TBH I had the same thoughts in hindsight regarding it being optional,
> > or but I am not sure I understand how the server buffer name being
> > named to match the network name would be confusing, or unwanted
> > behavior. Thanks for the feedback, I will add the neccesary code.
>
> Was this code added

Yes.
[Message part 2 (text/html, inline)]

bug closed, send any further explanations to 18300 <at> debbugs.gnu.org and Ivan Shmakov <ivan <at> siamics.net> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Mon, 28 Dec 2015 16:47:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 26 Jan 2016 12:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 8 years and 101 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.