emacs-devel
[Top][All Lists]
Advanced

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

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


From: drkm
Subject: with-temp-buffer, insert-file-content and errors
Date: Sat, 16 Jul 2005 00:54:45 +0200
User-agent: Gnus/5.110003 (No Gnus v0.3) Emacs/22.0.50 (windows-nt)

  Hi

  If you eval the following:

    (defun drkm:test ()
      (interactive)
      (with-temp-buffer
        (insert-file-contents "/tmp/an-existing-file" t)
        (insert "To modify the buffer...")
        (error "Some error")))

and then 'M-x drkm:test <RET>', you'll be prompt for saving or
not the " *temp*" buffer, *before* seeing the error (making a
function is only to not have the debugger started because using
'C-x C-e').

  But because you don't see the error when you are prompted, in
some case it may be more difficult to know what you want to
response.

  I guess 'with-temp-buffer' have to be modified to show the
error before (or while) 'kill-buffer' prompts the user, isn't it?

--drkm





reply via email to

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