Bug: dired bindings break Ex commands.

Serguei Jidkov sergiojxidkov at gmail.com
Fri Jul 23 19:31:53 CEST 2010


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



More information about the implementations-list mailing list