Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Keyboard shortcuts, key chords, key sequences, hotkeys, or any association between key combinations and corresponding actions in Emacs.

1
vote
1answer
41 views

C-c C-c is not working

I'm writing a major mode. In that mode I put: (define-key oef-mode-map (kbd "C-c C-c") 'oef-edit-in-browser) ; With Aquamacs (on my mac) the shortcut is working as expected. But with emacs (on ...
1
vote
1answer
120 views

Rebinding C-S-s?

I'm trying to set up C-S-s to run isearch-forward-symbol-at-point, but when I do the obvious step of: (global-set-key [C-S-s] 'isearch-forward-symbol-at-point) It doesn't work. It just does a ...
1
vote
0answers
19 views

Return key when Emacs running inside a terminal [duplicate]

I have re-assigned the RETURN key to exit the insert state in Evil mode. (define-key evil-insert-state-map [return] 'evil-normal-state) But this does't work with emacs -nw in terminal. Any way to ...
1
vote
1answer
40 views

How to remap ctrl-x with key-chord

How to remap C-x with key-chord mode. (key-chord-define-global "uu" 'what-goes-here?) https://www.emacswiki.org/emacs/KeyChord
0
votes
1answer
15 views

Shift + cursor stopped behave as usual in org mode

after a package update and restart shift+arrow does not behave as usual in org mode: move one day up/down in dates or cycling between statuses (todo, done, waiting...) in task lists. org-support-...
2
votes
0answers
23 views

Get keymap that called function

I am trying to write a function that can be used to make a keybinding "remember" the key sequence that led up to the function being called. (defun modal-function (func) (funcall func) (set-...
1
vote
1answer
55 views

how to solve conflicts between operating system shortcuts and emacs shortcuts?

In some cases operating system shortcuts takes precedence and in other cases emacs shortcuts takes precedence. what's the reason for this kind of behaviour? Eg: (Mojave shortcut) Command + shift + 5,...
5
votes
1answer
51 views

I accidentally set a letter key to another command. How can I reset it?

In the past when this happened, I was able to google the answer with no problem, but this time nothing's coming up.
1
vote
1answer
18 views

Issues adding super keybindings to term-mode-map on Mac OSX

I'm trying to bind Command-{ and Command-} to multi-term-prev and multi-term-next. I only want them in term-mode, since if I use it in a file buffer it will switch to show a terminal (which is rather ...
2
votes
2answers
41 views

Make Emacs short keys work in different language

I have to often switch the OS keyboard language between Latin an Cyrillic. When the keyboard is Cyrillic the short keys don't work because they are not recognized. For example a Latin command of C-x-c ...
0
votes
1answer
33 views

How to `transpose-chars' backwards

I'm trying to make a trivial function that simply transposes chars backwards. This is what I got so far: (defun jd:backward-transpose-chars () (interactive) (transpose-chars -1)) (define-key ...
2
votes
2answers
49 views

Elisp - Activate and Deactivate Linum-Mode when Goto-Line is Triggered

I switched to Emacs from Vim and because of Vims functionality of giving keys a prefix, (for example to jump up several lines etc.) i installed relative-linum-mode right away. Now i found out about ...
3
votes
1answer
41 views

how to provide a parameter for interactive lamda function

I want to be able to perform helm-swoop on an input error: on a compiler output buffer using C-x C-r, here is how I tried to achieve it. (global-set-key (kbd "C-x C-r") (lambda () (interactive) (...
0
votes
2answers
18 views

bind an insertion to a mouse click

I need to change a space to a | here and there and i guessed that the best possibility were to bind a mouse click and the insertion of the pipe (global-set-key [s-mouse-1] '(insert "|")) But when I ...
0
votes
2answers
57 views

How to deal with particular key-binding conflict (F3 key on Mac)

I would like to make a very basic macro on my Mac, to have a command that writes a list of slashes in the current file : //////////////////// The "Basic emacs macros" section of the manual says : ‘&...
1
vote
2answers
38 views

Keybinding for Smerge

I'm trying to change the keybindings to all the smerge commands. I added : (setq smerge-command-prefix "\C-c v") to my Emacs config. M-x customize smerge confirms that the Smerge Command Prefix is ^...
0
votes
0answers
36 views

is it possible for two people, using different emacs and keybindings to edit the same file synchronously?

I want to pair program with a couple of people but my keybindings in emacs are not the same as theirs. Is there a way to edit the same file but keep the keybindings different?
0
votes
1answer
21 views

how to map <C-M-left>, <C-M-right> etc to the correct hex codes in iterm2

I'm looking to configure iterm2 to output the correct hexcodes that correspond to in emacs. There's a whole bunch of mappings predefined but it's very cryptic. I'm a little bit lost as to how these ...
0
votes
1answer
40 views

how can a command be bound to Ctrl-' or Ctrl-<NUM> in the terminal

I want to bind a command to C-', C-` and C-0 through C-9 keys. It's not working in the terminal Is there a way to do so?
11
votes
1answer
741 views

what is the `A-` binding?

On Emacs, if I type C-h, b a list of keybinds come up, including: what is A- and how do I access it?
1
vote
2answers
51 views

use-package :bind not working as expected

I frequently work with R and ess, and want to bind a shortcut to a function that clears the R console: (use-package ess-site :ensure ess :bind (:map inferior-ess-mode-map ("C-c c" . ...
0
votes
0answers
23 views

On mac os, the C-n and C-p bindings are only working when using C-N and C-P

On my macOS High Sierra, the binding C-n or C-p are only working when used with Shift key so it looks like C-N and C-P. Same happens with some other bindings. What can be a reason for that?
0
votes
1answer
25 views

Setting C-p as helm-projectile-find-file

I put this at the very end of my config file: (global-set-key (kbd "C-p") 'helm-projectile-find-file) On Emacs start I can see that it is getting assigned using C-h k C-p. Then when I actually load ...
1
vote
1answer
35 views

What mode does the command `query-replace' activate?

I'm editing my keybinds mode-by-mode, and I've now come to the query-replace-map. I want to define my keybinds in a mode-hook to keep my files logically consistent, but I cannot determine which mode ...
1
vote
2answers
77 views

How to make all variables and functions of a mode visible without activating the mode

Let's say I want to customize a keybind for a mode that hasn't been loaded yet like so: (define-key eshell-mode-map (kbd "C-M-i") 'eshell-previous-input) But the problem is if I haven't yet loaded ...
2
votes
1answer
32 views

Using Emacs with Greek keyboard

I know I can use a Greek input method, but what I want is quite different: how to use Emacs in an OS configured for Greek, without having to set the keyboard to English (or any other Latin alphabet ...
1
vote
1answer
35 views

Changing the name of the function key <mouse-1> leads to problems

I want to change the name of the function key <mouse-1> like so: (define-key input-decode-map (kbd "<mouse-1>") (kbd "<jd:m1>")) And thus bind the new name to an arbitrary function ...
0
votes
0answers
9 views

Some keybindings do not work in Inferior Octave mode

I want to set C-M-n to forward-sexp in Inferior Octave mode (as forward-list appears not to exist here). However, C-M-n appears to be very persistently set to comint-next-prompt. Specifically, I can ...
1
vote
1answer
78 views

How is the key <backtab> defined; how to obliterate it; and how to create a new one from scratch?

Logos Basically what I've been doing the past couple of weeks is trying to customize my keybinds one mode at a time; thus I've been going through each mode one-by-one and completely clearing its ...
1
vote
0answers
15 views

Unbind SLIME's slime-edit-uses (M-_)

I installed undo-tree-mode into my emacs. It does have a lot of nifty features, one of them being undo-tree-redo (bound to M-_). It so useful that I put the following code inside my ~/.emacs.d/init.el:...
1
vote
1answer
11 views

How to sustain shift-selection with my custom scroll function

I have made two custom scroll functions (that scroll up and down a page respectively) (defun jd:scroll-up () (interactive) (scroll-down-command) (move-to-window-line nil)) (defun jd:scroll-...
1
vote
1answer
36 views

Quake Terminal Like Access for Emacs Client Session [duplicate]

I am trying to get used to Emacs. I have a problem with the startup time of the Emacs and I give up Emacs easily when the startup times for "vim", "subl" (sublime text), and "code" (vs code) are much ...
4
votes
1answer
39 views

How to suppress a minor mode's key binding in only certain major modes?

Suppose that I use minor mode MIN with a whole bunch of major modes. In one of those major modes, call it MAJ1, MIN's binding for a specific key K is undesirable; I would therefore like to suppress ...
1
vote
1answer
48 views

How do I get rid of RET being translated from <return>?

I'm overhauling all of my keybinds and I'm trying to keep it logically consistent. When I issue the command describe-key -> RET This pops up in the *Help* buffer: RET (translated from <return>...
0
votes
1answer
46 views

Spacemacs: change prefix key from `SPC-b` to `SPC-v`

I use buffer (SPC-b) prefix key very often, and would like to move its keymap to a more convenient key (e.g. SPC-v). Is there a way to achieve this without redefining the entire map? so I would like ...
0
votes
1answer
15 views

Toggle major mode with a custom key binding

I currently have 2 key bindings for switching between two major modes: (global-set-key (kbd "<f12>") 'js2-jsx-mode) (global-set-key (kbd "<f13>") 'web-mode) How would I reduce that to a ...
1
vote
1answer
33 views

Assign TAB in markdown mode

Running emacs 25.2.2, general, evil and markdown-mode installed from MELPA. The problem is when I hit TAB on a heading in a markdown file, it does not cycle visibility of content. C-h k TAB shows it ...
0
votes
1answer
56 views

Emacs on mac recognizing C-x as M-x

System Config: macOS Sierra, Emacs v26.1 installed from emacsformacosx.com issue: On a fresh install, the C-x key is mapped to M-x by default. Is this the default behaviour? If so, how can I ...
0
votes
0answers
33 views

Define keybindings for org-agenda starting with SPC

Using emacs 25.2.2, general, evil and evil-collection from MELPA. I have the following in my init.el: (general-unbind 'org-agenda-mode-map "SPC") (general-create-definer my-leader :prefix "SPC")...
0
votes
1answer
51 views

How can I get working motion keys with `emacs -nw`?

when I start Emacs without windowing system (-nw), the motion keys are not working. Instead, I get (parts of) the escape sequences, like: ;; This buffer is for text that is not saved, and for Lisp ...
0
votes
1answer
32 views

C-x and M-x remapped to SPC and SPC-SPC

What would be the best way to configure Emacs to handle the above keybindings for vanilla Emacs? Specifically, I'd like to have SPC work as C-x and SPC SPC work as M-x. I love Spacemacs for the ...
1
vote
1answer
20 views

Keybinding to go to an agenda custom view

Running emacs 25.2.2 and org 9.1.13. I have defined several custom views. I can visit them using C-c a followed by the assigned letter. I was wondering if I could cut the dispatcher all together. I ...
0
votes
2answers
60 views

Show Link Tooltip mouse over with keystroke

When I use mouse-over on an Link (thanks to Tobias) it shows an Image and text. When I used display-local-help the image disappeared (perhaps due to lack of space in the message area). I want to ...
0
votes
0answers
25 views

Meta ! not working

Not sure how to start debugging this, certainly haven't intentionally changed this. The shell-command function invoked manually still behaves as expected. Any clue on how to start debugging this?
0
votes
1answer
31 views

Keybinding for adding a new heading under a list item in org-mode

Lets say you are working in an org-mode structure like this: * First level heading… ** Second level heading *** Third level heading - list item one - list item two After list item two you want to ...
0
votes
1answer
28 views

Capturing data on .org document to table

I have a simple template in emacs .org mode . \begin{flushright} Name : Phone no: Billed amount: Date \end {flushright} • Details ......... I export the document to pdf and print it. I ...
-2
votes
1answer
40 views

Binding C-c C-e lo to “print” button

I use org mode for my routine work. I use sequence C-c C-e lo to export and open pdf almost 30 times a day Is it possible to bind this sequence to print button. It will make my job easy
0
votes
1answer
24 views

How to call export function, bypassing interactive menu

The shortcut C-c C-e is linked to org-export-dispatch. Whenever I want to export my current org buffer as html, I do C-c C-e R R, which is Export to reveal.js HTML Presentation -> To File. I am ...
0
votes
1answer
38 views

C-x-TAB not followed by options

I am after the key-binding C-x-TAB S-rightarrow to indent each line in a block by a TAB see - https://www.gnu.org/software/emacs/manual/html_node/emacs/Indentation-Commands.html. I always open emacs ...
0
votes
1answer
94 views

How to type S-<LEFT> during indent-rigidly?

How to type S-LEFT during the transient mode after C-x <TAB> (indent-rigidly)? Particularly, I am after this command C-x <TAB> This command is used to change the indentation of ...