Questions tagged [characters]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2 votes
1 answer
36 views

Highlight prettified code

is there a way of highlighting a prettified phrase? Something like: (push '("\\qquad " . "⧢") prettify-symbols-alist) (highlight-phrase "⧢" 'shadow) (highlight-...
Alois Pichler's user avatar
1 vote
1 answer
22 views

prettify text, escape characters

I have (appendq! prettify-symbols-alist '( ("_\\infty" . (? (bl . cl) ?∞)) ;; works ("_{-\\infty}" . (? (bl . cl) "-∞")) ;; does not work ...
Alois Pichler's user avatar
1 vote
0 answers
36 views

print hex-code in string

I hope "*ielm*"/eval-print-last-sexp print "\x80", but the result is ELISP> "😅\x80" "😅\200" ; Unicode characters should be displayed normally. My current ...
shynur's user avatar
  • 5,194
1 vote
1 answer
151 views

How to get the character representation of an integer?

As it is well known, characters in emacs are indistinguishable from the integer number representing them, so much so that the form (eq ?A 65) returns t. Nevertheless, there are situations in which one ...
Ruy's user avatar
  • 839
1 vote
1 answer
29 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 ...
roomworoof's user avatar
1 vote
1 answer
29 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 ...
Dan Drake's user avatar
  • 605
3 votes
3 answers
258 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? ...
Phoenix's user avatar
  • 351
4 votes
3 answers
247 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 ...
shynur's user avatar
  • 5,194
1 vote
2 answers
83 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 ...
Trung Ta's user avatar
  • 301
3 votes
1 answer
108 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 ...
doctorate's user avatar
  • 1,819
2 votes
2 answers
213 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 ...
precompute's user avatar
1 vote
2 answers
295 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 ...
Adelita's user avatar
  • 155
0 votes
0 answers
28 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", ...
Dilna's user avatar
  • 1
0 votes
2 answers
71 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 ...
Dilna's user avatar
  • 1
2 votes
4 answers
583 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?
Pedro Delfino's user avatar
0 votes
1 answer
47 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?
Vinn's user avatar
  • 293
1 vote
0 answers
127 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
eric123's user avatar
  • 11
2 votes
0 answers
148 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. ...
chpill's user avatar
  • 21
1 vote
1 answer
192 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 ...
jcubic's user avatar
  • 731
0 votes
1 answer
53 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 ...
Dilna's user avatar
  • 1
1 vote
1 answer
54 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. (...
Dilna's user avatar
  • 1
0 votes
1 answer
57 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 ...
Dilna's user avatar
  • 1
0 votes
1 answer
69 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.
David Borges's user avatar
0 votes
0 answers
78 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 ...
Alessandro Bertulli's user avatar
2 votes
1 answer
100 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 & ...
ideasman42's user avatar
  • 8,756
0 votes
1 answer
152 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 ...
Tomas By's user avatar
  • 123
1 vote
0 answers
54 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 ...
julianbetz's user avatar
1 vote
1 answer
239 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 . ...
Luctins's user avatar
  • 120
1 vote
1 answer
266 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) (<= ...
user4035's user avatar
  • 1,059
2 votes
1 answer
259 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, ...
David Hanak's user avatar
5 votes
2 answers
736 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?
FunkyBaby's user avatar
  • 797
1 vote
1 answer
775 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 ...
probo243's user avatar
1 vote
1 answer
258 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?
Name's user avatar
  • 7,829
0 votes
2 answers
517 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 ...
alper's user avatar
  • 1,350
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 ...
q.undertow's user avatar
0 votes
0 answers
125 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 ...
space_voyager's user avatar
0 votes
1 answer
99 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 ...
Aido's user avatar
  • 175
1 vote
1 answer
243 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 ...
jcp's user avatar
  • 13
2 votes
1 answer
299 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 ...
kotchwane's user avatar
  • 513
0 votes
1 answer
78 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 ...
Onner Irotsab's user avatar
1 vote
0 answers
396 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 ...
Welgriv's user avatar
  • 67
4 votes
4 answers
2k 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. #...
TrentinQuarantino's user avatar
0 votes
1 answer
74 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 ...
Aquaactress's user avatar
  • 1,453
0 votes
2 answers
101 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: (...
Onner Irotsab's user avatar
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 ...
Sati's user avatar
  • 775
1 vote
1 answer
113 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, ...
A.King's user avatar
  • 53
1 vote
1 answer
29 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)
Quinn Culver's user avatar
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 ...
Ryan1729's user avatar
  • 133
0 votes
1 answer
101 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 ...
anquegi's user avatar
  • 749
1 vote
1 answer
993 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 ...
Max1's user avatar
  • 151