* bug#27564: FFAP on file:// URLs
[not found] <87lgo8cba2.fsf@jidanni.org>
@ 2017-07-03 18:36 ` 積丹尼 Dan Jacobson
2017-07-03 18:54 ` npostavs
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: 積丹尼 Dan Jacobson @ 2017-07-03 18:36 UTC (permalink / raw)
To: 27564
$ cat x
http://example.com/
file:///usr/share/doc/sqlite3-doc/cli.html
file:///usr/share/doc/sqlite3-doc/cli.html#csv_import
$ emacs x
M-x ffap-bindings
Now do C-x C-f on each line.
The first line works fine, prompting with http://example.com/ .
The second and third line fail, with the file:// removed, despite:
ffap-url-regexp is a variable defined in ‘ffap.el’.
Its value is
"\\(news\\(post\\)?:\\|mailto:\\|file:\\|\\(ftp\\|https?\\|telnet\\|gopher\\|www\\|wais\\)://\\)"
(info "(emacs) FFAP") says
If what is found in the buffer has the form of a URL rather than
a file name, the commands use ‘browse-url’ to view it (*note
Browse-URL::).
So file:// end up never passed to browse-url like they should be.
ffap-version"25.2.1"
emacs-version"25.2.1"
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#27564: FFAP on file:// URLs
2017-07-03 18:36 ` bug#27564: FFAP on file:// URLs 積丹尼 Dan Jacobson
@ 2017-07-03 18:54 ` npostavs
2017-07-03 19:12 ` 積丹尼 Dan Jacobson
2017-07-04 12:40 ` 積丹尼 Dan Jacobson
2 siblings, 0 replies; 6+ messages in thread
From: npostavs @ 2017-07-03 18:54 UTC (permalink / raw)
To: 積丹尼 Dan Jacobson; +Cc: 27564
tags 27564 + notabug
quit
積丹尼 Dan Jacobson <jidanni@jidanni.org> writes:
> $ cat x
> http://example.com/
> file:///usr/share/doc/sqlite3-doc/cli.html
> file:///usr/share/doc/sqlite3-doc/cli.html#csv_import
> $ emacs x
> M-x ffap-bindings
> Now do C-x C-f on each line.
>
> The first line works fine, prompting with http://example.com/ .
> The second and third line fail, with the file:// removed, despite:
> ffap-url-regexp is a variable defined in ‘ffap.el’.
> Its value is
> "\\(news\\(post\\)?:\\|mailto:\\|file:\\|\\(ftp\\|https?\\|telnet\\|gopher\\|www\\|wais\\)://\\)"
>
> (info "(emacs) FFAP") says
> If what is found in the buffer has the form of a URL rather than
> a file name, the commands use ‘browse-url’ to view it (*note
> Browse-URL::).
>
> So file:// end up never passed to browse-url like they should be.
>
> ffap-version"25.2.1"
> emacs-version"25.2.1"
I think you want (setq ffap-url-unwrap-local nil)
ffap-url-unwrap-local is a variable defined in ‘ffap.el’.
Its value is t
Documentation:
If non-nil, convert some URLs to local file names before prompting.
Only "file:" and "ftp:" URLs are converted, and only if they
do not specify a host, or the host is either "localhost" or
equal to ‘system-name’.
You can customize this variable.
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#27564: FFAP on file:// URLs
2017-07-03 18:36 ` bug#27564: FFAP on file:// URLs 積丹尼 Dan Jacobson
2017-07-03 18:54 ` npostavs
@ 2017-07-03 19:12 ` 積丹尼 Dan Jacobson
2017-07-03 19:31 ` npostavs
2017-07-04 12:40 ` 積丹尼 Dan Jacobson
2 siblings, 1 reply; 6+ messages in thread
From: 積丹尼 Dan Jacobson @ 2017-07-03 19:12 UTC (permalink / raw)
To: npostavs; +Cc: 27564
OK but
ffap-url-regexp's docstring had better mention to see also
ffap-url-unwrap-local, else nobody will know!
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#27564: FFAP on file:// URLs
2017-07-03 19:12 ` 積丹尼 Dan Jacobson
@ 2017-07-03 19:31 ` npostavs
0 siblings, 0 replies; 6+ messages in thread
From: npostavs @ 2017-07-03 19:31 UTC (permalink / raw)
To: 積丹尼 Dan Jacobson; +Cc: 27564
[-- Attachment #1: Type: text/plain, Size: 240 bytes --]
積丹尼 Dan Jacobson <jidanni@jidanni.org> writes:
> OK but
> ffap-url-regexp's docstring had better mention to see also
> ffap-url-unwrap-local, else nobody will know!
I think it fits better in find-file-at-point's docstring.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: patch --]
[-- Type: text/x-diff, Size: 1129 bytes --]
From c041229e95dee7fadfa3a05ed2dc1b4958207582 Mon Sep 17 00:00:00 2001
From: Noam Postavsky <npostavs@gmail.com>
Date: Mon, 3 Jul 2017 15:27:09 -0400
Subject: [PATCH] Mention `ffap-url-unwrap-local' in find-file-at-point's
docstring (Bug#27564)
* lisp/ffap.el (find-file-at-point): Mention `ffap-url-unwrap-local'
and `ffap-url-unwrap-remote'.
---
lisp/ffap.el | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lisp/ffap.el b/lisp/ffap.el
index 87531110b8..8bcfbfcdff 100644
--- a/lisp/ffap.el
+++ b/lisp/ffap.el
@@ -1536,7 +1536,8 @@ (defun find-file-at-point (&optional filename)
With a prefix, this command behaves exactly like `ffap-file-finder'.
If `ffap-require-prefix' is set, the prefix meaning is reversed.
See also the variables `ffap-dired-wildcards', `ffap-newfile-prompt',
-and the functions `ffap-file-at-point' and `ffap-url-at-point'."
+`ffap-url-unwrap-local', `ffap-url-unwrap-remote', and the functions
+`ffap-file-at-point' and `ffap-url-at-point'."
(interactive)
(if (and (called-interactively-p 'interactive)
(if ffap-require-prefix (not current-prefix-arg)
--
2.11.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* bug#27564: FFAP on file:// URLs
2017-07-03 18:36 ` bug#27564: FFAP on file:// URLs 積丹尼 Dan Jacobson
2017-07-03 18:54 ` npostavs
2017-07-03 19:12 ` 積丹尼 Dan Jacobson
@ 2017-07-04 12:40 ` 積丹尼 Dan Jacobson
2017-07-05 0:09 ` npostavs
2 siblings, 1 reply; 6+ messages in thread
From: 積丹尼 Dan Jacobson @ 2017-07-04 12:40 UTC (permalink / raw)
To: npostavs; +Cc: 27564
n> I think it fits better in find-file-at-point's docstring.
Thumbs up!
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#27564: FFAP on file:// URLs
2017-07-04 12:40 ` 積丹尼 Dan Jacobson
@ 2017-07-05 0:09 ` npostavs
0 siblings, 0 replies; 6+ messages in thread
From: npostavs @ 2017-07-05 0:09 UTC (permalink / raw)
To: 積丹尼 Dan Jacobson; +Cc: 27564
close 27564
quit
積丹尼 Dan Jacobson <jidanni@jidanni.org> writes:
n> I think it fits better in find-file-at-point's docstring.
> Thumbs up!
Pushed to master.
[1: 684db44ea2]: 2017-07-04 20:06:06 -0400
Mention `ffap-url-unwrap-local' in find-file-at-point's docstring (Bug#27564)
http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=684db44ea23ee140c2bc8e72310c67362b7e782bPushed: [1: 684db44ea2] >
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-07-05 0:09 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <87lgo8cba2.fsf@jidanni.org>
2017-07-03 18:36 ` bug#27564: FFAP on file:// URLs 積丹尼 Dan Jacobson
2017-07-03 18:54 ` npostavs
2017-07-03 19:12 ` 積丹尼 Dan Jacobson
2017-07-03 19:31 ` npostavs
2017-07-04 12:40 ` 積丹尼 Dan Jacobson
2017-07-05 0:09 ` npostavs
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).