3

Is there a way to get completion-at-point to work inside edebug-eval-expression (i.e. similarly to the way it works in eval-expression)? Presently, when I press tab inside of a call to edebug-eval-expression, there are no completion candidates despite tab being bound to completion-at-point.

This behavior occurs even in vanilla Emacs 25.3.1 without any configuration. Does anyone know of a workaround?

  • I suggest you report this as a bug. – Stefan Mar 12 '18 at 18:04
3

The reason for that behavior is simply that different interactive forms are used in edebug-eval-expression and eval-expression. You can just override the interactive form of edebug-eval-expression with a part of the interactive form of eval-expression. (Direct replacement of the interactive form does not work since that two functions differ in the number of arguments.)

(defun lispTZA-edebug-eval-expression-completion (expr)
  "Replace interactive-spec of `edebug-eval-expression'
with `read--expression' from `eval-expression' to get completion working."
  (interactive (list (read--expression "Eval: "))))

(advice-add 'edebug-eval-expression :before #'lispTZA-edebug-eval-expression-completion)

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.