GNU bug report logs -
#43192
lisp/files.el; 6d10b607d0 introduced bug that breaks C-x C-c
Previous Next
Reported by: Tom Gillespie <tgbugs <at> gmail.com>
Date: Fri, 4 Sep 2020 02:50:02 UTC
Severity: normal
Tags: fixed
Fixed in version 28.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 43192 <at> debbugs.gnu.org (full text, mbox):
Tom Gillespie <tgbugs <at> gmail.com> writes:
> #+begin_src diff
> + (string-match
> + (concat "\\<"
> + (regexp-quote
> + (file-name-nondirectory
> + buffer-file-name))
> + "<[0-9]+>\\'")
> + (buffer-name buffer)))
> #+end_src
>
> This is the second statement in a call to `or'. buffer-file-name is
> not guaranteed to be non-nil because buffers like *scratch* and
> *Messages* exist. In many workflows for emacsclient opening to scratch
> and closing again from scratch are common.
I think it's just a typo -- the code should be:
diff --git a/lisp/files.el b/lisp/files.el
index 3403e257a1..5f5902d0cb 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -5574,7 +5574,7 @@ save-some-buffers
(concat "\\<"
(regexp-quote
(file-name-nondirectory
- buffer-file-name))
+ (buffer-file-name buffer)))
"<[^>]*>\\'")
(buffer-name buffer)))
;; The buffer name is similar to the
I've now applied this to Emacs 28, and that fixes the test case in this
bug report.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
This bug report was last modified 4 years and 264 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.