From: Ivan Shmakov <ivan@siamics.net>
To: 18300@debbugs.gnu.org
Cc: kelvin white <kwhite@gnu.org>
Subject: bug#18300: erc-format-target-and/or-network: do not rename server buffers unconditionally
Date: Wed, 20 Aug 2014 14:49:49 +0000 [thread overview]
Message-ID: <87a96zz04y.fsf@violet.siamics.net> (raw)
[-- 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 ()
next reply other threads:[~2014-08-20 14:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-20 14:49 Ivan Shmakov [this message]
2014-08-20 15:13 ` bug#18300: erc-format-target-and/or-network: do not rename server buffers unconditionally Kelvin White
2015-12-27 20:43 ` Lars Ingebrigtsen
2015-12-28 4:25 ` Kelvin White
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87a96zz04y.fsf@violet.siamics.net \
--to=ivan@siamics.net \
--cc=18300@debbugs.gnu.org \
--cc=kwhite@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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.