Re: with-temp-buffer, insert-file-content and errors

2005-07-19 Thread Stefan Monnier
> drkm was using code from my emacs-wiki program as an example for this. > You're right in that using a non-nil VISIT argument was a bad idea. > I've also worked around the "prompted to save a temp buffer" problem > by making a macro called `emacs-wiki-with-temp-buffer' as follows. > The condition-

Re: with-temp-buffer, insert-file-content and errors

2005-07-18 Thread Michael Olson
"Richard M. Stallman" <[EMAIL PROTECTED]> writes: > I think it is incorrect to use insert-file-contents with VISIT > non-nil on a temp buffer, so I think we don't need to try to fix > this. (It would not be easy, since the unwind-protect cleanup has > to execute before the error message gets disp

Re: with-temp-buffer, insert-file-content and errors

2005-07-17 Thread drkm
"Richard M. Stallman" writes: > I think it is incorrect to use insert-file-contents with VISIT non-nil > on a temp buffer, so I think we don't need to try to fix this. Ok. Where did you find this info? > (It would not be easy, since the unwind-protect cleanup has to > execute before the error

Re: with-temp-buffer, insert-file-content and errors

2005-07-16 Thread Richard M. Stallman
(defun drkm:test () (interactive) (with-temp-buffer (insert-file-contents "/tmp/an-existing-file" t) (insert "To modify the buffer...") (error "Some error"))) I think it is incorrect to use insert-file-contents with VISIT non-nil on a