unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#18300: erc-format-target-and/or-network: do not rename server buffers unconditionally
@ 2014-08-20 14:49 Ivan Shmakov
  2014-08-20 15:13 ` Kelvin White
  0 siblings, 1 reply; 4+ messages in thread
From: Ivan Shmakov @ 2014-08-20 14:49 UTC (permalink / raw)
  To: 18300; +Cc: kelvin white

[-- Attachment #1: Type: text/plain, Size: 1320 bytes --]

Package:  emacs
Severity: wishlist
X-Debbugs-Cc: Kelvin White <kwhite@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

[-- Attachment #2: Type: text/plain, Size: 685 bytes --]

commit 342b156cbe06c099a982d1e2fd9a01b074dff222
Author:     Kelvin White <kwhite@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 ()

^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#18300: erc-format-target-and/or-network: do not rename server buffers unconditionally
  2014-08-20 14:49 bug#18300: erc-format-target-and/or-network: do not rename server buffers unconditionally Ivan Shmakov
@ 2014-08-20 15:13 ` Kelvin White
  2015-12-27 20:43   ` Lars Ingebrigtsen
  0 siblings, 1 reply; 4+ messages in thread
From: Kelvin White @ 2014-08-20 15:13 UTC (permalink / raw)
  To: 18300; +Cc: Ivan Shmakov


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






^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#18300: erc-format-target-and/or-network: do not rename server buffers unconditionally
  2014-08-20 15:13 ` Kelvin White
@ 2015-12-27 20:43   ` Lars Ingebrigtsen
  2015-12-28  4:25     ` Kelvin White
  0 siblings, 1 reply; 4+ messages in thread
From: Lars Ingebrigtsen @ 2015-12-27 20:43 UTC (permalink / raw)
  To: Kelvin White; +Cc: 18300, Ivan Shmakov

Kelvin White <kwhite@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





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#18300: erc-format-target-and/or-network: do not rename server buffers unconditionally
  2015-12-27 20:43   ` Lars Ingebrigtsen
@ 2015-12-28  4:25     ` Kelvin White
  0 siblings, 0 replies; 4+ messages in thread
From: Kelvin White @ 2015-12-28  4:25 UTC (permalink / raw)
  To: Lars Magne Ingebrigtsen; +Cc: 18300, Ivan Shmakov

[-- Attachment #1: Type: text/plain, Size: 576 bytes --]

On Dec 27, 2015 3:44 PM, "Lars Ingebrigtsen" <larsi@gnus.org> wrote:
>
> Kelvin White <kwhite@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.

[-- Attachment #2: Type: text/html, Size: 828 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-12-28  4:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-20 14:49 bug#18300: erc-format-target-and/or-network: do not rename server buffers unconditionally Ivan Shmakov
2014-08-20 15:13 ` Kelvin White
2015-12-27 20:43   ` Lars Ingebrigtsen
2015-12-28  4:25     ` Kelvin White

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