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

Re: `w3m-input-url' bug



On 2010-09-09 03:18 +0100, Katsumi Yamaoka wrote:
> No, it's not necessarily a bug.  The feature has been introduced
> for gathering some url fragments which a certain mailer chopped
> a long url string into.  For instance:
>
> 	http://www.google.co.jp/search?hl=ja&inlang=ja&ie=Shift_
> 	JIS&q=emacs-w3m+or+ gnus-html.el
>
> But I feel it useless in the case where a url string contains
> whitespace in particular.  So, I tried (in CVS) improving it so
> as to remove only newlines and leading and trailing whitespace.

Thanks. I have now updated my emacs-w3m installation and it is working.
BTW, any idea why something like this isn't used:

--- w3m.el.~1.1498.~	2010-09-09 19:36:51.000000000 +0100
+++ w3m.el	2010-09-09 19:48:26.000000000 +0100
@@ -4615,10 +4615,8 @@
 				       (prin1-to-string default)))
 			   (if feeling-lucky "URL or Keyword: " "URL: ")))
 		       'w3m-url-completion nil nil initial
-		       'w3m-input-url-history)
+		       'w3m-input-url-history default)
 		    (define-key minibuffer-local-completion-map " " ofunc))))
-      (when (string= "" url)
-	(setq url default))
       (if (stringp url)
 	  (progn
 	    ;; remove duplication



By putting the DEFAULT argument in completing-read, users can use M-n to
bring it into the minibuffer to edit if they want to. This is the reason
(info "(elisp)Initial Input") considers initial-input deprecated.

Leo