help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

restrictive/discrete messages log (was: Re: Suppress (pop kill-ring) fro


From: Emanuel Berg
Subject: restrictive/discrete messages log (was: Re: Suppress (pop kill-ring) from *Messages*)
Date: Mon, 02 Nov 2015 02:05:12 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

Tim Johnson <tim@akwebsoft.com> writes:

> How can I suppress the recording of the item
> in messages?

How can one do this in general?

For the debugger, there is, for example

    ;; ignore a couple of common "errors"
    (setq debug-ignored-errors
          '(quit
            beginning-of-line    end-of-line
            beginning-of-buffer  end-of-buffer
            end-of-file
            buffer-read-only
            file-supersession) )

but for messages? The only thing I can think of is
the command that brings up the messages buffer.
Then you can do some filtering, like this:

    (defun switch-to-filtered-messages-buffer ()
      (interactive)
      (switch-to-buffer (messages-buffer))
      (let ((inhibit-read-only t))
        (goto-char 0)
        (while (re-search-forward "Mark set\n" nil t) ; no BOUND; NOERROR
          (replace-match "") ))
      (goto-char (point-max)) )

However, it doesn't work if the messages buffer is
visible already and the user doesn't have to invoke
a command to bring it up.

You see? Yet another advantage for the two-pane, tty
solution where buffers constantly have to be "brought
up"! :)

-- 
underground experts united
http://user.it.uu.se/~embe8573




reply via email to

[Prev in Thread] Current Thread [Next in Thread]