From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ivan Shmakov Newsgroups: gmane.emacs.bugs Subject: bug#18300: erc-format-target-and/or-network: do not rename server buffers unconditionally Date: Wed, 20 Aug 2014 14:49:49 +0000 Message-ID: <87a96zz04y.fsf@violet.siamics.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1408546290 17443 80.91.229.3 (20 Aug 2014 14:51:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 20 Aug 2014 14:51:30 +0000 (UTC) Cc: kelvin white To: 18300@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Aug 20 16:51:23 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XK7EO-0003nf-1B for geb-bug-gnu-emacs@m.gmane.org; Wed, 20 Aug 2014 16:51:20 +0200 Original-Received: from localhost ([::1]:56114 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XK7EN-0001Mm-LB for geb-bug-gnu-emacs@m.gmane.org; Wed, 20 Aug 2014 10:51:19 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48680) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XK7EG-0001GC-Bp for bug-gnu-emacs@gnu.org; Wed, 20 Aug 2014 10:51:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XK7EC-0003XT-4q for bug-gnu-emacs@gnu.org; Wed, 20 Aug 2014 10:51:12 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:41339) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XK7E6-0003Ww-Go; Wed, 20 Aug 2014 10:51:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XK7E6-00079e-4O; Wed, 20 Aug 2014 10:51:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ivan Shmakov Original-Sender: "Debbugs-submit" Resent-CC: kwhite@gnu.org, bug-gnu-emacs@gnu.org Resent-Date: Wed, 20 Aug 2014 14:51:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 18300 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: submit@debbugs.gnu.org X-Debbugs-Original-Xcc: kelvin white Original-Received: via spool by submit@debbugs.gnu.org id=B.140854620327430 (code B ref -1); Wed, 20 Aug 2014 14:51:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 20 Aug 2014 14:50:03 +0000 Original-Received: from localhost ([127.0.0.1]:48282 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XK7D8-00078E-Je for submit@debbugs.gnu.org; Wed, 20 Aug 2014 10:50:03 -0400 Original-Received: from fely.am-1.org ([78.47.74.50]:51310) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XK7D5-00077l-0U for submit@debbugs.gnu.org; Wed, 20 Aug 2014 10:50:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=siamics.net; s=a2013295; h=Content-Type:MIME-Version:Message-ID:Date:Sender:Subject:To:From; bh=JR2ujAjgz6whNl6dI7oZC9APi0Wq6L5vVrTa90AULQE=; b=lOPdQwSl2lPBji232FZDq+AWQ+QapoQ+8+YkBSsFuGPPPCt3BrnTbJEdebBIHYf6otyKbe6XFR7Pl3lgJuNDzOxPhXMjOEEVf9P9hNb4MKMDaFt36U1yOtKs3x07Qn3rzDgHGLVK0ALKfBrgKZyflIEljrA0JjC/bsMNOho6J3c=; Original-Received: from [2a02:2560:6d4:26ca::1:1d] (helo=violet.siamics.net) by fely.am-1.org with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1XK7D3-0008Dh-1D for submit@debbugs.gnu.org; Wed, 20 Aug 2014 14:49:57 +0000 Original-Received: from localhost ([::1] helo=violet.siamics.net) by violet.siamics.net with esmtps (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1XK7Cv-00010m-SN for submit@debbugs.gnu.org; Wed, 20 Aug 2014 21:49:49 +0700 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:92538 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Package: emacs Severity: wishlist X-Debbugs-Cc: Kelvin White 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=E2=80=99ve 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. --=20 FSF associate member #7257 http://boycottsystemd.org/ =E2=80=A6 3013 B6A0= 230E 334A --=-=-= Content-Type: text/plain Content-Disposition: inline commit 342b156cbe06c099a982d1e2fd9a01b074dff222 Author: Kelvin White 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 () --=-=-=--