1

I use emacs-org for my "non-programming" work. I need a completion framework. Present completion framework like completion.el, dabbreav, pabbrev and company provide single word completion.

I need something to complete a sentence like -- Generalised painless progressive distention of abdomen -- Generalised painless progressively increasing jaundice. On typing Generalised , I should get these options. Is it possible

Regards

2

abbrev can abbreviate text. Use a numeric argument to say how many words before point should be taken as the expansion. For example, to abbreviate the sentence "The cat and the mooon." as x, put the point at the end and do

C-u 5 C-x a g x <RET>

The emacs manual (info) for Abbrevs gives the details.

  • @m34capThat is abbreviation expansion, and not auto-complete. Getting a suggestion as soon as you start typing is more useful it is more natural – Vaibhav Jan 2 at 6:47
0

You can use hippie-expand:

(setq hippie-expand-try-functions-list '(try-expand-line))
(global-set-key (kbd "C-;") 'hippie-expand)

Now C-; should expand to the closest matching line. Repeating the command will get you all the matches.

Finally, if you want a popup menu with the choices listed there are some hacky ways of plugging hippie-expand into company-mode, but I'm not sure they work well. You can check the github page for company-mode.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.