$ echo http://example.com > /tmp/z $ emacs -nw -q /tmp/z Now do M-x ffap Now delete the URL that it is prompting us with. Now enter ~/.em<TAB> Tab doesn't complete .emacs!! You see, it "still has its brain convinced we are entering URLs". Even though it prompts "Find file or URL:"! And we already cleaned the URL completely from the minibuffer. ESC x ;; execute-extended-command f ;; self-insert-command f ;; self-insert-command a ;; self-insert-command p ;; self-insert-command RET ;; minibuffer-complete-and-exit DEL ;; delete-backward-char DEL ;; delete-backward-char DEL ;; delete-backward-char DEL ;; delete-backward-char DEL ;; delete-backward-char DEL ;; delete-backward-char DEL ;; delete-backward-char DEL ;; delete-backward-char DEL ;; delete-backward-char DEL ;; delete-backward-char DEL ;; delete-backward-char DEL ;; delete-backward-char DEL ;; delete-backward-char DEL ;; delete-backward-char DEL ;; delete-backward-char DEL ;; delete-backward-char DEL ;; delete-backward-char DEL ;; delete-backward-char ~ ;; self-insert-command / ;; self-insert-command . ;; self-insert-command e ;; self-insert-command m ;; self-insert-command TAB ;; self-insert-command TAB ;; self-insert-command TAB ;; self-insert-command TAB ;; self-insert-command C-g ;; abort-recursive-edit C-h l ;; view-lossage True, I didn't try "file:///" (but shouldn't have to.) emacs-version "27.1"
積丹尼 Dan Jacobson <jidanni@jidanni.org> writes: > $ echo http://example.com > /tmp/z > $ emacs -nw -q /tmp/z > Now do M-x ffap > Now delete the URL that it is prompting us with. > Now enter ~/.em<TAB> > Tab doesn't complete .emacs!! ffap is a guessing system, and it calls `read-string' when it guesses that you want to enter an URL. And even if you delete the URL, that doesn't magically change back to calling `read-file-name'. So I think the answer here is "don't do that, then"? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no
>>>>> "LI" == Lars Ingebrigtsen <larsi@gnus.org> writes:
LI> So I think the answer here is "don't do that, then"?
I was just making a reproducible case for you.
The usual case is: for FFAP users: Let's say the cursor is sitting on
top of a URL. Or say a file full of URLs.
Now there is no way to expand filenames!
Sure, one could remember to do C-u C-x C-f etc.
But that isn't natural.
What is natural is if we clean up the whole minibuffer, then FFAP should
reset its thinking.
Or, at least not prompt us with the "lie" of "File or URL..." when it is
already in "URL expansion only mode"...
積丹尼 Dan Jacobson <jidanni@jidanni.org> writes: > The usual case is: for FFAP users: Let's say the cursor is sitting on > top of a URL. Or say a file full of URLs. > > Now there is no way to expand filenames! Indeed, because you've asked Emacs to guess based on what's under point. > Sure, one could remember to do C-u C-x C-f etc. > > But that isn't natural. Why not? > What is natural is if we clean up the whole minibuffer, then FFAP should > reset its thinking. What if the user deleted the contents because they wanted to type in a different URL? > Or, at least not prompt us with the "lie" of "File or URL..." when it is > already in "URL expansion only mode"... You can type in a file name and it'll be opened. I don't see anything to fix here; closing. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no
>>>>> "LI" == Lars Ingebrigtsen <larsi@gnus.org> writes: >> Sure, one could remember to do C-u C-x C-f etc. >> >> But that isn't natural. LI> Why not? Because the computer should be smarter than needing that. We have cleaned up the minibuffer. So, just like the prompt (always) says, we should be able to enter a filename (and have it expanded._ >> What is natural is if we clean up the whole minibuffer, then FFAP should >> reset its thinking. LI> What if the user deleted the contents because they wanted to type in a LI> different URL? They could just type in the URL fine in that case. >> Or, at least not prompt us with the "lie" of "File or URL..." when it is >> already in "URL expansion only mode"... LI> You can type in a file name and it'll be opened. Ah, but not TAB expanded. All of the sudden it's like (year) 1967 and MS-DOS. LI> I don't see anything to fix here; closing.