all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Chong Yidong <cyd@stupidchicken.com>
Subject: X error handler
Date: Sun, 26 Feb 2006 21:59:18 -0500	[thread overview]
Message-ID: <871wxpmrqx.fsf@stupidchicken.com> (raw)

Currently, if Emacs receives an X protocol error and x_catch_errors
has not been called, Emacs will kill itself (x_error_handler calls
x_error_quitter, which calls x_connection_closed).  This seems
unnecessary.

Xlib defines two types of X error handlers.  The protocol error
handler (for us, this is x_error_handler) is intended for non-fatal X
protocol errors.  Fatal errors such as losing the connection to the X
server invoke a different handler, the X IO error handler (for us,
this is x_io_error_quitter), which really is supposed to kill Emacs.

Currently, about half the uses of x_catch_errors in Emacs code occur
where we want to make an Xlib call that can produce protocol
errors---we don't want those to kill Emacs, but we don't actually care
about whatever error messages are emitted.  It makes little sense to
go through xmalloc'ing an error message storage stack, etc., for this.

It seems to me cleaner to make the protocol error handler do nothing
by default (rather than kill Emacs).  When x_catch_errors is on, we
can carry out the current behavior, i.e., storing the error string
etc.

             reply	other threads:[~2006-02-27  2:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-27  2:59 Chong Yidong [this message]
2006-02-27 23:47 ` X error handler Richard Stallman
2006-02-28 16:16   ` Chong Yidong

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=871wxpmrqx.fsf@stupidchicken.com \
    --to=cyd@stupidchicken.com \
    /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.