GNU bug report logs -
#44822
27.1; Regression in `ffap-read-file-or-url'
Previous Next
Reported by: Drew Adams <drew.adams <at> oracle.com>
Date: Mon, 23 Nov 2020 17:25:02 UTC
Severity: normal
Merged with 44841
Found in version 27.1
Fixed in version 28.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 44822 <at> debbugs.gnu.org (full text, mbox):
> Date: Mon, 23 Nov 2020 09:23:37 -0800 (PST)
> From: Drew Adams <drew.adams <at> oracle.com>
>
> `ffap-read-file-or-url' now reads a URL as a file name, truncating to
> remove a prefix such as http:/. Prior to Emacs 27, it correctly
> returned the URL.
>
> If point is not on a URL, then the guess is nil. The user is prompted
> (as before) with the default directory as default. If the user rejects
> that default value and replaces it by a URL (e.g. yanking), then
> `ffap-read-file-or-url' should just return that URL, as it has always
> done. In Emacs 27, it instead tries to handle it as a file name,
> removing the prefix up to the first `/' before a non-/ char.
>
> emacs -Q
>
> ;; With point not on a URL or file name:
>
> (ffap-read-file-or-url "URL: " nil)
>
> ;; User is prompted, with the default-directory as default:
>
> URL: /my/default/dir/
>
> ;; User pastes a URL after that or replaces that with a URL.
>
> URL: /my/default/dir/http://foobar.com RET
> ;; or
> URL: http://foobar.com RET
>
> ;; This is returned: /foobar.com
>
> In Emacs 26.3 the URL entered by the user is returned correctly.
>
> A main use of `read-file-or-url' is to prompt for and read a URL. If a
> user enters a URL when FFAP has not been able to guess a URL, FFAP now
> just treats the input as a filename. It treats prefix `http:/' the same
> way it would treat prefix `c:' on MS Windows.
>
> Reading a URL is maybe the main use case of `ffap-read-file-or-url'. (There is no `ffap-read-url'.) It's now broken.
Thierry and Stefan, these changes seem to have been done by you. Can
you please take a look at this issue? Would it be possible to fix
this for Emacs 27.2?
This bug report was last modified 3 years and 283 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.