Questions tagged [text]
49 questions
9
votes
2 answers
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 analysis, sort the words in decreasing order with…

Name
- 7,849
- 4
- 41
- 87
6
votes
3 answers
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": 4,
"orgn": 17
}
]
I need to increment…

a_subscriber
- 4,062
- 1
- 18
- 56
5
votes
2 answers
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 ;;;;;;;;;;;;;;;;;;;;
I.e. automatically filling…

stevosn
- 291
- 2
- 8
4
votes
1 answer
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?

Orgmodes
- 85
- 4
2
votes
1 answer
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-excursion
(if (and (progn (evil-last-non-blank)…

user3496846
- 388
- 1
- 11
2
votes
2 answers
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

a_subscriber
- 4,062
- 1
- 18
- 56
1
vote
2 answers
How increment specific value in text
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
},
{
"id": 1,
"finished": 1573550444.4444,
…

a_subscriber
- 4,062
- 1
- 18
- 56
1
vote
2 answers
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 quotes (one, two, three) are lowercase text ?
In…

a_subscriber
- 4,062
- 1
- 18
- 56
1
vote
1 answer
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 this:
(-
(progn
(end-of-line)
…

abingham
- 927
- 6
- 18
0
votes
1 answer
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 show how i did it manually (for more detail):
Used…

Nordine Lotfi
- 357
- 2
- 13
-1
votes
0 answers
Select region between two rows. Many lines
Emacs 27.1
Suppose I has text file with 50_000 rows.
I want to select region from row number 10_000 to row number 30_000.
How I can do this in Emacs?

a_subscriber
- 4,062
- 1
- 18
- 56