all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: It's almost 2016 and when (single-threaded) Emacs hangs, you gotta be smashing your keyboard!
Date: Thu, 19 Nov 2015 23:09:47 +0200	[thread overview]
Message-ID: <83si417l2c.fsf@gnu.org> (raw)
In-Reply-To: <CAKu-7Wz1DYH-w28ud2iHnZ9rapAQDdx5s9K_Lgh+YT-VR+YVAg@mail.gmail.com>

> Date: Thu, 19 Nov 2015 21:55:06 +0100
> From: Alexander Shukaev <haroogan@gmail.com>
> Cc: help-gnu-emacs <help-gnu-emacs@gnu.org>
> 
> > FWIW, it isn't unreliable or fragile for me.  It is rather rock-solid,
> > my sessions are usually open for many weeks on end, and almost never
> > crash or hang.
> 
> Exactly, "almost never", but hangs DO happen.

Not here.  I have crashes maybe once or twice a year, that's all.  No
hangs.

> >> It may freeze or it may not freeze, but if it does, all of the
> >> unsaved work is lost, not to mention the fact that all of the layout
> >> of windows and open buffers are lost as well.
> >
> > Neither of this is true.  When Emacs hits a fatal error, it
> > auto-saves, and if you activate the desktop-saving feature, it will
> > save a snapshot of your window and frame configuration fairly
> > frequently, so starting a new session recreates at least those buffers
> > which were visiting files or directories.
> 
> Could you please provide concrete settings for this?

Desktop saving is in the manual, see the node "Saving Emacs Sessions".

Auto-saving on fatal errors happens by default, but you should select
the signal you use to kill Emacs wisely: e.g., "kill -9" is usually a
bad idea.

> Also, maybe it does save on fatal error, but you have no chance of
> saving upon killing the Emacs process due to dead hang.

Signals that can be caught are treated the same as fatal errors.
Emacs catches them all, and auto-saves before committing suicide.

You can also bind commands to SIGUSR1 and SIGUSR2 events, you will
find documentation and example in the "Misc Events" node of the ELisp
manual.  Then you can "kill -USR1 emacs-PID", and have it auto-save,
or maybe call 'error' to get to top level.

> >> First of all, I just want to once again draw your attention to one
> >> of the urgent issues (to this date) of Emacs.
> >
> > Which urgent issue is that?
> 
> The one described above: dead handing.

AFAIR, you are the first who thinks this happens frequently enough to
be a serious issue.  Unless you are using development snapshots, where
all bets are off.  (I was talking about official releases.)  But
anyway, in every such case attaching the debugger to Emacs and
reporting a bug with the details about where it hangs, or at least
providing a recipe and any information regarding the hang you can come
up with, is the only efficient way to make the situation better.
Complaining here certainly won't cut it.

> >> And, secondly, I want to ask whether there exists a way to solve the
> >> problem described above without multi-threading?
> >
> > On Posix systems, Emacs does use a kind of multi-threading: it invokes
> > the 'ls' command to generate the directory listing.  You can configure
> > Emacs on Windows to do the same, if you can get your hands on a decent
> > port of GNU 'ls'.
> >
> 
> I'm using 'ls' on both Linux and Windows and this does not prevent the
> occasional hang on network directories.

But then it's 'ls' that's hanging, not Emacs, right?  Emacs just waits
for 'ls', and it should be relatively easy to interrupt the wait,
either by "C-g" or by sending a signal, see above.



  reply	other threads:[~2015-11-19 21:09 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-19 20:29 It's almost 2016 and when (single-threaded) Emacs hangs, you gotta be smashing your keyboard! Alexander Shukaev
2015-11-19 20:36 ` John Wiegley
2015-11-19 20:57   ` Alexander Shukaev
2015-11-19 21:15     ` Eli Zaretskii
2015-11-19 20:46 ` Eli Zaretskii
2015-11-19 20:55   ` Alexander Shukaev
2015-11-19 21:09     ` Eli Zaretskii [this message]
     [not found]   ` <mailman.264.1447966512.31583.help-gnu-emacs@gnu.org>
2015-11-19 21:11     ` Pascal J. Bourguignon
2015-11-20  0:36       ` Bob Proulx
2015-11-20 10:49         ` Rasmus
2015-11-22 21:43         ` Xavier Maillard
2015-11-22 22:24           ` Stefan Monnier
2015-11-23  5:11             ` Xavier Maillard
2015-11-23  3:34           ` Eli Zaretskii
2015-11-23  5:13             ` Xavier Maillard
2015-11-23 13:52               ` John Wiegley
2015-11-23  1:19         ` MBR
     [not found]       ` <mailman.285.1447979800.31583.help-gnu-emacs@gnu.org>
2015-11-20  7:53         ` Loris Bennett
2015-11-20  9:42           ` Michael Albinus
2015-11-19 21:25 ` Dmitry Gutov
2015-11-19 21:43   ` Random832
2015-11-19 22:18     ` Dmitry Gutov
2015-11-20  7:54       ` Eli Zaretskii
     [not found] ` <mailman.262.1447966007.31583.help-gnu-emacs@gnu.org>
2015-11-23  0:12   ` Jason Rumney
     [not found] <mailman.258.1447964949.31583.help-gnu-emacs@gnu.org>
2015-11-19 21:09 ` Pascal J. Bourguignon

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=83si417l2c.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=help-gnu-emacs@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.