unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#57325: 27.1; functions in ff-other-file-alist
@ 2022-08-21 18:34 Felician Nemeth
  2022-08-21 18:55 ` Eli Zaretskii
  0 siblings, 1 reply; 13+ messages in thread
From: Felician Nemeth @ 2022-08-21 18:34 UTC (permalink / raw)
  To: 57325

[-- Attachment #1: Type: text/plain, Size: 1237 bytes --]

[There is a simple reproducer at end of the bug report.]

First, the documentation of ff-other-file-alist fails to mention that
the value of the variable does not have to be alist, it can be a symbol
as well.

More importantly, if the associated value is a function, then there's no
way for the function to signal that it cannot find a related file.

If the function returns "/nonexistent", then ff-find-the-other-file
(with the default settings) will try to create "/nonexistent".

If the function returns nil, then ff-find-the-other-file will call
ff-get-file-name and:

  (ff-get-file-name '("." "/usr/include" "/usr/local/include/*") nil nil)
  ==> "/home/nemethf/.emacs.d/News/drafts/drafts/679"

"emacs -Q -l bug.el" reproduces the problem by setting
uniquify-buffer-name-style.  However, my uniquify-buffer-name-style is
'forward and not nil.  Maybe Gnus changes uniquify-buffer-name-style
under the hood, because drafts/679 corresponds to a buffer named
"*sent wide reply to Somebody*<2>".

I tend to think this bug in line 577 of find-file.el:
http://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/find-file.el?id=958924a8126cf532d44c4b446d13ed744438cc9b#n577
But I don't understand the purpose of that string-match-p.

Thanks.


[-- Attachment #2: bug.el --]
[-- Type: application/emacs-lisp, Size: 448 bytes --]

[-- Attachment #3: Type: text/plain, Size: 280 bytes --]



In GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.24, cairo version 1.16.0)
 of 2021-03-28, modified by Debian built on x86-conova-01
Windowing system distributor 'The X.Org Foundation', version 11.0.12011000
System Description: Debian GNU/Linux 11 (bullseye)


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2022-08-30 16:10 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-21 18:34 bug#57325: 27.1; functions in ff-other-file-alist Felician Nemeth
2022-08-21 18:55 ` Eli Zaretskii
2022-08-21 19:37   ` Felician Nemeth
2022-08-22 11:44     ` Eli Zaretskii
2022-08-25  8:14       ` Eli Zaretskii
2022-08-29 11:57         ` Felician Nemeth
2022-08-29 14:04           ` Eli Zaretskii
2022-08-29 14:27             ` Felician Nemeth
2022-08-29 16:49               ` Eli Zaretskii
2022-08-30  8:46                 ` Felician Nemeth
2022-08-30 12:43                   ` Eli Zaretskii
2022-08-30 13:48                     ` Felician Nemeth
2022-08-30 16:10                       ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).