Subject: bug#25232: 24.4; Eliminate - Warning: Desktop file appears to be in use

From: "Richard Munitz (BLOOMBERG/ 731 LEX)" <[email-masked]>
Date: Mon, 19 Dec 2016 16:29:36 -0000

--text follows this line--

This is not a bug, rather a request for an optimization in desktop startup
behavior.
If an emacs process is killed (usually because it is left running when
the machine reboots), the next time I restart emacs, I get the
following: "Warning: Desktop file appears to be in use ..." along with the
pid of the former process.  And emacs will not begin loading the desktop 
until I enter "y" to the prompt.  I understand the purpose for the
warning.  However, if emacs has saved the machine and pid of the prior
session, it would seem that it should be capable of detecting that the
new instance is running on the same machine and that there is no
process currently on the machine having the previous pid. If those
conditions are met, then there can be no conflict with another running
instance of emacs and the warning and prompt should be skipped.

FYI, I have the following related to desktop support in my .emacs:
(desktop-save-mode 1)
(setq desktop-auto-save-timeout 60)
(setq desktop-restore-in-current-display t)

In GNU Emacs 24.4.1 (sparc-sun-solaris2.10, GTK+ Version 2.24.25)
 of 2016-12-08 on sdvlib7
Windowing system distributor `Hummingbird - Open Text', version 11.0.13830
Configured using:
 `configure --build=sparc-sun-solaris2.10 --host=sparc-sun-solaris2.10
 --prefix=/opt/bb --libdir=/opt/bb/lib64 -x-includes=/opt/bb/include
 -x-libraries=/opt/bb/lib64 --without-selinux --with-gif=no
 --without-gsettings CFLAGS=-m64 CPPFLAGS=-I/opt/bb/include
 'LDFLAGS=-m64 -L/opt/bb/lib64 -R/opt/bb/lib64''

Important settings:
  value of $LANG: en_US
  locale-coding-system: iso-latin-1-unix

Major mode: nXML

Minor modes in effect:
  desktop-save-mode: t
  electric-pair-mode: t
  show-paren-mode: t
  delete-selection-mode: t
  global-linum-mode: t
  linum-mode: t
  tooltip-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  global-visual-line-mode: t
  visual-line-mode: t
  transient-mark-mode: t

Recent input:
<help-echo> <down-mouse-1> <help-echo> <help-echo> 
<drag-mouse-1> <help-echo> <help-echo> y <switch-frame> 
<switch-frame> <switch-frame> <switch-frame> M-x r 
e p o r t - e m a i l <backspace> <backspace> c s - 
b u g <return>

Recent messages:
Indentation setup for shell type bash
Note: file is write protected
Using vacuous schema [4 times]
Setting up indent for shell type ksh88
Indentation variables are now local.
Indentation setup for shell type ksh88
Using vacuous schema
Wrote /home/rmunitz1/.emacs.d/.emacs.desktop.lock
Desktop: 4 frames, 165 buffers restored.
For information about GNU Emacs and the GNU system, type C-h C-a.

Load-path shadows:
None found.

Features:
(shadow sort gnus-util mail-extr emacsbug message cl-macs format-spec
rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums
mm-util help-fns mail-prsvr mail-utils python json comint ring
ansi-color conf-mode view noutline outline sh-script smie executable
make-mode nxml-uchnm rng-xsd xsd-regexp rng-cmpct rng-nxml rng-valid
rng-loc rng-uri rng-parse nxml-parse rng-match rng-dt rng-util rng-pttrn
nxml-ns nxml-mode nxml-outln nxml-rap nxml-util nxml-glyph nxml-enc
xmltok vc-git cc-langs cc-mode cc-fonts easymenu cc-guess cc-menus
cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs edmacro kmacro
zenburn-theme highlight-symbol easy-mmode cl gv thingatpt desktop
frameset cl-loaddefs cl-lib elec-pair paren delsel ido linum time-date
tooltip electric uniquify ediff-hook vc-hooks lisp-float-type mwheel
x-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list
newcomment lisp-mode prog-mode register page menu-bar rfn-eshadow timer
select scroll-bar mouse jit-lock font-lock syntax facemenu font-core
frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai
tai-viet lao korean japanese hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help
simple abbrev minibuffer nadvice loaddefs button faces cus-face macroexp
files text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote make-network-process
gfilenotify dynamic-setting font-render-setting move-toolbar gtk
x-toolkit x multi-tty emacs)

Memory information:
((conses 16 535473 23100)
 (symbols 48 34582 0)
 (miscs 40 15715 2143)
 (strings 32 77389 12883)
 (string-bytes 1 1758449)
 (vectors 16 22209)
 (vector-slots 8 756712 17666)
 (floats 8 223 621)
 (intervals 56 36344 464)
 (buffers 960 177))