From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: john muhl Newsgroups: gmane.emacs.bugs Subject: bug#73868: [PATCH] Fix naming of buffers for tags ending in Y in 'mpc' Date: Fri, 18 Oct 2024 14:05:24 -0500 Message-ID: <87a5f1p6yz.fsf@pub.pink> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11632"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Stefan Monnier To: 73868@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Oct 18 21:06:09 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1t1sIZ-0002o9-EP for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 18 Oct 2024 21:06:08 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t1sIA-0007Q3-Lr; Fri, 18 Oct 2024 15:05:42 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t1sI9-0007PN-1P for bug-gnu-emacs@gnu.org; Fri, 18 Oct 2024 15:05:41 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t1sI8-0007G4-Ok for bug-gnu-emacs@gnu.org; Fri, 18 Oct 2024 15:05:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:From:To:Subject; bh=FyWJOBwlWkrDGntG87VhIm5CMrSifYn1fitlaZiixeQ=; b=DOdMugJr7TqNsLAunJ8o2WmxWttTVjqlnvMTHi/6GLj+yf1yNIkIPS269CQRfXWY5emq9CBJk1Kur1gEaC5RsQUOK8YMSedIgKLxJgXDWyPnYq4XMAsnLyVV1Rzt8j4KFuU3nfd0P2HdS7D5JFokd06OAs5dj2bv5goATsriVBhSCUXP3qP9pXtmMoUjJlG5lJiFjFtc2PDawHnOOYP3aMKfN6vyT41m+jka1kH2CAE3e1R5FQsDZfXy5mSWbnxnayz6cpzi2Q/SvlBaJko+9u/EpKUTeqpj1jA/YKrw9Y81CVx8e+a2wpe+jWxPXuZ9LEp8OXo9yJEta+NruXFdhg==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t1sIU-0007J0-Qt; Fri, 18 Oct 2024 15:06:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: john muhl Original-Sender: "Debbugs-submit" Resent-CC: monnier@iro.umontreal.ca, bug-gnu-emacs@gnu.org Resent-Date: Fri, 18 Oct 2024 19:06:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 73868 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org X-Debbugs-Original-Xcc: Stefan Monnier Original-Received: via spool by submit@debbugs.gnu.org id=B.172927835928069 (code B ref -1); Fri, 18 Oct 2024 19:06:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 18 Oct 2024 19:05:59 +0000 Original-Received: from localhost ([127.0.0.1]:40102 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t1sIQ-0007If-Mg for submit@debbugs.gnu.org; Fri, 18 Oct 2024 15:05:59 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:54666) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t1sIM-0007IO-K3 for submit@debbugs.gnu.org; Fri, 18 Oct 2024 15:05:55 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t1sHz-0007Or-0M for bug-gnu-emacs@gnu.org; Fri, 18 Oct 2024 15:05:31 -0400 Original-Received: from fout-a3-smtp.messagingengine.com ([103.168.172.146]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t1sHx-0007CP-6B for bug-gnu-emacs@gnu.org; Fri, 18 Oct 2024 15:05:30 -0400 Original-Received: from phl-compute-07.internal (phl-compute-07.phl.internal [10.202.2.47]) by mailfout.phl.internal (Postfix) with ESMTP id B486813802C9 for ; Fri, 18 Oct 2024 15:05:25 -0400 (EDT) Original-Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-07.internal (MEProxy); Fri, 18 Oct 2024 15:05:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pub.pink; h=cc :content-type:content-type:date:date:from:from:in-reply-to :message-id:mime-version:reply-to:subject:subject:to:to; s=fm2; t=1729278325; x=1729364725; bh=FyWJOBwlWkrDGntG87VhIm5CMrSifYn1 fitlaZiixeQ=; b=FM4OHeDQ4fPEPW8mQgWnaDZWU8F5O74qv5Iab+sgidudH9tE qnBNga793sbkFhwlnsgKgv9VsIBw8gA23FXdz4DOaTgVFTTdKL13AlwRh+4+c3OK WzxrOJCqVWMWU8ogIwP/t/c+y3Ex66mUWevMXR9CcIPRmcubztU5Kp5q0ihdDT1A LesM7l86gy/PaOw8ffisii2Unj7fP6Nl8YOdTSCPkNCF0Q+pWwe1RjdrfcefAYa5 EMDyd7PUzoiGqKy+9yvDmu44i8OKnKzF1OHy58n2PsZ/dwyj6tsOfZGmzZd9ZfRl O/A7tfKF4O9JlP2cRiTR4/iK00FZRH6CIousCw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:message-id :mime-version:reply-to:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1729278325; x=1729364725; bh=FyWJOBwlWkrDGntG87VhIm5CMrSifYn1fit laZiixeQ=; b=S9bKscT/xSXHoq6ehOo9ndmZj5xQPZkUOvk0BRhCc8iV7pDGjf8 498XYFUmd+Axt8JvpT+V2/OqICufXl5LZqHIIH8T976WeywGRPJZ9rLqEKGo20E4 PDAIUTm+vzVBJE2KmFS4Yff2l+wGbbwQ8S2f3NdJxn4DLD2UWPdpNMnoa0SsHOHD 0yjalExHxwsbfELDnsWSnGbG6ev41Yju6yPUYUNJSed7zIe/F+qfzMaaq7Csw6sO QX/mIo36hlUjHGG8CXVwLM4UPG3LNUMdj0eMUchtoOeKp4VMo+lL+LqIZTxuJG8X DNwoXaOTf4ddbiiomBeoiO6QafTwmi6esmQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrvdehfedgudefudcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecunecujfgurhephffvuf ffkfggtgesmhdtreertddttdenucfhrhhomhepjhhohhhnuchmuhhhlhcuoehjmhesphhu sgdrphhinhhkqeenucggtffrrghtthgvrhhnpeefhfdvfedutdelvddvvdejhfefvdefle eggfeiueeiiedtvddvgfeiuedugeeljeenucevlhhushhtvghrufhiiigvpedtnecurfgr rhgrmhepmhgrihhlfhhrohhmpehjmhesphhusgdrphhinhhkpdhnsggprhgtphhtthhope dupdhmohguvgepshhmthhpohhuthdprhgtphhtthhopegsuhhgqdhgnhhuqdgvmhgrtghs sehgnhhurdhorhhg X-ME-Proxy: Feedback-ID: i74194916:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Fri, 18 Oct 2024 15:05:25 -0400 (EDT) Received-SPF: pass client-ip=103.168.172.146; envelope-from=jm@pub.pink; helo=fout-a3-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:293813 Archived-At: --=-=-= Content-Type: text/plain Tags: patch While trying to track down bug#41493 I noticed that the buffer for the Directory tag was named *MPC Directorys*. This changes buffer creation to use mpc-tagbrowser-tag-name instead of just adding an S to the end. --=-=-= Content-Type: text/patch Content-Disposition: attachment; filename=0001-Fix-naming-of-buffers-for-tags-ending-in-Y-in-mpc.patch >From e5a1ed0cf2bb8f4826918436bab9babab9d79d41 Mon Sep 17 00:00:00 2001 From: john muhl Date: Tue, 8 Oct 2024 12:24:27 -0500 Subject: [PATCH] Fix naming of buffers for tags ending in Y in 'mpc' * lisp/mpc.el (mpc-tagbrowser-buf): Use 'mpc-tagbrowser-tag-name' to ensure buffers corresponding to tags that end in Y are correctly pluralized; e.g. the tag "Directory" should create a buffer named "*MPC Directories*" not "*MPC Directorys". --- lisp/mpc.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lisp/mpc.el b/lisp/mpc.el index 9c0bbaaa0f2..ae6a40f9983 100644 --- a/lisp/mpc.el +++ b/lisp/mpc.el @@ -1572,9 +1572,10 @@ mpc-tagbrowser-tag-name (t (concat (symbol-name tag) "s")))) (defun mpc-tagbrowser-buf (tag) - (let ((buf (mpc-proc-buffer (mpc-proc) tag))) + (let ((buf (mpc-proc-buffer (mpc-proc) tag)) + (tag-name (mpc-tagbrowser-tag-name tag))) (if (buffer-live-p buf) buf - (setq buf (get-buffer-create (format "*MPC %ss*" tag))) + (setq buf (get-buffer-create (format "*MPC %s*" tag-name))) (mpc-proc-buffer (mpc-proc) tag buf) (with-current-buffer buf (let ((inhibit-read-only t)) @@ -1585,7 +1586,7 @@ mpc-tagbrowser-buf (insert mpc-tagbrowser-all-name "\n")) (forward-line -1) (setq mpc-tag tag) - (setq mpc-tag-name (mpc-tagbrowser-tag-name tag)) + (setq mpc-tag-name tag-name) (mpc-tagbrowser-all-select) (mpc-tagbrowser-refresh) buf)))) -- 2.46.2 --=-=-=--