When I toggle global debug mode for the first time in an emacs session and attempt to execute a piece of invalid lisp the backtrace window pops up. However if I close this window and delete the backtrace buffer and then try and execute another piece of invalid elisp the backtrace buffer no longer gets created and no window pops up. I have looked through the manual to try and figure out why this is happening to no avail, any help would be much apprecaited.
The problem is that killing the *Backtrace* buffer doesn't actually make you leave the debugger (contrary to hitting c or q), so you're still in the recursive edit where further debugging is disabled (so as to avoid jumping further into the debugger ad-nauseam).
I recommend you use C-] to get out of this situation. But I also recommend that you file this with M-x report-emacs-bug since it would make sense to exit the debugger when the backtrace buffer gets killed.
Related
See further below for the original question.
I've used gdb for over a couple of decades, and after an update gdb started defeating c-x-b and preventing windows from being used to view things I wanted to see, while forcing bindings to buffers I didn't care to see. The fix seems to have broken tab completion for shells.
Ah, so how can I to stop gdb from taking control of the buffers/windows/frames layout without breaking something else?
;; fix 'feature' of broken gdb where it takes control of an
;; emacs window, and locks the user out from switching from it
;;
(defun set-window-undedicated-p (window flag)
"Never set window dedicated."
flag)
(advice-add 'set-window-dedicated-p :override #'set-window-undedicated-p)
--- problem in the original post --->
about a year back, after an update, file name completion windows in the shell stopped closing after the completion. I figured this behavior would go away on the next release .. but it never has.
hitting tab -- all good
after completion, then another ls with tab
I can repeat this process until my shell panel is all but crowded out, and emacs fills with completion panels that all contain additional views of the shell.
Is this some kind of new feature that can be turned off? Or is it, as seems more likely, a bug? (How can it have lived for so long!?). Is there a simple way without taking one's hands off the keyboard to, in general, close the completion window so that the screen looks like it did before hitting tab?
[I had to take out the more detailed descriptions of the images because with them, stack exchange complained of unformatted code and wouldn't take the post... there was not even a hint of code in them. Anyway, this should be good enough.]
I'm trying to get familiar with emacs and Clojure and its working out pretty well..
It's just that everytime I get a Clojure error, it will close any emacs-window except the one where the error occured and instead show me a giant empty window of "popwin-dummy".
I can't quite see how that's supposed to help me fixing any bug... Can you tell me how to disable this behaviour?
Have a nice day!
As a general protection against "Emacs messed up my window configuration" occurrences, add the following to your init file:
(winner-mode 1)
You can also toggle it for the current session with M-x winner-mode
Then whenever your window configuration is unexpectedly changed, use C-c<left> to call winner-undo (which you can do repeatedly if necessary).
C-c<right> takes you back to the most recent configuration (immediately, rather than step-by-step).
This is my first time using gdb mode on emacs.
As you can see in the minibuffer, M-n for next doesn't work.
What might be the problem here?
EDIT: this is definitely not due to byobu, as mentioned in the comments.
I am using GDB with emacs and sometimes use GDB with DDD.
Starting version 22 (???) Emacs provides a tool-bar-mode, where you can do
the most important commands like run, next, step, up/down of stack frames in the emacs UI.
As such , I have moved away from DDD, since anyways I run most commands through command line and the sometime through the limited UI given in the tool-bar-mode.
However, the ability to hover your mouse over a variable and make the value to pop-up still seems to be missing. Does anyone know about some mode in emacs or some .el file that would allow Emacs to do the same.
This kinda goes against emacs not being a gui-ide. I can still use watchpoints/local variable buffer; but I really would like the ability to hover my mouse over some variable and see the value. Any help would be much appreciated.
gud-tooltip-mode is supposed to give you just that, I think.
I am not even sure this is a previous command or a non-finished command or whatever, but I do know I really don't like it.
My problem is that some commands (or messages, or whatever) get stuck in the mini-buffer so that when I type a new command it appears there really quickly, and then the mini-buffer is back to the stubborn command. Some commands seem to be chosen, and after using lots of commands something else gets stuck there, but there is always something being shown that I don't want to see. I tried typing C-g lots of times to see if it would quit, but that does not work.
This is a picture of what I have now:
It does not matter what I do, that bit
Label: hl-line
will not leave. It does leave momentarily when a new command is typed, but it goes back. I don't like it, it is confusing, and I would much rather see there the last used command.
I did check the customisation options for the mini-buffer (the bottom part of it can be seen in my picture), but I found nothing that seemed to be what I was looking for.
Any ideas?
Chances are you're getting into the situation because you started a command and used your mouse to select something in a different window. If that's the case, you can have Emacs automatically abort the command when you do such an action.
This is the code you'd add to your .emacs:
(defun stop-using-minibuffer ()
"kill the minibuffer"
(when (and (>= (recursion-depth) 1) (active-minibuffer-window))
(abort-recursive-edit)))
(add-hook 'mouse-leave-buffer-hook 'stop-using-minibuffer)
Note: I grabbed this from my blog post on the topic.
And there is also a super user question that addresses this issue, and my answer there provides a command to jump back to the minibuffer.
The mini-buffer has lost focus. Try C-x o (Control+x o) to regain focus. To cancel the command press C-g when you have focus in the mini-buffer.