GNU bug report logs - #22743
25.0.91: set-quit-char does not work if emacs lacks a controlling tty

Previous Next

Package: emacs;

Reported by: Duncan Burke <duncankburke <at> gmail.com>

Date: Sat, 20 Feb 2016 06:58:02 UTC

Severity: wishlist

Found in version 25.0.91

Full log


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

From: Duncan Burke <duncankburke <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 22743 <at> debbugs.gnu.org
Subject: Re: bug#22743: 25.0.91: set-quit-char does not work if emacs lacks a
 controlling tty
Date: Sat, 20 Feb 2016 22:37:56 +1100
On 20/02/16 20:40, Eli Zaretskii wrote:
> I don't think this patch will work reliably, because the parts of code
> you changed are not the whole picture.  C-g is supported implicitly
> and explicitly in many more places.  Grep the Lisp sources for C-g to
> see that.

I think it should be possible to rebind C-g. If it cannot be rebound, then
that is an exceptional wart which significantly compromises emacs'
configurability.

It is extremely common for lisp code, whether in emacs or an external 
package,
to make assumptions about default bindings. C-g is far from unique in this
respect and while it would be nice if emacs had a way of globally changing
these assumptions, this is an understood cost when one deviates 
significantly
from emacs defaults. I accept that changing something fundamental like this
requires scouring through lisp source and finding all the places this
assumption is made. Anything in lisp can be patched or configured at 
runtime,
so I am not particularly concerned about such issues.

This patch is required because in this specific instance an assumption 
is made
in the C code about the user's intended purpose of C-g, which has an 
effect in
a graphical frame (demonstrated by my example), but that cannot be 
configured
through lisp from a graphical frame.

> That's documented in the doc string of set-quit-char, so this is by
> design.  On a TTY, C-g triggers a signal, and Emacs uses a system API
> to change the character which does that.  But on GUI frames, this is
> not possible.

If this is the intended behaviour of set-quit-char, then how is one supposed
to set quit_char from a graphical frame? quit_char is demonstrably not
TTY-specific, so it should be configurable and I cannot see a better place
than set-quit-char.

> FWIW, my NSHO is that we should deprecate set-quit-char and remove it
> in a future Emacs version.  It is no longer reasonable to have a
> feature that only works on text terminals.

Do you mean that quit_char should be removed entirely from the C code? 
Perhaps
that would be best, I do not know enough to have an informed
optinion. However, as long as quit_char exists I have a demonstrated need to
be able to configure it at runtime.




This bug report was last modified 9 years and 117 days ago.

Previous Next


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