Questions tagged [characters]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
17 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 ...
user avatar
  • 661
0 votes
1 answer
31 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 ...
user avatar
  • 159
1 vote
1 answer
28 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. (...
user avatar
  • 159
0 votes
1 answer
33 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 ...
user avatar
  • 159
0 votes
1 answer
25 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.
user avatar
0 votes
0 answers
36 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 ...
user avatar
2 votes
1 answer
42 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 & ...
user avatar
  • 7,179
0 votes
1 answer
24 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 ...
user avatar
  • 123
1 vote
0 answers
23 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 ...
user avatar
1 vote
1 answer
42 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 . ...
user avatar
  • 106
1 vote
1 answer
204 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) (<= ...
user avatar
  • 845
2 votes
1 answer
145 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, ...
user avatar
4 votes
1 answer
253 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?
user avatar
  • 687
1 vote
1 answer
114 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?
user avatar
  • 7,344
0 votes
2 answers
318 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 ...
user avatar
  • 1,076
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 ...
user avatar
0 votes
0 answers
108 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 ...
user avatar
0 votes
1 answer
78 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 ...
user avatar
  • 165
1 vote
1 answer
81 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 ...
user avatar
  • 13
2 votes
1 answer
199 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 ...
user avatar
  • 431
0 votes
1 answer
45 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 ...
user avatar
1 vote
0 answers
224 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 ...
user avatar
  • 67
4 votes
2 answers
982 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. #...
user avatar
0 votes
1 answer
61 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 ...
user avatar
  • 1,283
0 votes
2 answers
83 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: (...
user avatar
4 votes
2 answers
1k 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 ...
user avatar
  • 645
1 vote
1 answer
73 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, ...
user avatar
  • 21
1 vote
1 answer
25 views

Number value echoed from evaluation

What does the (#o3, #x3, ?\C-c) output in the echo area (next to the 3) represent? Here I've simply evaluated (+ 1 2)
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 ...
user avatar
  • 133
0 votes
1 answer
89 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 ...
user avatar
  • 697
1 vote
1 answer
839 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 ...
user avatar
  • 131
1 vote
0 answers
104 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: ...
user avatar
  • 845
1 vote
1 answer
44 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 ...
user avatar
  • 1,089
0 votes
2 answers
96 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-...
user avatar
  • 339
2 votes
1 answer
42 views

Finding English Letters in a multilingual document

I have a document mainly Persian with English/French/German characters here and there. I want to append a command before Latin word(s) and a } at the end. Do you think it could be done in emacs? ...
user avatar
  • 195
0 votes
1 answer
275 views

Check if a character is in a string

It is easy to present list of allowed characters as string, like " \n\t". (char-before) return integer. How can I check that a character is in a string? There is What is the easiest way to check if ...
user avatar
  • 3,132
2 votes
1 answer
82 views

How to replace a digit by a letter?

I want to replace some digits by letters such that 1 ---> a 2 ---> b ... In emacs I have tried the following replacement: M-x query-replace-regexp RET \([0-9]+\) RET \,(string (+ ?a \#1)) RET ...
user avatar
2 votes
1 answer
92 views

How should one interpret the printed representation of integers in Emacs Lisp?

I'm getting to grips with Emacs Lisp in GNU Emacs 25.3.2. While trying to understand the printed representation of integers I got confused by the following echo area output produced by C-x C-e: 10 -&...
user avatar
4 votes
2 answers
871 views

Make Emacs short keys work in different language

I have to often switch the OS keyboard language between Latin an Cyrillic. When the keyboard is Cyrillic the short keys don't work because they are not recognized. For example a Latin command of C-x-c ...
user avatar
  • 221
0 votes
1 answer
690 views

insert a single character

My goal Write code in my init.el file so that from now on, M-v will just print the BELL character (character number 27 in hexadecimal) instead of scrolling down as it does by default. My failed ...
user avatar
4 votes
1 answer
5k views

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 ...
user avatar
0 votes
1 answer
113 views

Convert HTML umlauts to corresponding characters

I have a list of strings containing german umlauts as their html representation, e.g. ü is &uuml; and so on. Is there an easy, maybe built-in, way to convert them within strings, i.e. "Pr&uuml;...
user avatar
7 votes
1 answer
2k views

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?
user avatar
  • 2,934
0 votes
0 answers
29 views

Change line length calculation of a certain character displayed with multiple glyphs

I am differentiating em-dashes (—) from hypens (-) in emacs using this code in my .emacs: (let* ((glyph-em-dash (make-glyph-code ?\u002D 'font-lock-function-name-face)) ) (aset standard-...
user avatar
2 votes
2 answers
124 views

How can I use a char as a counter?

I have this LaTeX code: \begin{enumerate}[a] \affiliation{...} \affiliation{...} \affiliation{...} ... \affiliation{...} \end{enumerate} and, using a script written in Emacs Lisp, I want to ...
user avatar
7 votes
1 answer
208 views

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 ...
user avatar
  • 24.3k
4 votes
1 answer
1k views

Test char at point

I want to test if char at point is, let's say, "{" I found: (string= "{" (buffer-substring-no-properties (point) (+ 1 (point)))) and: (string-match-p "{" (what-cursor-position)) both working. ...
user avatar
4 votes
0 answers
235 views

How to make Emacs not intercept Command-Ctrl-Space, used for Special Characters on macOS?

On macOS the CommandCtrlSpace shortcut opens an Emoji picker which can be expanded into a Special Characters picker. But when I type this shortcut on Emacs in order to input a character, instead of ...
user avatar
  • 340
2 votes
2 answers
276 views

Accessing the character in the line below

I am writing an Emacs Lisp function which needs to know the character directly under point in the line below, returning nil when no such character exists. I thus defined the function char-below, which ...
user avatar
  • 597
1 vote
1 answer
305 views

Replace certain multibyte characters

In my markdown file (coming from a Windows computer on which I have no control), I have several multi-byte characters. Some text xx Some text yy Some text In emacs, they are displayed as \221 and \...
user avatar
  • 1,668