How to delete all the error messages in the Backtrace buffer, so that when a new error occurs only the new error will be displayed instead of prepending with the old error.
The backtrace buffer has its own mode with several command shortcuts. I use the 'q' key to kill the buffer and continue on but I'm sure others will work as well.
Here's a list of them: http://www.cs.utah.edu/dept/old/texinfo/emacs18/emacs_26.html#SEC190
Related
I'm recently started to use emacs gdb debugger but I can't find a way to clear *input/output* buffer for a re-run. emacs simply prints the output after the previous one!
When I invoke Emacs, I see some error messages which are replaced by the main window (startup screen) pretty soon. How can I access these error messages?
The error messages are stored in the *Messages* buffer. There is a command to open it: C-h e. You can also just click on the echo area in the bottom of the window.
By default, the last 1000 lines of messages are saved. You can change this by setting the variable message-log-max.
I get this warning in my matlab-shell buffer when I print alot to stdout:
Warning (undo): Buffer `*MATLAB*' undo info was 12268000 bytes long.
The undo info was discarded because it exceeded `undo-outer-limit'.
This is normal if you executed a command that made a huge change
to the buffer. In that case, to prevent similar problems in the
future, set `undo-outer-limit' to a value that is large enough to
cover the maximum size of normal changes you expect a single
command to make, but not so large that it might exceed the
maximum memory allotted to Emacs.
My emacs looks like this:
I really don't need any undo in the matlab-shell which is the right buffer. Is there a way to disable this warning? Note that the left buffer is a MATLAB script which means that the major mode is MATLAB, and certainly undo should not be disabled there.
As that warning message says (or used to say?):
You can disable the popping up of this buffer by adding the entry
(undo discard-info) to the user option warning-suppress-types,
which is defined in the warnings library.
That is:
(add-to-list 'warning-suppress-types '(undo discard-info))
(That will of course just disable the warning, not the undo data collection itself.)
Your question is a little ambiguous, but assuming you're saying that you have no need to undo things in this buffer, then you can disable the undo system on a per-buffer basis:
buffer-disable-undo is an interactive compiled Lisp function in `simple.el'.
(buffer-disable-undo &optional BUFFER)
Make BUFFER stop keeping undo information.
No argument or nil as argument means do this for the current buffer.
So you can call M-x buffer-disable-undo RET interactively, or if you're sure about it, you could add this to a hook function for the mode in question.
Edit:
So based on the extra information in the question comments, I would suggest this:
(add-hook 'matlab-shell-mode-hook 'buffer-disable-undo)
Say I have long debugging session in Perl with perldb on Emacs (M-x perldb). The output piles up, and at some point it becomes difficult to navigate through it.
I can restart the debugger with R, but that doesn't clear up the previous output. Is there a command to clear up the output of the buffer of the Perl debugger without having to kill the debugger and starting a new session?
You can run comint-truncate-buffer. This will remove all but the last 1024 lines from the buffer. The size can be customized by changing comint-buffer-maximum-size.
If you'd like to have the buffer truncated automatically, run this snippet of elisp:
(add-hook 'comint-output-filter-functions 'comint-truncate-buffer)
Debugger input and output is buffer contents like any other — if you want to delete it, just do it. For example, C-x h C-w (mark-whole-buffer followed by kill-region) works in perldb buffers just fine, and is the closest equivalent to a "clear screen" command in a text terminal.
Occasionally when I'm compiling, I have to scroll up my compilation buffer to see the details of an error. At this point, emacs stops "following" my compilation buffer, i.e., scrolling to automatically display new output.
I'm using Aqumacs on OS X. Any idea how I can "reattach" or re encourage the compilation buffer to follow again?
Regards,
Chris
Put in your ~/.emacs file
;; Compilation output
(setq compilation-scroll-output t)
or even
(setq compilation-scroll-output 'first-error)
to make it scroll to the first error.
Try using M-x auto-revert-tail-mode or M-x auto-revert-mode. Taken from official documentation:
One use of Auto-Revert mode is to
“tail” a file such as a system log, so
that changes made to that file by
other programs are continuously
displayed. To do this, just move the
point to the end of the buffer, and it
will stay there as the file contents
change. However, if you are sure that
the file will only change by growing
at the end, use Auto-Revert Tail mode
instead (auto-revert-tail-mode). It is
more efficient for this. Auto-Revert
Tail mode works also for remote files.
So, as Chmouel already noted, just moving point to end of buffer will also work.
I am not sure about aquamacs but for me (Emacs 23/Debian) I just go in the compilation window and place my cursor at the end of the window which will attach and follow (you can go to another window and it will still follow).