From unknown Fri Aug 15 20:55:51 2025 X-Loop: help-debbugs@gnu.org Subject: bug#15279: Info broken image Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 05 Sep 2013 21:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 15279 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 15279@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.137841705418897 (code B ref -1); Thu, 05 Sep 2013 21:38:02 +0000 Received: (at submit) by debbugs.gnu.org; 5 Sep 2013 21:37:34 +0000 Received: from localhost ([127.0.0.1]:42355 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VHhF7-0004uj-Ty for submit@debbugs.gnu.org; Thu, 05 Sep 2013 17:37:34 -0400 Received: from eggs.gnu.org ([208.118.235.92]:39350) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VHhF6-0004uS-3y for submit@debbugs.gnu.org; Thu, 05 Sep 2013 17:37:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VHhEs-0006Kk-Cb for submit@debbugs.gnu.org; Thu, 05 Sep 2013 17:37:26 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_20 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:55570) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VHhEs-0006Kg-9K for submit@debbugs.gnu.org; Thu, 05 Sep 2013 17:37:18 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41044) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VHhEm-00024n-5j for bug-gnu-emacs@gnu.org; Thu, 05 Sep 2013 17:37:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VHhEg-0006JV-6a for bug-gnu-emacs@gnu.org; Thu, 05 Sep 2013 17:37:12 -0400 Received: from ps18281.dreamhost.com ([69.163.218.105]:56139 helo=ps18281.dreamhostps.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VHhEg-0006JR-0Q for bug-gnu-emacs@gnu.org; Thu, 05 Sep 2013 17:37:06 -0400 Received: from localhost.jurta.org (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 74F1E258B9E936 for ; Thu, 5 Sep 2013 14:37:03 -0700 (PDT) From: Juri Linkov Organization: JURTA Date: Fri, 06 Sep 2013 00:35:17 +0300 Message-ID: <8738pjymsq.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -3.4 (---) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.4 (---) When Info can't find an image file it replaces the image with the placeholder "[broken image]" even when there is ASCII variant of the image. It would be more user-friendly to display ASCII variant if it is provided in the Info file. Additionally this patch also displays the ALT attribute in the tooltip like web browsers do. === modified file 'lisp/info.el' --- lisp/info.el 2013-07-03 20:47:56 +0000 +++ lisp/info.el 2013-09-05 21:33:39 +0000 @@ -1611,11 +1611,15 @@ (defun Info-display-images-node () "")) (image (if (file-exists-p image-file) (create-image image-file) - "[broken image]"))) + (or (cdr (assoc-string "text" parameter-alist)) + (and src (concat "[broken image:" src "]")) + "[broken image]")))) (if (not (get-text-property start 'display)) (add-text-properties - start (point) `(display ,image rear-nonsticky (display))))) + start (point) + `(display ,image rear-nonsticky (display) + help-echo ,(cdr (assoc-string "alt" parameter-alist)))))) ;; text-only display, show alternative text if provided, or ;; otherwise a clue that there's meant to be a picture (delete-region start (point)) From unknown Fri Aug 15 20:55:51 2025 X-Loop: help-debbugs@gnu.org Subject: bug#15279: Info broken image Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 06 Sep 2013 01:22:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 15279 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Juri Linkov Cc: 15279@debbugs.gnu.org Received: via spool by 15279-submit@debbugs.gnu.org id=B15279.13784305077446 (code B ref 15279); Fri, 06 Sep 2013 01:22:02 +0000 Received: (at 15279) by debbugs.gnu.org; 6 Sep 2013 01:21:47 +0000 Received: from localhost ([127.0.0.1]:42587 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VHkk6-0001w2-NA for submit@debbugs.gnu.org; Thu, 05 Sep 2013 21:21:46 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:7089) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VHkk5-0001vq-59 for 15279@debbugs.gnu.org; Thu, 05 Sep 2013 21:21:45 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFHO+KK6/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLNBIUGA0kiB4GwS2RCgOkeoFegxM X-IPAS-Result: Av4EABK/CFHO+KK6/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLNBIUGA0kiB4GwS2RCgOkeoFegxM X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="26608972" Received: from 206-248-162-186.dsl.teksavvy.com (HELO pastel.home) ([206.248.162.186]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 05 Sep 2013 21:18:32 -0400 Received: by pastel.home (Postfix, from userid 20848) id 957F566A60; Thu, 5 Sep 2013 21:21:39 -0400 (EDT) From: Stefan Monnier Message-ID: References: <8738pjymsq.fsf@mail.jurta.org> Date: Thu, 05 Sep 2013 21:21:39 -0400 In-Reply-To: <8738pjymsq.fsf@mail.jurta.org> (Juri Linkov's message of "Fri, 06 Sep 2013 00:35:17 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) > When Info can't find an image file it replaces the image > with the placeholder "[broken image]" even when there is > ASCII variant of the image. It would be more user-friendly > to display ASCII variant if it is provided in the Info file. > Additionally this patch also displays the ALT attribute > in the tooltip like web browsers do. Looks good, please install, Stefan From unknown Fri Aug 15 20:55:51 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.503 (Entity 5.503) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Juri Linkov Subject: bug#15279: closed (Re: bug#15279: Info broken image) Message-ID: References: <87ioyd4r55.fsf@mail.jurta.org> <8738pjymsq.fsf@mail.jurta.org> X-Gnu-PR-Message: they-closed 15279 X-Gnu-PR-Package: emacs X-Gnu-PR-Keywords: patch Reply-To: 15279@debbugs.gnu.org Date: Fri, 06 Sep 2013 20:45:03 +0000 Content-Type: multipart/mixed; boundary="----------=_1378500303-30935-1" This is a multi-part message in MIME format... ------------=_1378500303-30935-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #15279: Info broken image which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 15279@debbugs.gnu.org. --=20 15279: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D15279 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1378500303-30935-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 15279-done) by debbugs.gnu.org; 6 Sep 2013 20:44:55 +0000 Received: from localhost ([127.0.0.1]:44977 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VI2ti-00082Y-RU for submit@debbugs.gnu.org; Fri, 06 Sep 2013 16:44:55 -0400 Received: from ps18281.dreamhost.com ([69.163.218.105]:56303 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VI2tg-00082L-Ft for 15279-done@debbugs.gnu.org; Fri, 06 Sep 2013 16:44:53 -0400 Received: from localhost.jurta.org (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 8E588258B9E936; Fri, 6 Sep 2013 13:44:45 -0700 (PDT) From: Juri Linkov To: Stefan Monnier Subject: Re: bug#15279: Info broken image Organization: JURTA References: <8738pjymsq.fsf@mail.jurta.org> Date: Fri, 06 Sep 2013 23:44:06 +0300 In-Reply-To: (Stefan Monnier's message of "Thu, 05 Sep 2013 21:21:39 -0400") Message-ID: <87ioyd4r55.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 15279-done Cc: 15279-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) >> When Info can't find an image file it replaces the image >> with the placeholder "[broken image]" even when there is >> ASCII variant of the image. It would be more user-friendly >> to display ASCII variant if it is provided in the Info file. >> Additionally this patch also displays the ALT attribute >> in the tooltip like web browsers do. > > Looks good, please install, Done. ------------=_1378500303-30935-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 5 Sep 2013 21:37:34 +0000 Received: from localhost ([127.0.0.1]:42355 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VHhF7-0004uj-Ty for submit@debbugs.gnu.org; Thu, 05 Sep 2013 17:37:34 -0400 Received: from eggs.gnu.org ([208.118.235.92]:39350) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VHhF6-0004uS-3y for submit@debbugs.gnu.org; Thu, 05 Sep 2013 17:37:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VHhEs-0006Kk-Cb for submit@debbugs.gnu.org; Thu, 05 Sep 2013 17:37:26 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_20 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:55570) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VHhEs-0006Kg-9K for submit@debbugs.gnu.org; Thu, 05 Sep 2013 17:37:18 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41044) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VHhEm-00024n-5j for bug-gnu-emacs@gnu.org; Thu, 05 Sep 2013 17:37:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VHhEg-0006JV-6a for bug-gnu-emacs@gnu.org; Thu, 05 Sep 2013 17:37:12 -0400 Received: from ps18281.dreamhost.com ([69.163.218.105]:56139 helo=ps18281.dreamhostps.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VHhEg-0006JR-0Q for bug-gnu-emacs@gnu.org; Thu, 05 Sep 2013 17:37:06 -0400 Received: from localhost.jurta.org (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 74F1E258B9E936 for ; Thu, 5 Sep 2013 14:37:03 -0700 (PDT) From: Juri Linkov To: bug-gnu-emacs@gnu.org Subject: Info broken image Organization: JURTA Date: Fri, 06 Sep 2013 00:35:17 +0300 Message-ID: <8738pjymsq.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -3.4 (---) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.4 (---) When Info can't find an image file it replaces the image with the placeholder "[broken image]" even when there is ASCII variant of the image. It would be more user-friendly to display ASCII variant if it is provided in the Info file. Additionally this patch also displays the ALT attribute in the tooltip like web browsers do. === modified file 'lisp/info.el' --- lisp/info.el 2013-07-03 20:47:56 +0000 +++ lisp/info.el 2013-09-05 21:33:39 +0000 @@ -1611,11 +1611,15 @@ (defun Info-display-images-node () "")) (image (if (file-exists-p image-file) (create-image image-file) - "[broken image]"))) + (or (cdr (assoc-string "text" parameter-alist)) + (and src (concat "[broken image:" src "]")) + "[broken image]")))) (if (not (get-text-property start 'display)) (add-text-properties - start (point) `(display ,image rear-nonsticky (display))))) + start (point) + `(display ,image rear-nonsticky (display) + help-echo ,(cdr (assoc-string "alt" parameter-alist)))))) ;; text-only display, show alternative text if provided, or ;; otherwise a clue that there's meant to be a picture (delete-region start (point)) ------------=_1378500303-30935-1--