I'm trying to use flyspell from inside the terminal but when I run flyspell-correct-word-before-point I get the error This command requires pop-up dialogs. Is there a way to work around this issue? Am I just misconfigured? I don't believe I have any flyspell-specific configuration settings.

1 Answer 1


EmacsWiki has the answer to this question on the Fly Spell page:

If you’d like to use Flyspell’s menu selection in the terminal, or just prefer to use popup.el over the graphical menu, stick this somewhere in your load path:

(defun flyspell-emacs-popup-textual (event poss word)
  "A textual flyspell popup menu."
  (require 'popup)
  (let* ((corrects (if flyspell-sort-corrections
                       (sort (car (cdr (cdr poss))) 'string<)
                     (car (cdr (cdr poss)))))
         (cor-menu (if (consp corrects)
                       (mapcar (lambda (correct)
                                 (list correct correct))
         (affix (car (cdr (cdr (cdr poss)))))
         (base-menu  (let ((save (if (and (consp affix) show-affix-info)
                                      (list (concat "Save affix: " (car affix))
                                      '("Accept (session)" session)
                                      '("Accept (buffer)" buffer))
                                   '(("Save word" save)
                                     ("Accept (session)" session)
                                     ("Accept (buffer)" buffer)))))
                       (if (consp cor-menu)
                           (append cor-menu (cons "" save))
         (menu (mapcar
                (lambda (arg) (if (consp arg) (car arg) arg))
    (cadr (assoc (popup-menu* menu :scroll-bar t) base-menu))))

and put this in your init file:

(eval-after-load "flyspell"
     (fset 'flyspell-emacs-popup 'flyspell-emacs-popup-textual)))

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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