Gnus development mailing list
 help / color / mirror / Atom feed
* problem in gnus-html-display-image: Xemacs while GNU Emacs is ok
@ 2014-10-15 12:15 Uwe Brauer
  0 siblings, 0 replies; only message in thread
From: Uwe Brauer @ 2014-10-15 12:15 UTC (permalink / raw)
  To: ding; +Cc: XEmacs Beta Discussion



gnus-html-display-image works differently in Xemacs an in gnus, 

A html message which contains some link to a gif image, is displayed
with GNU correctly but not with Xemacs. I debugged it with both Emacsen.

GNU emacs
(defun gnus-html-display-image (url start end &optional alt-text)
  "Display image at URL on text from START to END.
Use ALT-TEXT for the image string."
  (or alt-text (setq alt-text "*"))
  (if (string-match "\\`cid:" url)
      (let ((handle (mm-get-content-id (substring url (match-end 0)))))
	(when handle
	  (gnus-html-put-image (mm-with-part handle (buffer-string))
			       url alt-text)))
    (if (gnus-html-cache-expired url gnus-html-image-cache-ttl)
	;; We don't have it, so schedule it for fetching
	;; asynchronously.
	(gnus-html-schedule-image-fetching
	 (current-buffer)
	 (list url alt-text))
      ;; It's already cached, so just insert it.
      (gnus-html-put-image (gnus-html-get-image-data url) url alt-text))))
                                                        ^^: minibuffer
                                                        displays some
                                                        buffer which is
                                                        in gif format
                                                        then the
                                                        function display
                                                        it.

Xemacs

(defun gnus-html-display-image (url start end &optional alt-text)
  "Display image at URL on text from START to END.
Use ALT-TEXT for the image string."
  (or alt-text (setq alt-text "*"))
  (if (string-match "\\`cid:" url)
      (let ((handle (mm-get-content-id (substring url (match-end 0)))))
	(when handle
	  (gnus-html-put-image (mm-with-part handle (buffer-string))
			       url alt-text)))
    (if (gnus-html-cache-expired url gnus-html-image-cache-ttl)
	;; We don't have it, so schedule it for fetching
	;; asynchronously.
	(gnus-html-schedule-image-fetching
	 (current-buffer)
	 (list url alt-text))
                         ^^^returns: (nil . " *URL-5*"), which is a
                         buffer in gif format: as said in a different
                         message xemacs does not display the content of
                         this message
      ;; It's already cached, so just insert it.
      (gnus-html-put-image (gnus-html-get-image-data url) url alt-text))))
                                                                      ^xemacs
                                                                      jumps
                                                                      over
                                                                      this
                                                                      ()
                                                                      and
                                                                      does
                                                                      nothing

Any help would be appreciated.

Uwe Brauer 




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-10-15 12:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-15 12:15 problem in gnus-html-display-image: Xemacs while GNU Emacs is ok Uwe Brauer

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 NNTP newsgroup(s).