Bug: dired bindings break Ex commands.
Hi everyone! I'm yet another long time vim user trying to make a transition to emacs. Recently I've discovered vimpulse and, suddenly, emacs started to look much more usable. :) Thanks for making this great package! Sure, it's not without its quirks but I still find it life-saving (or fingers-saving, at the very least). Here is a little bug in the current git master I've discovered just before switching vimpulse-wants-vi-keys-in-* variables off. In vimpulse-compatibility.el:
(eval-after-load 'dired '(when vimpulse-want-vi-keys-in-dired ;; [... snip ...] (add-to-list 'ex-token-alist '("e" (epa-dired-do-encrypt))) (add-to-list 'ex-token-alist '("s" (epa-dired-do-sign))) (add-to-list 'ex-token-alist '("v" (epa-dired-do-verify))) (add-to-list 'ex-token-alist '("d" (epa-dired-do-decrypt))) (viper-modify-major-mode 'dired-mode 'vi-state map))))
I guess the idea was to add buffer local Ex commands, but it doesn't work. Once dired mode is entered, commands get overwritten globally. After that every attempt to use :e fails with "dired-move-to-filename: No file on this line" message. Of course unsetting `vimpulse-wants-vi-keys-in-dired' "solves" the problem, as does removing of the `add-to-list' expressions. But maybe you will want to do something more creative about it. :)
On 2010-07-23 19:31, Serguei Jidkov wrote:
Thanks for making this great package!
You're welcome. :)
I guess the idea was to add buffer local Ex commands, but it doesn't work. Once dired mode is entered, commands get overwritten globally. ... Of course unsetting `vimpulse-wants-vi-keys-in-dired' "solves" the problem, as does removing of the `add-to-list' expressions. But maybe you will want to do something more creative about it. :)
The creative thing would be to implement buffer-local Ex bindings. I don't have time for that right now (Viper's Ex code is rather messy, and in dire need of an overhaul), so I just removed the faulty bindings in commit [40689c970b]. -- Vegard
participants (2)
-
Serguei Jidkov -
Vegard Øye