Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [text]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
14 views

How can I set text size for PlantUML, when output type is TXT?

I've set (setq plantuml-output-type "txt") , so that it opens a buffer with text output. , but diagrams get really big, so it's hard to see. Can I scale just this output?
1 vote
1 answer
71 views

Searching for text fragments by character text properties

The text to be processed has special words marked with a special font. The required text is copied to the clipboard with the mouse (from firefox). The text is pasted into the clipboard emacs("...
0 votes
1 answer
86 views

Swap two pieces of text

I often find myself swapping pieces of text. How can I make a command to replace the current text with the latest kill, then put the text I just replaced at the position of the previous kill? Or is ...
0 votes
3 answers
56 views

Fewer keystrokes for calculating in org mode

When I need while editing a .org file to calculate, say, 23.45 * 15, I copy (M-w) that string then call M-x calc. I paste the numbers as a string, preceded by a single tick (using algebraic mode so I ...
1 vote
1 answer
63 views

How best to cope with Dragon speech recognition occasionally adding blank spaces at the beginning of lines?

BRIEF: When speech recognition software occasionally inserts extra blank spaces at the beginning of lines that are being dictated into emacs fundamental or textmode, how can the bad stuff below be ...
5 votes
3 answers
4k views

Find and replace a text among the files of a project

How can I do a "find and replace a string" in the files of a project? Is there a standard, built-in way?
0 votes
0 answers
225 views

Doom Emacs AsciiDoc syntax highlighting?

I want to write AsciiDoc documents in Emacs (more specifically Doom Emacs) with syntax highlighting. I've tried: Adding (package! adoc-mode) to the bottom of ~/.doom.d/packages.el . Adding adoc-mode ...
0 votes
1 answer
23 views

Issue when expanding clojure source blocks

I have defined expand and execute functions for 'text' source blocks as follows: (defun org-babel-expand-body:text (body params) (org-trim body)) (defun org-babel-execute:text (body params) (org-...
2 votes
2 answers
682 views

How to convert a single character to its hex value?

I have a character, e.g. O, and I want to convert it to its hexadecimal encoded value. The result must be 4f. How can I do this in Emacs 26.1?
9 votes
2 answers
1k views

How to obtain the statistic of the frequency of words in a buffer

For linguists and many other scientists, analyzing the frequency of the words appearing in a text is a great tool. Some commercial text editors and some websites provide this tool. In word frequency ...
2 votes
1 answer
298 views

Import thousands of text files into org-mode

I have a folder with 3000+ txt files (made in nvALT originally) that I would like to import into an org-mode file. Preferrably I would like each file name to become a header in the org-file. The order ...
1 vote
1 answer
142 views

How do I Include plain text file org-mode as is for LaTeX export?

I'm using #+INCLUDE: "./file.txt" to organize documents but including files this way is messing with linefeeds on org-mode export to LaTeX/Pdf. Is there a property or attribute that could ...
2 votes
1 answer
573 views

How insert random number?

Suppose I has text: test hello The cursor is after word test. I need to insert random number? Also I need to set range of random (e.g. from 0 to 1000) The result maybe like this: test100 hello
0 votes
1 answer
449 views

How to center region in exact middle of screen?

So i basically want to (as the title suggest) to center a region of text, in the center of the screen. Current example is using part of this site. From this To this And here a small gif video to ...
4 votes
2 answers
3k views

How to insert character or word N times in a buffer or file?

Just curious to know how to do this, since i already know in other languages (bash, etc). I know how to insert a character in elisp, just not sure on how to do it when it's done nth time (in ...
24 votes
3 answers
2k views

Fixing DOuble CApitals as I type

I have a bit of a slow pinky. As my other fingers get faster and faster at typing, my pinky just can't keep up. This frequently leads me to type sentences whose first word starts with two uppercase ...
1 vote
2 answers
275 views

How increment specific value in text [duplicate]

windows 10, Emacs 26.1 Suppose I has the next text [ { "id": 1, "finished": 1573550444.4444, "orgn": 17 }, { "id": 1, "finished": 1573550444.4444, "orgn": 17 }, { ...
6 votes
3 answers
1k views

How to increment number in every matching line?

[ { "id": 0, "finished": 1, "orgn": 17 }, { "id": 1, "finished": 2, "orgn": 17 }, { "id": 2, "finished": 3, "orgn": 17 }, { "id": 3, "finished"...
3 votes
1 answer
202 views

How remove lines which are not equal in two buffers?

Consider the following buffers buffer_1: 11111111 22222222 33333333 44444444 buffer_2: 55555555 66666666 22222222 44444444 I need to remove all lines which are not equal in buffer_1 and buffer_2. ...
0 votes
1 answer
45 views

Not work "subscr": Symbol’s function definition is void: [closed]

Emacs 26.1, I try to use function subscr Example: subscr({a,b,c,d,e,f,h},{1,2,3}) But I get error: eval: Symbol’s function definition is void: {a
2 votes
1 answer
66 views

Surround a line with slashes

So, I am writing a function to italize/unitalize the current line (without the surrounding blanks) by surrounding it with slashes /. (defun my-italize-line-dwim () (interactive) (save-...
3 votes
1 answer
473 views

Generate different uuid in every line?

I need to replace guid_here by different uuid. provider [guid_here] [guid_here] provider test again [guid_here] test again2 [guid_here] test [guid_here] again2 I use this approach. Install package ...
1 vote
2 answers
116 views

How check that text in quotes are lowercase text

example1: test "one" hi this is test "two" check I need to "three" this example2: test "one" hi this is test "Two" check I need to "three" this Is it possible to check that text (some function) in ...
3 votes
1 answer
216 views

regexp: exclude repeated characters for highlight - hi-lock-mode

I want to search using regexp to capture plain text. I want to capture passages that begin with opening quotation marks and end at the end of the paragraph, and even though the quote continues onto a ...
2 votes
2 answers
302 views

How show (filter) only text lines with all uppercase chars?

Suppose I has the next text: test HELLO help HOW ARE YOU buy I need to get (filter) only text lines with all uppercase chars. So result must be like this: HELLO HOW ARE YOU
1 vote
2 answers
209 views

Count the number of paragraphs

There are plenty of ways to count lines, words, and characters in Emacs. For instance, invoking M-= (AKA count-words-region) does that very thing on a given region. However, I am having trouble ...
6 votes
4 answers
5k views

How remove whitespaces in the beginning of lines?

Emacs 26.1 I has the next text: I need to remove all whitespaces in the beginning of the lines. Every line has different count of whitespaces. The result must be like this:
4 votes
1 answer
161 views

Width of string as if it were displayed

From the documentation of string-width string: This function returns the width in columns of the string string, if it were displayed in the current buffer and the selected window. For me this ...
5 votes
2 answers
341 views

Is there a function in emacs that centers an input text and fills the line with the comment symbol as one would use it for headings in a file?

I want to have a quick way of writing a heading in an arbitrary file. So in Emacs-lisp mode the selction of Heading in a file and a call of the function would result in: ;;;;;;;;;;;;;;;;;;;; Heading ;...
61 votes
5 answers
11k views

What options are there for writing better non-programming text in Emacs?

This is a fork from the question What options are there for doing spell-checking in Emacs? Because I'm currently doing a lot of non-programming tasks in Emacs I'm wondering whether Emacs can support ...
2 votes
1 answer
30 views

turn coherent string into individual characters

I have a text with a number of coherent strings, e.g.: ax923fasd asidna1 xxa008 Is there a quick way to convert these so that there be a space between each of them, i.e.: a x 9 2 3 f a s d a s i d ...
1 vote
0 answers
338 views

Setting margins in `text-mode`

I use text files for most of my work. But for printing them on letterhead, I need to set margins to say 3 cm for upper margin and 2.5 cm for lower. Is there any way I can define them in text-mode. ...
1 vote
1 answer
118 views

Swap text before and after "=" in properties file

Windows 10, Emacs 25.1 Suppose I have properties file: 1=10 2=BS.30 3=BS.20A Before "=" are numbers, but after "=" has any text(without spaces) I want to swap text before and after "=". So the ...
1 vote
1 answer
378 views

What is the mode or the command to selectively display selected region?

There seems to be a command to display only the text in the selected region, leaving the rest of the text hidden. What is the command?
0 votes
0 answers
211 views

Is there a way to convert an array of bytes into a UTF-8 string?

There are now some files which contain raw bytes which are valid UTF-8 characters, e.g. a line of the file could be '@\u0915\u0941\u091b@ \u092c\u093f\u0902\u0926\u0941 \u0938\u095e\u0947\u0926 \u0939\...
2 votes
1 answer
1k views

org-mode how to export raw text no formatting?

Any quick way to export an org-mode document into a text file with no formatting and no org markup characters? I am aware of C-c C-e [t] Export to Plain Text unfortunatly those options add formatting ...
1 vote
1 answer
1k views

Elisp search and delete

Interspersed in a text file I have 0:36Skip to 0 minutes and 36 seconds blah blah, always at the beginning of a line. I am looking for a function to search and delete these. Failing, I have (defun ...
4 votes
1 answer
92 views

Clone content in another part of document?

Is it possible to clone a part of a document in another part of the document? So that changing one, changes both?
3 votes
2 answers
409 views

Convert a word into an acronym

I have a buffer with this line of text: This is a random test I want to convert test in T.E.S.T., like this: This is a random T.E.S.T. So far, I came up with this function: (defun mu-convert-...
1 vote
1 answer
1k views

Calculating the length of a line in a buffer

Simple question, I think: How can I calculate the length of a line in emacs lisp? It seems like there should be a function for this, but I can't find it. What I'm using right now is something like ...
5 votes
1 answer
75 views

Is there a built-in or package solution for managing references in text files?

I'm currently writing up a design document and I want to include a number of references to external documents/URLs. I can manually add reference brackets and links so that: See the external file blah....
2 votes
1 answer
780 views

Always view *.pdb files as text file

I frequently work with Protein Data Bank files. These are text files that contain atomic level structure information of molecules. They can be recognized by their '.pdb' extension. Whenever editing ...
5 votes
1 answer
2k views

Turn off fringes in text-mode

How do I turn off fringes in text-mode? The closest I've gotten is this: (add-hook 'text-mode-hook (lambda () (set-fringe-mode '(0 . 0)))) But that turns off fringes ...
5 votes
1 answer
479 views

How to obtain the statistics of the frequency of characters in a buffer

Are there some Emacs' packages which can be used for analysing the frequency of the characters and the words used in the current buffer. As a particular example it would be interesting to have a ...
1 vote
1 answer
141 views

Why don't insert-in-front-hooks run?

Open a scratch buffer, paste the following an evaluate it: (insert (propertize "hello" 'insert-in-front-hooks (list (lambda (&rest unused) (message "test"))))) Typing ...
1 vote
1 answer
245 views

Green lines are invisible in diff output for some files in *shell*

I use Emacs a lot including for most terminal sessions. One of activities includes typing git commands inside a shell buffer. I found a very interesting color puzzle. After downloading forked ...
4 votes
2 answers
158 views

Hi-lighting common grammar mistakes in all prose across modes with English text

I already make extensive use of flyspell-mode to keep my errant spelling in check. However I'm currently trying to break the bad habit of using "it's" for possessive statements. I've had a brief look ...
10 votes
1 answer
321 views

Recognizing sentences that don't end in two spaces

I'm not going to weigh in on whether ending sentences with two spaces is the One True Way or an abomination. All I know is that I show no signs of establishing a consistent habit of hitting the ...