Questions tagged [characters]
93 questions
11
votes
4 answers
How to determine if the current character is a letter
How I can determine if the current character is a letter (an alphabetic character) (i.e., belongs to the syntax class [:alpha:] in regexp notions).
I would like to write a simple function like below:
(defun test-letter () (interactive)
(if…

Name
- 7,689
- 4
- 38
- 84
9
votes
4 answers
Showing bytes as hexadecimal escapes rather than octal escapes
Short version: Can I make Emacs show \ff or \xff instead of \377?
Long version: Suppose you open a file that is not entirely text and has some binary data (say a PostScript or PDF file). For example, suppose you open GNU Emacs Reference Card…

ShreevatsaR
- 880
- 6
- 19
8
votes
1 answer
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. Is there a non-interactive way to insert a character
given its Unicode name?

Toothrot
- 3,204
- 1
- 12
- 30
8
votes
3 answers
Fast unicode symbol insertion?
Currently, I'm inserting unicode characters (mainly math symbols) using TeX input method. This is cumbersome, since, for each character, I have to do following:
Switch to TeX input method pressing C-\
type latex expression like \Bbb{R} or…

Empty_Mind
- 1,341
- 12
- 27
7
votes
2 answers
Idiomatic way of extending keymap for inserting unicode symbols?
I often find myself needing to insert Unicode characters that have no default binding in iso-transl-ctl-x-8-map, i.e., characters that can't be inserted using C-x 8 followed by one or more letters/punctuation characters.
To add bindings to the C-x 8…

itsjeyd
- 14,586
- 3
- 58
- 87
7
votes
1 answer
Is there a more efficient alternative to search-forward when searching for a single character?
I need to split the contents of a buffer into a list of strings. The null character is used to separate the items.
It the items were separated by newline characters, then I could use the same approach as process-lines:
(let (lines)
(while (not…

tarsius
- 25,298
- 4
- 69
- 109
7
votes
3 answers
Translate ae to ä on non-German keyboard
If for some reason I am stuck to a keyboard with English layout and I often have to enter text in German - can emacs translate ae to ä (or ue to ü) for me?
I do have a not-working solution like this:
(setq abbrev-file-name "~/.emacs.d/abbrev_defs"
…

Matthias
- 745
- 3
- 14
6
votes
1 answer
Arabic in emacs shown as separate letters
I am trying to work with Arabic and English texts in the same buffer. They don't have to be in the same paragraphs.
A text like والإكرام و نوافج is shown as separate letters.
Contrary to English, in Arabic, the letters should change the form…

P. Ajrem
- 141
- 3
5
votes
1 answer
Zero width space shows as underscore
Typing a zero-width space in TERMINAL emacs shows an underscore-ish character. How to make it showing nothing?

FunkyBaby
- 767
- 1
- 4
- 10
5
votes
1 answer
How can I ask emacs to show me (visually) invisible characters like CR LF?
The title says it all: I want emacs to show (all, or only some, like CR LF) invisible characters in my buffer? (If it matters: I am using the latest emacs (25) on the latest debian testing)
(I am not used to the tags used on this site, so please…

kjetil b halvorsen
- 153
- 1
- 7
5
votes
1 answer
What are the ?\(, ?\[, ?\{ symbols in emacs lisp?
I've came across this comment in an evil-surround issue, which stated this code:
;; use non-spaced pairs when surrounding with an opening brace
(evil-add-to-alist
'evil-surround-pairs-alist
?\( '("(" . ")")
?\[ '("[" . "]")
?\{ '("{" . "}")
?\)…

ninrod
- 1,436
- 2
- 13
- 28
5
votes
2 answers
Incrementing characters in Emacs, next to numbers?
You can place a pointer on a number, like 1, and increment it to 2.
There are many alternatives on this. See also the Emacs Wiki:
https://www.emacswiki.org/emacs/IncrementNumber
7 alternatives to increment a number under the pointer!
But there is a…

ReneFroger
- 3,855
- 22
- 63
4
votes
3 answers
the Term “Hash Notation“ in the Elisp Manual
I'm reading GNU Emacs Lisp Reference Manual, and I see the phrase "hash notation".
Two places in the document seem to have different interpretations, so I have 2 questions.
2.1 Printed Representation and Read Syntax:
...... some types have no…

shynur
- 4,065
- 1
- 3
- 23
4
votes
2 answers
Unicode input from keyboard (QMK) to Emacs
I have setup my QMK-enabled keyboard to output Unicode characters. In short, that was adding UNICODE_ENABLE = yes line to the rules.mk file and adding the following two lines to the config.h file.
#define UNICODE_SELECTED_MODES UC_LNX, UC_OSX,…

TrentinQuarantino
- 61
- 5
4
votes
2 answers
Non-greedy regex not working
I can't seem to get the non-greedy regex to work.
Sample String:
ABCD,E《F》、《GH》、《XYIJ》、《KL》、《MN》。
Regex Code:
《.+?IJ》
Search Result:
Because .+? is a non-greedy input, I was expecting the search to confine to the nearest 《》 pair, as shown below.…

Sati
- 775
- 6
- 21