From: Juri Linkov <juri@jurta.org>
To: 15279@debbugs.gnu.org
Subject: bug#15279: Info broken image
Date: Fri, 06 Sep 2013 00:35:17 +0300 [thread overview]
Message-ID: <8738pjymsq.fsf@mail.jurta.org> (raw)
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))
next reply other threads:[~2013-09-05 21:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-05 21:35 Juri Linkov [this message]
2013-09-06 1:21 ` bug#15279: Info broken image Stefan Monnier
2013-09-06 20:44 ` Juri Linkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8738pjymsq.fsf@mail.jurta.org \
--to=juri@jurta.org \
--cc=15279@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).