From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Reuben Thomas Newsgroups: gmane.emacs.devel Subject: Re: desktop.el: autosave? Date: Mon, 3 Dec 2007 21:14:28 +0000 (GMT) Message-ID: References: <8763zjfe0v.fsf@jurta.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Trace: ger.gmane.org 1196725634 11142 80.91.229.12 (3 Dec 2007 23:47:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 3 Dec 2007 23:47:14 +0000 (UTC) Cc: rms@gnu.org, emacs-devel@gnu.org To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Dec 04 00:47:22 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IzL0M-0005cC-FR for ged-emacs-devel@m.gmane.org; Tue, 04 Dec 2007 00:47:15 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IzL01-0006W2-Uc for ged-emacs-devel@m.gmane.org; Mon, 03 Dec 2007 18:46:53 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IzImV-00035h-Ue for emacs-devel@gnu.org; Mon, 03 Dec 2007 16:24:47 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IzImS-00034s-7L for emacs-devel@gnu.org; Mon, 03 Dec 2007 16:24:47 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IzImS-00034p-1r for emacs-devel@gnu.org; Mon, 03 Dec 2007 16:24:44 -0500 Original-Received: from pelican.sc3d.org ([216.184.201.86]) by monty-python.gnu.org with esmtps (SSL 3.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1IzImC-0007Vx-6y; Mon, 03 Dec 2007 16:24:28 -0500 DomainKey-Signature: a=rsa-sha1; s=key1024; d=sc3d.org; c=nofws; q=dns; b=OleAK3UyLZSCxILettMqmjm8N/cqD3FhKLM9b//T2598W1q0ycxEvkQjM/05HffLXJ/KXdDjXx7n4RRxU15h7CWtuCa0c6hWKW1//3YJK1eycUwaByXmt/aSyf1uLIPOsVsaW5ErhiHU9Szu7Xc0Rfx4j9r40GTsgbLDue6z5dw= Original-Received: from localhost (cpc4-hitc1-0-0-cust477.lutn.cable.ntl.com [86.11.13.222]) by pelican.sc3d.org (pf ESMTP spamd IP-based SPAM blocker) with ASMTP (SSL) id IHR81231; Mon, 03 Dec 2007 16:14:31 -0500 X-X-Sender: rrt@localhost.localdomain In-Reply-To: <8763zjfe0v.fsf@jurta.org> User-Agent: Alpine 0.99999 (DEB 796 2007-11-08) X-detected-kernel: by monty-python.gnu.org: Windows 2000 SP4, XP SP1+ X-Mailman-Approved-At: Mon, 03 Dec 2007 18:42:56 -0500 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:84622 Archived-At: On Sat, 1 Dec 2007, Juri Linkov wrote: > I use in .emacs: > > (defun my-desktop-save () > (interactive) > ;; `desktop-owner' is a new function in Emacs 22.1.50 to check > ;; for conflicts between two running Emacs instances. > ;; We don't want automatic saving in the second Emacs process. > (if (and (fboundp 'desktop-owner) (eq (desktop-owner) (emacs-pid))) > (desktop-save "~"))) Why did you not use desktop-save-in-desktop-dir? I use stable Emacs so I won't get the benefit of desktop-owner, but thanks for writing it so I will automagically as soon as it exists in stable! -- http://rrt.sc3d.org/ | The yak is slow but the earth is patient (LucasArts)