unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#18825: eww does not handle file:/file/name properly
@ 2014-10-25 12:17 Ivan Shmakov
  2014-11-02 21:08 ` Ted Zlatanov
  0 siblings, 1 reply; 2+ messages in thread
From: Ivan Shmakov @ 2014-10-25 12:17 UTC (permalink / raw)
  To: 18825

[-- Attachment #1: Type: text/plain, Size: 1027 bytes --]

Package:  emacs
Severity: minor
Tags:     patch

	The condition currently employed in ‘eww’ for file: scheme URIs
	is a bit more restrictive than necessary:

   156	;;;###autoload
   157	(defun eww (url)
   158	  "Fetch URL and render the page.
   159	If the input doesn't look like an URL or a domain name, the
   160	word(s) will be searched for via `eww-search-prefix'."
   161	  (interactive "sEnter URL or keywords: ")
   162	  (cond ((string-match-p "\\`file://" url))
   163	        ((string-match-p "\\`ftp://" url)
   164	         (user-error "FTP is not supported."))

	While RFC 1738 does not allow for no-authority file: URIs,
	RFC 3986 makes the authority part optional /in general,/ and
	recognizing file:/name as synonymous to file:///name looks like
	a common extension over the RFC 1738 syntax.

	I thus suggest the condition to be relaxed to only include a
	single slash after ‘file:’.

-- 
FSF associate member #7257  http://boycottsystemd.org/  … 3013 B6A0 230E 334A

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/diff, Size: 405 bytes --]

--- eww.el
+++ eww.el
@@ -159,7 +159,7 @@ eww (url)
 If the input doesn't look like an URL or a domain name, the
 word(s) will be searched for via `eww-search-prefix'."
   (interactive "sEnter URL or keywords: ")
-  (cond ((string-match-p "\\`file://" url))
+  (cond ((string-match-p "\\`file:/" url))
         ((string-match-p "\\`ftp://" url)
          (user-error "FTP is not supported."))
         (t

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

* bug#18825: eww does not handle file:/file/name properly
  2014-10-25 12:17 bug#18825: eww does not handle file:/file/name properly Ivan Shmakov
@ 2014-11-02 21:08 ` Ted Zlatanov
  0 siblings, 0 replies; 2+ messages in thread
From: Ted Zlatanov @ 2014-11-02 21:08 UTC (permalink / raw)
  To: Ivan Shmakov; +Cc: 18825-done

On Sat, 25 Oct 2014 12:17:50 +0000 Ivan Shmakov <ivan@siamics.net> wrote: 

IS> -  (cond ((string-match-p "\\`file://" url))
IS> +  (cond ((string-match-p "\\`file:/" url))

Thanks for the patch; applied in your name.  Closing.

Ted





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

end of thread, other threads:[~2014-11-02 21:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-25 12:17 bug#18825: eww does not handle file:/file/name properly Ivan Shmakov
2014-11-02 21:08 ` Ted Zlatanov

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