[PATCH] Fix emms-tag-editor-rename-track to support slash in newname
teeoius <[email protected]> Wed, 16 Jul 2025 15:54:40 +0000
| Newsgroups | gmane.emacs.emms.user |
|---|---|
| Message-ID | <JacpKjp6rR_zX6a-92kmkUQ5JjYJw8dUPihkh85ozVjnMJseurgqTzGB9XGS4YK-DPB5gXcSH6s6TmmKjzmsWmrDOxRkNSMwZuryVsm8d-c=@proton.me> |
When an audio file's artist or album info contains '/', emms-tag-editor-rename-track will have wrong behaviors. I wrote this patch to fix it.
Let's suppose an audio "test.mp3" which artist is "Alice/Bob", when I call emms-tag-editor-rename-track to rename it to {artist - track}, emms will regard "Alice/Bob - test.mp3" as a directory called "Alice" and its file "Bob - test.mp3", instead of rename the file correctly. If we replace '/' with '_', then the rename function will work.
0001-Fix-emms-tag-editor-rename-track-to-support-slash-in.patch
(text/x-patch, 1.2 KB)
From 9579578828a28bf1238da10f4c8f9c06085fc740 Mon Sep 17 00:00:00 2001 From: teeoius <[email protected]> Date: Wed, 16 Jul 2025 15:34:46 +0000 Subject: [PATCH] Fix emms-tag-editor-rename-track to support slash in newname --- emms-tag-editor.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/emms-tag-editor.el b/emms-tag-editor.el index 401bca7..e5050a1 100644 --- a/emms-tag-editor.el +++ b/emms-tag-editor.el @@ -795,8 +795,8 @@ Then it's the callers job to apply them afterwards with (mapcar (lambda (tag) (list (string-to-char (cdr tag)) - (or (emms-track-get track (car tag)) - ""))) + (string-replace "/" "_" (or (emms-track-get track (car tag)) + "")))) emms-tag-editor-tags)))) "." suffix))) (emms-track-set track 'newname new-file) -- 2.50.1