From: "Colin Woodbury" <colin@fosskers.ca>
To: 50149@debbugs.gnu.org
Subject: bug#50149: [PATCH] Don't echo empty string
Date: Sat, 21 Aug 2021 08:28:45 -0700 [thread overview]
Message-ID: <68cb32ec-c8d5-4c28-8177-8d651128618d@www.fastmail.com> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 51 bytes --]
This fixes an oversight from my last patch. Thanks!
[-- Attachment #1.2: Type: text/html, Size: 198 bytes --]
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Don-t-echo-empty-string.patch --]
[-- Type: text/x-patch; name="0001-Don-t-echo-empty-string.patch", Size: 903 bytes --]
From 8fd60db517739df38d47dd656219b910c2251418 Mon Sep 17 00:00:00 2001
From: Colin Woodbury <colin@fosskers.ca>
Date: Sat, 21 Aug 2021 08:23:18 -0700
Subject: [PATCH] Don't echo empty string
* lisp/files.el (file-name-with-extension): Avoid echoing a filename
string known to be empty.
---
lisp/files.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lisp/files.el b/lisp/files.el
index f0baa4fac6..ba362827ee 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -5033,7 +5033,7 @@ FILENAME has the format of a directory.
See also `file-name-sans-extension'."
(let ((extn (string-trim-left extension "[.]")))
(cond ((string-empty-p filename)
- (error "Empty filename: %s" filename))
+ (error "Empty filename"))
((string-empty-p extn)
(error "Malformed extension: %s" extension))
((directory-name-p filename)
--
2.33.0
next reply other threads:[~2021-08-21 15:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-21 15:28 Colin Woodbury [this message]
2021-08-22 14:27 ` bug#50149: [PATCH] Don't echo empty string Lars Ingebrigtsen
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=68cb32ec-c8d5-4c28-8177-8d651128618d@www.fastmail.com \
--to=colin@fosskers.ca \
--cc=50149@debbugs.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.