Questions tagged [text]

49 questions
61
votes
5 answers

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 me in writing better texts. So, let's open with…
elemakil
  • 2,517
  • 1
  • 18
  • 26
24
votes
3 answers

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 letters. Here's a short example. THere's nothing in…
Malabarba
  • 22,878
  • 6
  • 78
  • 163
10
votes
1 answer

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 spacebar twice at the end of a sentence. So, given…
Avdi
  • 737
  • 1
  • 7
  • 8
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,689
  • 4
  • 38
  • 84
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
  • 3,854
  • 1
  • 17
  • 47
6
votes
4 answers

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:
a_subscriber
  • 3,854
  • 1
  • 17
  • 47
5
votes
1 answer

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 permanently for all buffers after I've visited a text buffer…
MajorBriggs
  • 236
  • 1
  • 8
5
votes
1 answer

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 mechanism for sorting the frequency of the characters…
Name
  • 7,689
  • 4
  • 38
  • 84
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
5
votes
1 answer

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.txt [1] .... (at bottom of…
stsquad
  • 4,626
  • 28
  • 45
4
votes
2 answers

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 succession) in elisp. Here an example: Basically,…
Nordine Lotfi
  • 345
  • 2
  • 13
4
votes
1 answer

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 imply that (string-width "1\n12\n123") should return 3,…
vonaka
  • 171
  • 7
4
votes
2 answers

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 around and haven't found any grammar checkers but…
stsquad
  • 4,626
  • 28
  • 45
4
votes
3 answers

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?
Rakori
  • 143
  • 1
  • 3
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
1
2 3 4