all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@jurta.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: [Emacs-diffs] trunk r116304: * lisp/desktop.el (desktop-read): Claim the lock when the owner is not the current process.
Date: Sat, 08 Feb 2014 12:14:44 +0200	[thread overview]
Message-ID: <871tzdq5er.fsf@mail.jurta.org> (raw)
In-Reply-To: <838utmxcre.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 08 Feb 2014 09:52:05 +0200")

>> The one that comes last wins.  The last session will do auto-saving,
>> the previous won't.  At least, there should be no conflict of both sessions
>> trying to auto-save to the same file, because auto-saving checks the ownership.
>> The conflict might occur when during exiting both sessions will try writing
>> to the same file.  I see nothing in `desktop-kill' that would prevent saving
>> to a non-locked desktop, except the question "Save desktop?"
>
> That's not what I see today, I think.  When I need to test something
> in a fresh session, I sometimes by mistake invoke "emacs" instead of
> "emacs -Q", which reads my ~/.emacs and activates desktop saving.  The
> main Emacs session is alive, of course.  Then, when I exit, I'm asked
> whether to save desktop and given the opportunity to say NO,

When you invoke "emacs" instead of "emacs -Q" by mistake,
it warns you about the mistake by asking

  "Warning: desktop file appears to be in use by PID %s.
   Using it may cause conflicts.  Use it anyway? "

so you could just say NO.

> because I certainly don't want my main desktop file to be overwritten
> by this mistaken session.  I'm not sure this change doesn't eliminate
> this useful capability.

Even when you answer YES, and a new session will auto-save the desktop,
you still can save the final version of the desktop from the first session
if you exit it later than the auto-saving session, so it will overwrite
the desktop from the latest exited session.



  reply	other threads:[~2014-02-08 10:14 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.190526.1391788637.10747.emacs-diffs@gnu.org>
2014-02-07 16:20 ` [Emacs-diffs] trunk r116304: * lisp/desktop.el (desktop-read): Claim the lock when the owner is not the current process Eli Zaretskii
2014-02-07 19:42   ` Juri Linkov
2014-02-07 20:25     ` Juanma Barranquero
2014-02-08 10:11       ` Juri Linkov
2014-02-08 10:21         ` Juanma Barranquero
2014-02-08 10:35           ` Juri Linkov
2014-02-08 10:42             ` Juanma Barranquero
2014-02-08 19:32               ` Juri Linkov
2014-02-08 20:29                 ` Juanma Barranquero
2014-02-08 21:08                   ` Juanma Barranquero
2014-02-08  7:52     ` Eli Zaretskii
2014-02-08 10:14       ` Juri Linkov [this message]
2014-02-08 10:47         ` David Kastrup
2014-02-08 10:52         ` Eli Zaretskii
2014-02-08 11:16           ` Andreas Schwab
2014-02-08 14:22             ` Eli Zaretskii

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

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

  git send-email \
    --in-reply-to=871tzdq5er.fsf@mail.jurta.org \
    --to=juri@jurta.org \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.