unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Several seconds of delay when exiting Emacs
@ 2011-11-28 10:59 Steven Har
  2011-11-29 18:14 ` Tassilo Horn
  0 siblings, 1 reply; 9+ messages in thread
From: Steven Har @ 2011-11-28 10:59 UTC (permalink / raw)
  To: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 468 bytes --]

Hi all,

I'm using breadcrumb.el, and from time to time when exiting Emacs there's a
few seconds delay with the status area showing "Wrote
~/.emacs.d/breadcrumb" (but there's no breadcrumb file being saved). I
wonder what Emacs is trying to do here. This only happens around 25% of the
time.

Yes, I know I shouldn't fire up and exit Emacs too often, but old habits
die hard (especially since I use mc as my main file manager instead of
Emacs' builtin one).

Regards,

[-- Attachment #2: Type: text/html, Size: 635 bytes --]

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

* Re: Several seconds of delay when exiting Emacs
  2011-11-28 10:59 Several seconds of delay when exiting Emacs Steven Har
@ 2011-11-29 18:14 ` Tassilo Horn
  2011-12-14  2:07   ` Steven Har
  0 siblings, 1 reply; 9+ messages in thread
From: Tassilo Horn @ 2011-11-29 18:14 UTC (permalink / raw)
  To: help-gnu-emacs

Steven Har <stevenhar007@gmail.com> writes:

Hi Steven,

> I'm using breadcrumb.el, and from time to time when exiting Emacs
> there's a few seconds delay with the status area showing "Wrote
> ~/.emacs.d/breadcrumb"

The "wrote" (past tense) suggests that the culprit is something that
happens after the breadcrumb has finished, but that's only a vague
guess.

Before you exit emacs, do M-x toggle-debug-on-quit RET.  Then exit emacs
(C-x C-c), and when you are in the seems-to-hang state, hit C-g.  That
will pop up a buffer showing a lisp backtrace that you can poste here
and hopefully helps us finding the culprit.

Bye,
Tassilo




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

* Re: Several seconds of delay when exiting Emacs
  2011-11-29 18:14 ` Tassilo Horn
@ 2011-12-14  2:07   ` Steven Har
  2011-12-14  4:15     ` Drew Adams
  0 siblings, 1 reply; 9+ messages in thread
From: Steven Har @ 2011-12-14  2:07 UTC (permalink / raw)
  To: Tassilo Horn; +Cc: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 1219 bytes --]

On Wed, Nov 30, 2011 at 1:14 AM, Tassilo Horn <tassilo@member.fsf.org>wrote:

> Steven Har <stevenhar007@gmail.com> writes:
>
> Hi Steven,
>
> > I'm using breadcrumb.el, and from time to time when exiting Emacs
> > there's a few seconds delay with the status area showing "Wrote
> > ~/.emacs.d/breadcrumb"
>
> The "wrote" (past tense) suggests that the culprit is something that
> happens after the breadcrumb has finished, but that's only a vague
> guess.
>
> Before you exit emacs, do M-x toggle-debug-on-quit RET.  Then exit emacs
> (C-x C-c), and when you are in the seems-to-hang state, hit C-g.  That
> will pop up a buffer showing a lisp backtrace that you can poste here
> and hopefully helps us finding the culprit.
>
> Ok I managed to do that just now, here's the debugger output (I guess not
much more info? But I'm still very clueless when it comes to Emacs Lisp):

Debugger entered--Lisp error: (quit)
save-place-forget-unreadable-files()
save-place-alist-to-file()
save-place-kill-emacs-hook()
run-hooks(kill-emacs-hook)
kill-emacs()
save-buffers-kill-emacs(nil)
save-buffers-kill-terminal(nil)
call-interactively(save-buffers-kill-terminal nil nil)

I'll try strace and report on any progress later.

--

[-- Attachment #2: Type: text/html, Size: 1742 bytes --]

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

* RE: Several seconds of delay when exiting Emacs
  2011-12-14  2:07   ` Steven Har
@ 2011-12-14  4:15     ` Drew Adams
  2011-12-14  4:26       ` Drew Adams
  0 siblings, 1 reply; 9+ messages in thread
From: Drew Adams @ 2011-12-14  4:15 UTC (permalink / raw)
  To: 'Steven Har', 'Tassilo Horn'; +Cc: help-gnu-emacs

> Debugger entered--Lisp error: (quit)
> save-place-forget-unreadable-files()
> save-place-alist-to-file()
> save-place-kill-emacs-hook()
> run-hooks(kill-emacs-hook)
> kill-emacs()
> save-buffers-kill-emacs(nil)
> save-buffers-kill-terminal(nil)
> call-interactively(save-buffers-kill-terminal nil nil)

I know nothing about `saveplace.el', but looking around a little it appears that
that is the library involved here.  Take a look at it.   Look at the values of
your `save-place-*' user options (e.g., `save-place-limit').  Look at what's in
your file `save-place-file' (by default, `~/.emacs-places').

If you have lots of places recorded (for lots of files), or lots of files that
need to be checked for readability (see `save-place-skip-check-regexp'), then
that could explain why Emacs takes a while to quit.

This is what `save-place-forget-unreadable-files' does, according to its doc
string:

  Remove unreadable files from `save-place-alist'.
  For each entry in the alist, if `file-readable-p' returns
  nil for the filename, remove the entry.  Save the new alist
  (as the first pair may have changed) back to `save-place-alist'.

(`save-place-alist' is the list of places to save to `save-place-file'.)




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

* RE: Several seconds of delay when exiting Emacs
  2011-12-14  4:15     ` Drew Adams
@ 2011-12-14  4:26       ` Drew Adams
  2011-12-14 11:36         ` Tassilo Horn
  0 siblings, 1 reply; 9+ messages in thread
From: Drew Adams @ 2011-12-14  4:26 UTC (permalink / raw)
  To: 'Steven Har', 'Tassilo Horn'; +Cc: help-gnu-emacs

> I know nothing about `saveplace.el', but looking around a 
> little it appears that that is the library involved here.

FWIW - Googling a bit shows that (a) `save-place.el' has been part of GNU Emacs
since at least version 19, and (b) back in Emacs 21 it was even documented in
the Emacs manual, but that mention was removed in Emacs 22.  I find no mention
of it in the Emacs NEWS (past or current).

Here is a link to an old manual node that mentions it:
http://www.delorie.com/gnu/docs/emacs/emacs_465.html




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

* Re: Several seconds of delay when exiting Emacs
  2011-12-14  4:26       ` Drew Adams
@ 2011-12-14 11:36         ` Tassilo Horn
  2011-12-14 13:55           ` Drew Adams
  0 siblings, 1 reply; 9+ messages in thread
From: Tassilo Horn @ 2011-12-14 11:36 UTC (permalink / raw)
  To: Drew Adams; +Cc: help-gnu-emacs

"Drew Adams" <drew.adams@oracle.com> writes:

>> I know nothing about `saveplace.el', but looking around a 
>> little it appears that that is the library involved here.
>
> FWIW - Googling a bit shows that (a) `save-place.el' has been part of
> GNU Emacs since at least version 19, and (b) back in Emacs 21 it was
> even documented in the Emacs manual, but that mention was removed in
> Emacs 22.  I find no mention of it in the Emacs NEWS (past or
> current).

It's still in emacs 24, but its file name changed to saveplace.el.  But
strange, that is has been removed from the info docs'

  (info "(emacs)Saving Emacs Sessions")

section...

> Here is a link to an old manual node that mentions it:
> http://www.delorie.com/gnu/docs/emacs/emacs_465.html

Yes, instead of using that toggle function, I have

  (require 'saveplace)
  (setq-default save-place t)

in my ~/.emacs.

Bye,
Tassilo



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

* RE: Several seconds of delay when exiting Emacs
  2011-12-14 11:36         ` Tassilo Horn
@ 2011-12-14 13:55           ` Drew Adams
  2011-12-14 14:06             ` Steven Har
  0 siblings, 1 reply; 9+ messages in thread
From: Drew Adams @ 2011-12-14 13:55 UTC (permalink / raw)
  To: 'Tassilo Horn'; +Cc: help-gnu-emacs

> >> I know nothing about `saveplace.el', but looking around a 
> >> little it appears that that is the library involved here.
> >
> > FWIW - Googling a bit shows that (a) `save-place.el' has

I meant `saveplace.el'

> > been part of GNU Emacs since at least version 19, and
> > (b) back in Emacs 21 it was even documented in the Emacs
> > manual, but that mention was removed in Emacs 22.  I find
> > no mention of it in the Emacs NEWS (past or current).
> 
> It's still in emacs 24, but its file name changed to 
> saveplace.el.

Actually, I think the name was always `saveplace.el'.  I misspoke, above.

> But strange, that is has been removed from
> the info docs' (info "(emacs)Saving Emacs Sessions")
> section...
>
> > Here is a link to an old manual node that mentions it:
> > http://www.delorie.com/gnu/docs/emacs/emacs_465.html
> 
> Yes, instead of using that toggle function, I have
>   (require 'saveplace)
>   (setq-default save-place t)
> in my ~/.emacs.




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

* Re: Several seconds of delay when exiting Emacs
  2011-12-14 13:55           ` Drew Adams
@ 2011-12-14 14:06             ` Steven Har
  2011-12-17  7:40               ` Le Wang
  0 siblings, 1 reply; 9+ messages in thread
From: Steven Har @ 2011-12-14 14:06 UTC (permalink / raw)
  To: Drew Adams; +Cc: Tassilo Horn, help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 1259 bytes --]

On Wed, Dec 14, 2011 at 8:55 PM, Drew Adams <drew.adams@oracle.com> wrote:

> > >> I know nothing about `saveplace.el', but looking around a
> > >> little it appears that that is the library involved here.
> > >
> > > FWIW - Googling a bit shows that (a) `save-place.el' has
>
> I meant `saveplace.el'
>
> > > been part of GNU Emacs since at least version 19, and
> > > (b) back in Emacs 21 it was even documented in the Emacs
> > > manual, but that mention was removed in Emacs 22.  I find
> > > no mention of it in the Emacs NEWS (past or current).
> >
> > It's still in emacs 24, but its file name changed to
> > saveplace.el.
>
> Actually, I think the name was always `saveplace.el'.  I misspoke, above.
>
> > But strange, that is has been removed from
> > the info docs' (info "(emacs)Saving Emacs Sessions")
> > section...
> >
> > > Here is a link to an old manual node that mentions it:
> > > http://www.delorie.com/gnu/docs/emacs/emacs_465.html
> >
> > Yes, instead of using that toggle function, I have
> >   (require 'saveplace)
> >   (setq-default save-place t)
> > in my ~/.emacs.
>
>
Indeed, I remove those two lines from the system's startup file
(/usr/share/emacs/23.2/lisp/site-start.el on mine) and now the delays are
gone.

Thanks, all!

--

[-- Attachment #2: Type: text/html, Size: 1994 bytes --]

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

* Re: Several seconds of delay when exiting Emacs
  2011-12-14 14:06             ` Steven Har
@ 2011-12-17  7:40               ` Le Wang
  0 siblings, 0 replies; 9+ messages in thread
From: Le Wang @ 2011-12-17  7:40 UTC (permalink / raw)
  To: Steven Har; +Cc: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 361 bytes --]

On Wed, Dec 14, 2011 at 10:06 PM, Steven Har <stevenhar007@gmail.com> wrote:

>
> Indeed, I remove those two lines from the system's startup file
> (/usr/share/emacs/23.2/lisp/site-start.el on mine) and now the delays are
> gone.
>
>
Take a look at session.el, it might do what saveplace did for you.  A lot
of people "in the know" use session.el.  :)


-- 
Le

[-- Attachment #2: Type: text/html, Size: 717 bytes --]

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

end of thread, other threads:[~2011-12-17  7:40 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-28 10:59 Several seconds of delay when exiting Emacs Steven Har
2011-11-29 18:14 ` Tassilo Horn
2011-12-14  2:07   ` Steven Har
2011-12-14  4:15     ` Drew Adams
2011-12-14  4:26       ` Drew Adams
2011-12-14 11:36         ` Tassilo Horn
2011-12-14 13:55           ` Drew Adams
2011-12-14 14:06             ` Steven Har
2011-12-17  7:40               ` Le Wang

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