From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/78732 Path: news.gmane.org!not-for-mail From: Katsumi Yamaoka Newsgroups: gmane.emacs.gnus.general Subject: Re: shr-map keymap issues Date: Fri, 06 May 2011 18:21:00 +0900 Organization: Emacsen advocacy group Message-ID: References: <8739ljfij1.fsf@lifelogs.com> <87mxjjm9b4.fsf@lifelogs.com> <87oc3lvxns.fsf@lifelogs.com> <87hb9b8q17.fsf@lifelogs.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: dough.gmane.org 1304673770 29231 80.91.229.12 (6 May 2011 09:22:50 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 6 May 2011 09:22:50 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M27034@lists.math.uh.edu Fri May 06 11:22:47 2011 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QIHFF-0007OF-1A for ding-account@gmane.org; Fri, 06 May 2011 11:22:45 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1QIHE2-0001f3-7y; Fri, 06 May 2011 04:21:30 -0500 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1QIHE0-0001et-GY for ding@lists.math.uh.edu; Fri, 06 May 2011 04:21:28 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1QIHDu-0005Lx-EX for ding@lists.math.uh.edu; Fri, 06 May 2011 04:21:23 -0500 Original-Received: from orlando.hostforweb.net ([216.246.45.90]) by quimby.gnus.org with esmtp (Exim 4.72) (envelope-from ) id 1QIHDs-0002GQ-5w for ding@gnus.org; Fri, 06 May 2011 11:21:20 +0200 Original-Received: from localhost ([127.0.0.1]:41134) by orlando.hostforweb.net with esmtpa (Exim 4.69) (envelope-from ) id 1QIHDi-0004ZF-6d for ding@gnus.org; Fri, 06 May 2011 04:21:10 -0500 X-Face: #kKnN,xUnmKia.'[pp`;Omh}odZK)?7wQSl"4o04=EixTF+V[""w~iNbM9ZL+.b*_CxUmFk B#Fu[*?MZZH@IkN:!"\w%I_zt>[$nm7nQosZ<3eu;B:$Q_:p!',P.c0-_Cy[dz4oIpw0ESA^D*1Lw= L&i*6&( User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (cygwin) Cancel-Lock: sha1:xXS9a8LnJC+jyUXQdlICoV1bqu4= X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - orlando.hostforweb.net X-AntiAbuse: Original Domain - gnus.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - jpl.org X-Source: X-Source-Args: X-Source-Dir: X-Spam-Score: -1.9 (-) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:78732 Archived-At: --=-=-= Ted Zlatanov wrote: LMI> `W D W' and `W D D' (hide-/show-images). > I just tested that in Gnus against this article: > Newsgroups: gwene.com.thelastpsychia.partialobjects > Archived-at: > Xref: news.gmane.org gwene.com.thelastpsychia.partialobjects:113 > It did not work for me: images were not hidden. It's easy if shr.el allows the use of Gnus' resource. ;-) --=-=-= Content-Type: text/x-patch Content-Disposition: inline --- shr.el~ 2011-05-05 21:58:59.375000000 +0000 +++ shr.el 2011-05-06 09:18:35.566220400 +0000 @@ -514,7 +514,12 @@ (when (and (> (current-column) 0) (> (car (image-size image t)) 400)) (insert "\n")) - (insert-image image (or alt "*")))) + (if (eq major-mode 'gnus-article-mode) + (progn + (insert-image image (propertize (or alt "*") + 'gnus-image-category 'shr)) + (gnus-add-image 'shr image)) + (insert-image image (or alt "*"))))) (insert alt))) (defun shr-rescale-image (data) --=-=-=--