GNU bug report logs - #17659
24.3.90; C-x 8 ? displays help instead of inserting INVERTED QUESTION MARK

Previous Next

Package: emacs;

Reported by: Eric Hanchrow <eric.hanchrow <at> gmail.com>

Date: Sun, 1 Jun 2014 04:01:01 UTC

Severity: important

Found in version 24.3.90

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

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 17659 in the body.
You can then email your comments to 17659 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#17659; Package emacs. (Sun, 01 Jun 2014 04:01:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Eric Hanchrow <eric.hanchrow <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 01 Jun 2014 04:01:02 GMT) Full text and rfc822 format available.

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

From: Eric Hanchrow <eric.hanchrow <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.3.90;
 C-x 8 ? displays help instead of inserting INVERTED QUESTION MARK
Date: Sat, 31 May 2014 21:00:12 -0700
The subject says it all: when I type C-x 8 ?, I expect emacs to insert
into the buffer Unicode 191, INVERTED QUESTION MARK.  However, instead
it displays a *Help* buffer whose first line reads

        Key translations Starting With C-x 8:



In GNU Emacs 24.3.90.1 (x86_64-apple-darwin13.1.0, NS apple-appkit-1265.19)
 of 2014-05-07 on Eric-Hanchrows-MacBook-Pro.local
Windowing system distributor `Apple', version 10.3.1265
Configured using:
 `configure --with-ns'

Important settings:
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  eldoc-mode: t
  magit-auto-revert-mode: t
  shell-dirtrack-mode: t
  diff-auto-refine-mode: t
  global-auto-revert-mode: t
  elisp-slime-nav-mode: t
  recentf-mode: t
  ido-everywhere: t
  display-time-mode: t
  tooltip-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
<backspace> M-\ C-a C-n C-o C-n C-M-d C-M-f C-M-f C-M-f
C-o C-M-f C-M-o C-M-f C-M-o C-M-f C-M-o C-M-f C-M-o
C-M-f C-M-o C-M-f C-M-o C-M-f C-M-o C-M-f C-M-o C-M-f
C-M-o C-M-u C-M-q C-x | C-n C-M-n C-M-o C-M-n C-M-o
C-M-u C-M-q C-n C-n C-n C-n C-e C-a C-p C-M-n C-M-o
C-M-u C-M-q C-n C-M-d C-M-n C-o C-M-n C-o C-M-n C-o
C-M-n C-o C-M-n C-o C-M-n C-o C-M-n C-a C-M-u C-M-u
C-M-u C-M-u C-M-q C-h a p r e t t y <return> C-M-v
C-M-v C-M-v C-x o M-v M-v M-v C-l M-m <return> q C-x
b <return> C-p C-p C-e C-SPC C-M-b M-w M-> M-( c l
- p r e <M-tab> p <M-tab> SPC C-y C-e C-j M-- C-l C-M-p
C-M-k C-M-p C-M-k C-M-k C-x C-o M-- C-l C-u C-u C-p
C-u C-p C-u C-p C-n C-n C-M-d C-M-d C-M-f C-M-f C-M-f
C-M-f C-M-f C-M-f C-M-f C-M-f C-M-f C-M-f C-M-f C-M-u
C-b C-b C-f C-f C-n M-RET M-m C-f C-f C-f C-h i C-x
b <return> M-> i n p u t - d e c o <M-tab> C-j C-h
i q l o c a l - f u n <M-tab> C-j C-x | M-- C-l C-M-p
C-p M-1 M-( c l - p r e t t <M-tab> p <M-tab> SPC C-e
C-M-k C-j C-M-p C-p C-p ; ; SPC C-a C-o C-p C-p ; ;
SPC C-a C-n M-> C-M-p C-p C-p C-f C-f C-f C-SPC C-e
M-w M-> C-u C-y C-h i C-u C-n C-u C-n C-p C-p C-e C-b
C-SPC M-b M-b M-b M-w C-x b <return> C-e C-b C-M-b
C-M-o C-y C-M-k C-e C-j C-M-p M-0 C-l C-v C-v C-v C-v
C-v C-v C-v C-v C-v C-v C-v C-v C-v C-v C-M-u C-M-u
C-M-u C-M-u M-x r e p o <tab> r <tab> <return>

Recent messages:
Mark set
Truncate long lines enabled
forward-list: Scan error: "Containing expression ends prematurely", 6598, 6599
Type "q" in help window to restore its previous buffer.
Mark set [3 times]
M-RET is undefined
Mark set
Truncate long lines disabled
Mark set [6 times]
Making completion list...

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug sendmail apropos dabbrev debug
iso-transl log-view pcmpl-unix rect mm-archive network-stream starttls
url-cache url-handlers vc-bzr vc-sccs vc-svn vc-cvs vc-rcs vc
vc-dispatcher js cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles
cc-align cc-engine cc-vars cc-defs yaml-mode tar-mode jka-compr
smerge-mode mule-util ffap eieio-opt speedbar sb-image ezimage dframe
flyspell ispell browse-kill-ring misearch multi-isearch face-remap woman
man eldoc protbuf gist gh-gist gh-oauth gh-api logito gh-cache pcache
gh-auth gh-common gh-url url-http tls url url-proxy url-privacy
url-expand url-methods url-history mailcap url-auth url-cookie
url-domsuf url-gw gh-profile timezone eieio-base magit-key-mode magit
view tramp tramp-compat tramp-loaddefs trampver shell pcomplete epa epg
epg-config diff-mode git-rebase-mode git-commit-mode log-edit message
format-spec rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse
rfc2231 rfc2047 rfc2045 ietf-drums mailabbrev mail-utils gmm-utils
mailheader pcvs-util add-log vc-git derived autorevert filenotify
elisp-slime-nav paste-to-dropbox path server saveplace url-util
url-parse auth-source gnus-util mm-util mail-prsvr password-cache
url-vars find-func ibuf-ext ibuf-macs ibuffer recentf tree-widget
wid-edit dired-x dired perl-extras perl-mode autoinsert rx elpy
yasnippet help-mode pyvenv grep python nose easy-mmode json idomenu
imenu ido highlight-indentation flymake find-file-in-project cl etags
elpy-refactor auto-complete-config auto-complete edmacro kmacro popup
quack thingatpt compile cmuscheme comint ansi-color ring scheme
color-theme-autoloads fuzzy-autoloads gist-autoloads finder-inf eieio
byte-opt bytecomp byte-compile cconv eieio-core
highlight-indentation-autoloads idomenu-autoloads iedit-autoloads
logito-autoloads markdown-mode-autoloads info easymenu pcache-autoloads
powerline advice help-fns cl-macs gv powerline-separators color
cl-loaddefs cl-lib powerline-themes quack-autoloads svg-clock-autoloads
typo-autoloads yaml-mode-autoloads package time midnight time-date
tooltip electric uniquify ediff-hook vc-hooks lisp-float-type mwheel
ns-win tool-bar dnd fontset image regexp-opt fringe tabulated-list
newcomment lisp-mode prog-mode register page menu-bar rfn-eshadow timer
select scroll-bar mouse jit-lock font-lock syntax facemenu font-core
frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai
tai-viet lao korean japanese hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help
simple abbrev minibuffer nadvice loaddefs button faces cus-face macroexp
files text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote make-network-process
cocoa ns multi-tty emacs)

Memory information:
((conses 16 781944 201941)
 (symbols 48 57208 0)
 (miscs 40 1866 3163)
 (strings 32 282720 4216)
 (string-bytes 1 5155307)
 (vectors 16 44016)
 (vector-slots 8 1691982 184043)
 (floats 8 380 1720)
 (intervals 56 68888 1320)
 (buffers 960 63))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17659; Package emacs. (Mon, 02 Jun 2014 13:02:01 GMT) Full text and rfc822 format available.

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

From: Leo Liu <sdl.web <at> gmail.com>
To: Eric Hanchrow <eric.hanchrow <at> gmail.com>
Cc: Stefan Monnier <monnier <at> iro.umontreal.ca>, 17659 <at> debbugs.gnu.org
Subject: Re: bug#17659: 24.3.90;
 C-x 8 ? displays help instead of inserting INVERTED QUESTION MARK
Date: Mon, 02 Jun 2014 21:01:12 +0800
On 2014-05-31 21:00 -0700, Eric Hanchrow wrote:
> The subject says it all: when I type C-x 8 ?, I expect emacs to insert
> into the buffer Unicode 191, INVERTED QUESTION MARK.  However, instead
> it displays a *Help* buffer whose first line reads
>
>         Key translations Starting With C-x 8:

? is bound in iso-transl-ctl-x-8-map but oddly the ? (help-char) takes
precedence. Stefan, any idea where to look to fix it?

Leo




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17659; Package emacs. (Tue, 03 Jun 2014 01:53:02 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Leo Liu <sdl.web <at> gmail.com>
Cc: Eric Hanchrow <eric.hanchrow <at> gmail.com>, 17659 <at> debbugs.gnu.org
Subject: Re: bug#17659: 24.3.90;
 C-x 8 ? displays help instead of inserting INVERTED QUESTION MARK
Date: Mon, 02 Jun 2014 21:52:26 -0400
>> The subject says it all: when I type C-x 8 ?, I expect emacs to insert
>> into the buffer Unicode 191, INVERTED QUESTION MARK.  However, instead
>> it displays a *Help* buffer whose first line reads
>> Key translations Starting With C-x 8:
> ? is bound in iso-transl-ctl-x-8-map but oddly the ? (help-char) takes
> precedence. Stefan, any idea where to look to fix it?

I guess it's in read_key_sequence (you know, that self-evident 10-liner).


        Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17659; Package emacs. (Tue, 03 Jun 2014 02:59:02 GMT) Full text and rfc822 format available.

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

From: Leo Liu <sdl.web <at> gmail.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: Eric Hanchrow <eric.hanchrow <at> gmail.com>, 17659 <at> debbugs.gnu.org
Subject: Re: bug#17659: 24.3.90;
 C-x 8 ? displays help instead of inserting INVERTED QUESTION MARK
Date: Tue, 03 Jun 2014 10:58:07 +0800
On 2014-06-02 21:52 -0400, Stefan Monnier wrote:
> I guess it's in read_key_sequence (you know, that self-evident 10-liner).

;)

I can not verify if this breaks something else (I am using an apple
keyboard) but it fixes the bug.

=== modified file 'lisp/international/iso-transl.el'
--- lisp/international/iso-transl.el	2014-02-10 01:34:22 +0000
+++ lisp/international/iso-transl.el	2014-06-03 02:46:11 +0000
@@ -39,7 +39,7 @@
 ;;; Code:
 
 ;;; Provide some binding for startup:
-;;;###autoload (define-key key-translation-map "\C-x8" 'iso-transl-ctl-x-8-map)
+;;;###autoload (define-key ctl-x-map "8" iso-transl-ctl-x-8-map)
 ;;;###autoload (autoload 'iso-transl-ctl-x-8-map "iso-transl" "Keymap for C-x 8 prefix." t 'keymap)
 
 (defvar iso-transl-dead-key-alist
@@ -239,12 +239,10 @@
 
 (defvar iso-transl-ctl-x-8-map nil
   "Keymap for C-x 8 prefix.")
+
 (or iso-transl-ctl-x-8-map
     (fset 'iso-transl-ctl-x-8-map
 	  (setq iso-transl-ctl-x-8-map (make-sparse-keymap))))
-(or key-translation-map
-    (setq key-translation-map (make-sparse-keymap)))
-(define-key key-translation-map "\C-x8" iso-transl-ctl-x-8-map)
 
 ;; For each entry in the alist, we'll make up to three ways to generate
 ;; the character in question: the prefix `C-x 8'; the ALT modifier on




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17659; Package emacs. (Wed, 04 Jun 2014 00:03:01 GMT) Full text and rfc822 format available.

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

From: Leo Liu <sdl.web <at> gmail.com>
To: 17659 <at> debbugs.gnu.org
Subject: Re: bug#17659: 24.3.90;
 C-x 8 ? displays help instead of inserting INVERTED QUESTION MARK
Date: Wed, 04 Jun 2014 08:02:41 +0800
On 2014-06-03 10:58 +0800, Leo Liu wrote:
> I can not verify if this breaks something else (I am using an apple
> keyboard) but it fixes the bug.

How about something along these lines?

=== modified file 'lisp/international/iso-transl.el'
--- lisp/international/iso-transl.el	2014-02-10 01:34:22 +0000
+++ lisp/international/iso-transl.el	2014-06-03 16:18:51 +0000
@@ -39,8 +39,10 @@
 ;;; Code:
 
 ;;; Provide some binding for startup:
-;;;###autoload (define-key key-translation-map "\C-x8" 'iso-transl-ctl-x-8-map)
-;;;###autoload (autoload 'iso-transl-ctl-x-8-map "iso-transl" "Keymap for C-x 8 prefix." t 'keymap)
+;;;###autoload
+(define-prefix-command 'iso-transl-ctl-x-8-map)
+;;;###autoload
+(define-key ctl-x-map "8" 'iso-transl-ctl-x-8-map)
 
 (defvar iso-transl-dead-key-alist
   '((?\' . mute-acute)
@@ -237,15 +239,6 @@
      ("N"  . [?Ñ])
      ("n"  . [?ñ]))))
 
-(defvar iso-transl-ctl-x-8-map nil
-  "Keymap for C-x 8 prefix.")
-(or iso-transl-ctl-x-8-map
-    (fset 'iso-transl-ctl-x-8-map
-	  (setq iso-transl-ctl-x-8-map (make-sparse-keymap))))
-(or key-translation-map
-    (setq key-translation-map (make-sparse-keymap)))
-(define-key key-translation-map "\C-x8" iso-transl-ctl-x-8-map)
-
 ;; For each entry in the alist, we'll make up to three ways to generate
 ;; the character in question: the prefix `C-x 8'; the ALT modifier on
 ;; the first key of the sequence; and (if applicable) replacing the first





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17659; Package emacs. (Wed, 04 Jun 2014 12:35:02 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Leo Liu <sdl.web <at> gmail.com>
Cc: 17659 <at> debbugs.gnu.org
Subject: Re: bug#17659: 24.3.90;
 C-x 8 ? displays help instead of inserting INVERTED QUESTION MARK
Date: Wed, 04 Jun 2014 08:33:04 -0400
> How about something along these lines?

This would break C-x 8 in Isearch, AFAIK.
Have you tried to find the root cause of the problem?

        Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17659; Package emacs. (Thu, 19 Jun 2014 03:34:02 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Leo Liu <sdl.web <at> gmail.com>
Cc: Eric Hanchrow <eric.hanchrow <at> gmail.com>, 17659 <at> debbugs.gnu.org
Subject: Re: bug#17659: 24.3.90;
 C-x 8 ? displays help instead of inserting INVERTED QUESTION MARK
Date: Wed, 18 Jun 2014 23:33:11 -0400
>> The subject says it all: when I type C-x 8 ?, I expect emacs to insert
>> into the buffer Unicode 191, INVERTED QUESTION MARK.  However, instead
>> it displays a *Help* buffer whose first line reads
>> Key translations Starting With C-x 8:
> ? is bound in iso-transl-ctl-x-8-map but oddly the ? (help-char) takes
> precedence. Stefan, any idea where to look to fix it?

BTW, maybe it was obvious to someone, but it wasn't to me, so I'll
mention that this is a regression w.r.t 24.3 and it is caused by the
change documented in NEWS:

*** The key `?' now describes prefix bindings, like `C-h'.


        Stefan




Reply sent to Stefan Monnier <monnier <at> iro.umontreal.ca>:
You have taken responsibility. (Thu, 19 Jun 2014 03:53:01 GMT) Full text and rfc822 format available.

Notification sent to Eric Hanchrow <eric.hanchrow <at> gmail.com>:
bug acknowledged by developer. (Thu, 19 Jun 2014 03:53:02 GMT) Full text and rfc822 format available.

Message #28 received at 17659-done <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Eric Hanchrow <eric.hanchrow <at> gmail.com>
Cc: 17659-done <at> debbugs.gnu.org
Subject: Re: bug#17659: 24.3.90;
 C-x 8 ? displays help instead of inserting INVERTED QUESTION MARK
Date: Wed, 18 Jun 2014 23:52:49 -0400
> The subject says it all: when I type C-x 8 ?, I expect emacs to insert
> into the buffer Unicode 191, INVERTED QUESTION MARK.  However, instead
> it displays a *Help* buffer whose first line reads

>         Key translations Starting With C-x 8:

I installed the patch below into emacs-24 which seems to fix this problem.


        Stefan


=== modified file 'src/keyboard.c'
--- src/keyboard.c	2014-05-06 16:16:57 +0000
+++ src/keyboard.c	2014-06-19 03:30:12 +0000
@@ -9384,16 +9385,6 @@
 	  first_unbound = min (t, first_unbound);
 
 	  head = EVENT_HEAD (key);
-	  if (help_char_p (head) && t > 0)
-	    {
-	      read_key_sequence_cmd = Vprefix_help_command;
-	      keybuf[t++] = key;
-	      last_nonmenu_event = key;
-	      /* The Microsoft C compiler can't handle the goto that
-		 would go here.  */
-	      dummyflag = 1;
-	      break;
-	    }
 
 	  if (SYMBOLP (head))
 	    {
@@ -9651,6 +9642,17 @@
 
 	  goto replay_sequence;
 	}
+
+      if (NILP (current_binding)
+	  && help_char_p (EVENT_HEAD (key)) && t > 1)
+	    {
+	      read_key_sequence_cmd = Vprefix_help_command;
+	      /* The Microsoft C compiler can't handle the goto that
+		 would go here.  */
+	      dummyflag = 1;
+	      break;
+	    }
+
       /* If KEY is not defined in any of the keymaps,
 	 and cannot be part of a function key or translation,
 	 and is a shifted function key,





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17659; Package emacs. (Thu, 19 Jun 2014 04:25:01 GMT) Full text and rfc822 format available.

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

From: Leo Liu <sdl.web <at> gmail.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: Eric Hanchrow <eric.hanchrow <at> gmail.com>, 17659 <at> debbugs.gnu.org
Subject: Re: bug#17659: 24.3.90;
 C-x 8 ? displays help instead of inserting INVERTED QUESTION MARK
Date: Thu, 19 Jun 2014 12:23:57 +0800
On 2014-06-18 23:33 -0400, Stefan Monnier wrote:
> BTW, maybe it was obvious to someone, but it wasn't to me, so I'll
> mention that this is a regression w.r.t 24.3 and it is caused by the
> change documented in NEWS:
>
> *** The key `?' now describes prefix bindings, like `C-h'.

There were some consequences that weren't obvious at the time of that
change. Gladly the dark corners are gone one by one, I mean thanks for
the fix.

Leo




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17659; Package emacs. (Thu, 19 Jun 2014 13:34:02 GMT) Full text and rfc822 format available.

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

From: Drew Adams <drew.adams <at> oracle.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>, Leo Liu <sdl.web <at> gmail.com>
Cc: Eric Hanchrow <eric.hanchrow <at> gmail.com>, 17659 <at> debbugs.gnu.org
Subject: RE: bug#17659: 24.3.90; C-x 8 ? displays help instead of inserting
 INVERTED QUESTION MARK
Date: Thu, 19 Jun 2014 06:32:53 -0700 (PDT)
> > ? is bound in iso-transl-ctl-x-8-map but oddly the ? (help-char) takes
> > precedence. Stefan, any idea where to look to fix it?
> 
> BTW, maybe it was obvious to someone, but it wasn't to me, so I'll
> mention that this is a regression w.r.t 24.3 and it is caused by the
> change documented in NEWS:
> 
> *** The key `?' now describes prefix bindings, like `C-h'.

See also bug #16617.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 18 Jul 2014 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 11 years and 60 days ago.

Previous Next


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