From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juanma Barranquero Newsgroups: gmane.emacs.devel Subject: Re: A few questions about desktop.el Date: Fri, 22 Jul 2005 16:36:43 +0200 Message-ID: References: Reply-To: Juanma Barranquero NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1122043849 9091 80.91.229.2 (22 Jul 2005 14:50:49 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 22 Jul 2005 14:50:49 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jul 22 16:50:47 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Dvyqi-00034v-1F for ged-emacs-devel@m.gmane.org; Fri, 22 Jul 2005 16:50:04 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Dvysr-00059T-1F for ged-emacs-devel@m.gmane.org; Fri, 22 Jul 2005 10:52:17 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Dvyr3-0004i6-L8 for emacs-devel@gnu.org; Fri, 22 Jul 2005 10:50:25 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Dvyqs-0004aV-0E for emacs-devel@gnu.org; Fri, 22 Jul 2005 10:50:16 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Dvyqn-0004Wn-IC for emacs-devel@gnu.org; Fri, 22 Jul 2005 10:50:09 -0400 Original-Received: from [64.233.182.196] (helo=nproxy.gmail.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Dvyng-0000UD-U1 for emacs-devel@gnu.org; Fri, 22 Jul 2005 10:46:57 -0400 Original-Received: by nproxy.gmail.com with SMTP id i2so46348nfe for ; Fri, 22 Jul 2005 07:36:43 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=cAy8zM7qOvwjY+3diu/Zjsg0+MabomHxhDUJp22iKraocWOEKQYp2EFyTQKki4gvMo86TIbIGfBCxc8ccfsVMOoH6wrLmlMl5gJHZB0AbXS++XxadAPopEa8PGUXj4PHqILpqIUmSzpE71d1YmNu9hojSWBARhIvI5m1RB6Kghg= Original-Received: by 10.48.143.9 with SMTP id q9mr96815nfd; Fri, 22 Jul 2005 07:36:43 -0700 (PDT) Original-Received: by 10.48.250.5 with HTTP; Fri, 22 Jul 2005 07:36:43 -0700 (PDT) Original-To: Emacs Devel In-Reply-To: Content-Disposition: inline X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:41134 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:41134 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? --=20 /L/e/k/t/u