Questions tagged [characters]
The characters tag has no usage guidance.
91
questions
1
vote
1
answer
23
views
The number of characters in one line is very different from `window-width`
In my environment, I can only enter 130 single-byte characters in one line in the actual buffer while window-width is returning 160. Apparently window-width is returning columns, not characters. Is ...
1
vote
1
answer
17
views
insert-char completion says no matches, but inserts character anyway?
I'm using C-x 8 RET to insert a Unicode character. I enter the hex value -- for example, 201c -- and the minibuffer says "no matches". But if I just hit enter, the expected left double quote ...
3
votes
2
answers
81
views
Convert accented characters to non-accented counterparts (character folding)
Is there a way for lisp to convert a string with accented characters into a non-accented counterpart without mapping each and every character or is creating a manual map the only way to achieve this?
...
0
votes
0
answers
14
views
Why are checkboxes not showing in customize UI?
Emacs installed from https://emacsformacosx.com/.
When visiting the customize UI, I see blank spaces where I should have checkboxes. Does anyone have suggestions for how to resolve, or provide more ...
4
votes
3
answers
130
views
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 ...
1
vote
2
answers
35
views
How to prevent the character `^[(B` from being displayed on the compilation buffer
When I run the test feature of Rust in Emacs compilation mode, with ansi-color mode loaded, somehow the character ^[(B is always displayed like below:
It looks quite annoying.
Does anyone know how to ...
3
votes
1
answer
89
views
How to implement character folding (stripping Arabic text from diacritics or tashkeel aka text normalization or cleansing) when doing search in Emacs?
This is a follow-up question on a previous one here looking for a solution to this very common task of searching for a string in a text irrespective of the vowel diacritics associated with. Arabic ...
2
votes
2
answers
166
views
Programmatically invoking insert-char for compatibility with unicode insertion in Linux
I'm trying to enter unicode chars in emacs in the same manner I can anywhere else in linux, with the C-S-u string shortcut.
Unfortunately, the function I've written does not work.
(defun insert-char-c ...
1
vote
2
answers
237
views
Way to keybind «» in Emacs
I would like to be able to keybind « and » to easy key bindings.
At the moment in Emacs the only way to write these latin quotation marks is this:
C-x 8 < and C-x 8 >
I tried the following, but ...
0
votes
0
answers
25
views
read-char-by-name to start from Arrows or Dingbats
Using (read-char-by-name "utfname: ") how can I start from Arrows or Dingbats rather than painfully starting from "Null" "START OF HEADING", ...
0
votes
2
answers
57
views
Interactive selection with hex codes
I want a function that can take a utf hexcode from the user, and use it to change the glasses-separator in glasses-mode. When I use completing-read using a list of hexcodes things for well and the ...
1
vote
4
answers
238
views
How to count the number of characters in the marked (selected) region?
I know how to count the number of words.
How to count the number of characters in the marked (selected) region?
0
votes
1
answer
26
views
How to get the value of an evaluated function and nothing else?
In emacs, when I evaluate an elisp function, I get the value plus other stuff.
For example, if I evaluate (+ 2 2), I get this:
4 (#04, #x4, ?\C-d)
How can I setup emacs to just return 4?
1
vote
0
answers
65
views
how to turn off special character?
I am pretty new to emacs. does anyone how to turn off special character, such as 渘 ?
I tried to search online but no luck.
emacs 28
2
votes
0
answers
89
views
Cannot input some characters using linux compose key in Emacs GUI
I'm trying to write some exotic characters, like ĵ, ĉ or ŭ. I am using a qwerty US keyboard layout on a GNU linux machine, and I set up my compose key with setxkbmap -layout us -option compose:ralt. ...
1
vote
1
answer
87
views
Emacs shows white space and newline characters
What kind of feature is this and how to disable it?
I've used the wrong shortcut, but I don't remember what I pressed. When I kill the buffer and open the same file again I have those markers.
The ...
0
votes
1
answer
41
views
read-char-from-minibuffer for optional argument
The following counts the number of opening (brcmk-beg) and closing (brcmk-end) braces. Having brcmk-end an optional argument, I would like to print
$begmk nil $count-begmk 0
when the user either ...
1
vote
1
answer
40
views
Displaying character input with interactive declaration
I have the following code for reading two characters, using the interactive declaration. When I run the interactive function the input character is not being shown after the description string.
(...
0
votes
1
answer
40
views
Command that accepts a string and a selected region
Would like to have a function that selects a string (from a list or from a user-defined string, using the mini-buffer) and a selected region.
User would input (), [], {} specifying the opening and ...
0
votes
1
answer
42
views
How can I insert a character by its hex code in the minibuffer?
I've seen it's possible to insert characters with their hex codes by using ctrl+x 8 RET but on regular buffers. I'd like to insert in the minibuffer itself.
0
votes
0
answers
64
views
How to represent guillemets in `org-mode`: Unicode vs Org-mode entities)?
I was planning to write some narrative in Emacs, and after a bit of research it seems that the most complete solution may be org-mode. Now, I report direct speech using guillemets (« and »). The ...
2
votes
1
answer
73
views
Fast character replacement table for strings?
Does Emacs have an API for creating a character translation table which can then be efficiently applied to strings?
A data structure for example that can be created using a set of source & ...
0
votes
1
answer
86
views
How to print character code in UTF-8 (ie ASCII codes)
With
(let ((c (char-after (point))))
I get the code of the current character, and if I just do
(message "%X" c)
it prints the hexadecimal UTF-16 apparently. Is there a simple way to get ...
1
vote
0
answers
44
views
Set a non-default font for latin characters
I want to display phonetic alphabet characters alongside general text in a somewhat coherent manner.
My default font is JetBrains Mono, so at the very least, the characters of the phonetic alphabet ...
1
vote
1
answer
184
views
How to remove characters causing encoding error
When I visit any file under a certain file tree, emacs spits out this error:
These default coding systems were tried to encode text
in the buffer ‘ *temp file*’:
(utf-8 (7862 . 4194279) (14646 . ...
1
vote
1
answer
227
views
isdigit in elisp
I wanted to check that char is a digit by comparing its code with codes of 0 and 9, presuming that the digits codes are contiguous in code table:
(let ((char ?\e))
(if (and (>= char ?\0) (<= ...
2
votes
1
answer
220
views
Characters in unicode-smp charset have no glyphs in Emacs 27.1, debian buster, using MesloLGS NF font
I'm using Gnu Emacs 27.1 GTK on Debian 10 from buster-backports. I'm also using the MesloLGS NF font that ships with zsh powerlevel10k, and has a heck of a lot of unicode characters. Nonetheless, ...
4
votes
1
answer
532
views
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?
1
vote
1
answer
589
views
Adding unicode special characters
I wanted to add a latin capital O with circumflex [ô] to a file in emacs, but for some reason all my attempts lead to the character being replaced by a question mark ?. I tried :
M-x insert-char ...
1
vote
1
answer
197
views
unescaped character literals detection error
When I reload my init file I get an error (or warning) saying
unescaped character literals `?(', `?)', `?[', `?]' detected!
What does this error (warning) mean and how can one fix it?
0
votes
2
answers
453
views
How to prevent unwanted characters such as`[OB` and `^[OA` and hanging at bottom or top point on scrolling?
I am using emacs under iTerm2 on Mac. I am using mouse to scroll up and down. Please not that I haven't face with the issue when I remotely connected into a linux machine, which has exactly same emacs ...
1
vote
1
answer
60
views
Recursion in char_charset?
I am looking at the C code for Emacs as of Emacs 26.1, file charset.c , defun char-charset (around line 2040), and file charset.h, macro CHAR_CHARSET (around line 380). I don't understand how in the ...
0
votes
0
answers
117
views
Uppercase instead of lowercase Greek letter shown in Julia mode
I am writing Julia code in Emacs, which allows the use of unicode characters in the source code. However, some symbols come out looking weird. For example the Greek letter nu:
becomes:
Does anyone ...
0
votes
1
answer
89
views
Display Δ in the *Shell Command Output* Buffer
I have a shell command I'm running from Emacs that has a Δ character in its output. How can I configure the *Shell Command Output* buffer to display UTF-8 by default?
edit: There could also be ...
1
vote
1
answer
188
views
How to print escaped characters with princ
When Emacs shows an integer value in the minibuffer, or as an output to IELM, it shows three representations of it -- octal, hex and as character:
ELISP> 10
10 (#o12, #xa, ?\C-j)
This is really ...
2
votes
1
answer
257
views
Hide non-breaking spaces in org-mode, but show them in code blocks
Default Emacs settings show non-breaking spaces as a kind of underscore. This is very useful because these otherwise invisible characters would break code execution in many programming languages, and ...
0
votes
1
answer
53
views
How to replace a letter with its numerical alphabetic position?
I have this code:
\author[p]{...}
\author[bc]{...}
\author[p]{...}
\author[l,o]{...}
\author[t,q]{...}
\author[at]{...}
\author[z]{...}
\author[ak]{...}
\author[az]{...}
\author[ah,bq]{...}
...
I ...
1
vote
0
answers
327
views
How to change comments characters in assembly mode
I am editing .s files whit an assembly-to-binary translator that does not accept ; as a comment delimiter but accept C like comments (namely // and /* ... */).
I tried to modify comment-start ...
4
votes
2
answers
1k
views
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.
#...
0
votes
1
answer
70
views
Nonexistent newline on display after using outorg
I'm using outorg to convert an elisp file to an org file and then back to an elisp file via (outorg-convert-to-org) and (outorg-convert-back-to-code). When I do this conversion I notice that it looks ...
0
votes
2
answers
98
views
How to replace first 100 digits with letters?
I want to replace the first 104 digits as it follows:
1 --> a
...
26 --> z
27 --> aa
...
52 --> az
53 --> ba
...
104 --> bz
I have tried as it follows:
(...
4
votes
2
answers
2k
views
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 ...
1
vote
1
answer
92
views
forward-word and non-letter "words"
Using forward-word with this line:
foo *** *** bar,
I want to have the folowing behavior:
foo| ***| ***| bar|,
Not:
foo| *** *** bar|,
So, if between spaces there are only non-letter symbols, ...
1
vote
1
answer
28
views
Number value echoed from evaluation [duplicate]
What does the (#o3, #x3, ?\C-c) output in the echo area (next to the 3) represent? Here I've simply evaluated
(+ 1 2)
3
votes
1
answer
1k
views
How do you type a space character in Spacemacs?
I was researching editors and I ended up stumbling upon Spacemacs and the fact that it uses the spacebar instead of traditional modifier keys. The documentation claims that this lowers the user's risk ...
0
votes
1
answer
96
views
How to display unicode chars in ielm
I'm using emacs on MAC OSX
ELISP> (emacs-version)
"GNU Emacs 27.0.50 (build 1, x86_64-apple-darwin18.7.0, NS appkit-1671.60 Version 10.14.6 (Build 18G95))
of 2019-09-06"
ielm REPL echoes back ...
1
vote
1
answer
911
views
How to understand paragraph-start variable regex
Problem
When i evaluate the paragraph-start variable in the major mode lisp-mode, it has the following value
"^L\\|[ ]*$"
In emacs the ^L is displayed in red color so I'm not sure if there is ...
1
vote
0
answers
150
views
Set font family for comments
In coq mode I have ligatures being used: instead of "fun", it shows λ in the programming code. But in the comments lambda transformed into a character I can't even copy, so I'll attach a screenshot:
...
1
vote
1
answer
55
views
set-register register-separator "\n\n")
Upon reading GNU Emacs Manual #rectangle register
When you are collecting text using append-to-register and prepend-to-register, you may want to separate individual collected pieces using a ...
0
votes
2
answers
117
views
Symbol's value as variable is void: ‘yes-or-no-p
I have the following lines in my config file:
(fset 'yes-or-no-p 'y-or-n-p)
(setq confirm-kill-emacs ‘yes-or-no-p)
The latter line is what's throwing the error. I would like to be able to use 'y-or-...