Subject: bug#16277: 24.3.50; [PATCH] eww: Cannot use double/single quote for search words.

From: Kenjiro NAKAYAMA <[email-masked]>
Date: Sat, 28 Dec 2013 20:36:55 +0900

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

* Reproduce the bug.
step 1. M-x eww
step 2. input "eww.el" to mini-buffer. (eg. sEnter URL or keywords: "eww.el")
(Result)-> Error will occure (eg. error "eww.el/80 Name or service not known").

The cause is that eww cannot treat double quote or single quote.
(Therefore, eww cannot search the word which has "." dot like eww.el.)

I send the patch to fix it.

Signed-off-by: Kenjiro NAKAYAMA <[email-masked]>

        * net/eww.el (eww):  Support single/double quote for search.

---
 lisp/net/eww.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lisp/net/eww.el b/lisp/net/eww.el
index 25309d1..578032b 100644
--- a/lisp/net/eww.el
+++ b/lisp/net/eww.el
@@ -157,8 +157,9 @@ word(s) will be searched for via `eww-search-prefix'."
          (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)))
+                 (or (and (not (string-match-p "\\`[\"\'].*[\"\']\\'" url))
+                          (> (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)))
-- 
1.8.3.1

Regards,

Kenjiro