3

I'm new to org-mode and really need to figure out how to get completion working for stuff like :tags and #+ options. Apparently org uses pcomplete as the completion backend. Indeed M-x pcomplete (helm) does offer a buffer with long list of completions for #+ (which disappears if you try to expand the buffer). You then have to click on one of the options, which feels pretty kind of clumsy.

Is there a feature complete and mature alternative to pcomplete? I'm used to completions just popping up as I type, and would ideally like to get the same functionality in Org. Alternately, am I using pcomplete wrong?

Update

Here's the full code:

(defun my-org-mode-hook ()
  (add-hook 'completion-at-point-functions 'pcomplete-completions-at-point nil t))
(add-hook 'org-mode-hook #'my-org-mode-hook)

It works!

4

It depends on how you've configured Emacs so that "completions just pop up", but possibly

(add-hook 'completion-at-point-functions 'pcomplete-completions-at-point)

will do it. If you use company for completions (as I do) and you have company-capf in company-backends (it should be there by default I believe) company should pick up pcomplete completions via completion-at-point.

You may also be interested in "Easy templates"; see http://orgmode.org/manual/Easy-templates.html#Easy-templates.

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.