GNU bug report logs -
#50279
28.0.50; ffap-file-finder customization no longer works
Previous Next
Reported by: Bob Rogers <rogers <at> rgrjr.com>
Date: Mon, 30 Aug 2021 17:08:01 UTC
Severity: normal
Tags: moreinfo
Found in version 28.0.50
Fixed in version 29.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 50279 in the body.
You can then email your comments to 50279 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#50279
; Package
emacs
.
(Mon, 30 Aug 2021 17:08:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Bob Rogers <rogers <at> rgrjr.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Mon, 30 Aug 2021 17:08:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
I have a long-standing customization to ffap-file-finder which offers
external applications depending on file extension that is broken by the
following commit:
commit 253b36bd40d1b342cdda09b0bee183788120f67e
Author: dickmao <none>
Date: Tue Aug 3 12:02:48 2021 -0400
ffap ido accommodation
Now that ffap-file-finder can be ido-find-file, the
noninteractive portion of find-file-at-point cannot
assume ffap-file-finder always takes an argument
(ido-find-file does not).
* lisp/ffap.el (find-file-at-point): Do not call ffap-file-finder.
* test/lisp/ffap-tests.el (ffap-ido-mode): Test it.
The essence of the change is that it does find-file at the critical
point instead of funcalling ffap-file-finder. I assume that breaking
such extensions was not the intent, as it is an incompatible change to a
defcustom variable, and there is no associated NEWS entry.
-- Bob Rogers
http://www.rgrjr.com/
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#50279
; Package
emacs
.
(Tue, 31 Aug 2021 02:00:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 50279 <at> debbugs.gnu.org (full text, mbox):
Bob Rogers <rogers <at> rgrjr.com> writes:
> I have a long-standing customization to ffap-file-finder which offers
> external applications depending on file extension that is broken by the
> following commit:
>
> commit 253b36bd40d1b342cdda09b0bee183788120f67e
> Author: dickmao <none>
> Date: Tue Aug 3 12:02:48 2021 -0400
>
> ffap ido accommodation
Do you have a test case that demonstrates the breakage?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#50279
; Package
emacs
.
(Tue, 31 Aug 2021 03:45:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 50279 <at> debbugs.gnu.org (full text, mbox):
(Re-sending the mail to the bug tracker.)
Bob Rogers <rogers <at> rgrjr.com> writes:
> From: Lars Ingebrigtsen <larsi <at> gnus.org>
> Date: Tue, 31 Aug 2021 03:59:34 +0200
>
> Do you have a test case that demonstrates the breakage?
>
> I can reproduce this using my full customizations, but not in emacs -Q
> with an excerpt of my code. More precisely, the problem reproduces, but
> not the desired behavior after reverting the change. And indeed,
> looking closer at the code, I don't understand why reverting this
> particular change should make a difference. But it worked when I built
> emacs on 31-Jul (d3d6ea50d2) and didn't when I next built it on 11-Aug
> (3b5f8ab0d0), and I don't see any other change to ffap.el that might
> explain the difference.
>
> I'll be out of town tomorrow, so I'll have to give this another look
> on Wednesday.
>
> -- Bob
Added tag(s) moreinfo.
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Wed, 01 Sep 2021 08:43:01 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#50279
; Package
emacs
.
(Wed, 29 Sep 2021 16:04:02 GMT)
Full text and
rfc822 format available.
Message #16 received at 50279 <at> debbugs.gnu.org (full text, mbox):
Lars Ingebrigtsen <larsi <at> gnus.org> writes:
>> I can reproduce this using my full customizations, but not in emacs -Q
>> with an excerpt of my code. More precisely, the problem reproduces, but
>> not the desired behavior after reverting the change. And indeed,
>> looking closer at the code, I don't understand why reverting this
>> particular change should make a difference. But it worked when I built
>> emacs on 31-Jul (d3d6ea50d2) and didn't when I next built it on 11-Aug
>> (3b5f8ab0d0), and I don't see any other change to ffap.el that might
>> explain the difference.
>>
>> I'll be out of town tomorrow, so I'll have to give this another look
>> on Wednesday.
This was a month ago -- did you make any further progress in debugging
this?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#50279
; Package
emacs
.
(Wed, 29 Sep 2021 16:12:01 GMT)
Full text and
rfc822 format available.
Message #19 received at 50279 <at> debbugs.gnu.org (full text, mbox):
From: Lars Ingebrigtsen <larsi <at> gnus.org>
Date: Wed, 29 Sep 2021 18:02:52 +0200
Lars Ingebrigtsen <larsi <at> gnus.org> writes:
>> I can reproduce this using my full customizations, but not in emacs -Q
>> with an excerpt of my code. More precisely, the problem reproduces, but
>> not the desired behavior after reverting the change. And indeed,
>> looking closer at the code, I don't understand why reverting this
>> particular change should make a difference. But it worked when I built
>> emacs on 31-Jul (d3d6ea50d2) and didn't when I next built it on 11-Aug
>> (3b5f8ab0d0), and I don't see any other change to ffap.el that might
>> explain the difference.
>>
>> I'll be out of town tomorrow, so I'll have to give this another look
>> on Wednesday.
This was a month ago -- did you make any further progress in debugging
this?
It definitely has to do with my initializations, but I've been swamped
for the last three weeks and unable to get any further. I should be
able to get back to it this week.
-- Bob
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#50279
; Package
emacs
.
(Thu, 30 Sep 2021 06:10:02 GMT)
Full text and
rfc822 format available.
Message #22 received at 50279 <at> debbugs.gnu.org (full text, mbox):
Bob Rogers <rogers <at> rgrjr.com> writes:
> It definitely has to do with my initializations, but I've been swamped
> for the last three weeks and unable to get any further. I should be
> able to get back to it this week.
Great; there's no hurry.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Removed tag(s) moreinfo.
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Sun, 31 Oct 2021 16:18:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#50279
; Package
emacs
.
(Mon, 22 Aug 2022 18:53:01 GMT)
Full text and
rfc822 format available.
Message #27 received at 50279 <at> debbugs.gnu.org (full text, mbox):
Lars Ingebrigtsen <larsi <at> gnus.org> writes:
>> It definitely has to do with my initializations, but I've been swamped
>> for the last three weeks and unable to get any further. I should be
>> able to get back to it this week.
>
> Great; there's no hurry.
This was almost a year ago. Any progress?
Added tag(s) moreinfo.
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Mon, 22 Aug 2022 18:53:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#50279
; Package
emacs
.
(Mon, 22 Aug 2022 19:10:01 GMT)
Full text and
rfc822 format available.
Message #32 received at 50279 <at> debbugs.gnu.org (full text, mbox):
From: Lars Ingebrigtsen <larsi <at> gnus.org>
Date: Mon, 22 Aug 2022 20:52:30 +0200
Lars Ingebrigtsen <larsi <at> gnus.org> writes:
>> It definitely has to do with my initializations, but I've been swamped
>> for the last three weeks and unable to get any further. I should be
>> able to get back to it this week.
>
> Great; there's no hurry.
This was almost a year ago. Any progress?
I spent a while trying bifurcation last winter with no result. I really
do want to resolve this issue, but I just moved my family across the
continent, and have barely had time to think for months now. Our
furniture delivery has been delayed, so I've started to clean up some
software loose ends (and catch up on emacs-devel); with any luck I may
have time to look at this again.
For once I have something to blame other than my world-class
procrastination skills . . .
-- Bob
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#50279
; Package
emacs
.
(Tue, 23 Aug 2022 10:02:02 GMT)
Full text and
rfc822 format available.
Message #35 received at 50279 <at> debbugs.gnu.org (full text, mbox):
Bob Rogers <rogers <at> rgrjr.com> writes:
> Our furniture delivery has been delayed, so I've started to clean up
> some software loose ends (and catch up on emacs-devel); with any luck
> I may have time to look at this again.
Great!
> For once I have something to blame other than my world-class
> procrastination skills . . .
😀
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#50279
; Package
emacs
.
(Tue, 06 Sep 2022 03:11:01 GMT)
Full text and
rfc822 format available.
Message #38 received at 50279 <at> debbugs.gnu.org (full text, mbox):
From: Lars Ingebrigtsen <larsi <at> gnus.org>
Date: Tue, 23 Aug 2022 12:00:51 +0200
Bob Rogers <rogers <at> rgrjr.com> writes:
> Our furniture delivery has been delayed, so I've started to clean up
> some software loose ends (and catch up on emacs-devel); with any luck
> I may have time to look at this again.
Great!
Having finally gotten around to investigating this properly, I find that
the solution should have been obvious: dickmao removed the feature in
the following commit:
commit 253b36bd40d1b342cdda09b0bee183788120f67e
Author: dickmao <none>
Date: Tue Aug 3 12:02:48 2021 -0400
ffap ido accommodation
Now that ffap-file-finder can be ido-find-file, the
noninteractive portion of find-file-at-point cannot
assume ffap-file-finder always takes an argument
(ido-find-file does not).
* lisp/ffap.el (find-file-at-point): Do not call ffap-file-finder.
* test/lisp/ffap-tests.el (ffap-ido-mode): Test it.
I no longer understand why we thought it could not be reproduced in
"emacs -Q", as I can do so with the following code:
(defun rgr-ffap-file-finder (file-name &optional wildcards)
(interactive "FFind file: \np")
(message "[got %S]" file-name)
(find-file file-name wildcards))
(setq ffap-file-finder 'rgr-ffap-file-finder)
and this recipe:
1. "emacs -Q"
2. Load the code above.
3. Locate a suitable file in dired (I used a JPEG).
4. Position point on the file name, and do "M-x ffap".
The JPEG will appear in emacs but the "[got ...]" message will not
appear. Additionally, find-file-at-point can be instrumented with the
patch below. That will identify the exact find-file call being used,
and is how I traced it to this commit.
But of course resolving my issue without breaking dickmao's issue is
beyond my pay grade. ;-} Though I do notice that ffap.el already has
(memq ffap-file-finder '(find-file find-alternate-file))
as a way of testing for arg-handling capability. But maybe that's
enough of a code smell.
-- Bob
------------------------------------------------------------------------
diff --git a/lisp/ffap.el b/lisp/ffap.el
index 88b4bce9fd..a4dec5e792 100644
--- a/lisp/ffap.el
+++ b/lisp/ffap.el
@@ -1623,6 +1623,7 @@ find-file-at-point
((or (not ffap-newfile-prompt)
(file-exists-p filename)
(y-or-n-p "File does not exist, create buffer? "))
+ (message "ffap calling find-file on %S directly" filename)
(find-file
;; expand-file-name fixes "~/~/.emacs" bug
(expand-file-name filename)))
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#50279
; Package
emacs
.
(Tue, 06 Sep 2022 10:26:01 GMT)
Full text and
rfc822 format available.
Message #41 received at 50279 <at> debbugs.gnu.org (full text, mbox):
Bob Rogers <rogers <at> rgrjr.com> writes:
> But of course resolving my issue without breaking dickmao's issue is
> beyond my pay grade. ;-} Though I do notice that ffap.el already has
>
> (memq ffap-file-finder '(find-file find-alternate-file))
>
> as a way of testing for arg-handling capability. But maybe that's
> enough of a code smell.
Yeah, the ffap code is kinda gross.
I think I've now fixed this in Emacs 29 by restoring the old code in
ffap and adjusting the hooks in ido instead. Can you check whether this
fixed the problem for you?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#50279
; Package
emacs
.
(Tue, 06 Sep 2022 17:10:01 GMT)
Full text and
rfc822 format available.
Message #44 received at 50279 <at> debbugs.gnu.org (full text, mbox):
From: Lars Ingebrigtsen <larsi <at> gnus.org>
Date: Tue, 06 Sep 2022 12:25:31 +0200
Bob Rogers <rogers <at> rgrjr.com> writes:
> But of course resolving my issue without breaking dickmao's issue is
> beyond my pay grade. ;-} Though I do notice that ffap.el already has
>
> (memq ffap-file-finder '(find-file find-alternate-file))
>
> as a way of testing for arg-handling capability. But maybe that's
> enough of a code smell.
Yeah, the ffap code is kinda gross.
No argument from this quarter.
I think I've now fixed this in Emacs 29 by restoring the old code in
ffap and adjusting the hooks in ido instead. Can you check whether this
fixed the problem for you?
Works like a charm. Another thorn in my side removed; thanks!
-- Bob
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#50279
; Package
emacs
.
(Tue, 06 Sep 2022 20:15:02 GMT)
Full text and
rfc822 format available.
Message #47 received at 50279 <at> debbugs.gnu.org (full text, mbox):
Bob Rogers <rogers <at> rgrjr.com> writes:
> Works like a charm. Another thorn in my side removed; thanks!
Thanks for checking; I'm closing this bug report, then.
bug marked as fixed in version 29.1, send any further explanations to
50279 <at> debbugs.gnu.org and Bob Rogers <rogers <at> rgrjr.com>
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Tue, 06 Sep 2022 20:15:03 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Wed, 05 Oct 2022 11:24:08 GMT)
Full text and
rfc822 format available.
This bug report was last modified 2 years and 260 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.