unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#17659: 24.3.90; C-x 8 ? displays help instead of inserting INVERTED QUESTION MARK
@ 2014-06-01  4:00 Eric Hanchrow
  2014-06-02 13:01 ` Leo Liu
  2014-06-19  3:52 ` Stefan Monnier
  0 siblings, 2 replies; 10+ messages in thread
From: Eric Hanchrow @ 2014-06-01  4:00 UTC (permalink / raw)
  To: 17659

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))





^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#17659: 24.3.90; C-x 8 ? displays help instead of inserting INVERTED QUESTION MARK
  2014-06-01  4:00 bug#17659: 24.3.90; C-x 8 ? displays help instead of inserting INVERTED QUESTION MARK Eric Hanchrow
@ 2014-06-02 13:01 ` Leo Liu
  2014-06-03  1:52   ` Stefan Monnier
  2014-06-19  3:33   ` Stefan Monnier
  2014-06-19  3:52 ` Stefan Monnier
  1 sibling, 2 replies; 10+ messages in thread
From: Leo Liu @ 2014-06-02 13:01 UTC (permalink / raw)
  To: Eric Hanchrow; +Cc: 17659

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





^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#17659: 24.3.90; C-x 8 ? displays help instead of inserting INVERTED QUESTION MARK
  2014-06-02 13:01 ` Leo Liu
@ 2014-06-03  1:52   ` Stefan Monnier
  2014-06-03  2:58     ` Leo Liu
  2014-06-19  3:33   ` Stefan Monnier
  1 sibling, 1 reply; 10+ messages in thread
From: Stefan Monnier @ 2014-06-03  1:52 UTC (permalink / raw)
  To: Leo Liu; +Cc: Eric Hanchrow, 17659

>> 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





^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#17659: 24.3.90; C-x 8 ? displays help instead of inserting INVERTED QUESTION MARK
  2014-06-03  1:52   ` Stefan Monnier
@ 2014-06-03  2:58     ` Leo Liu
  2014-06-04  0:02       ` Leo Liu
  0 siblings, 1 reply; 10+ messages in thread
From: Leo Liu @ 2014-06-03  2:58 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Eric Hanchrow, 17659

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





^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#17659: 24.3.90; C-x 8 ? displays help instead of inserting INVERTED QUESTION MARK
  2014-06-03  2:58     ` Leo Liu
@ 2014-06-04  0:02       ` Leo Liu
  2014-06-04 12:33         ` Stefan Monnier
  0 siblings, 1 reply; 10+ messages in thread
From: Leo Liu @ 2014-06-04  0:02 UTC (permalink / raw)
  To: 17659

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






^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#17659: 24.3.90; C-x 8 ? displays help instead of inserting INVERTED QUESTION MARK
  2014-06-04  0:02       ` Leo Liu
@ 2014-06-04 12:33         ` Stefan Monnier
  0 siblings, 0 replies; 10+ messages in thread
From: Stefan Monnier @ 2014-06-04 12:33 UTC (permalink / raw)
  To: Leo Liu; +Cc: 17659

> 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





^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#17659: 24.3.90; C-x 8 ? displays help instead of inserting INVERTED QUESTION MARK
  2014-06-02 13:01 ` Leo Liu
  2014-06-03  1:52   ` Stefan Monnier
@ 2014-06-19  3:33   ` Stefan Monnier
  2014-06-19  4:23     ` Leo Liu
  2014-06-19 13:32     ` Drew Adams
  1 sibling, 2 replies; 10+ messages in thread
From: Stefan Monnier @ 2014-06-19  3:33 UTC (permalink / raw)
  To: Leo Liu; +Cc: Eric Hanchrow, 17659

>> 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





^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#17659: 24.3.90; C-x 8 ? displays help instead of inserting INVERTED QUESTION MARK
  2014-06-01  4:00 bug#17659: 24.3.90; C-x 8 ? displays help instead of inserting INVERTED QUESTION MARK Eric Hanchrow
  2014-06-02 13:01 ` Leo Liu
@ 2014-06-19  3:52 ` Stefan Monnier
  1 sibling, 0 replies; 10+ messages in thread
From: Stefan Monnier @ 2014-06-19  3:52 UTC (permalink / raw)
  To: Eric Hanchrow; +Cc: 17659-done

> 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,






^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#17659: 24.3.90; C-x 8 ? displays help instead of inserting INVERTED QUESTION MARK
  2014-06-19  3:33   ` Stefan Monnier
@ 2014-06-19  4:23     ` Leo Liu
  2014-06-19 13:32     ` Drew Adams
  1 sibling, 0 replies; 10+ messages in thread
From: Leo Liu @ 2014-06-19  4:23 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Eric Hanchrow, 17659

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





^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#17659: 24.3.90; C-x 8 ? displays help instead of inserting INVERTED QUESTION MARK
  2014-06-19  3:33   ` Stefan Monnier
  2014-06-19  4:23     ` Leo Liu
@ 2014-06-19 13:32     ` Drew Adams
  1 sibling, 0 replies; 10+ messages in thread
From: Drew Adams @ 2014-06-19 13:32 UTC (permalink / raw)
  To: Stefan Monnier, Leo Liu; +Cc: Eric Hanchrow, 17659

> > ? 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.





^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2014-06-19 13:32 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-01  4:00 bug#17659: 24.3.90; C-x 8 ? displays help instead of inserting INVERTED QUESTION MARK Eric Hanchrow
2014-06-02 13:01 ` Leo Liu
2014-06-03  1:52   ` Stefan Monnier
2014-06-03  2:58     ` Leo Liu
2014-06-04  0:02       ` Leo Liu
2014-06-04 12:33         ` Stefan Monnier
2014-06-19  3:33   ` Stefan Monnier
2014-06-19  4:23     ` Leo Liu
2014-06-19 13:32     ` Drew Adams
2014-06-19  3:52 ` Stefan Monnier

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).