From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/67843 Path: news.gmane.org!not-for-mail From: Naohiro Aota Newsgroups: gmane.emacs.w3m,gmane.emacs.gnus.general Subject: [emacs-w3m:10493] Re: nnrss vs. copy link location Date: Thu, 04 Dec 2008 02:17:42 +0900 (JST) Message-ID: <20081204.021742.256018989115879870.nao.aota@gmail.com> References: <87prkaf5dp.fsf@jidanni.org> Reply-To: emacs-w3m@namazu.org NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1228324677 11823 80.91.229.2 (3 Dec 2008 17:17:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 3 Dec 2008 17:17:57 +0000 (UTC) Cc: emacs-w3m@namazu.org, ding@gnus.org To: jidanni@jidanni.org Original-X-From: emacs-w3m-admin@namazu.org Wed Dec 03 17:17:55 2008 Return-path: Envelope-to: emacs-w3m@deer.gmane.org Original-Received: from quimby.gnus.org ([80.91.231.51]) by ciao.gmane.org with esmtp (Exim 4.43) id 1L7vMI-0005bA-R5 for emacs-w3m@deer.gmane.org; Wed, 03 Dec 2008 17:17:54 +0000 Original-Received: from vaj.namazu.org ([202.221.179.42]) by quimby.gnus.org with esmtp (Exim 3.36 #1 (Debian)) id 1L7vMU-0000rF-00 for ; Wed, 03 Dec 2008 18:18:07 +0100 Original-Received: from vaj.namazu.org (localhost [127.0.0.1]) by vaj.namazu.org (Postfix) with ESMTP id EE39F99F23; Thu, 4 Dec 2008 02:17:50 +0900 (JST) Original-Received: from rv-out-0708.google.com (rv-out-0708.google.com [209.85.198.244]) by vaj.namazu.org (Postfix) with ESMTP id A0E7399E23 for ; Thu, 4 Dec 2008 02:17:49 +0900 (JST) Original-Received: by rv-out-0708.google.com with SMTP id f25so4056044rvb.50 for ; Wed, 03 Dec 2008 09:17:48 -0800 (PST) Original-Received: by 10.141.19.9 with SMTP id w9mr6428607rvi.31.1228324668651; Wed, 03 Dec 2008 09:17:48 -0800 (PST) Original-Received: from localhost (zaq3a55f27d.zaq.ne.jp [58.85.242.125]) by mx.google.com with ESMTPS id f42sm5855448rvb.6.2008.12.03.09.17.46 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 03 Dec 2008 09:17:47 -0800 (PST) In-Reply-To: <87prkaf5dp.fsf@jidanni.org> X-ML-Name: emacs-w3m X-Mail-Count: 10493 X-MLServer: fml [fml 4.0.3 release (20011202/4.0.3)]; post only (anyone can post) X-ML-Info: If you have a question, send e-mail with the body "help" (without quotes) to the address emacs-w3m-ctl@namazu.org; help= X-Mailer: Mew version 6.1.53 on Emacs 23.0.60 / Mule 6.0 (HANACHIRUSATO) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:message-id:to:cc:subject :from:in-reply-to:references:x-mailer:mime-version:content-type :content-transfer-encoding; bh=pnIowjK1Um+reGRtIXE5atYmjnnjpkpiC5ICg41ySAE=; b=i77EshfOOTvsSfSvXVFz12vZQHSw0KJpzysg/SY+f4x5KGANAM3T5+cRfa1Ckj7gXb vra0lo8ClA2RL6hO49PiQhfBQYBpVNIIjo7XQDhR7dyM2IHgWXSXjXjf40Qte7lsLHMz 9mjlUa1L2ZKpmWVo5FRNMQ1gB6VPeTGhRxsOM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:message-id:to:cc:subject:from:in-reply-to:references:x-mailer :mime-version:content-type:content-transfer-encoding; b=qXB+q3nImWAaWp+Y3SFuQFwtFwIX89WKCAG07rseiEUXAOUhRPSryvzBFTGxZg6ELH wre81T+tzwO9qhlkFKAqYn0zK074umZqLytJIM823wq9PYPTZCM1sXef3NEP9919af6F ceesrNwkDLHx48gUvUvGRQJAbr1iziEqM8VhY= X-Spam-Flag: No X-Spam-Probability: 0.000000 Precedence: bulk Original-Lines: 157 List-Id: emacs-w3m.namazu.org List-Software: fml [fml 4.0.3 release (20011202/4.0.3)] List-Post: List-Owner: List-Help: List-Unsubscribe: Xref: news.gmane.org gmane.emacs.w3m:7853 gmane.emacs.gnus.general:67843 Archived-At: From: jidanni@jidanni.org Subject: nnrss vs. copy link location Date: Wed, 03 Dec 2008 08:51:14 +0800 > I'm reading http://feedproxy.google.com/TorrentFreak in NNRSS, but > when I come across links like > href="http://torrentfreak.com/pirate-party-endorses-obama-080103/">US > Pirate Party > there is no 'copy link location' etc. right click mouse keys etc. No > way to copy link location. It seems that there is something wrong with Gnus. mm-inline-text-html-render-with-w3m() in mm-view.el .------------------------------------------------------------------------------- | (let ((w3m-safe-url-regexp mm-w3m-safe-url-regexp) | w3m-force-redisplay) | (w3m-region (point-min) (point-max) nil charset)) `------------------------------------------------------------------------------- Here, links' special keymap (w3m-link-map) is set. .------------------------------------------------------------------------------- | (when (and mm-inline-text-html-with-w3m-keymap | (boundp 'w3m-minor-mode-map) | w3m-minor-mode-map) | (add-text-properties | (point-min) (point-max) | (list 'keymap w3m-minor-mode-map | ;; Put the mark meaning this part was rendered by emacs-w3m. | 'mm-inline-text-html-with-w3m t))) `------------------------------------------------------------------------------- But here, the previous keymap is overridden. :( Anyway, I wrote a patch to fix this problem. Could you check it? Regards, Naohiro Aota 2008-12-03 Naohiro Aota * mm-view.el (mm-inline-text-html-render-with-w3m): Put special keymap on links. * gnus-art.el (gnus-article-wash-html-with-w3m): Ditto. Index: lisp/gnus-art.el =================================================================== RCS file: /usr/local/cvsroot/gnus/lisp/gnus-art.el,v retrieving revision 7.283 diff -u -r7.283 gnus-art.el --- lisp/gnus-art.el 3 Oct 2008 04:21:54 -0000 7.283 +++ lisp/gnus-art.el 3 Dec 2008 17:05:33 -0000 @@ -2731,11 +2731,34 @@ (when (and mm-inline-text-html-with-w3m-keymap (boundp 'w3m-minor-mode-map) w3m-minor-mode-map) - (add-text-properties - (point-min) (point-max) - (list 'keymap w3m-minor-mode-map - ;; Put the mark meaning this part was rendered by emacs-w3m. - 'mm-inline-text-html-with-w3m t)))) + (if (and (boundp 'w3m-link-map) + w3m-link-map) + (let ((begin (point-min)) + (map (copy-keymap w3m-link-map)) + end) + (set-keymap-parent map w3m-minor-mode-map) + (while (setq end (next-single-property-change begin + 'w3m-href-anchor)) + (add-text-properties + begin end + (list 'keymap (if (get-text-property begin 'w3m-href-anchor) + map + w3m-minor-mode-map) + ;; Put the mark meaning this part was rendered by emacs-w3m. + 'mm-inline-text-html-with-w3m t)) + (setq begin end)) + (add-text-properties + begin (point-max) + (list 'keymap (if (get-text-property begin 'w3m-href-anchor) + map + w3m-minor-mode-map) + ;; Put the mark meaning this part was rendered by emacs-w3m. + 'mm-inline-text-html-with-w3m t))) + (add-text-properties + (point-min) (point-max) + (list 'keymap w3m-minor-mode-map + ;; Put the mark meaning this part was rendered by emacs-w3m. + 'mm-inline-text-html-with-w3m t))))) (defvar charset) ;; Bound by `article-wash-html'. Index: lisp/mm-view.el =================================================================== RCS file: /usr/local/cvsroot/gnus/lisp/mm-view.el,v retrieving revision 7.59 diff -u -r7.59 mm-view.el --- lisp/mm-view.el 22 Sep 2008 10:34:03 -0000 7.59 +++ lisp/mm-view.el 3 Dec 2008 17:05:33 -0000 @@ -261,11 +261,34 @@ (when (and mm-inline-text-html-with-w3m-keymap (boundp 'w3m-minor-mode-map) w3m-minor-mode-map) - (add-text-properties - (point-min) (point-max) - (list 'keymap w3m-minor-mode-map - ;; Put the mark meaning this part was rendered by emacs-w3m. - 'mm-inline-text-html-with-w3m t))) + (if (and (boundp 'w3m-link-map) + w3m-link-map) + (let ((begin (point-min)) + (map (copy-keymap w3m-link-map)) + end) + (set-keymap-parent map w3m-minor-mode-map) + (while (setq end (next-single-property-change begin + 'w3m-href-anchor)) + (add-text-properties + begin end + (list 'keymap (if (get-text-property begin 'w3m-href-anchor) + map + w3m-minor-mode-map) + ;; Put the mark meaning this part was rendered by emacs-w3m. + 'mm-inline-text-html-with-w3m t)) + (setq begin end)) + (add-text-properties + begin (point-max) + (list 'keymap (if (get-text-property begin 'w3m-href-anchor) + map + w3m-minor-mode-map) + ;; Put the mark meaning this part was rendered by emacs-w3m. + 'mm-inline-text-html-with-w3m t))) + (add-text-properties + (point-min) (point-max) + (list 'keymap w3m-minor-mode-map + ;; Put the mark meaning this part was rendered by emacs-w3m. + 'mm-inline-text-html-with-w3m t)))) (mm-handle-set-undisplayer handle `(lambda ()