unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#15279: Info broken image
@ 2013-09-05 21:35 Juri Linkov
  2013-09-06  1:21 ` Stefan Monnier
  0 siblings, 1 reply; 3+ messages in thread
From: Juri Linkov @ 2013-09-05 21:35 UTC (permalink / raw
  To: 15279

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))
 





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#15279: Info broken image
  2013-09-05 21:35 bug#15279: Info broken image Juri Linkov
@ 2013-09-06  1:21 ` Stefan Monnier
  2013-09-06 20:44   ` Juri Linkov
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Monnier @ 2013-09-06  1:21 UTC (permalink / raw
  To: Juri Linkov; +Cc: 15279

> 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





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#15279: Info broken image
  2013-09-06  1:21 ` Stefan Monnier
@ 2013-09-06 20:44   ` Juri Linkov
  0 siblings, 0 replies; 3+ messages in thread
From: Juri Linkov @ 2013-09-06 20:44 UTC (permalink / raw
  To: Stefan Monnier; +Cc: 15279-done

>> 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.





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-09-06 20:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-05 21:35 bug#15279: Info broken image Juri Linkov
2013-09-06  1:21 ` Stefan Monnier
2013-09-06 20:44   ` Juri Linkov

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).