6

Is there a way to filter out certain messages from being echoed in the echo-area while still being logged in to the Messages buffer ?

Use case scenario being an aggressive backward delete in the minibuffer yields a Text is read-only message when the point hits the prompt. I find this highly distracting.

4

You can hack just about any function with defadvice, although debugging advised functions is quite difficult:

(defadvice message (around my-message-filter activate)
  (unless (string-match "Text is read-only" (or (ad-get-arg 0) ""))
    ad-do-it))
  • 1
    Yeah, looks like advicing is the only way. I was hoping there was an inbuilt filter or something. BTW the above snippet does not log to the *Messages* buffer though that is easily fixed by changing the conditional to if and sending the string manually to the *Messages* buffer. I will wait for a day before accepting it. – Vamsi Sep 23 '14 at 23:42
  • 1
    AFAICT this doesn't work any messages in the echo area that get triggered by the C source. For example the end of buffer message. – Joseph Garvin Dec 20 '14 at 21:24

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.