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

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

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


From: Michael Olson
Subject: [emacs-wiki-discuss] Re: [BUG?] muse-publish handling abnormal exit during call to publish
Date: Fri, 15 Jul 2005 21:01:47 -0500
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux)

drkm <address@hidden> writes:

> Peter K.Lee <address@hidden> writes:
>
>> 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)
>>         ...
>
> Yes, you're right.  But this construction sounds strange to me.
> What's the difference between it and simply visiting the file?
> Because we create a temporary buffer, and directly we fill it with
> the content of a file and associate the buffer with this file.
>
> 'muse-publish.el' doesn't have any Author or Maintainer tag, so I
> guess it's from Michael.  Why did you use a temporary buffer there?

Thanks for the detective work, Peter and drkm.

As far as I understand it, the reason for using the temp buffer is: If
an error occurs while publishing, don't clobber the original file.

Unfortunately, passing `t' as the second argument to
`insert-file-contents' seems to defeat this purpose.  It isn't
desirable to still have the file associated with the temp buffer.  My
guess is that once this command is modified (dropping the second
argument), the problem with the buffer-clobbering will be gone.

I think I'll try to modify (and rename!)
`muse-with-temp-buffer-no-prompt' so that it pops up a window with
information when an error occurs.  I'm not sure if the temp buffer
should be kept around ... maybe I'll make a debugging option that will
determine whether or not to kill the buffer.

-- 
Michael Olson -- FSF Associate Member #652 -- http://www.mwolson.org/
Interests: anime, Debian, XHTML, wiki, Emacs Lisp
  /` |\ | | | IRC: mwolson on freenode.net: #hcoop, #muse, #pulug
 |_] | \| |_| Jabber: mwolson_at_hcoop.net

Attachment: pgpIJkZ53UET7.pgp
Description: PGP signature


reply via email to

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