unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Problem using with-temp-file
@ 2007-02-07 15:52 rgb
  2007-02-07 16:52 ` Robert Thorpe
  0 siblings, 1 reply; 10+ messages in thread
From: rgb @ 2007-02-07 15:52 UTC (permalink / raw)
  To: help-gnu-emacs

When I use with-temp-file I end up with an empty file although the
trace doesn't show me any good reason for the file being empty.

Does anyone see why I get an empty file?
I inserted the call to debug and looked at the temp buffer to be sure
the correct data really was in the buffer.  The arguments to write-
region seem to confirm that it's working against the correct
buffer....

Thanks

Debugger entered--entering a function:
* write-region(1 2943 "~/Data-2007-02-07-07:17.txt" nil 0)
* (save-current-buffer (set-buffer temp-buffer) (widen) (write-region
(point-min) (point-max) temp-file nil 0))
* (with-current-buffer temp-buffer (widen) (write-region (point-min)
(point-max) temp-file nil 0))
  (prog1 (with-current-buffer temp-buffer (insert ...) (debug)) (with-
current-buffer temp-buffer (widen) (write-region ... ... temp-file nil
0)))
  (unwind-protect (prog1 (with-current-buffer temp-buffer ... ...)
(with-current-buffer temp-buffer ... ...)) (and (buffer-name temp-
buffer) (kill-buffer temp-buffer)))
  (let ((temp-file my-data-file) (temp-buffer ...)) (unwind-protect
(prog1 ... ...) (and ... ...)))
  (with-temp-file my-data-file (insert (get-my-data)) (debug))
  eval((with-temp-file my-data-file (insert (get-my-data)) (debug)))
  eval-expression((with-temp-file my-data-file (insert (get-my-data))
(debug)) nil)
  call-interactively(eval-expression)

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

end of thread, other threads:[~2007-02-10  9:38 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-02-07 15:52 Problem using with-temp-file rgb
2007-02-07 16:52 ` Robert Thorpe
2007-02-07 18:05   ` rgb
2007-02-07 18:29     ` rgb
2007-02-08 10:30       ` Robert Thorpe
2007-02-08 14:09         ` rgb
2007-02-08 16:02           ` Robert Thorpe
2007-02-10  9:38             ` Kevin Rodgers
2007-02-09  4:38         ` Stefan Monnier
2007-02-09  9:02           ` Juanma Barranquero

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).