emacs-wiki-discuss
[Top][All Lists]
Advanced

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

Re: [emacs-wiki-discuss] Re: [BUG?] muse-publish handling abnormal exit


From: Peter K . Lee
Subject: Re: [emacs-wiki-discuss] Re: [BUG?] muse-publish handling abnormal exit during call to publish
Date: Fri, 15 Jul 2005 14:45:08 -0400
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/22.0.50 (gnu/linux)

drkm <address@hidden> writes:

>   BTW, I can't reproduce such a request to save the temporary
> buffer.  Calling the following function results in displaying the
> error, and beeping, in the usual way:
>
>     (defun drkm:test ()
>       (interactive)
>       (with-temp-buffer
>         (insert "To modify the buffer...")
>         (error "Some error")))
>
>   Here is the definition of 'with-temp-buffer' on my Emacs:
>
>     (defmacro with-temp-buffer (&rest body)
>       "Create a temporary buffer, and evaluate BODY there like `progn'.
>     See also `with-temp-file' and `with-output-to-string'."
>       (declare (indent 0) (debug t))
>       (let ((temp-buffer (make-symbol "temp-buffer")))
>         `(let ((,temp-buffer (generate-new-buffer " *temp*")))
>            (unwind-protect
>                (with-current-buffer ,temp-buffer
>                  ,@body)
>              (and (buffer-name ,temp-buffer)
>                   (kill-buffer ,temp-buffer))))))

Mine reads the same.

>   What's the version of the Emacs you use?

I'm using GNU Emacs 22.0.50.1 (i686-pc-linux-gnu, multi-tty) of
2005-04-06 on psycho

I think it may be a little more unique to muse, I'm suspecting this to
be what causes the behavior:

      (with-temp-buffer
        (insert-file-contents file t)
        ...

Check it out on muse-publish.el

I'm not exactly sure how, but it appears that call makes the temporary
buffer want to save the contents...

-Peter




reply via email to

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