I know this question is similar to completion of a sentence rather than word but I ask anyway since I suggest another way of storing what is supposed to be auto-completed.
Suppose I stored some sentences in a file. How could I, in the current buffer, complete the sentences from this file just by typing the beginning (or, better, any part) of them?
Edit: To be more explicit, here is the context: I'm in the process of grading (maths) exams and most of the positive and negative remarks I have to express (and to write down) about my students works are the sames.
Hence, suppose I have the following sentences in a sentences.txt
file:
Please, don't take your dreams for reality: (a + b)² ≠ a² + b².
Please, don't take your dreams for reality: cos(a + b) ≠ cos a + cos b.
You should revise the derivatives.
No, √(a²) ≠ a.
This only works for a positive x.
I'd like to be able in my current buffer (of a file stored, say, in the same directory as sentences.txt
) to type e.g.
Please
and to be prompted with the first two sentences in a drop down list, just as does autocomplete
for the (single) words of the current buffer.
(emacs) Abbrevs
, and if you do that, you'll see how to create an abbreviations file that does what you want.