emacs-devel
[Top][All Lists]
Advanced

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

Re: Saving enriched mode with embedded image misplaces end tag


From: Richard Stallman
Subject: Re: Saving enriched mode with embedded image misplaces end tag
Date: Fri, 28 Dec 2001 22:31:30 -0700 (MST)

    |> I tried it, and I got the correct results.  Can anyone else make it
    |> fail?  Does it fail if you run emacs with `emacs -q'?
    |> Does it fail if you build the current Emacs sources from CVS?

    I can reproduce that with 21.1.  I also get these messages:

    Enriched: encoding document...
    Can't close x-display: not open.
    Can't close (image :type pbm :file "gnus.pbm"): not open.
    These text properties could not be saved:
        (intangible)

Can anyone reproduce this bug with the current sources from CVS?
Is the bug fixed?


From: Derek Upham <address@hidden>
To: address@hidden
Subject: Saving enriched mode with embedded image misplaces end tag
Message-ID: <address@hidden>
MIME-Version: 1.0
Sender: address@hidden
Errors-To: address@hidden
X-BeenThere: address@hidden
X-Mailman-Version: 2.0.5
Precedence: bulk
List-Help: <mailto:address@hidden>
List-Post: <mailto:address@hidden>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-gnu-emacs>,
        <mailto:address@hidden>
List-Id: Bug reports for GNU Emacs,
        the Swiss army knife of text editors <bug-gnu-emacs.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-gnu-emacs>,
        <mailto:address@hidden>
List-Archive: <http://mail.gnu.org/pipermail/bug-gnu-emacs/>
Date: Wed, 14 Nov 2001 15:55:24 -0800 (PST)
Content-Type: TEXT/PLAIN; charset=US-ASCII
Content-Length: 1487

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

  (defun test-bar ()
    (find-file "bar.doc")
    (enriched-mode)
    (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")
    (save-buffer))

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 
test.</x-display>

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

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

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