9

You set shell-command as global key-binding for F1 and you add a hook function to shell-mode-hook that sets the local key binding to mode-line-other-buffer. (global-set-key (kbd "<f1>") #'shell) (defun my-shell-mode-hook () "My preferred settings for `shell-mode'." (local-set-key (kbd "<f1>") #'mode-line-other-...


4

Yes, there is, run M-x org-babel-next-src-block. The default keybindings for this function are C-c C-v C-n and C-c C-v n. See also the subsection Key bindings and Useful Functions in the orgmode manual.


2

You got it almost right. The error indicates that you tried to use a variable called map which isn’t defined; probably you copied it from some code where there was a variable called map. You probably want to use global-map instead; this is a variable which is predefined, and it holds the global key map: (define-key global-map (kbd "C-w") 'kill-...


2

You can override the org-mode-map like this: (define-key org-mode-map (kbd "S-C-<left>") 'shrink-window-horizontally) (define-key org-mode-map (kbd "S-C-<right>") 'enlarge-window-horizontally) (define-key org-mode-map (kbd "S-C-<down>") 'shrink-window) (define-key org-mode-map (kbd "S-C-<up>") '...


2

It generally requires listening to all keystrokes all the time, and swearing profusely that you’re not a keylogger. And naturally the way you implement it is quite different from OS to OS. It therefore cannot be done directly in Emacs lisp; it requires some level of C programming to integrate with the OS. I don’t believe that anyone has implemented this ...


2

(ivy-define-key ivy-minibuffer-map (kbd "TAB") #'ivy-partial) Originally TAB binds to ivy-partial-or-done. Note that in ivy terms, "done" means your term "execute", whereas "partial" means to try to complete in minibuffer. So switching from ivy-partial-or-done to ivy-partial will keep the tab-complete function but ...


1

As pointed out by @Dan in the comments, the problem was that the piece of code invoked python-auto-format, which undefined. Instead, it should be python-autopep8. The functioning code looks like this: (defcustom python-autopep8-path (executable-find "autopep8") "autopep8 executable path." :group 'python :type 'string) (defun ...


1

You need to use doble-quotes for kbd: (define-key some-mode-map (kbd "M-\"") 'somefunction)


Only top voted, non community-wiki answers of a minimum length are eligible