From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Katsumi Yamaoka Newsgroups: gmane.emacs.bugs Subject: bug#24034: 25.0.95; shr-fill-line multiplies the number of images Date: Wed, 20 Jul 2016 19:28:11 +0900 Organization: Emacsen advocacy group Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1469010635 14981 80.91.229.3 (20 Jul 2016 10:30:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 20 Jul 2016 10:30:35 +0000 (UTC) To: 24034@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jul 20 12:30:20 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bPole-0000xA-D2 for geb-bug-gnu-emacs@m.gmane.org; Wed, 20 Jul 2016 12:30:18 +0200 Original-Received: from localhost ([::1]:33513 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bPola-0003rs-FV for geb-bug-gnu-emacs@m.gmane.org; Wed, 20 Jul 2016 06:30:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43791) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bPolU-0003qX-QO for bug-gnu-emacs@gnu.org; Wed, 20 Jul 2016 06:30:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bPolP-0003SZ-2Y for bug-gnu-emacs@gnu.org; Wed, 20 Jul 2016 06:30:08 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:45595) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bPolO-0003SH-VD for bug-gnu-emacs@gnu.org; Wed, 20 Jul 2016 06:30:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bPolO-0002MV-R8 for bug-gnu-emacs@gnu.org; Wed, 20 Jul 2016 06:30:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Katsumi Yamaoka Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 20 Jul 2016 10:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 24034 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.14690105458984 (code B ref -1); Wed, 20 Jul 2016 10:30:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 20 Jul 2016 10:29:05 +0000 Original-Received: from localhost ([127.0.0.1]:57932 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bPokS-0002Kq-PW for submit@debbugs.gnu.org; Wed, 20 Jul 2016 06:29:04 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:52693) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bPokR-0002KK-5D for submit@debbugs.gnu.org; Wed, 20 Jul 2016 06:29:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bPokL-00037B-2Z for submit@debbugs.gnu.org; Wed, 20 Jul 2016 06:28:57 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:57541) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bPokK-000370-Vg for submit@debbugs.gnu.org; Wed, 20 Jul 2016 06:28:57 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43641) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bPokH-0003md-M1 for bug-gnu-emacs@gnu.org; Wed, 20 Jul 2016 06:28:55 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bPokD-00035z-G7 for bug-gnu-emacs@gnu.org; Wed, 20 Jul 2016 06:28:52 -0400 Original-Received: from mail-hampton.hostforweb.net ([205.234.186.191]:44483 helo=hampton.hostforweb.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bPokD-0002r9-BJ for bug-gnu-emacs@gnu.org; Wed, 20 Jul 2016 06:28:49 -0400 Original-Received: from s70.gtokyofl21.vectant.ne.jp ([202.215.75.70]:60027 helo=localhost) by hampton.hostforweb.net with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.87) (envelope-from ) id 1bPojS-002CfV-TE; Wed, 20 Jul 2016 05:28:04 -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.13 (Gnus v5.13) Emacs/25.1.50 (i686-pc-cygwin) Cancel-Lock: sha1:HJ5lZ7zm+Ezz5ezswwZapySLHUc= X-OutGoing-Spam-Status: No, score=-2.9 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - hampton.hostforweb.net X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - jpl.org X-Get-Message-Sender-Via: hampton.hostforweb.net: authenticated_id: yamaoka/from_h X-Authenticated-Sender: hampton.hostforweb.net: yamaoka@jpl.org X-Source: X-Source-Args: X-Source-Dir: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (barebone) [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:121293 Archived-At: --=-=-= Hi, If `gnus-inhibit-images' is t, shr shows the alt text of an image in the article buffer. If the alt text is long, `shr-fill-line' devides it into two or more lines, and each line will get to have a link to the image individually. In that case, those number of images will be displayed when a user invokes the WDW command (gnus-article-show-images) even if there should be only a single image. The cause of this problem is that `shr-fill-line' divides not only the alt text but also the `image-url' text property. So, I'd like to install the following change. This is the right fix, isn't it? Regards, --=-=-= Content-Type: text/x-patch Content-Disposition: inline --- shr.el~ 2016-03-21 22:00:40.983451400 +0000 +++ shr.el 2016-07-20 10:26:30.487350400 +0000 @@ -636,13 +636,12 @@ ;; Success; continue. (when (= (preceding-char) ?\s) (delete-char -1)) - (let ((face (get-text-property (point) 'face)) + (let ((props (text-properties-at (point))) (background-start (point))) (insert "\n") (shr-indent) - (when face - (put-text-property background-start (point) 'face - `,(shr-face-background face)))) + (when props + (add-text-properties background-start (point) props))) (setq start (point)) (shr-vertical-motion shr-internal-width) (when (looking-at " $") --=-=-=--