Skip to main content
Share Your Experience: Take the 2024 Developer Survey
14 votes
Accepted

Insert character by its Unicode name

From the documentation of insert-char, I cannot see why (insert-char "GREEK SMALL LETTER EPSILON") doesn't work. It doesn't work because insert-char understands Unicode character names only ...
Basil's user avatar
  • 12.4k
3 votes
Accepted

Programmatically invoking insert-char for compatibility with unicode insertion in Linux

The insert-char function wants a character, but substring returns a string. They're not the same type, and a character in elisp is essentially an integer. Let's convert the hexadecimal charcode into ...
g-gundam's user avatar
  • 1,281
1 vote

Adding unicode special characters

Those mostly work for me in Emacs 27.1, though you should note that correct name is "LATIN CAPITAL LETTER O WITH CIRCUMFLEX". If you don't have autocompletion in this prompt (there is none ...
db48x's user avatar
  • 18.2k
1 vote
Accepted

Placing a hook after each character insertion

Inserting characters into the buffer is normally done via self-insert-command, which has a hook called post-self-insert-hook that you can use: (defun backward-char-after-insert () (backward-char)) ...
rpluim's user avatar
  • 5,315
1 vote
Accepted

How to insert a space char when inputting a node name to `org-roam-node-find`?

You can always use C-q SPC to insert a space char. You can use C-q to insert any character. So just type Programming, followed by C-q SPC, followed by `Languages. C-h k C-q tells us: C-q runs the ...
Drew's user avatar
  • 77.9k
1 vote
Accepted

function returning space

C-u 8 SPC will insert 8 spaces. Equivalently from lisp: (self-insert-command 8 ?\s)
Trevoke's user avatar
  • 2,450
1 vote

insert-char completion says no matches, but inserts character anyway?

You see No match when you hit TAB because there's no match for the text 201c using the completion-styles you have. More importantly, C-x 8 RET matches character names, not code points. But if you hit ...
Drew's user avatar
  • 77.9k
1 vote

Programmatically invoking insert-char for compatibility with unicode insertion in Linux

This is not intended as a direct answer to your question, but the C-S-u keybinding that you are referring to is part of Gnome’s IME support. It should work automatically in any Gtk application, ...
db48x's user avatar
  • 18.2k

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