Questions tagged [characters]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
1answer
12 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
2answers
28 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-...
2
votes
1answer
39 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? ...
0
votes
1answer
24 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 ...
2
votes
1answer
24 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 ...
2
votes
1answer
45 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 -&...
2
votes
2answers
117 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 ...
0
votes
1answer
82 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 ...
0
votes
1answer
150 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 ...
0
votes
1answer
31 views

Convert HTML umlauts to corresponding characters

I have a list of strings containing german umlauts as their html representation, e.g. ü is ü and so on. Is there an easy, maybe built-in, way to convert them within strings, i.e. "Prü...
4
votes
1answer
596 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?
0
votes
0answers
18 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-...
2
votes
2answers
64 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 ...
7
votes
1answer
153 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 ...
1
vote
1answer
88 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. ...
4
votes
0answers
151 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 ...
2
votes
2answers
61 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 ...
1
vote
1answer
95 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 \...
1
vote
1answer
72 views

Display devanagari characters

Running Emacs 25 on Kubuntu 17.10. I am able to enter text in devanagari script but it does not dispaly correctly in the editor. For instance, the text entered as: क का कि की कु कू के कै को कौ कं कः...
0
votes
0answers
70 views

Problem with accented greek vowels

I cannot type a Greek accented vowel in emacs. In Xorg, I use the el keyboard layout and in other applications (e.g. Firefox) the normal way to type an accented vowel (e.g. ά) is, first the colon ...
4
votes
1answer
125 views

Typing composite characters (e.g. diacritics) in emacs

When running GNU Emacs as a GUI (under Ubuntu), I can't type composite characters with a Spanish keyboard. For example, to type character á in a Spanish keyboard you first type the ´ key followed by ...
0
votes
0answers
58 views

Automated conversion to real accented characters

I use org-mode to maintain a to-read list of articles. An entry in the list is produced by a function that I wrote in ELisp. The function uses bibtex-completion-get-value for the title and bibtex-...
2
votes
2answers
701 views

how to teach emacs that `'` (dead acute) + c = ç?

I've set up my keyboard layout in arch with localectl set-x11-keymap us pc104 intl By default, in this layout, the ' is a dead character. It is called a dead acute. In Portuguese, we are used to ...
7
votes
4answers
986 views

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, ...
0
votes
2answers
426 views

emacs counts German umlaut as two columns

I have been writing a document with a not monospaced font, because it is not code but only text. This is a document written in reStructuredText, with the file ending .rst and when it is opened in ...
3
votes
1answer
263 views

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 ?\( '("(...
6
votes
3answers
357 views

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: ...
0
votes
1answer
66 views

How do I display dashs as minus signs outside comments and strings?

In source code, I'd like to display “-” as “−”. In the font I use, the dash is very short and doesn't match the “+” at all. This is only to improve visual appearance. The character in the file must ...
1
vote
1answer
80 views

Getting auto-complete to work correctly in scribble-mode

I've been using Neil Van Dyke's scribble-mode for editing Scribble code in Emacs. I'm also using auto-complete and ac-capf to get better completion in scribble-mode. However, I've been running into a ...
0
votes
1answer
42 views

ESS dendrograms: appearance of last branch

In R it is possible to customise the appearance of a dendrogram and set a custom start character for the last branches. According to the documentation: In some environments, using ' will provide ...
1
vote
0answers
43 views

extra e character is inserted before every character

I have a problem every so often where I accidentally hit a key combination (don't know what it is) and I get into a state where the letter e (sometimes it is another letter IIRC) is inserted before ...
2
votes
3answers
79 views

What does “^[” represent?

I wrote a terminal output to a plain text file and opened it in Emacs, and I see "^[" here and there. I'd like to change it to tabs in terminal before writing its output to the file, but I don't know ...
0
votes
1answer
74 views

shell-command and C-h

If I create a string from the output of a shell command, using shell-command-to-string, I sometimes see ^H characters in the string, when I guess those characters were supposed to result in ...
5
votes
2answers
635 views

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 ...
2
votes
1answer
512 views

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, ...
1
vote
2answers
1k views

How to change the background/foreground color of some characters/words?

I know by M-x set-background-color or M-x set-foreground-color one can change the background/foreground of the the entire buffer. Of course this color change only persists in the current session. In ...
3
votes
1answer
318 views

how can I fix incorrect character width?

Emacs is telling me that a certain character only takes up 1 column, even though it clearly takes up two? Is there a way I can fix this? The reason is that I'm doing some calculations in order to "...
1
vote
0answers
104 views

Composition of the Arabic letters Lam and Alef in Emacs

When I insert the character ل (the Arabic letter Lam) followed by ا (the Arabic letter Alef) the result would be لا. In other text editors when I have the word لا I can mark (select) each of its ...
9
votes
4answers
2k views

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: ...
4
votes
2answers
374 views

How can I programmatically get the canonical unicode name of a character?

I'm attempting to get the name of the character (or multibyte character) at point, and just the name, programmatically. describe-char tells me what the character's name is, along with a bunch of ...