From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Glenn Morris Newsgroups: gmane.emacs.bugs Subject: bug#10977: detail from .xession-errors concerning .desktop extension of ~./emacs.desktop Date: Mon, 12 Mar 2012 12:42:52 -0400 Message-ID: References: <201203091055.38668.trikl@online.de> <4F5A6F18.4080109@online.de> <83k42szzs8.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1331570675 24238 80.91.229.3 (12 Mar 2012 16:44:35 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 12 Mar 2012 16:44:35 +0000 (UTC) Cc: trikl@online.de, 10977@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Mar 12 17:44:33 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1S78MK-0007RY-GL for geb-bug-gnu-emacs@m.gmane.org; Mon, 12 Mar 2012 17:44:32 +0100 Original-Received: from localhost ([::1]:44135 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S78MJ-0000xC-TR for geb-bug-gnu-emacs@m.gmane.org; Mon, 12 Mar 2012 12:44:31 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:46770) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S78MB-0000Zv-09 for bug-gnu-emacs@gnu.org; Mon, 12 Mar 2012 12:44:29 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S78Lz-0004Ig-88 for bug-gnu-emacs@gnu.org; Mon, 12 Mar 2012 12:44:22 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:40245) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S78Lz-0004Ic-4v for bug-gnu-emacs@gnu.org; Mon, 12 Mar 2012 12:44:11 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1S78os-00053v-3t for bug-gnu-emacs@gnu.org; Mon, 12 Mar 2012 13:14:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Glenn Morris Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 12 Mar 2012 17:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10977 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 10977-submit@debbugs.gnu.org id=B10977.133157238219324 (code B ref 10977); Mon, 12 Mar 2012 17:14:02 +0000 Original-Received: (at 10977) by debbugs.gnu.org; 12 Mar 2012 17:13:02 +0000 Original-Received: from localhost ([127.0.0.1]:47066 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S78nt-00051Z-Hg for submit@debbugs.gnu.org; Mon, 12 Mar 2012 13:13:01 -0400 Original-Received: from fencepost.gnu.org ([208.118.235.10]:35481) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S78nh-00051A-6I for 10977@debbugs.gnu.org; Mon, 12 Mar 2012 13:13:00 -0400 Original-Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1S78Kj-0000sk-BY; Mon, 12 Mar 2012 12:42:53 -0400 X-Spook: Manfurov freedom M-14 NWO rs9512c digicash e-cash event X-Ran: X\]3:DTBND\-T=iwPyze)D]PBoV|*pI7>(>Ow%ZbI|O,6NeXv>N\a{7;3_4 (Stefan Monnier's message of "Sat, 10 Mar 2012 20:39:46 -0500") User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:57724 Archived-At: Stefan Monnier wrote: >>> I think the necessary change would be to make desktop-read set >>> desktop-dirname to user-emacs-directory if no existing desktop is found >>> in any of those three locations (and no DIRNAME arg was specified). > > Agreed. > >> Only in the case where "." = "~", I should have said. > > Disagreed. I would agree to special case the "."="~" in the sense of > ignoring "." from desktop-path when "." is "~" (so that > user-emacs-directory takes precedence over ~), but special casing it > when setting desktop-dirname doesn't seem to bring us anything. echo '(desktop-save-mode 1)' >| ~/.emacs emacs C-h v desktop-dirname You'll find it set to the value of PWD. This controls where the desktop gets saved on exit. I'm saying that when you start in HOME, Emacs should prefer to save in user-emacs-directory rather than PWD; but not when you start in /some/other/place (you could never have more than one desktop then; I make use of multiple desktops). Another option: Save all desktops to ~/.emacs.d/desktops/; either with the directory name encoded in the name of the desktop file, or have an index file that maps starting directories to desktop files. That would also allow for named desktops (desktop-project1, desktop-project2, etc). PS I've also changed my mind and think that .desktop.el would be a better name than .emacs.desktop. Would need compat code to load .emacs.desktop if it exists, but prefer saving to .desktop.el.