GNU bug report logs - #16217
24.3.50; [PATCH] eww: Add non-supported ftp error.

Previous Next

Package: emacs;

Reported by: Kenjiro NAKAYAMA <nakayamakenjiro <at> gmail.com>

Date: Sun, 22 Dec 2013 10:53:02 UTC

Severity: normal

Tags: patch

Found in version 24.3.50

Done: Ted Zlatanov <tzz <at> lifelogs.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 16217 in the body.
You can then email your comments to 16217 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#16217; Package emacs. (Sun, 22 Dec 2013 10:53:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Kenjiro NAKAYAMA <nakayamakenjiro <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 22 Dec 2013 10:53:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Kenjiro NAKAYAMA <nakayamakenjiro <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.3.50; [PATCH] eww: Add non-supported ftp error.
Date: Sun, 22 Dec 2013 19:51:52 +0900
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 <nakayamakenjiro <at> gmail.com>

        * 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




Reply sent to Ted Zlatanov <tzz <at> lifelogs.com>:
You have taken responsibility. (Sun, 22 Dec 2013 22:41:02 GMT) Full text and rfc822 format available.

Notification sent to Kenjiro NAKAYAMA <nakayamakenjiro <at> gmail.com>:
bug acknowledged by developer. (Sun, 22 Dec 2013 22:41:03 GMT) Full text and rfc822 format available.

Message #10 received at 16217-done <at> debbugs.gnu.org (full text, mbox):

From: Ted Zlatanov <tzz <at> lifelogs.com>
To: Kenjiro NAKAYAMA <nakayamakenjiro <at> gmail.com>
Cc: 16217-done <at> debbugs.gnu.org, Lars Magne Ingebrigtsen <larsi <at> gnus.org>
Subject: Re: bug#16217: 24.3.50; [PATCH] eww: Add non-supported ftp error.
Date: Sun, 22 Dec 2013 17:41:29 -0500
On Sun, 22 Dec 2013 19:51:52 +0900 Kenjiro NAKAYAMA <nakayamakenjiro <at> gmail.com> 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 <nakayamakenjiro <at> gmail.com>

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

Applied, thank you.

Ted




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 20 Jan 2014 12:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 11 years and 148 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.