Questions tagged [self-insert-command]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
45 views

How to make all key combinations insert themselves into vterm?

I'd like to create a keymap vterm-insert-map for vterm that self-inserts all or at least all currently bound key combinations, except for one, which acts as an escape key. I can use set-transient-map ...
Alexander Praehauser's user avatar
1 vote
1 answer
28 views

Trouble aliasing ctl-x-map, C-x 8 insert command?

I'm reading the beginning of the Emacs manual on inserting text. It says you can run C-x 8 [ to insert a left single curly quote. That works. In my init.el I have this: (define-key global-map [(...
Rob N's user avatar
  • 649
2 votes
1 answer
82 views

Translations of self-inserting keys

What exactly determines what is inserted by self-insert-command? If I change the input-method to greek, p will insert π, but will still be bound to self-insert-command, though it patently does not ...
Toothrot's user avatar
  • 3,264
1 vote
1 answer
198 views

Cover the active region with a character

Called with an active region, it will replace all spaces in that region with the character corresponding to the subsequent key press. E.g., if cover-active-region is bound to C-c /, then C-c / h will ...
Dodgie's user avatar
  • 472
1 vote
1 answer
95 views

eshell backtrace when trying to use character command

I have written a custom interactive command that takes a character as an argument. When I happen to use the key binding for that command while in a eshell buffer where a long-running command is ...
Joseph Garvin's user avatar
0 votes
1 answer
307 views

How to Self Insert Tab When Editing String In go-mode?

The title contains the crux of my question. In go-mode, tabs and auto-indentation generally works well, except when I am editing strings. When inside of a string, I'd like the tab key to self-insert. ...
dave mankoff's user avatar
0 votes
1 answer
253 views

Typing common keys (e.g. space, colon) gives "Symbol's function definition is void: nil"

I've recently been trying to convert my startup files to using use-package, so I've been editing my .emacs file a lot. I seem to have myself in a state where some common self-insert-command ...
Ken Williams's user avatar
4 votes
1 answer
438 views

How to approximate pre-self-insert-hook (which doesn't exist)?

Q: how does one approximate the functionality of the non-existent pre-self-insert-hook? This question is inspired by the curiosity that is the combination of abbrev-mode and self-insert-command. The ...
Dan's user avatar
  • 33k
6 votes
1 answer
923 views

Mimic self-insert-command with insert/insert-char?

Due to various/extensive remappings I insert symbols with Control+key, for example Ctrl+9 inserts a left parenthesis (. This works fine with the remappings and the insert/insert-commands, however, ...
user avatar
8 votes
2 answers
924 views

Automatically inserting an space when inserting a character depending on the previous character

Usually after inserting punctuation marks like . , : I make an space before inserting the next character. Is it possible that Emacs automatically do this behavior? For example inserting something like ...
Name's user avatar
  • 7,869
4 votes
4 answers
516 views

writing tests for a post-self-insert-command hook

I wrote a minor mode with the purpose of modifying written text on the fly. It is currently creating a post-self-insert-command-hook, and triggers only on specific keypresses (e.g. the space bar, a ...
Trevoke's user avatar
  • 2,440