GNU bug report logs -
#9751
23.3; Alternative Keyboard Feature/Bug
Previous Next
Reported by: Nikos Pitsianis <nikos <at> cs.duke.edu>
Date: Fri, 14 Oct 2011 07:19:02 UTC
Severity: normal
Found in version 23.3
Done: Stefan Monnier <monnier <at> iro.umontreal.ca>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
>>>> What is the way in emacs to alias Ctr-chi to Ctr-x ?
>>> I'd do it in input-decode-map:
>>> (define-key input-decode-map [?\C-χ] [?\C-x])
>>> (define-key input-decode-map [?\C-ψ] [?\C-s])
>> The problem is that this method doesn't work for self-inserting characters,
>> i.e. to be able to handle keybindings that contain characters without
>> modifiers like e.g. `C-x b' we can't use
>> (define-key input-decode-map [?β] [?b])
>
> That's a problem indeed. I guess we can use function-key-map instead, tho.
There is a serious problem with using `function-key-map'. The users who
encrypt gpg files in Emacs, can't decrypt them using command line tools.
The reason is that `epa-encrypt-file' uses `read-passwd' to read
a passphrase for symmetric encryption, but some keys are translated
according to `function-key-map'.
Trying to decrypt the file with command line tools using the same
passphrase fails because command line tools don't use `function-key-map'
translation for passphrases.
This problem can be fixed with the following patch:
=== modified file 'lisp/subr.el'
--- lisp/subr.el 2012-01-07 19:50:04 +0000
+++ lisp/subr.el 2012-01-12 00:34:03 +0000
@@ -2092,6 +2092,7 @@ (defun read-passwd (prompt &optional con
(echo-keystrokes 0)
(cursor-in-echo-area t)
(message-log-max nil)
+ (local-function-key-map nil)
(stop-keys (list 'return ?\r ?\n ?\e))
(rubout-keys (list 'backspace ?\b ?\177)))
(add-text-properties 0 (length prompt)
This bug report was last modified 13 years and 194 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.