Skip to main content

Questions tagged [self-insert-command]

Filter by
Sorted by
Tagged with
5 votes
1 answer
254 views

How can I detect when emacs is dictation safe?

Longer version of question: how can I efficiently detect and indicate when emacs is dictation safe? By "dictation safe", I really mean "when can type random printable ASCII characters ...
Krazy Glew's user avatar
0 votes
0 answers
114 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
30 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
  • 701
2 votes
1 answer
96 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,304
1 vote
1 answer
210 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
  • 482
1 vote
1 answer
96 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
315 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
259 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
458 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
  • 33.4k
6 votes
1 answer
926 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
959 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
  • 8,037
4 votes
4 answers
524 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,457