unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#5552: 23.1; desktop seems not quite to understand session management
@ 2010-02-09 17:42 rrt
  2010-02-09 18:57 ` Jan Djärv
  2010-02-10  9:08 ` Jan Djärv
  0 siblings, 2 replies; 7+ messages in thread
From: rrt @ 2010-02-09 17:42 UTC (permalink / raw)
  To: 5552

If I log out of my GNOME desktop then back in, desktop says that
another Emacs process (the old one) appears to be using the desktop
file and asks me if I want to use it anyway. If I say “y” then things
work as normal (unsurprisingly, since the old process is no longer
running). However, desktop should know that the old process is dead;
perhaps it needs to talk to the session manager code?


In GNU Emacs 23.1.1 (i486-pc-linux-gnu, GTK+ Version 2.18.3)
 of 2009-11-10 on vernadsky, modified by Debian
Windowing system distributor `The X.Org Foundation', version 11.0.10604000
configured using `configure  '--build=i486-linux-gnu' '--host=i486-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var/lib' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs23:/etc/emacs:/usr/local/share/emacs/23.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.1/site-lisp:/usr/share/emacs/site-lisp:/usr/share/emacs/23.1/leim' '--with-x=yes' '--with-x-toolkit=gtk' '--with-toolkit-scroll-bars' 'build_alias=i486-linux-gnu' 'host_alias=i486-linux-gnu' 'CFLAGS=-DDEBIAN -g -O2' 'LDFLAGS=-g' 'CPPFLAGS=''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_GB.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default-enable-multibyte-characters: t

Major mode: CPerl

Minor modes in effect:
  show-paren-mode: t
  savehist-mode: t
  minibuffer-electric-default-mode: t
  iswitchb-mode: t
  icomplete-mode: t
  global-auto-revert-mode: t
  desktop-save-mode: t
  global-whitespace-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  global-auto-composition-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
<down-mouse-1> <mouse-1> <help-echo> <down-mouse-1> 
<mouse-1> y <down-mouse-1> <mouse-1> <down-mouse-1> 
<mouse-1> M-x r e p o r t - e m <tab> <return>

Recent messages:
uncompressing emacs-6.gz...done
uncompressing emacs-7.gz...done
uncompressing emacs-8.gz...done
Scanning for "hard" Perl constructions... done
Loading make-mode...done
Scanning for "hard" Perl constructions... done
Scanning for "hard" Perl constructions... done
Scanning for "hard" Perl constructions... done
Lazy desktop load complete
call-interactively: Text is read-only [2 times]







^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#5552: 23.1; desktop seems not quite to understand session management
  2010-02-09 17:42 bug#5552: 23.1; desktop seems not quite to understand session management rrt
@ 2010-02-09 18:57 ` Jan Djärv
  2010-02-10  9:08 ` Jan Djärv
  1 sibling, 0 replies; 7+ messages in thread
From: Jan Djärv @ 2010-02-09 18:57 UTC (permalink / raw)
  To: rrt; +Cc: 5552



rrt@sc3d.org skrev 2010-02-09 18.42:
> If I log out of my GNOME desktop then back in, desktop says that
> another Emacs process (the old one) appears to be using the desktop
> file and asks me if I want to use it anyway. If I say “y” then things
> work as normal (unsurprisingly, since the old process is no longer
> running). However, desktop should know that the old process is dead;
> perhaps it needs to talk to the session manager code?
>

Note: The desktop-save feature is independent from the Gnome session 
management.  I too have seen this question when Emacs is terminated by just 
logging out.

	Jan D.

>
> In GNU Emacs 23.1.1 (i486-pc-linux-gnu, GTK+ Version 2.18.3)
>   of 2009-11-10 on vernadsky, modified by Debian
> Windowing system distributor `The X.Org Foundation', version 11.0.10604000
> configured using `configure  '--build=i486-linux-gnu' '--host=i486-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var/lib' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs23:/etc/emacs:/usr/local/share/emacs/23.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.1/site-lisp:/usr/share/emacs/site-lisp:/usr/share/emacs/23.1/leim' '--with-x=yes' '--with-x-toolkit=gtk' '--with-toolkit-scroll-bars' 'build_alias=i486-linux-gnu' 'host_alias=i486-linux-gnu' 'CFLAGS=-DDEBIAN -g -O2' 'LDFLAGS=-g' 'CPPFLAGS=''
>
> Important settings:
>    value of $LC_ALL: nil
>    value of $LC_COLLATE: nil
>    value of $LC_CTYPE: nil
>    value of $LC_MESSAGES: nil
>    value of $LC_MONETARY: nil
>    value of $LC_NUMERIC: nil
>    value of $LC_TIME: nil
>    value of $LANG: en_GB.UTF-8
>    value of $XMODIFIERS: nil
>    locale-coding-system: utf-8-unix
>    default-enable-multibyte-characters: t
>
> Major mode: CPerl
>
> Minor modes in effect:
>    show-paren-mode: t
>    savehist-mode: t
>    minibuffer-electric-default-mode: t
>    iswitchb-mode: t
>    icomplete-mode: t
>    global-auto-revert-mode: t
>    desktop-save-mode: t
>    global-whitespace-mode: t
>    mouse-wheel-mode: t
>    file-name-shadow-mode: t
>    global-font-lock-mode: t
>    font-lock-mode: t
>    blink-cursor-mode: t
>    global-auto-composition-mode: t
>    auto-composition-mode: t
>    auto-encryption-mode: t
>    auto-compression-mode: t
>    column-number-mode: t
>    line-number-mode: t
>    transient-mark-mode: t
>
> Recent input:
> <down-mouse-1>  <mouse-1>  <help-echo>  <down-mouse-1>
> <mouse-1>  y<down-mouse-1>  <mouse-1>  <down-mouse-1>
> <mouse-1>  M-x r e p o r t - e m<tab>  <return>
>
> Recent messages:
> uncompressing emacs-6.gz...done
> uncompressing emacs-7.gz...done
> uncompressing emacs-8.gz...done
> Scanning for "hard" Perl constructions... done
> Loading make-mode...done
> Scanning for "hard" Perl constructions... done
> Scanning for "hard" Perl constructions... done
> Scanning for "hard" Perl constructions... done
> Lazy desktop load complete
> call-interactively: Text is read-only [2 times]
>
>
>
>






^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#5552: 23.1; desktop seems not quite to understand session management
  2010-02-09 17:42 bug#5552: 23.1; desktop seems not quite to understand session management rrt
  2010-02-09 18:57 ` Jan Djärv
@ 2010-02-10  9:08 ` Jan Djärv
  2010-02-10  9:38   ` Chong Yidong
  1 sibling, 1 reply; 7+ messages in thread
From: Jan Djärv @ 2010-02-10  9:08 UTC (permalink / raw)
  To: rrt; +Cc: 5552

rrt@sc3d.org skrev:
> If I log out of my GNOME desktop then back in, desktop says that
> another Emacs process (the old one) appears to be using the desktop
> file and asks me if I want to use it anyway. If I say “y” then things
> work as normal (unsurprisingly, since the old process is no longer
> running). However, desktop should know that the old process is dead;
> perhaps it needs to talk to the session manager code?
> 

When you log out, the X connection is closed and emacs exits.  However, it 
does not run kill-emacs-hooks.  Desktop.el depends on that hook to clean up 
after itself.

Should we run kill-emacs instead of shut_down_emacs when exiting due to X 
connection lost?

	Jan D.






^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#5552: 23.1; desktop seems not quite to understand session management
  2010-02-10  9:08 ` Jan Djärv
@ 2010-02-10  9:38   ` Chong Yidong
  2010-02-15  7:48     ` Jan D.
  2010-05-02 18:50     ` Jan Djärv
  0 siblings, 2 replies; 7+ messages in thread
From: Chong Yidong @ 2010-02-10  9:38 UTC (permalink / raw)
  To: Jan Djärv; +Cc: 5552, rrt

Jan Djärv <jan.h.d@swipnet.se> writes:

> When you log out, the X connection is closed and emacs exits.
> However, it does not run kill-emacs-hooks.  Desktop.el depends on that
> hook to clean up after itself.
>
> Should we run kill-emacs instead of shut_down_emacs when exiting due
> to X connection lost?

There was a related thread about this a year ago, regarding how Emacs
responds to SIGTERM by calling shut_down_emacs rather than kill-emacs:

  http://lists.gnu.org/archive/html/emacs-devel/2009-01/msg00530.html

The thread did not have a clear conclusion, but I'm in favor of changing
things to run kill-emacs in such situations.  But I think this is best
done after the release, unless someone can come up with a very
convincing argument otherwise.






^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#5552: 23.1; desktop seems not quite to understand session management
  2010-02-10  9:38   ` Chong Yidong
@ 2010-02-15  7:48     ` Jan D.
  2010-02-15 14:11       ` Stefan Monnier
  2010-05-02 18:50     ` Jan Djärv
  1 sibling, 1 reply; 7+ messages in thread
From: Jan D. @ 2010-02-15  7:48 UTC (permalink / raw)
  To: Chong Yidong; +Cc: 5552, rrt

Chong Yidong wrote:
> There was a related thread about this a year ago, regarding how Emacs
> responds to SIGTERM by calling shut_down_emacs rather than kill-emacs:
>
>   http://lists.gnu.org/archive/html/emacs-devel/2009-01/msg00530.html
>
> The thread did not have a clear conclusion, but I'm in favor of changing
> things to run kill-emacs in such situations.  But I think this is best
> done after the release, unless someone can come up with a very
> convincing argument otherwise.
>   
Then we need to add some parameter or other mean to tell functions in 
kill-emacs-hook that is it not OK to interact with the user. This is the 
case if the X server closes connection in case of a logout.  Desktop.el 
might in some situations try to ask the user if a desktop file shall be 
used.

    Jan D.







^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#5552: 23.1; desktop seems not quite to understand session management
  2010-02-15  7:48     ` Jan D.
@ 2010-02-15 14:11       ` Stefan Monnier
  0 siblings, 0 replies; 7+ messages in thread
From: Stefan Monnier @ 2010-02-15 14:11 UTC (permalink / raw)
  To: Jan D.; +Cc: Chong Yidong, 5552, rrt

>> There was a related thread about this a year ago, regarding how Emacs
>> responds to SIGTERM by calling shut_down_emacs rather than kill-emacs:
>> http://lists.gnu.org/archive/html/emacs-devel/2009-01/msg00530.html
>> The thread did not have a clear conclusion, but I'm in favor of changing
>> things to run kill-emacs in such situations.  But I think this is best
>> done after the release, unless someone can come up with a very
>> convincing argument otherwise.
> Then we need to add some parameter or other mean to tell functions in
> kill-emacs-hook that is it not OK to interact with the user.  This is the
> case if the X server closes connection in case of a logout.  Desktop.el
> might in some situations try to ask the user if a desktop file shall
> be used.

Or alternatively use a new hook instead (call it `emacs-exit-hook' maybe),
i.e. pass that parameter via the control flow rather than the data flow.


        Stefan






^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#5552: 23.1; desktop seems not quite to understand session management
  2010-02-10  9:38   ` Chong Yidong
  2010-02-15  7:48     ` Jan D.
@ 2010-05-02 18:50     ` Jan Djärv
  1 sibling, 0 replies; 7+ messages in thread
From: Jan Djärv @ 2010-05-02 18:50 UTC (permalink / raw)
  To: Chong Yidong; +Cc: rrt, 5552-done

2010-02-10 10:38, Chong Yidong skrev:
> Jan Djärv<jan.h.d@swipnet.se>  writes:
>
>> When you log out, the X connection is closed and emacs exits.
>> However, it does not run kill-emacs-hooks.  Desktop.el depends on that
>> hook to clean up after itself.
>>
>> Should we run kill-emacs instead of shut_down_emacs when exiting due
>> to X connection lost?
>
> There was a related thread about this a year ago, regarding how Emacs
> responds to SIGTERM by calling shut_down_emacs rather than kill-emacs:
>
>    http://lists.gnu.org/archive/html/emacs-devel/2009-01/msg00530.html
>
> The thread did not have a clear conclusion, but I'm in favor of changing
> things to run kill-emacs in such situations.  But I think this is best
> done after the release, unless someone can come up with a very
> convincing argument otherwise.

kill-emacs is now run in Emacs 24 when X connection is lost, when SIGTERM or 
SIGHUP is received (Gnome session management uses SIGHUP to kill X clients).

	Jan D.







^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-05-02 18:50 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-09 17:42 bug#5552: 23.1; desktop seems not quite to understand session management rrt
2010-02-09 18:57 ` Jan Djärv
2010-02-10  9:08 ` Jan Djärv
2010-02-10  9:38   ` Chong Yidong
2010-02-15  7:48     ` Jan D.
2010-02-15 14:11       ` Stefan Monnier
2010-05-02 18:50     ` Jan Djärv

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