GNU bug report logs - #5512
Automatically saving and restoring an Emacs session in GNOME

Previous Next

Package: emacs;

Reported by: Reuben Thomas <rrt <at> sc3d.org>

Date: Tue, 2 Feb 2010 15:23:01 UTC

Severity: minor

Tags: moreinfo

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 5512 in the body.
You can then email your comments to 5512 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5512; Package emacs. (Tue, 02 Feb 2010 15:23:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Reuben Thomas <rrt <at> sc3d.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 02 Feb 2010 15:23:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Reuben Thomas <rrt <at> sc3d.org>
To: bug-emacs <bug-emacs <at> gnu.org>
Subject: Automatically saving and restoring an Emacs session in GNOME
Date: Tue, 2 Feb 2010 15:21:29 +0000
When I log out of my GNOME desktop, if Emacs (23.1) is running I get a
message that it is "not responding". I therefore usually manually quit
Emacs before logging out.

Looking at the source, it seems that Emacs does have xsession support,
so I am wondering what the problem is here. I am only running Emacs
interactively, not in any sort of daemon mode, so the only emacs
process I have running is the one I started myself.

I can't see anything about this in the manual, but of course the
trouble is that "session" occurs many times. I can't find "xsession"
at all in the manual, and "log out" doesn't yield anything helpful
either. Searching online suggests that Emacs may need some help with
GNOME, but I can't see which version or why exactly it needs help, if
it does.

Clarification sought!

-- 
http://rrt.sc3d.org
occupants, n. professional underwear





Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5512; Package emacs. (Tue, 02 Feb 2010 19:46:01 GMT) Full text and rfc822 format available.

Message #8 received at 5512 <at> debbugs.gnu.org (full text, mbox):

From: Jan Djärv <jan.h.d <at> swipnet.se>
To: Reuben Thomas <rrt <at> sc3d.org>
Cc: 5512 <at> debbugs.gnu.org
Subject: Re: bug#5512: Automatically saving and restoring an Emacs session
	in	GNOME
Date: Tue, 02 Feb 2010 20:45:24 +0100

Reuben Thomas skrev 2010-02-02 16.21:
> When I log out of my GNOME desktop, if Emacs (23.1) is running I get a
> message that it is "not responding". I therefore usually manually quit
> Emacs before logging out.
>
> Looking at the source, it seems that Emacs does have xsession support,
> so I am wondering what the problem is here. I am only running Emacs
> interactively, not in any sort of daemon mode, so the only emacs
> process I have running is the one I started myself.
>
> I can't see anything about this in the manual, but of course the
> trouble is that "session" occurs many times. I can't find "xsession"
> at all in the manual, and "log out" doesn't yield anything helpful
> either. Searching online suggests that Emacs may need some help with
> GNOME, but I can't see which version or why exactly it needs help, if
> it does.
>
> Clarification sought!

Maybe your Emacs was built without libSM?  Did you compile it yourself?
In that case, check if HAVE_X_SM is defined in src/config.h.

If not, try to see if Emacs is linked to libSM.  On GNU/Linux that is
% ldd emacs

Please yes M-x report-emacs-bug when reporting bugs, it includes information 
that helps tracking down the bug.

	Jan D.







Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5512; Package emacs. (Tue, 02 Feb 2010 20:12:02 GMT) Full text and rfc822 format available.

Message #11 received at 5512 <at> debbugs.gnu.org (full text, mbox):

From: Reuben Thomas <rrt <at> sc3d.org>
To: Jan Djärv <jan.h.d <at> swipnet.se>
Cc: 5512 <5512 <at> debbugs.gnu.org>
Subject: Re: bug#5512: Automatically saving and restoring an Emacs session in 
	GNOME
Date: Tue, 2 Feb 2010 20:10:50 +0000
On 2 February 2010 19:45, Jan Djärv <jan.h.d <at> swipnet.se> wrote:
>
> Maybe your Emacs was built without libSM?  Did you compile it yourself?
> In that case, check if HAVE_X_SM is defined in src/config.h.

It is the standard Ubuntu build of Emacs 23.1, and it is linked
against libSM. Is there any other information I can give?

Here's the output that report-emacs-bug gives:



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: Org

Minor modes in effect:
  shell-dirtrack-mode: t
  filladapt-mode: t
  longlines-mode: t
  buffer-face-mode: t
  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
  smart-quotes-mode: t
  global-whitespace-mode: t
  mouse-wheel-mode: t
  use-hard-newlines: 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

-- 
http://rrt.sc3d.org
dowsing: it may not be scientific, but at least it’s well-intentioned




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5512; Package emacs. (Mon, 08 Feb 2010 07:50:02 GMT) Full text and rfc822 format available.

Message #14 received at 5512 <at> debbugs.gnu.org (full text, mbox):

From: Jan Djärv <jan.h.d <at> swipnet.se>
To: Reuben Thomas <rrt <at> sc3d.org>
Cc: 5512 <5512 <at> debbugs.gnu.org>
Subject: Re: bug#5512: Automatically saving and restoring an Emacs session
	in 	GNOME
Date: Mon, 08 Feb 2010 08:49:17 +0100
Reuben Thomas skrev:
> On 2 February 2010 19:45, Jan Djärv <jan.h.d <at> swipnet.se> wrote:
>> Maybe your Emacs was built without libSM?  Did you compile it yourself?
>> In that case, check if HAVE_X_SM is defined in src/config.h.
> 
> It is the standard Ubuntu build of Emacs 23.1, and it is linked
> against libSM. Is there any other information I can give?
> 
> Here's the output that report-emacs-bug gives:

Start emacs and do
C-h v x-session-id.
C-h v emacs-save-session-functions
C-h v emacs-session-filename

What is the output?

	Jan D.





Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5512; Package emacs. (Mon, 08 Feb 2010 20:47:02 GMT) Full text and rfc822 format available.

Message #17 received at 5512 <at> debbugs.gnu.org (full text, mbox):

From: Reuben Thomas <rrt <at> sc3d.org>
To: Jan Djärv <jan.h.d <at> swipnet.se>
Cc: 5512 <5512 <at> debbugs.gnu.org>
Subject: Re: bug#5512: Automatically saving and restoring an Emacs session in 
	GNOME
Date: Mon, 8 Feb 2010 20:45:54 +0000
On 8 February 2010 07:49, Jan Djärv <jan.h.d <at> swipnet.se> wrote:
> Reuben Thomas skrev:
>>
>> On 2 February 2010 19:45, Jan Djärv <jan.h.d <at> swipnet.se> wrote:
>>>
>>> Maybe your Emacs was built without libSM?  Did you compile it yourself?
>>> In that case, check if HAVE_X_SM is defined in src/config.h.
>>
>> It is the standard Ubuntu build of Emacs 23.1, and it is linked
>> against libSM. Is there any other information I can give?
>>
>> Here's the output that report-emacs-bug gives:
>
> Start emacs and do
> C-h v x-session-id.

Its value is
"1054f6786d2b365c6e126377503438154000000015820035"

> C-h v emacs-save-session-functions

Its value is nil

> C-h v emacs-session-filename

No such variable; there is a function of this name, however...

-- 
http://rrt.sc3d.org
Police Refuse To Help Thug Attack Mum (Metro)




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5512; Package emacs. (Tue, 09 Feb 2010 10:04:01 GMT) Full text and rfc822 format available.

Message #20 received at 5512 <at> debbugs.gnu.org (full text, mbox):

From: Jan Djärv <jan.h.d <at> swipnet.se>
To: Reuben Thomas <rrt <at> sc3d.org>
Cc: 5512 <5512 <at> debbugs.gnu.org>
Subject: Re: bug#5512: Automatically saving and restoring an Emacs session
	in 	GNOME
Date: Tue, 09 Feb 2010 11:02:44 +0100
Reuben Thomas skrev:
> On 8 February 2010 07:49, Jan Djärv <jan.h.d <at> swipnet.se> wrote:
>> Reuben Thomas skrev:
>>> On 2 February 2010 19:45, Jan Djärv <jan.h.d <at> swipnet.se> wrote:
>>>> Maybe your Emacs was built without libSM?  Did you compile it yourself?
>>>> In that case, check if HAVE_X_SM is defined in src/config.h.
>>> It is the standard Ubuntu build of Emacs 23.1, and it is linked
>>> against libSM. Is there any other information I can give?
>>>
>>> Here's the output that report-emacs-bug gives:
>> Start emacs and do
>> C-h v x-session-id.
> 
> Its value is
> "1054f6786d2b365c6e126377503438154000000015820035"
> 
>> C-h v emacs-save-session-functions
> 
> Its value is nil
> 
>> C-h v emacs-session-filename
> 
> No such variable; there is a function of this name, however...
> 

Yes sorry.  Anyway, you have session suport compiled in and Emacs talks to the 
session manager.

Do you have a directory ~/.emacs.d and is it writable?  If you start emacs, 
log out and then in again, do you have any session.* files in emacs.d?
Or any ~/.emacs.session.* files?

	Jan D.




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5512; Package emacs. (Tue, 09 Feb 2010 17:48:02 GMT) Full text and rfc822 format available.

Message #23 received at 5512 <at> debbugs.gnu.org (full text, mbox):

From: Reuben Thomas <rrt <at> sc3d.org>
To: Jan Djärv <jan.h.d <at> swipnet.se>
Cc: 5512 <5512 <at> debbugs.gnu.org>
Subject: Re: bug#5512: Automatically saving and restoring an Emacs session in 
	GNOME
Date: Tue, 9 Feb 2010 17:47:04 +0000
On 9 February 2010 10:02, Jan Djärv <jan.h.d <at> swipnet.se> wrote:
> Anyway, you have session suport compiled in and Emacs talks to
> the session manager.
>
> Do you have a directory ~/.emacs.d and is it writable?

Yes.

> If you start emacs,
> log out and then in again, do you have any session.* files in emacs.d?
> Or any ~/.emacs.session.* files?

OK, the problem seems to be a bit more complex than I thought.

If I close down all my programs, log out, log in, start Emacs, then
log out and back in, everything works, and my session is restored.

If however I try to log out from a long-running session, GNOME says "A
program is still running: Emacs", and offers me the choice to log out
anyway, or to cancel the log-out action. If I ignore the warning and
log out anyway, then indeed the Emacs session is restored when I log
back in.

So in fact, my problem is really: why sometimes does Emacs refuse to
be killed? I tried for example starting an emacs client session, but
that didn't seem to trigger this problem.

In summary, it's a minor annoyance now that I understand what is going
on better, but it would be nice to work out why Emacs sometimes
refuses to die at first, althuogh it doesn't seem to matter if I just
log out anyway.

(I did come across another minor bug in the process which I'll now
file separately.)

-- 
http://rrt.sc3d.org
occupants, n. professional underwear




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5512; Package emacs. (Tue, 09 Feb 2010 18:56:02 GMT) Full text and rfc822 format available.

Message #26 received at 5512 <at> debbugs.gnu.org (full text, mbox):

From: Jan Djärv <jan.h.d <at> swipnet.se>
To: Reuben Thomas <rrt <at> sc3d.org>
Cc: 5512 <5512 <at> debbugs.gnu.org>
Subject: Re: bug#5512: Automatically saving and restoring an Emacs session
	in 	GNOME
Date: Tue, 09 Feb 2010 19:55:51 +0100

Reuben Thomas skrev 2010-02-09 18.47:
> On 9 February 2010 10:02, Jan Djärv<jan.h.d <at> swipnet.se>  wrote:
>>   Anyway, you have session suport compiled in and Emacs talks to
>> the session manager.
>>
>> Do you have a directory ~/.emacs.d and is it writable?
>
> Yes.
>
>>   If you start emacs,
>> log out and then in again, do you have any session.* files in emacs.d?
>> Or any ~/.emacs.session.* files?
>
> OK, the problem seems to be a bit more complex than I thought.
>
> If I close down all my programs, log out, log in, start Emacs, then
> log out and back in, everything works, and my session is restored.
>
> If however I try to log out from a long-running session, GNOME says "A
> program is still running: Emacs", and offers me the choice to log out
> anyway, or to cancel the log-out action. If I ignore the warning and
> log out anyway, then indeed the Emacs session is restored when I log
> back in.
>
> So in fact, my problem is really: why sometimes does Emacs refuse to
> be killed? I tried for example starting an emacs client session, but
> that didn't seem to trigger this problem.
>
> In summary, it's a minor annoyance now that I understand what is going
> on better, but it would be nice to work out why Emacs sometimes
> refuses to die at first, althuogh it doesn't seem to matter if I just
> log out anyway.
>
> (I did come across another minor bug in the process which I'll now
> file separately.)

This is usually Emacs not responding to the session manager, or taking too 
long time to do so.  I have an idea about this, I'll have to check it out.

	Jan D.

>




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#5512; Package emacs. (Mon, 31 Jan 2022 17:10:01 GMT) Full text and rfc822 format available.

Message #29 received at 5512 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Reuben Thomas <rrt <at> sc3d.org>
Cc: 5512 <at> debbugs.gnu.org
Subject: Re: bug#5512: Automatically saving and restoring an Emacs session
 in GNOME
Date: Mon, 31 Jan 2022 18:09:26 +0100
Reuben Thomas <rrt <at> sc3d.org> writes:

> When I log out of my GNOME desktop, if Emacs (23.1) is running I get a
> message that it is "not responding". I therefore usually manually quit
> Emacs before logging out.

(I'm going through old bug reports that unfortunately weren't resolved
at the time.)

Are you still seeing this issue in recent Emacs/Gnome versions?  (I
can't recall seeing this myself in a long time.)

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) moreinfo. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Mon, 31 Jan 2022 17:10:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#5512; Package emacs. (Mon, 31 Jan 2022 17:19:01 GMT) Full text and rfc822 format available.

Message #34 received at 5512 <at> debbugs.gnu.org (full text, mbox):

From: Reuben Thomas <rrt <at> sc3d.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 5512 <at> debbugs.gnu.org
Subject: Re: bug#5512: Automatically saving and restoring an Emacs session in
 GNOME
Date: Mon, 31 Jan 2022 17:17:40 +0000
On Mon, 31 Jan 2022 at 17:09, Lars Ingebrigtsen <larsi <at> gnus.org> wrote:
>
> Are you still seeing this issue in recent Emacs/Gnome versions?  (I
> can't recall seeing this myself in a long time.)

No, I'm not. Thanks for checking!

-- 
https://rrt.sc3d.org




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#5512; Package emacs. (Mon, 31 Jan 2022 17:31:02 GMT) Full text and rfc822 format available.

Message #37 received at 5512 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Reuben Thomas <rrt <at> sc3d.org>
Cc: 5512 <at> debbugs.gnu.org
Subject: Re: bug#5512: Automatically saving and restoring an Emacs session
 in GNOME
Date: Mon, 31 Jan 2022 18:30:31 +0100
Reuben Thomas <rrt <at> sc3d.org> writes:

>> Are you still seeing this issue in recent Emacs/Gnome versions?  (I
>> can't recall seeing this myself in a long time.)
>
> No, I'm not. Thanks for checking!

Thanks; I'm closing this bug report, then.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug closed, send any further explanations to 5512 <at> debbugs.gnu.org and Reuben Thomas <rrt <at> sc3d.org> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Mon, 31 Jan 2022 17:31:04 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 01 Mar 2022 12:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 125 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.