[Top][All Lists]

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

Re: A few questions about desktop.el

From: Juanma Barranquero
Subject: Re: A few questions about desktop.el
Date: Fri, 22 Jul 2005 16:36:43 +0200

The very end of `desktop-save' contains:

  (setq default-directory dirname)
  (when (file-exists-p filename) (delete-file filename))
  (let ((coding-system-for-write 'emacs-mule))
    (write-region (point-min) (point-max) filename nil 'nomessage))))

The code to delete the desktop file before writing into it has
existed, AFAICS, since release 1.1 of desktop.el.

However, it is bringing me pain on Windows. If I try to exit Emacs
while viewing the .emacs.desktop from a command shell, Emacs tries to
delete the file (and apparently succeeds), and then tries to write it
anew (and it fails). After exiting the viewer program, .emacs.desktop
no longer exists. Not nice.

It is really necessary to delete the file prior to `write-region' it?
Are there use cases where that is an advantage?


reply via email to

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