New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ctrl+U Alt+A (C-u M-x) eats the first character #133
Comments
What a devilish bug for a sunday...I will look into it. |
I can't exactly reproduce it. However, Ctrl+u Alt+a doesn't even bring up an execute kbd-macro for me... Something is wrong. |
I'm kind of stumped on this bug. I can't see where a |
Thanks for looking into it! I don't remember this being a problem with Xah Lee's package from before it was on MELPA. Have you considered doing something like a binary search to determine when it broke? I also wonder, since you are not seeing the same symptoms as I am, whether you have something like helm installed that could affect the behavior. |
I tried using "git bisect" to investigate further and found that the problem appears (for me, at least) at commit 95fa49c. |
I now reproduce the behavior. I'm not sure why I wasn't reproducing it before. It does the same thing in helm and smex, unfortunately. I tried reverting to the commit you pointed out and it didn't really work for me. I'm going to have to look into this more... |
Thanks for the git bisect tip. Facinating. |
By the way, an easy way to start a clean ergoemacs session is to use the key |
You look like someone I know... Is your first name Tom? |
I got to the same place.... |
Sorry, it's Paul. Anyway, 95fa49c is the first bad commit; the parent, i.e. 95fa49c^ should work. It looks like the commit throws away a lot of keyboard bindings in a strange way, but I don't understand it because it is in the middle of a monster function. The code seems to have been cleaned up a lot since then, and the particular The bad commit also caused some tests in |
Sometimes I can't figure out how to write a test for a bug. This is one that I can't figure out how to write a test for. |
The funny thing about this bug, is By setting
The actual function bound to |
Even taking out the post-command-hook and pre-command-hook functions, this doesn't work. |
By taking out all refenreces to this function, the bug still occurs. This is done by: (defun ergoemacs-setup-keys-for-layout (layout &optional base-layout)
"Setup keys based on a particular LAYOUT. All the keys are based on QWERTY layout."
(ergoemacs-setup-translation layout base-layout)
;; Reset shortcuts layer.
(setq ergoemacs-command-shortcuts-hash (make-hash-table :test 'equal))
(let ((setup-ergoemacs-keymap nil))
(ergoemacs-setup-keys-for-keymap ergoemacs-keymap))
... |
I don't think that function is causing the bug.... |
Right now, I have a work-around. If |
Thanks for working so hard on this! By the way, the bug also occurs with some other prefixed commands like |
I think this bug occurs whenever there is a prefix argument and the command enters the minibuffer. |
Hm. It may be the universal-argument-other-key that is eating the character. (defun universal-argument-other-key (arg)
(interactive "P")
(setq prefix-arg arg)
(let* ((key (this-command-keys))
(keylist (listify-key-sequence key)))
(setq unread-command-events
(append (nthcdr universal-argument-num-events keylist)
unread-command-events)))
(reset-this-command-lengths)
(restore-overriding-map)) |
It is run right after ergoemacs starts the minibuffer. |
change one command-keys to single-command-keys
This should be fixed. Even for the Ctrl+o example |
The current version in MELPA now works great. Thanks! |
To reproduce, type Ctrl+U Alt+A shell, and you will see "C-u M-x hell" in the minibuffer (with no "s").
I verified this with a fresh emacs with ergoemacs-mode-20131210.815 installed via Melpa, executing:
The text was updated successfully, but these errors were encountered: