unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / Atom feed
* bug#45779: Once FFAP sniffs a URL, its taste buds no longer recognize filenames
@ 2021-01-11 11:35 積丹尼 Dan Jacobson
  2021-01-11 15:29 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 5+ messages in thread
From: 積丹尼 Dan Jacobson @ 2021-01-11 11:35 UTC (permalink / raw)
  To: 45779

$ 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"





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

* bug#45779: Once FFAP sniffs a URL, its taste buds no longer recognize filenames
  2021-01-11 11:35 bug#45779: Once FFAP sniffs a URL, its taste buds no longer recognize filenames 積丹尼 Dan Jacobson
@ 2021-01-11 15:29 ` Lars Ingebrigtsen
  2021-01-11 22:32   ` 積丹尼 Dan Jacobson
  0 siblings, 1 reply; 5+ messages in thread
From: Lars Ingebrigtsen @ 2021-01-11 15:29 UTC (permalink / raw)
  To: 積丹尼 Dan Jacobson; +Cc: 45779

積丹尼 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





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

* bug#45779: Once FFAP sniffs a URL, its taste buds no longer recognize filenames
  2021-01-11 15:29 ` Lars Ingebrigtsen
@ 2021-01-11 22:32   ` 積丹尼 Dan Jacobson
  2021-01-11 22:39     ` Lars Ingebrigtsen
  0 siblings, 1 reply; 5+ messages in thread
From: 積丹尼 Dan Jacobson @ 2021-01-11 22:32 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 45779

>>>>> "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"...





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

* bug#45779: Once FFAP sniffs a URL, its taste buds no longer recognize filenames
  2021-01-11 22:32   ` 積丹尼 Dan Jacobson
@ 2021-01-11 22:39     ` Lars Ingebrigtsen
  2021-01-11 22:53       ` 積丹尼 Dan Jacobson
  0 siblings, 1 reply; 5+ messages in thread
From: Lars Ingebrigtsen @ 2021-01-11 22:39 UTC (permalink / raw)
  To: 積丹尼 Dan Jacobson; +Cc: 45779

積丹尼 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





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

* bug#45779: Once FFAP sniffs a URL, its taste buds no longer recognize filenames
  2021-01-11 22:39     ` Lars Ingebrigtsen
@ 2021-01-11 22:53       ` 積丹尼 Dan Jacobson
  0 siblings, 0 replies; 5+ messages in thread
From: 積丹尼 Dan Jacobson @ 2021-01-11 22:53 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 45779

>>>>> "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.






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

end of thread, other threads:[~2021-01-11 22:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-11 11:35 bug#45779: Once FFAP sniffs a URL, its taste buds no longer recognize filenames 積丹尼 Dan Jacobson
2021-01-11 15:29 ` Lars Ingebrigtsen
2021-01-11 22:32   ` 積丹尼 Dan Jacobson
2021-01-11 22:39     ` Lars Ingebrigtsen
2021-01-11 22:53       ` 積丹尼 Dan Jacobson

unofficial mirror of bug-gnu-emacs@gnu.org 

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://yhetil.org/emacs-bugs/0 emacs-bugs/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 emacs-bugs emacs-bugs/ https://yhetil.org/emacs-bugs \
		bug-gnu-emacs@gnu.org
	public-inbox-index emacs-bugs

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.emacs.bugs
	nntp://news.gmane.io/gmane.emacs.bugs


AGPL code for this site: git clone http://ou63pmih66umazou.onion/public-inbox.git