emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#16217: closed (24.3.50; [PATCH] eww: Add non-suppo


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#16217: closed (24.3.50; [PATCH] eww: Add non-supported ftp error.)
Date: Sun, 22 Dec 2013 22:41:02 +0000

Your message dated Sun, 22 Dec 2013 17:41:29 -0500
with message-id <address@hidden>
and subject line Re: bug#16217: 24.3.50; [PATCH] eww: Add non-supported ftp 
error.
has caused the debbugs.gnu.org bug report #16217,
regarding 24.3.50; [PATCH] eww: Add non-supported ftp error.
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
16217: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16217
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: 24.3.50; [PATCH] eww: Add non-supported ftp error. Date: Sun, 22 Dec 2013 19:51:52 +0900 User-agent: mu4e 0.9.9.6pre2; emacs 24.3.50.1
This report includes a patch to the bug. Please, review and install it
to the official tree if appreciated.

Reproduce the bug.
 1. M-x eww ftp://SOMEWHERE/pub  (eg. ftp://ftp.kernel.org/pub/)
 2. The error message "Searching for program: no such file or
 directory, ftp" is wrong.

I included tiny change ("\\`file:"-> "\\`file://"), and corrected
indent. (Number of spaces is wrong?)


Signed-off-by: Kenjiro NAKAYAMA <address@hidden>

        * net/eww.el (eww) : Add non-supported ftp error.

---
 lisp/net/eww.el | 28 +++++++++++++++-------------
 1 file changed, 15 insertions(+), 13 deletions(-)

diff --git a/lisp/net/eww.el b/lisp/net/eww.el
index 15bb2c0..fd592ef 100644
--- a/lisp/net/eww.el
+++ b/lisp/net/eww.el
@@ -144,19 +144,21 @@ See also `eww-form-checkbox-selected-symbol'."
 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))
-       (t
-        (if (and (= (length (split-string url)) 1)
-                 (or (> (length (split-string url "\\.")) 1)
-                     (string-match eww-local-regex url)))
-            (progn
-              (unless (string-match-p "\\`[a-zA-Z][-a-zA-Z0-9+.]*://" url)
-                (setq url (concat "http://"; url)))
-              ;; some site don't redirect final /
-              (when (string= (url-filename (url-generic-parse-url url)) "")
-                (setq url (concat url "/"))))
-          (setq url (concat eww-search-prefix
-                            (replace-regexp-in-string " " "+" url))))))
+  (cond ((string-match-p "\\`file://" url))
+        ((string-match-p "\\`ftp://"; url)
+         (user-error "FTP is not supported."))
+        (t
+         (if (and (= (length (split-string url)) 1)
+                  (or (> (length (split-string url "\\.")) 1)
+                      (string-match eww-local-regex url)))
+             (progn
+               (unless (string-match-p "\\`[a-zA-Z][-a-zA-Z0-9+.]*://" url)
+                 (setq url (concat "http://"; url)))
+               ;; some site don't redirect final /
+               (when (string= (url-filename (url-generic-parse-url url)) "")
+                 (setq url (concat url "/"))))
+           (setq url (concat eww-search-prefix
+                             (replace-regexp-in-string " " "+" url))))))
   (url-retrieve url 'eww-render (list url)))
 
 ;;;###autoload (defalias 'browse-web 'eww)
-- 
1.8.3.1

Regards,

Kenjiro NAKAYAMA



--- End Message ---
--- Begin Message --- Subject: Re: bug#16217: 24.3.50; [PATCH] eww: Add non-supported ftp error. Date: Sun, 22 Dec 2013 17:41:29 -0500 User-agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3.50 (gnu/linux)
On Sun, 22 Dec 2013 19:51:52 +0900 Kenjiro NAKAYAMA <address@hidden> wrote: 

KN> This report includes a patch to the bug. Please, review and install it
KN> to the official tree if appreciated.

KN> Reproduce the bug.
KN>  1. M-x eww ftp://SOMEWHERE/pub  (eg. ftp://ftp.kernel.org/pub/)
KN>  2. The error message "Searching for program: no such file or
KN>  directory, ftp" is wrong.

KN> I included tiny change ("\\`file:"-> "\\`file://"), and corrected
KN> indent. (Number of spaces is wrong?)


KN> Signed-off-by: Kenjiro NAKAYAMA <address@hidden>

KN>         * net/eww.el (eww) : Add non-supported ftp error.

Applied, thank you.

Ted


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]