Closed emacs18 closed 4 years ago
I looked into this some more. It seems like the bug was not in purpose-mode, but in emacs. I sent the following patch to emacs as detailed at https://debbugs.gnu.org/cgi/bugreport.cgi?bug=41888 If I hear back from emacs developers, I'll also updated this PR.
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el
index d5fd1dce6f..540bc9ce7f 100644
--- a/lisp/progmodes/gud.el
+++ b/lisp/progmodes/gud.el
@@ -2621,9 +2621,9 @@ comint mode, which see."
(select-window
(display-buffer
(get-buffer-create (concat "*gud" filepart "*"))
- '(display-buffer-reuse-window
- display-buffer-in-previous-window
- display-buffer-same-window display-buffer-pop-up-window)))
+ '((display-buffer-reuse-window
+ display-buffer-in-previous-window
+ display-buffer-same-window display-buffer-pop-up-window))))
(when (and existing-buffer (get-buffer-process existing-buffer))
(error "This program is already being debugged"))
;; Set the dir, in case the buffer already existed with a different dir.
This has been fixed upstream within emacs via https://github.com/emacs-mirror/emacs/commit/cce00bef0313bc42beee8096d9312313889dc92d
I use latest develop branch of spacemacs on emacs 27 on ubuntu 20.04.
purpose-mode
seem to break built-in commandgdb
, i.e.,M-x gdb
fails to come up. Turning offpurpose-mode
minor mode still causegdb
to fail. However adding one line of code inpurpose-mode
minor mode to reset a variable seems to allowgdb
to work at least whenpurpose-mode
minor is disabled. If this minor is enabled,gdb
still fail even with the one line change. Details follow.If I type
M-x gdb
and typels
to debugls
program (or any other program), I get this stack trace where I shortened several very long lines with trailing "…":I'm not sure what this
purpose-mode
does, but I thought just disabling it should be sufficient via something like this:However this causes yet another stack trace:
So I tried the following tweak to restore the value of
display-buffer-overriding-action
to its original value. This change does allowM-x gdb
to work withpurpose-mode
turned off.Following is quote of the part of the doc-string of
display-buffer-overriding-action
.Perhaps this warning should be heeded by not messing with the variable at all it that is possible.