GNU bug report logs - #22620
24.5; "(global-hi-lock-mode 1)" broke "C-x" key bindings inside "M-x term", especially for "emacs -nw" (Emacs inside Emacs).

Previous Next

Package: emacs;

Reported by: Oleksandr Gavenko <gavenkoa <at> gmail.com>

Date: Wed, 10 Feb 2016 19:52:02 UTC

Severity: normal

Tags: confirmed

Found in versions 24.5, 26.2

Fixed in version 28.1

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 22620 in the body.
You can then email your comments to 22620 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 bug-gnu-emacs <at> gnu.org:
bug#22620; Package emacs. (Wed, 10 Feb 2016 19:52:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Oleksandr Gavenko <gavenkoa <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 10 Feb 2016 19:52:02 GMT) Full text and rfc822 format available.

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

From: Oleksandr Gavenko <gavenkoa <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.5;
 "(global-hi-lock-mode 1)" broke "C-x" key bindings inside "M-x term",
 especially for "emacs -nw" (Emacs inside Emacs).
Date: Wed, 10 Feb 2016 19:56:34 +0200
In GNU Emacs 24.5.1 (x86_64-pc-linux-gnu, GTK+ Version 3.18.2)
 of 2015-10-24 on trouble, modified by Debian
Windowing system distributor `The X.Org Foundation', version 11.0.11702000
System Description:	Debian GNU/Linux testing (stretch)

I use convenient script for invoking Emacs in terminal as if it was "vi"
(because I hate a way vi works):

  http://hg.defun.work/utils/file/tip/emacs/e

which is actually call:

  emacsclient -t

Today I try to use "hg record" to select diff hunks manually inside M-x term
(instead of xterm).

My EDITOR=et which is above "emacsclient -t".

After entering to Emacs inside Emacs terminal emulation I can't save file or
iterate over buffers. For all commands with "C-x" prefix I see:

  C-x C-s is undefined
  C-x C-c is undefined

in outer Emacs (that was in X Window). So key sequences doesn't reach Emacs
inside Emacs terminal emulator.

After bisecting I found that with X Emacs:

  $ emacs -q

after evaluating:

  (global-hi-lock-mode 1)

and entering to "M-x term" Emacs in term-mode can't handle "C-x" sequences.

My 3 kLOC .emacs file with commented:

  (global-hi-lock-mode 1)

work fine.

-- 
http://defun.work/




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#22620; Package emacs. (Wed, 10 Feb 2016 20:20:02 GMT) Full text and rfc822 format available.

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

From: Oleksandr Gavenko <gavenkoa <at> gmail.com>
To: help-debbugs <at> gnu.org (GNU bug Tracking System)
Cc: 22620 <at> debbugs.gnu.org
Subject: Re: bug#22620: Acknowledgement (24.5;
 "(global-hi-lock-mode 1)" broke "C-x" key bindings inside "M-x term",
 especially for "emacs -nw" (Emacs inside Emacs).)
Date: Wed, 10 Feb 2016 22:19:43 +0200
After:

  (global-hi-lock-mode 1)

this:

  (global-hi-lock-mode -1)

restore behavior. Repeating:

  (global-hi-lock-mode 1)

again broke "C-x" prefix.

-- 
http://defun.work/




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#22620; Package emacs. (Sat, 27 Jul 2019 03:50:02 GMT) Full text and rfc822 format available.

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

From: Noam Postavsky <npostavs <at> gmail.com>
To: Oleksandr Gavenko <gavenkoa <at> gmail.com>
Cc: 22620 <at> debbugs.gnu.org
Subject: Re: bug#22620: 24.5;
 "(global-hi-lock-mode 1)" broke "C-x" key bindings inside "M-x term",
 especially for "emacs -nw" (Emacs inside Emacs).
Date: Fri, 26 Jul 2019 23:49:18 -0400
tags 22620 + confirmed
found 22620 26.2
quit

Oleksandr Gavenko <gavenkoa <at> gmail.com> writes:

>   (global-hi-lock-mode 1)
>
> again broke "C-x" prefix.

Yes, the problem is that hi-lock-mode defines keys using the C-x prefix,
and it is a minor mode so it overrides term.el's major mode binding of
C-x to term-send-raw.  It's not immediately clear to me what the correct
fix is though.

I guess we could add term-mode to hi-lock-exclude-modes?





Added tag(s) confirmed. Request was from Noam Postavsky <npostavs <at> gmail.com> to control <at> debbugs.gnu.org. (Sat, 27 Jul 2019 03:50:02 GMT) Full text and rfc822 format available.

bug Marked as found in versions 26.2. Request was from Noam Postavsky <npostavs <at> gmail.com> to control <at> debbugs.gnu.org. (Sat, 27 Jul 2019 03:50:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#22620; Package emacs. (Thu, 08 Jul 2021 01:26:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Noam Postavsky <npostavs <at> gmail.com>
Cc: 22620 <at> debbugs.gnu.org, Oleksandr Gavenko <gavenkoa <at> gmail.com>
Subject: Re: bug#22620: 24.5; "(global-hi-lock-mode 1)" broke "C-x" key
 bindings inside "M-x term", especially for "emacs -nw" (Emacs inside
 Emacs).
Date: Thu, 08 Jul 2021 03:25:06 +0200
Noam Postavsky <npostavs <at> gmail.com> writes:

> Oleksandr Gavenko <gavenkoa <at> gmail.com> writes:
>
>>   (global-hi-lock-mode 1)
>>
>> again broke "C-x" prefix.
>
> Yes, the problem is that hi-lock-mode defines keys using the C-x prefix,
> and it is a minor mode so it overrides term.el's major mode binding of
> C-x to term-send-raw.  It's not immediately clear to me what the correct
> fix is though.
>
> I guess we could add term-mode to hi-lock-exclude-modes?

Yup.  I did that in Emacs 28, and it made the problem go away.

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




bug marked as fixed in version 28.1, send any further explanations to 22620 <at> debbugs.gnu.org and Oleksandr Gavenko <gavenkoa <at> gmail.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Thu, 08 Jul 2021 01:26:02 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. (Thu, 05 Aug 2021 11:24:04 GMT) Full text and rfc822 format available.

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

Previous Next


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