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.
Related
I am using emacs-daemon. When every I restart my daemon and do C-x C-b my Buffer List seems always full.
Later, when I start my emacsclient for a seconds(like a fast flash) it shows a file that located on the top of my Buffer List and opens the file I want to open. This is little annoying to face with all the time.
Example:
I type emacsclient -t file_a.py.
For a second or less, buffer called file_b.py opens (my lastly opened file).
Than file_a.py get opens.
This always repeats itself even I clean my buffer list doing following and open a new file (since buffer list now contains more than one file):
Link:
Edit: There's also the boring old buffer menu you get with C-x C-b.
In this menu, you can hold d until it marks each buffer for deletion,
then press x to commit.
Even after doing this after that IBuffer shows up since it is the latest opened buffer.
[Q] Is it possible to prevent 1 second file show up when I start emacsclient? If possible I always want to keep my Buffer List empty, but not sure would it be a good idea, or some how keep a empty file at the top of the buffer list since it will show a blank frame.
This also occurs when I using emacs -nw where scratch* buffer or latest opened buffer shows up for as seconds as well.
Emacs usually use Ctrl+G to cancel the operation ,but when i use the GUD mode to debug a program ,the Ctrl+G is usually not working so well as i expected.
For example, if i wanna to set a break point at the source test.cpp, line 223,
if i input
"b test.c:" ,then i use the TAB to auto complete it then will try to list all the possible result , then the emacs cannot respond to any input.
if i use Ctrl+G to cancel this, the result continue to output all result to the screen, this may take a long time.
is there a way to cancel this action more effectively?
Ctrl+G is for cancelling Emacs commands, but that output is coming from the debugger that's being run in the comint buffer. The Emacs command has already completed, it just sent the TAB to the debugger process.
Try Ctrl+C Ctrl+C, which sends an interrupt to the subprocess. However, it's possible that the subprocess has already finished sending the list of results, and it's all in the pty buffer.
Commands entered after pressing M-x can be viewed using the up/down arrow keys.
How can I get a list of all the commands including menu bar invocation, commands
triggered using mouse clicks, etc. in Emacs?
For a complete list of history, type C-h l (lowercase "L").
Note: this list is complete in the sense that it keeps all events and commands that happened recently, but it's not complete in the sense that it only keeps track of the last 300 or so events (and corresponding commands).
I've used mwe-log-commands to make screencasts. It shows events and the commands they trigger as you work in Emacs.
command-log-mode
I've just forked it and made it into a proper minor-mode and global-minor-mode along with some other improvements as command-log-mode.
Give it a shot and file issues against me if the documentation is unclear or if you find any bugs.
So you want the history of of all commands, regardless of where they are executed? I don't know if emacs provides this by default, but you can add your own function to post-command-hook which is executed after every command, so you can use it to collect all the executed commands.
M-x view-lossage
From emacs documentation
(view-lossage)
Display last few input keystrokes and the commands run. For
convenience this uses the same format as edit-last-kbd-macro. See
lossage-size to update the number of recorded keystrokes.
To record all your input, use open-dribble-file.
(open-dribble-file FILE)
Start writing input events to a dribble file called FILE. Any
previously open dribble file will be closed first. If FILE is nil,
just close the dribble file, if any. If the file is still open when
Emacs exits, it will be closed then.
The events written to the file include keyboard and mouse input
events, but not events from executing keyboard macros. The events are
written to the dribble file immediately without line buffering.
Be aware that this records all characters you type! This may include
sensitive information such as passwords.
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
I used to be able to open a new buffer in Emacs quickly using the command C-x b <non existent buffer name>
Somehow I've broken this in my version of Emacs (23.1). When ever I try to do this now I get the message [No match] in the command buffer.
Does anyone know what I might have done to break this functionality, or is it possible that I imagined being able to do this?
Set confirm-nonexistent-file-or-buffer to nil:
confirm-nonexistent-file-or-buffer is a variable defined in `files.el'.
Its value is after-completion
Documentation:
Whether confirmation is requested before visiting a new file or buffer.
If nil, confirmation is not requested.
If the value is `after-completion', confirmation is only
requested if the user called `minibuffer-complete' right before
`minibuffer-complete-and-exit'.
Any other non-nil value means to request confirmation.
This affects commands like `switch-to-buffer' and `find-file'.
You can customize this variable.
This variable was introduced, or its default value was changed, in
version 23.1 of Emacs.
If you have enabled ido-mode, you can still switch to the behavior you're familiar with. I do this frequently when I know I'll be creating a new named buffer.
C-x b C-b
You press C-j instead of hitting enter twice, which will bypass the confirmation and immediately open the new buffer. This works with or without ido-mode. This will have the same effect has pressing enter with confirm-nonexistent-file-or-buffer set to nil.
You probably enabled ido-mode. You need to press ENTER to confirm the creation of the buffer.