GNU bug report logs - #57325
27.1; functions in ff-other-file-alist

Previous Next

Package: emacs;

Reported by: Felician Nemeth <felician.nemeth <at> gmail.com>

Date: Sun, 21 Aug 2022 18:35:01 UTC

Severity: normal

Found in version 27.1

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #23 received at 57325 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Felician Nemeth <felician.nemeth <at> gmail.com>
Cc: 57325 <at> debbugs.gnu.org
Subject: Re: bug#57325: 27.1; functions in ff-other-file-alist
Date: Mon, 29 Aug 2022 17:04:44 +0300
> From: Felician Nemeth <felician.nemeth <at> gmail.com>
> Cc: 57325 <at> debbugs.gnu.org
> Date: Mon, 29 Aug 2022 13:57:44 +0200
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> > AFAICT, what you saw is the consequence of one basic problem:
> > ff-find-the-other-file is unprepared to deal with a function that
> > returns nil (instead of a list of file-name extensions to try).  So it
> > tries to use that nil value as if it was a list of extensions, and the
> > result is basically random.
> >
> > It should be easy to make ff-find-the-other-file detect the nil value
> > and handle it as if it found no match for the current buffer's file.
> > Do you think this would be better?  Or we could simply document that a
> > function in ff-other-file-alist must return a list of extensions.
> >
> > WDYT?
> 
> I think extending the documentation to explain what is expected from the
> function is enough.  It would have helped me.

I did that now.

> Also, when the function returns an absolute file name, then the
> returned file should be already opened, otherwise ff-find-other-file
> cannot find it.

Hmm... not sure how this is relevant.  The function should return a
list of extensions, not a file name.  What am I missing?




This bug report was last modified 2 years and 326 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.