* bug#73868: [PATCH] Fix naming of buffers for tags ending in Y in 'mpc'
@ 2024-10-18 19:05 john muhl
2024-10-18 21:12 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 1 reply; 3+ messages in thread
From: john muhl @ 2024-10-18 19:05 UTC (permalink / raw)
To: 73868; +Cc: Stefan Monnier
[-- Attachment #1: Type: text/plain, Size: 228 bytes --]
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.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Fix-naming-of-buffers-for-tags-ending-in-Y-in-mpc.patch --]
[-- Type: text/patch, Size: 1534 bytes --]
From e5a1ed0cf2bb8f4826918436bab9babab9d79d41 Mon Sep 17 00:00:00 2001
From: john muhl <jm@pub.pink>
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* bug#73868: [PATCH] Fix naming of buffers for tags ending in Y in 'mpc'
2024-10-18 19:05 bug#73868: [PATCH] Fix naming of buffers for tags ending in Y in 'mpc' john muhl
@ 2024-10-18 21:12 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-19 16:24 ` john muhl
0 siblings, 1 reply; 3+ messages in thread
From: Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-10-18 21:12 UTC (permalink / raw)
To: john muhl; +Cc: 73868
> 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.
Thanks! Pushed to `master`!
Stefan
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#73868: [PATCH] Fix naming of buffers for tags ending in Y in 'mpc'
2024-10-18 21:12 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-10-19 16:24 ` john muhl
0 siblings, 0 replies; 3+ messages in thread
From: john muhl @ 2024-10-19 16:24 UTC (permalink / raw)
To: 73868-done; +Cc: Stefan Monnier
Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org> writes:
>> 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.
>
> Thanks! Pushed to `master`!
>
>
> Stefan
Thanks. Closing this one now.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-10-19 16:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-18 19:05 bug#73868: [PATCH] Fix naming of buffers for tags ending in Y in 'mpc' john muhl
2024-10-18 21:12 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-19 16:24 ` john muhl
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.