unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Glenn Morris <rgm@gnu.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: trikl@online.de, 10977@debbugs.gnu.org
Subject: bug#10977: detail from .xession-errors concerning .desktop extension	of ~./emacs.desktop
Date: Mon, 12 Mar 2012 12:42:52 -0400	[thread overview]
Message-ID: <m1zkblkbxv.fsf@fencepost.gnu.org> (raw)
In-Reply-To: <jwvehszzzm2.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Sat, 10 Mar 2012 20:39:46 -0500")

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.





  reply	other threads:[~2012-03-12 16:42 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-09  9:55 bug#10977: 24.0.94; filename "emacs.desktop" collides with kde xy*.desktop logic Thomas Rikl
2012-03-09 10:04 ` Eli Zaretskii
2012-03-09 18:21 ` Glenn Morris
2012-03-09 20:59 ` bug#10977: detail from .xession-errors concerning .desktop extension of ~./emacs.desktop Th. Rikl
2012-03-09 21:33   ` Glenn Morris
2012-03-10  7:21     ` Eli Zaretskii
2012-03-10 14:31       ` Stefan Monnier
2012-03-10 19:16         ` Thomas Rikl
2012-03-10 19:25         ` Glenn Morris
2012-03-10 19:28           ` Glenn Morris
2012-03-11  1:39             ` Stefan Monnier
2012-03-12 16:42               ` Glenn Morris [this message]
2012-03-12 18:14                 ` Stefan Monnier
2012-03-12 18:49                   ` Glenn Morris
2012-03-12 19:35                     ` Stefan Monnier
2012-03-12  9:34           ` Chong Yidong
2012-03-12 12:38             ` Stefan Monnier
2012-03-12 13:58               ` bug#10977: detail from .xession-errors concerning .desktopextension " Drew Adams
2012-06-21  7:27 ` bug#10977: 24.0.94; filename "emacs.desktop" collides with kde xy*.desktop logic Chong Yidong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m1zkblkbxv.fsf@fencepost.gnu.org \
    --to=rgm@gnu.org \
    --cc=10977@debbugs.gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=trikl@online.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).