4

Using flyspell by default is handy, but the message on every file gets annoying (especially since it doesnt go away).

eg:

Starting new Ispell process /usr/bin/aspell with american dictionary...

Is there a way to disable this, or at least clear the message? I checked ispell.el and there wasn't an obvious way.

3
  • I commented out that section a few years ago and have never looked back until today (after reading this thread). There is no user customization to turn that message off, which is why I commented it out.
    – lawlist
    Nov 5, 2017 at 7:40
  • I don't mind commenting it out, but it's annoying to need to do this each time the emacs package is updated.
    – ideasman42
    Nov 5, 2017 at 7:49
  • A year or so ago, there was NEWS about a new (now old) way to quiet messages so that they do not show up in the echo area. If the function at issue does not have any other important messages, you could let-bind that message suppression echo area variable with an advice to the function that gives the annoying message; e.g., ispell-init-process. However, that advice would affect all messages generated by that function. Another idea would be to copy the entire function over to your user-configuration, modify it, and load it after ispell.el; and, check new releases of Emacs for changes.
    – lawlist
    Nov 5, 2017 at 8:28

2 Answers 2

3

You can temporarily disable message with the following advice for ispell-init-process. That is a general approach which also works for other functions emitting unwanted messages.

(defun message-off-advice (oldfun &rest args)
  "Quiet down messages in adviced OLDFUN."
  (let ((message-off (make-symbol "message-off")))
    (unwind-protect
    (progn
      (advice-add #'message :around #'ignore (list 'name message-off))
      (apply oldfun args))
    (advice-remove #'message message-off))))

(advice-add #'ispell-init-process :around #'message-off-advice)
1
  • This is supresing other messages (such as confirmation on exit). note that I'm using (setq use-dialog-box nil).
    – ideasman42
    Mar 13, 2018 at 23:08
0

The other answer silenced too many (other, non-ispell) messages for me, but the approach from https://superuser.com/a/1025827 works:

(defun suppress-messages (old-fun &rest args)
  (cl-flet ((silence (&rest args1) (ignore)))
    (advice-add 'message :around #'silence)
    (unwind-protect
         (apply old-fun args)
      (advice-remove 'message #'silence))))

(advice-add 'ispell-init-process :around #'suppress-messages)
(advice-add 'ispell-kill-ispell :around #'suppress-messages)

(I would have just made a comment, but have too little reputation.)

Your Answer

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

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