all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* with-temp-buffer, insert-file-content and errors
@ 2005-07-15 22:54 drkm
  2005-07-17  6:45 ` Richard M. Stallman
  0 siblings, 1 reply; 5+ messages in thread
From: drkm @ 2005-07-15 22:54 UTC (permalink / raw)


  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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2005-07-19 14:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-15 22:54 with-temp-buffer, insert-file-content and errors drkm
2005-07-17  6:45 ` Richard M. Stallman
2005-07-17 12:11   ` drkm
2005-07-18 23:11   ` Michael Olson
2005-07-19 14:34     ` Stefan Monnier

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.