New answers tagged

1

The cleanest way is to not reuse Evil-specific commands or keystrokes unless absolutely necessary. Looking at the definition of :w, which happens to be the evil-write command, one can see that it parses the file name argument and calls shell-command-on-region if it starts with a bang. Here's the equivalent specialized command: (defun my-evil-run-python-...


0

That key is defined on ido-file-completion-map.


1

The comments clarified that the question was about the behaviour of holding down the Shift modifier key while Caps Lock was on. It's common for the shift key to invert the state of caps lock, rather than to unconditionally enable caps. Hence: t => t SHIFT + t => T CAPS + t => T CAPS + SHIFT + t => t In that latter case, Emacs sees only a lower-...


1

I experienced the same problem, this is what helped me make it work (although I could not find out why): Generate zh_TW.UTF-8 locale (uncomment in /etc/locale.gen and run locale-gen) Run emacs with LC_CTYPE set to this locale (env LC_CTYPE=zh_TW.UTF-8 emacs)


1

Do you have either a (require 'move-dup) or a use-package declaration for move-dup? If not, that is likely your problem.


1

I don't believe there is a way to access the menu search feature from Emacs directly, but there is a workaround if you are using the Mitsuharu version of Mac Emacs: use M-x menu-bar-open, then type the standard key Cmd-? to open the menu search. You might try binding s-? to menu-bar-open so that you can get to the search by pressing it twice.


0

Another simple solution is to use Ctrl+Ins/Shift-Delete instead of Ctrl+C/Ctrl-X when recording the macro.


0

You can do this: ;; Dynamic bindings. A filter function returns the command to ;; call. If the function returns nil, Emacs treats it as if ;; no binding exists in that keymap, and continues looking for ;; a binding elsewhere. (define-key <map> <key> `(menu-item "" <my-cmd> :filter ,(lambda (cmd) ...


1

I had this problem before and came up with this solution. Make a minor mode where you define your conditional commands: (defvar conditional-overriding-mode-map (make-sparse-keymap)) (define-minor-mode conditional-overriding-mode "a minor mode for commands that only work if a certain condition holds." t nil conditional-overriding-mode-map) The ...


0

I've taken @Drew's answer and blended it with https://stackoverflow.com/a/36994486/324105 to produce this command: (defun my-describe-all-keymaps () "Describe all keymaps in currently-defined variables." (interactive) (with-output-to-temp-buffer "*keymaps*" (let (symbs seen) (mapatoms (lambda (s) (when (...


1

A partial answer, just to say how you can get a list of all variables currently bound to keymaps: (let ((symbs ())) (mapatoms (lambda (s) (when (and (boundp s) (keymapp (symbol-value s))) (push (indirect-variable s) symbs)))) symbs)


2

The easiest way is to just call whatever function would have been called when the original key binding was used. Suppose it was function foo: (global-set-key <existing-binding> 'foo-wrapper) (defun foo-wrapper (arg1 arg2) (interactive) (if my-condition-holds (my-foo arg1 arg2) (foo arg1 arg2))) Note that you have to pass along any ...


2

phils is correct; if you use C-cletter for your personal customizations then you're not supposed to have to worry about conflicts with the key bindings from a mode. As for actually enumerating all possible keymaps to check if they would define the same shortcut… that's a bit difficult. As far as I know, there's no global list of all keymaps. There's no ...


Top 50 recent answers are included