Subject: Re: bug#61613: 30.0.50; ffap-other-window ignores ffap-require-prefix

From: Ergus <[email-masked]>
Date: Sun, 19 Feb 2023 11:09:04 +0100

On February 19, 2023 10:21:02 AM GMT+01:00, Eli Zaretskii <[email-masked]> wrote:
>> Date: Sun, 19 Feb 2023 03:45:30 +0100
>> From:  Ergus via "Bug reports for GNU Emacs,
>>  the Swiss army knife of text editors" <[email-masked]>
>> 
>> I just found that ffap-other-window ignores when ffap-require-prefix is
>> non-nil.
>> 
>> Looking at the code it seems to be that find-file-at-point has:
>> 
>> (and (called-interactively-p 'interactive)
>>      (if ffap-require-prefix (not current-prefix-arg)
>> 	 current-prefix-arg))
>> 
>> but ffap-other-window calls find-file-at-point no interactively. Same
>> for ffap-other-frame, ffap-other-tab and so on...
>
>What would be the point of supporting ffap-require-prefix when you
>call ffap-other-window?  That variable controls whether to invoke
>ffap-file-finder, which is not suitable for -other-window commands, I
>think?  That is why, AFAIU, when not called interactively,
>find-file-at-point doesn't call ffap-file-finder at all, and therefore
>there's no point in heeding ffap-require-prefix.  Right?

Hi Eli:

Yes, that's what I expect, but it is actually offering the completion when using the other-window alternative.

Just:

emacs -Q
M-x ffap-bindings
M-: (setq ffap-require-prefix t)
Write /somedir

C-x C-f  (you see: ~/)

But 

C-x 4 f (you see /somedir)

This seems to be related with the ffap-prompter called before the switch then?

Best,

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.