[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Saving enriched mode with embedded image misplaces end tag

From: Derek Upham
Subject: Saving enriched mode with embedded image misplaces end tag
Date: Wed, 14 Nov 2001 15:55:24 -0800 (PST)

Run the following function in a directory where you have write access:

  (defun test-bar ()
    (find-file "bar.doc")
    (insert "This is a test.")
    (forward-word -1)
    (forward-char -1)
    ;; Point is now just after the "a".
    (insert-image (create-image "gnus.pbm") "gnus")

The function creates a file named "bar.doc" with the text

  This is a# test.

where the hash symbol is actually the big GNUS logo.  Kill that buffer and
load the file with ^X^F (find-file), and the text has changed to:

  This is a#

The final word, "test." has disappeared.  If we examine the saved file,
"bar.doc" (either load it literally, or view it from the shell), we see
the following:

  Content-Type: text/enriched
  Text-Width: 70
  This is a<x-display><param>(image :type pbm :file "gnus.pbm")</param>gnus 

This is incorrect---the "x-display" end tag should come immediately after
the word "gnus".  If we fix this by hand and re-load the file, it displays

This is with GNU Emacs 21.1.1 (i386-debian-linux-gnu, X toolkit, Xaw3d
scroll bars) of 2001-11-09 on raven, modified by Debian.


Derek Upham
address@hidden                                 http://www.serv.net/~sand

"Ha!  Your Leaping Tiger Kung Fu is no match for my Frightened Piglet style!"

reply via email to

[Prev in Thread] Current Thread [Next in Thread]