[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
 Re: w3m-goto-url NNTP interference
- From: Hideyuki SHIRAI (白井秀行) <shirai@xxxxxxxxxxx>
- Date: Sun, 20 Feb 2011 20:42:25 +0900 (JST)
- X-ml-name: emacs-w3m
- X-mail-count: 11524
- References: <87r5b9gcyw.fsf@xxxxxxxxxxx>
From: jidanni@xxxxxxxxxxx said
Subject: [emacs-w3m:11518] w3m-goto-url NNTP interference
Message-ID: <87r5b9gcyw.fsf@xxxxxxxxxxx>
Date: Wed, 16 Feb 2011 06:16:55 +0800
> g runs the command w3m-goto-url, which is an interactive compiled Lisp
> function in `w3m.el'.
>
> It is too smart. If one TABs to, or hits RET on
>
> <a href="http://groups.google.com/group/comp.risks">comp.risks</a>
>
> one sees the correct link, but when one uses "g",
> one gets
> URL (default HOME): news:comp.risks
If you use gnus, the following expression seems to return
"comp.risks".
(ffap-newsgroup-p "comp.risks") => "comp.risks"
Then, it comes to be said about Jidanni san as follows;
(let ()
  (with-temp-buffer
    (insert "comp.risks")
    (goto-char (point-min))
    (ffap-url-at-point))) => "news:comp.risks"
(let ()
  (with-temp-buffer
    (insert "comp.risks")
    (goto-char (point-min))
    (w3m-active-region-or-url-at-point))) => "news:comp.risks"
So, intial value of w3m-input-url() will be set "news:comp.risks".
> I bet there is no variable to stop it.
I think about two method of answer. But、these worry about the
adverse effect because I am not usually using gnus.
(1) Set ffap-newsgroup-regexp to confused value.
 (setq ffap-newsgroup-regexp "^SHIRAISHIRAISHIRAISHIRAI$")
 So, (ffap-newsgroup-p "comp.risks") => nil
(2) Apply the following patch to CVS HEAD.
--- w3m.el	01 Feb 2011 22:17:56 +0900	1.1519
+++ w3m.el	20 Feb 2011 19:25:51 +0900
@@ -4550,10 +4550,10 @@
 		(delete-region (match-beginning 0) (match-end 0)))
 	      (buffer-string)))
 	(w3m-deactivate-region))
-    (or (w3m-url-at-point)
-	(w3m-anchor)
+    (or (w3m-anchor)
 	(unless w3m-display-inline-images
 	  (w3m-image))
+	(w3m-url-at-point)
 	(and default=current
 	     (stringp w3m-current-url)
 	     (if (string-match "\\`about://\\(?:header\\|source\\)/"
-- 
Hideyuki Shirai (mailto:shirai@xxxxxxxxxxx)gnus 使っている方々、どうすれば良いですかねぇ?