* bug#55863: 29.0.50; [PATCH] Avoid hanging chad of *Backtrace*
@ 2022-06-08 21:28 dick.r.chiang
2022-06-09 5:45 ` Eli Zaretskii
` (3 more replies)
0 siblings, 4 replies; 24+ messages in thread
From: dick.r.chiang @ 2022-06-08 21:28 UTC (permalink / raw)
To: 55863
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: 0001-Avoid-the-hanging-chad-of-Backtrace.patch --]
[-- Type: text/x-diff, Size: 9971 bytes --]
From 45147670525b4556e69dcba7b9d3497738d7e023 Mon Sep 17 00:00:00 2001
From: dickmao <dick.r.chiang@gmail.com>
Date: Wed, 8 Jun 2022 17:24:41 -0400
Subject: [PATCH] Avoid the hanging chad of "*Backtrace*"
make TEST_INTERACTIVE=yes test/lisp/abbrev-tests
* lisp/emacs-lisp/debug.el (debugger-buffer-name): DRY.
(debug): Don't just erase the *Backtrace*; kill it.
* test/lisp/abbrev-tests.el (copy-abbrev-table-test):
We have `ignore-errors` for this purpose.
(abbrev-tests-backtrace-bury): Test it.
---
lisp/emacs-lisp/debug.el | 113 ++++++++++++++++++--------------------
test/lisp/abbrev-tests.el | 20 +++++--
2 files changed, 68 insertions(+), 65 deletions(-)
diff --git a/lisp/emacs-lisp/debug.el b/lisp/emacs-lisp/debug.el
index 6c172d6c31d..c1c977ce66e 100644
--- a/lisp/emacs-lisp/debug.el
+++ b/lisp/emacs-lisp/debug.el
@@ -95,6 +95,8 @@ debug-allow-recursive-debug
:type 'boolean
:version "29.1")
+(defconst debugger-buffer-name "*Backtrace*")
+
(defvar debugger-step-after-exit nil
"Non-nil means \"single-step\" after the debugger exits.")
@@ -162,18 +164,13 @@ debugger--restore-buffer-state
;;;###autoload
(defun debug (&rest args)
"Enter debugger. \\<debugger-mode-map>`\\[debugger-continue]' returns from the debugger.
-Arguments are mainly for use when this is called from the internals
-of the evaluator.
-You may call with no args, or you may pass nil as the first arg and
-any other args you like. In that case, the list of args after the
-first will be printed into the backtrace buffer.
+ARGS are for internal use of the evaluator, which inserts the
+symbol \\='debug to avoid printing extraneous debugger stack frames.
-If `inhibit-redisplay' is non-nil when this function is called,
-the debugger will not be entered."
+A non-nil `inhibit-redisplay' precludes any action."
(interactive)
(if inhibit-redisplay
- ;; Don't really try to enter debugger within an eval from redisplay.
debugger-value
(let ((non-interactive-frame
(or noninteractive ;FIXME: Presumably redundant.
@@ -187,50 +184,49 @@ debug
(equal "initial_terminal" (terminal-name)))))
;; Don't let `inhibit-message' get in our way (especially important if
;; `non-interactive-frame' evaluated to a non-nil value.
- (inhibit-message nil)
+ inhibit-message
;; We may be entering the debugger from a context that has
;; let-bound `inhibit-read-only', which means that all
;; buffers would be read/write while the debugger is running.
- (inhibit-read-only nil))
+ inhibit-read-only)
(unless non-interactive-frame
(message "Entering debugger..."))
- (let (debugger-value
- (debugger-previous-state
- (if (get-buffer "*Backtrace*")
- (with-current-buffer (get-buffer "*Backtrace*")
- (debugger--save-buffer-state))))
- (debugger-args args)
- (debugger-buffer (get-buffer-create "*Backtrace*"))
- (debugger-old-buffer (current-buffer))
- (debugger-window nil)
- (debugger-step-after-exit nil)
- (debugger-will-be-back nil)
- ;; Don't keep reading from an executing kbd macro!
- (executing-kbd-macro nil)
- ;; Save the outer values of these vars for the `e' command
- ;; before we replace the values.
- (debugger-outer-match-data (match-data))
- (debugger-with-timeout-suspend (with-timeout-suspend)))
+ (let* ((debugger-old-buffer (current-buffer))
+ (debugger-previous-state
+ (when-let ((buf (get-buffer debugger-buffer-name)))
+ (with-current-buffer buf
+ (debugger--save-buffer-state))))
+ (debugger-buffer (get-buffer-create debugger-buffer-name))
+ (debugger-args args)
+ ;; Save the outer values of these vars for the `e' command
+ ;; before we replace the values.
+ (debugger-outer-match-data (match-data))
+ (debugger-with-timeout-suspend (with-timeout-suspend))
+ debugger-value debugger-window
+ debugger-step-after-exit debugger-will-be-back
+ debugger-step-after-exit
+ ;; Don't keep reading from an executing kbd macro!
+ executing-kbd-macro)
;; Set this instead of binding it, so that `q'
;; will not restore it.
(setq overriding-terminal-local-map nil)
;; Don't let these magic variables affect the debugger itself.
- (let ((last-command nil) this-command track-mouse
- (inhibit-trace t)
- unread-command-events
- unread-post-input-method-events
- last-input-event last-command-event last-nonmenu-event
- last-event-frame
- overriding-local-map
+ (let ((inhibit-trace t)
(load-read-function #'read)
;; If we are inside a minibuffer, allow nesting
;; so that we don't get an error from the `e' command.
(enable-recursive-minibuffers
(or enable-recursive-minibuffers (> (minibuffer-depth) 0)))
- (standard-input t) (standard-output t)
- inhibit-redisplay
- (cursor-in-echo-area nil)
- (window-configuration (current-window-configuration)))
+ (standard-input t)
+ (standard-output t)
+ (window-configuration (current-window-configuration))
+ last-command this-command track-mouse
+ unread-command-events
+ unread-post-input-method-events
+ inhibit-redisplay cursor-in-echo-area
+ last-input-event last-command-event last-nonmenu-event
+ last-event-frame
+ overriding-local-map)
(unwind-protect
(save-excursion
(when (eq (car debugger-args) 'debug)
@@ -272,22 +268,19 @@ debug
`((previous-window . ,debugger-previous-window))))))
(setq debugger-window (selected-window))
(when debugger-jumping-flag
- ;; Try to restore previous height of debugger
- ;; window.
- (condition-case nil
- (window-resize
- debugger-window
- (- debugger-previous-window-height
- (window-total-height debugger-window)))
- (error nil))
+ ;; Restore previous height of debugger window.
+ (ignore-errors
+ (window-resize
+ debugger-window
+ (- debugger-previous-window-height
+ (window-total-height debugger-window))))
(setq debugger-previous-window debugger-window))
(message "")
- (let ((standard-output nil)
+ (let (standard-output
(buffer-read-only t))
(message "")
;; Make sure we unbind buffer-read-only in the right buffer.
- (save-excursion
- (recursive-edit))))
+ (save-excursion (recursive-edit))))
(when (and (window-live-p debugger-window)
(eq (window-buffer debugger-window) debugger-buffer))
;; Record height of debugger window.
@@ -298,23 +291,21 @@ debug
(set-window-configuration window-configuration)
(when (and (window-live-p debugger-window)
(eq (window-buffer debugger-window) debugger-buffer))
- (progn
- ;; Unshow debugger-buffer.
- (quit-restore-window debugger-window debugger-bury-or-kill)
- ;; Restore current buffer (Bug#12502).
- (set-buffer debugger-old-buffer)))
+ ;; Unshow debugger-buffer.
+ (quit-restore-window debugger-window debugger-bury-or-kill)
+ ;; Restore current buffer (Bug#12502).
+ (set-buffer debugger-old-buffer))
;; Forget debugger window, it won't be back (Bug#17882).
(setq debugger-previous-window nil))
;; Restore previous state of debugger-buffer in case we were
;; in a recursive invocation of the debugger, otherwise just
- ;; erase the buffer.
+ ;; kill the buffer.
(when (buffer-live-p debugger-buffer)
- (with-current-buffer debugger-buffer
- (if debugger-previous-state
- (debugger--restore-buffer-state debugger-previous-state)
- (setq backtrace-insert-header-function nil)
- (setq backtrace-frames nil)
- (backtrace-print))))
+ (if debugger-previous-state
+ (with-current-buffer debugger-buffer
+ (debugger--restore-buffer-state debugger-previous-state))
+ (let (kill-buffer-query-functions)
+ (kill-buffer debugger-buffer))))
(with-timeout-unsuspend debugger-with-timeout-suspend)
(set-match-data debugger-outer-match-data)))
(setq debug-on-next-call debugger-step-after-exit)
diff --git a/test/lisp/abbrev-tests.el b/test/lisp/abbrev-tests.el
index 947178473e4..eb9d48871d4 100644
--- a/test/lisp/abbrev-tests.el
+++ b/test/lisp/abbrev-tests.el
@@ -89,11 +89,23 @@ copy-abbrev-table-test
(should (abbrev-table-p foo-abbrev-table))
;; Bug 21828
(let ((new-foo-abbrev-table
- (condition-case nil
- (copy-abbrev-table foo-abbrev-table)
- (error nil))))
+ (ignore-errors (copy-abbrev-table foo-abbrev-table))))
(should (abbrev-table-p new-foo-abbrev-table)))
- (should-not (string-equal (buffer-name) "*Backtrace*")))
+ (should-not (string-equal (buffer-name) debugger-buffer-name)))
+
+(ert-deftest abbrev-tests-backtrace-bury ()
+ "No hanging *Backtrace* chads."
+ (skip-unless (not noninteractive))
+ (let ((pop-after (lambda (&rest _args) (throw 'here t))))
+ (should
+ (unwind-protect
+ (catch 'here
+ (add-function :after (symbol-function 'pop-to-buffer) pop-after)
+ (should (advice-member-p pop-after 'pop-to-buffer))
+ (debug))
+ (remove-function (symbol-function 'pop-to-buffer) pop-after)))
+ (should-not (advice-member-p pop-after 'pop-to-buffer))
+ (should-not (get-buffer debugger-buffer-name))))
(ert-deftest abbrev-table-empty-p-test ()
(should-error (abbrev-table-empty-p 42))
--
2.35.1
[-- Attachment #2: Type: text/plain, Size: 13553 bytes --]
In Commercial Emacs 0.3.1snapshot 89d2679 in dev (upstream 29.0.50, x86_64-pc-linux-gnu) built on dick
Repository revision: 89d2679ecae1f6a4e298a00c031db80a600237b6
Repository branch: dev
Windowing system distributor 'The X.Org Foundation', version 11.0.12013000
System Description: Ubuntu 20.04.3 LTS
Configured using:
'configure --prefix=/home/dick/.local --with-tree-sitter CC=gcc-10
PKG_CONFIG_PATH=/home/dick/.local/lib/pkgconfig CXX=gcc-10'
Configured features:
CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG JSON
TREE_SITTER LCMS2 LIBSELINUX LIBXML2 MODULES NOTIFY INOTIFY PDUMPER PNG
RSVG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS WEBP X11 XDBE XIM
XINPUT2 XPM GTK3 ZLIB
Important settings:
value of $LANG: en_US.UTF-8
locale-coding-system: utf-8-unix
Major mode: Magit
Minor modes in effect:
global-git-commit-mode: t
shell-dirtrack-mode: t
projectile-mode: t
flx-ido-mode: t
override-global-mode: t
global-hl-line-mode: t
hl-line-mode: t
winner-mode: t
tooltip-mode: t
show-paren-mode: t
mouse-wheel-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
buffer-read-only: t
column-number-mode: t
line-number-mode: t
transient-mark-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
Load-path shadows:
/home/dick/gomacro-mode/gomacro-mode hides /home/dick/.emacs.d/elpa/gomacro-mode-20200326.1103/gomacro-mode
/home/dick/org-gcal.el/org-gcal hides /home/dick/.emacs.d/elpa/org-gcal-0.3/org-gcal
/home/dick/.emacs.d/elpa/chess-2.0.5/_pkg hides /home/dick/.local/share/emacs/site-lisp/_pkg
/home/dick/.emacs.d/elpa/chess-2.0.5/chess-pos hides /home/dick/.local/share/emacs/site-lisp/chess-pos
/home/dick/.emacs.d/elpa/chess-2.0.5/chess-module hides /home/dick/.local/share/emacs/site-lisp/chess-module
/home/dick/.emacs.d/elpa/chess-2.0.5/chess-ucb hides /home/dick/.local/share/emacs/site-lisp/chess-ucb
/home/dick/.emacs.d/elpa/chess-2.0.5/chess-scid hides /home/dick/.local/share/emacs/site-lisp/chess-scid
/home/dick/.emacs.d/elpa/chess-2.0.5/chess-puzzle hides /home/dick/.local/share/emacs/site-lisp/chess-puzzle
/home/dick/.emacs.d/elpa/chess-2.0.5/chess-irc hides /home/dick/.local/share/emacs/site-lisp/chess-irc
/home/dick/.emacs.d/elpa/chess-2.0.5/chess-network hides /home/dick/.local/share/emacs/site-lisp/chess-network
/home/dick/.emacs.d/elpa/chess-2.0.5/chess-autosave hides /home/dick/.local/share/emacs/site-lisp/chess-autosave
/home/dick/.emacs.d/elpa/chess-2.0.5/chess-engine hides /home/dick/.local/share/emacs/site-lisp/chess-engine
/home/dick/.emacs.d/elpa/chess-2.0.5/chess-tutorial hides /home/dick/.local/share/emacs/site-lisp/chess-tutorial
/home/dick/.emacs.d/elpa/chess-2.0.5/chess-german hides /home/dick/.local/share/emacs/site-lisp/chess-german
/home/dick/.emacs.d/elpa/chess-2.0.5/chess-file hides /home/dick/.local/share/emacs/site-lisp/chess-file
/home/dick/.emacs.d/elpa/chess-2.0.5/chess-random hides /home/dick/.local/share/emacs/site-lisp/chess-random
/home/dick/.emacs.d/elpa/chess-2.0.5/chess-stockfish hides /home/dick/.local/share/emacs/site-lisp/chess-stockfish
/home/dick/.emacs.d/elpa/chess-2.0.5/chess-pgn hides /home/dick/.local/share/emacs/site-lisp/chess-pgn
/home/dick/.emacs.d/elpa/chess-2.0.5/chess-kibitz hides /home/dick/.local/share/emacs/site-lisp/chess-kibitz
/home/dick/.emacs.d/elpa/chess-2.0.5/chess-eco hides /home/dick/.local/share/emacs/site-lisp/chess-eco
/home/dick/.emacs.d/elpa/chess-2.0.5/chess-display hides /home/dick/.local/share/emacs/site-lisp/chess-display
/home/dick/.emacs.d/elpa/chess-2.0.5/chess-var hides /home/dick/.local/share/emacs/site-lisp/chess-var
/home/dick/.emacs.d/elpa/chess-2.0.5/chess-test hides /home/dick/.local/share/emacs/site-lisp/chess-test
/home/dick/.emacs.d/elpa/chess-2.0.5/chess-ply hides /home/dick/.local/share/emacs/site-lisp/chess-ply
/home/dick/.emacs.d/elpa/chess-2.0.5/chess-message hides /home/dick/.local/share/emacs/site-lisp/chess-message
/home/dick/.emacs.d/elpa/chess-2.0.5/chess-ics1 hides /home/dick/.local/share/emacs/site-lisp/chess-ics1
/home/dick/.emacs.d/elpa/chess-2.0.5/chess-phalanx hides /home/dick/.local/share/emacs/site-lisp/chess-phalanx
/home/dick/.emacs.d/elpa/chess-2.0.5/chess-game hides /home/dick/.local/share/emacs/site-lisp/chess-game
/home/dick/.emacs.d/elpa/chess-2.0.5/chess-log hides /home/dick/.local/share/emacs/site-lisp/chess-log
/home/dick/.emacs.d/elpa/chess-2.0.5/chess-plain hides /home/dick/.local/share/emacs/site-lisp/chess-plain
/home/dick/.emacs.d/elpa/chess-2.0.5/chess-perft hides /home/dick/.local/share/emacs/site-lisp/chess-perft
/home/dick/.emacs.d/elpa/chess-2.0.5/chess-glaurung hides /home/dick/.local/share/emacs/site-lisp/chess-glaurung
/home/dick/.emacs.d/elpa/chess-2.0.5/chess-ai hides /home/dick/.local/share/emacs/site-lisp/chess-ai
/home/dick/.emacs.d/elpa/chess-2.0.5/chess-fruit hides /home/dick/.local/share/emacs/site-lisp/chess-fruit
/home/dick/.emacs.d/elpa/chess-2.0.5/chess-uci hides /home/dick/.local/share/emacs/site-lisp/chess-uci
/home/dick/.emacs.d/elpa/chess-2.0.5/chess-epd hides /home/dick/.local/share/emacs/site-lisp/chess-epd
/home/dick/.emacs.d/elpa/chess-2.0.5/chess-database hides /home/dick/.local/share/emacs/site-lisp/chess-database
/home/dick/.emacs.d/elpa/chess-2.0.5/chess-link hides /home/dick/.local/share/emacs/site-lisp/chess-link
/home/dick/.emacs.d/elpa/chess-2.0.5/chess-transport hides /home/dick/.local/share/emacs/site-lisp/chess-transport
/home/dick/.emacs.d/elpa/chess-2.0.5/chess-none hides /home/dick/.local/share/emacs/site-lisp/chess-none
/home/dick/.emacs.d/elpa/chess-2.0.5/chess-polyglot hides /home/dick/.local/share/emacs/site-lisp/chess-polyglot
/home/dick/.emacs.d/elpa/chess-2.0.5/chess-crafty hides /home/dick/.local/share/emacs/site-lisp/chess-crafty
/home/dick/.emacs.d/elpa/chess-2.0.5/chess-chat hides /home/dick/.local/share/emacs/site-lisp/chess-chat
/home/dick/.emacs.d/elpa/chess-2.0.5/chess hides /home/dick/.local/share/emacs/site-lisp/chess
/home/dick/.emacs.d/elpa/chess-2.0.5/chess-images hides /home/dick/.local/share/emacs/site-lisp/chess-images
/home/dick/.emacs.d/elpa/chess-2.0.5/chess-gnuchess hides /home/dick/.local/share/emacs/site-lisp/chess-gnuchess
/home/dick/.emacs.d/elpa/chess-2.0.5/chess-fen hides /home/dick/.local/share/emacs/site-lisp/chess-fen
/home/dick/.emacs.d/elpa/chess-2.0.5/chess-ics hides /home/dick/.local/share/emacs/site-lisp/chess-ics
/home/dick/.emacs.d/elpa/chess-2.0.5/chess-ics2 hides /home/dick/.local/share/emacs/site-lisp/chess-ics2
/home/dick/.emacs.d/elpa/chess-2.0.5/chess-common hides /home/dick/.local/share/emacs/site-lisp/chess-common
/home/dick/.emacs.d/elpa/chess-2.0.5/chess-input hides /home/dick/.local/share/emacs/site-lisp/chess-input
/home/dick/.emacs.d/elpa/chess-2.0.5/chess-announce hides /home/dick/.local/share/emacs/site-lisp/chess-announce
/home/dick/.emacs.d/elpa/chess-2.0.5/chess-clock hides /home/dick/.local/share/emacs/site-lisp/chess-clock
/home/dick/.emacs.d/elpa/chess-2.0.5/chess-sound hides /home/dick/.local/share/emacs/site-lisp/chess-sound
/home/dick/.emacs.d/elpa/chess-2.0.5/chess-sjeng hides /home/dick/.local/share/emacs/site-lisp/chess-sjeng
/home/dick/.emacs.d/elpa/chess-2.0.5/chess-algebraic hides /home/dick/.local/share/emacs/site-lisp/chess-algebraic
/home/dick/.emacs.d/elpa/transient-0.3.7snapshot/transient hides /home/dick/.local/share/emacs/0.3.1/lisp/transient
Features:
(perl-mode ag vc-svn find-dired eudc-capf eudc eudc-vars shadow
bbdb-message footnote emacsbug whitespace pulse shortdoc magit-extras
goto-addr mule-util cl-print debug backtrace face-remap
magit-patch-changelog magit-patch magit-submodule magit-obsolete
magit-blame magit-stash magit-reflog magit-bisect magit-push magit-pull
magit-fetch magit-clone magit-remote magit-commit magit-sequence
magit-notes magit-worktree magit-tag magit-merge magit-branch
magit-reset magit-files magit-refs magit-status magit magit-repos
magit-apply magit-wip magit-log which-func imenu magit-diff smerge-mode
diff git-commit log-edit pcvs-util add-log magit-core magit-margin
magit-transient magit-process with-editor server magit-mode transient
misearch multi-isearch org-element avl-tree ol-eww eww xdg ol-rmail
ol-mhe ol-irc ol-info ol-gnus nnselect ol-docview doc-view jka-compr
image-mode exif ol-bibtex ol-bbdb ol-w3m ol-doi org-link-doi org-tempo
tempo org org-macro org-footnote org-pcomplete org-list org-faces
org-entities org-version ob-R ob-emacs-lisp ob-ein ein-cell
ein-shared-output ein-output-area ein-kernel ein-ipdb ein-query
ein-events ein-websocket websocket bindat ein-node ewoc ein-log
ein-classes ein-core ein ein-utils deferred ob ob-tangle org-src ob-ref
ob-lob ob-table ob-exp ob-comint ob-core ob-eval org-table oc-basic
bibtex ol org-keys oc org-compat org-macs org-loaddefs find-func
cal-menu calendar cal-loaddefs qp gnus-html url-queue help-fns
radix-tree sort smiley shr-color mm-archive gnus-async gnus-ml vc-git
diff-mode vc vc-dispatcher bug-reference cc-mode cc-fonts cc-guess
cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs
tramp-archive tramp-gvfs tramp-cache zeroconf gravatar dns mail-extr
textsec uni-scripts idna-mapping ucs-normalize uni-confusable
textsec-check gnus-notifications gnus-fun notifications gnus-kill
gnus-dup disp-table utf-7 blamer a tramp tramp-loaddefs trampver
tramp-integration cus-start files-x tramp-compat shell pcomplete ls-lisp
url-cache benchmark nnrss nnfolder nndiscourse rbenv nnhackernews
nntwitter nntwitter-api bbdb-gnus gnus-demon nntp nnmairix nnml nnreddit
gnus-topic url-http url-auth url-gw network-stream nsm request
virtualenvwrapper gud s json-rpc python gnus-score score-mode gnus-bcklg
gnus-srvr gnus-cite anaphora bbdb-mua bbdb-com bbdb bbdb-site timezone
gnus-delay gnus-draft gnus-cache gnus-agent gnus-msg gnus-art mm-uu
mml2015 mm-view mml-smime smime gnutls dig gnus-sum shr pixel-fill
kinsoku url-file url-dired svg dom nndraft nnmh gnus-group mm-url
gnus-undo use-package use-package-delight use-package-diminish
gnus-start gnus-dbus dbus xml gnus-cloud nnimap nnmail mail-source utf7
netrc nnoo parse-time iso8601 gnus-spec gnus-int gnus-range message
sendmail yank-media rmc puny dired-x dired dired-loaddefs rfc822 mml
mml-sec epa epg rfc6068 epg-config mm-decode mm-bodies mm-encode
mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mailabbrev gmm-utils
mailheader gnus-win paredit-ext paredit subed subed-vtt subed-srt
subed-common subed-mpv subed-debug subed-config inf-ruby ruby-mode smie
company pcase haskell-interactive-mode haskell-presentation-mode
haskell-process haskell-session haskell-compile haskell-mode
haskell-cabal haskell-utils haskell-font-lock haskell-indentation
haskell-string haskell-sort-imports haskell-lexeme haskell-align-imports
haskell-complete-module haskell-ghc-support noutline outline
flymake-proc flymake warnings etags fileloop generator dabbrev
haskell-customize hydra lv use-package-ensure solarized-theme
solarized-definitions projectile lisp-mnt ibuf-ext ibuffer
ibuffer-loaddefs thingatpt magit-autorevert autorevert filenotify
magit-git magit-base magit-section format-spec crm dash rx compat-27
compat-26 compat grep compile comint ansi-color gnus nnheader range
mail-utils mm-util mail-prsvr gnus-util text-property-search time-date
flx-ido flx google-translate-default-ui google-translate-core-ui
facemenu color ido google-translate-core google-translate-tk
google-translate-backend use-package-bind-key bind-key auto-complete
easy-mmode advice edmacro kmacro popup cus-edit pp cus-load wid-edit
emms-player-mplayer emms-player-simple emms emms-compat cl-extra
help-mode xref project use-package-core derived hl-line winner ring
finder-inf json-reformat-autoloads json-snatcher-autoloads
projectile-autoloads sml-mode-autoloads tornado-template-mode-autoloads
info package browse-url url url-proxy url-privacy url-expand url-methods
url-history url-cookie generate-lisp-file url-domsuf url-util mailcap
url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs
eieio-loaddefs password-cache json map url-vars seq gv subr-x byte-opt
bytecomp byte-compile cconv cldefs cl-loaddefs cl-lib iso-transl tooltip
eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type
elisp-mode mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd
fontset image regexp-opt fringe tree-sitter tabulated-list replace
newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar
rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock
font-lock syntax font-core term/tty-colors frame minibuffer nadvice
simple cl-generic indonesian philippine cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms
cp51932 hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese composite emoji-zwj charscript charprop case-table
epa-hook jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button
loaddefs faces cus-face macroexp files window text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget keymap
hashtable-print-readable backquote threads dbusbind inotify lcms2
dynamic-setting system-font-setting font-render-setting cairo
move-toolbar gtk x-toolkit xinput2 x multi-tty make-network-process
emacs)
Memory information:
((conses 16 1227829 176046)
(symbols 48 53502 23)
(strings 32 237869 24639)
(string-bytes 1 7132157)
(vectors 16 141025)
(vector-slots 8 2909657 195769)
(floats 8 1371 3219)
(intervals 56 60221 5281)
(buffers 1000 51))
^ permalink raw reply related [flat|nested] 24+ messages in thread
* bug#55863: 29.0.50; [PATCH] Avoid hanging chad of *Backtrace*
2022-06-08 21:28 bug#55863: 29.0.50; [PATCH] Avoid hanging chad of *Backtrace* dick.r.chiang
@ 2022-06-09 5:45 ` Eli Zaretskii
2022-06-09 6:46 ` Juri Linkov
` (2 subsequent siblings)
3 siblings, 0 replies; 24+ messages in thread
From: Eli Zaretskii @ 2022-06-09 5:45 UTC (permalink / raw)
To: dick.r.chiang; +Cc: 55863
> From: dick.r.chiang@gmail.com
> Date: Wed, 08 Jun 2022 17:28:29 -0400
>
> Subject: [PATCH] Avoid the hanging chad of "*Backtrace*"
^^^^^^^^^^^^^^^^^^^^^^
What does this mean?
> * lisp/emacs-lisp/debug.el (debugger-buffer-name): DRY.
Say what?
> (debug): Don't just erase the *Backtrace*; kill it.
Why?
> lisp/emacs-lisp/debug.el | 113 ++++++++++++++++++--------------------
Where's the meat? Will you ever learn to separate small changes from
large refactoring, so that your patches could be reviewed in
reasonable time and with reasonable effort? Will you ever learn to
respect comments left behind by others and not blindly delete them for
no good reason?
Until you do learn all that, expect most if not all of your
submissions to be turned down. If you want to contribute to a
project, you will need to learn to play by its rules.
^ permalink raw reply [flat|nested] 24+ messages in thread
* bug#55863: 29.0.50; [PATCH] Avoid hanging chad of *Backtrace*
2022-06-08 21:28 bug#55863: 29.0.50; [PATCH] Avoid hanging chad of *Backtrace* dick.r.chiang
2022-06-09 5:45 ` Eli Zaretskii
@ 2022-06-09 6:46 ` Juri Linkov
2022-06-09 10:11 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-06-09 12:59 ` Lars Ingebrigtsen
3 siblings, 0 replies; 24+ messages in thread
From: Juri Linkov @ 2022-06-09 6:46 UTC (permalink / raw)
To: dick.r.chiang; +Cc: 55863
> ;; Don't let `inhibit-message' get in our way (especially important if
> ;; `non-interactive-frame' evaluated to a non-nil value.
> - (inhibit-message nil)
> + inhibit-message
> ;; We may be entering the debugger from a context that has
> ;; let-bound `inhibit-read-only', which means that all
> ;; buffers would be read/write while the debugger is running.
> - (inhibit-read-only nil))
> + inhibit-read-only)
Often an explicit nil value is used as an indication that it
overrides the default value. This helps to read source code.
^ permalink raw reply [flat|nested] 24+ messages in thread
* bug#55863: 29.0.50; [PATCH] Avoid hanging chad of *Backtrace*
2022-06-08 21:28 bug#55863: 29.0.50; [PATCH] Avoid hanging chad of *Backtrace* dick.r.chiang
2022-06-09 5:45 ` Eli Zaretskii
2022-06-09 6:46 ` Juri Linkov
@ 2022-06-09 10:11 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-06-09 12:59 ` Lars Ingebrigtsen
3 siblings, 0 replies; 24+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-06-09 10:11 UTC (permalink / raw)
To: dick.r.chiang; +Cc: 55863
dick.r.chiang@gmail.com writes:
> Subject: [PATCH] Avoid the hanging chad of "*Backtrace*"
Most people do not use paper punches anymore, and are likely to think of
the urban slang meaning of "chad" instead. Mysterious commit messages
do not belong in our source code.
> * lisp/emacs-lisp/debug.el (debugger-buffer-name): DRY.
> (debug): Don't just erase the *Backtrace*; kill it.
> * test/lisp/abbrev-tests.el (copy-abbrev-table-test):
> We have `ignore-errors` for this purpose.
> (abbrev-tests-backtrace-bury): Test it.
> ---
> lisp/emacs-lisp/debug.el | 113 ++++++++++++++++++--------------------
> test/lisp/abbrev-tests.el | 20 +++++--
So exactly what is the problem, and where is the fix? And why is
`abbrev-tests.el' related?
> 2 files changed, 68 insertions(+), 65 deletions(-)
>
> diff --git a/lisp/emacs-lisp/debug.el b/lisp/emacs-lisp/debug.el
> index 6c172d6c31d..c1c977ce66e 100644
> --- a/lisp/emacs-lisp/debug.el
> +++ b/lisp/emacs-lisp/debug.el
> @@ -95,6 +95,8 @@ debug-allow-recursive-debug
> :type 'boolean
> :version "29.1")
>
> +(defconst debugger-buffer-name "*Backtrace*")
No doc string.
^ permalink raw reply [flat|nested] 24+ messages in thread
* bug#55863: 29.0.50; [PATCH] Avoid hanging chad of *Backtrace*
2022-06-08 21:28 bug#55863: 29.0.50; [PATCH] Avoid hanging chad of *Backtrace* dick.r.chiang
` (2 preceding siblings ...)
2022-06-09 10:11 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-06-09 12:59 ` Lars Ingebrigtsen
2022-06-09 13:51 ` dick
3 siblings, 1 reply; 24+ messages in thread
From: Lars Ingebrigtsen @ 2022-06-09 12:59 UTC (permalink / raw)
To: dick.r.chiang; +Cc: 55863
dick.r.chiang@gmail.com writes:
> Subject: [PATCH] Avoid the hanging chad of "*Backtrace*"
>
> make TEST_INTERACTIVE=yes test/lisp/abbrev-tests
If I run that line on the current trunk, I don't get any *Backtrace*
buffer (if that's indeed what you meant to imply). Do you have a better
recipe for reproduction of whatever the problem is?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 24+ messages in thread
* bug#55863: 29.0.50; [PATCH] Avoid hanging chad of *Backtrace*
2022-06-09 12:59 ` Lars Ingebrigtsen
@ 2022-06-09 13:51 ` dick
2022-06-09 16:01 ` Lars Ingebrigtsen
2022-06-09 16:58 ` Juri Linkov
0 siblings, 2 replies; 24+ messages in thread
From: dick @ 2022-06-09 13:51 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: 55863
(let ((pop-after (lambda (&rest _args) (throw 'here t))))
(unwind-protect
(catch 'here
(add-function :after (symbol-function 'pop-to-buffer) pop-after)
(debug))
(remove-function (symbol-function 'pop-to-buffer) pop-after))
(cl-assert (not (get-buffer "*Backtrace*"))))
OR
(let ((debug-on-error t))
(error "No chads please."))
Then type "q", "C-x C-b", and note the empty lurker *Backtrace*.
Apparently I'm the only one irked by this recurring bugaboo.
^ permalink raw reply [flat|nested] 24+ messages in thread
* bug#55863: 29.0.50; [PATCH] Avoid hanging chad of *Backtrace*
2022-06-09 13:51 ` dick
@ 2022-06-09 16:01 ` Lars Ingebrigtsen
2022-06-09 16:58 ` Juri Linkov
1 sibling, 0 replies; 24+ messages in thread
From: Lars Ingebrigtsen @ 2022-06-09 16:01 UTC (permalink / raw)
To: dick; +Cc: 55863
dick <dick.r.chiang@gmail.com> writes:
> (let ((debug-on-error t))
> (error "No chads please."))
>
> Then type "q", "C-x C-b", and note the empty lurker *Backtrace*.
Ah, yes, that's annoying. I agree that we should kill the *Backtrace*
buffer -- the current code just empties the buffer, but leaves it
behind, which doesn't seem useful.
(`q' aka `bury-buffer' commonly in many modes, well, buries the buffer,
but in this case we empty it first, so it's not useful to avoid killing
it in this case.)
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 24+ messages in thread
* bug#55863: 29.0.50; [PATCH] Avoid hanging chad of *Backtrace*
2022-06-09 13:51 ` dick
2022-06-09 16:01 ` Lars Ingebrigtsen
@ 2022-06-09 16:58 ` Juri Linkov
2022-06-09 17:34 ` Lars Ingebrigtsen
` (2 more replies)
1 sibling, 3 replies; 24+ messages in thread
From: Juri Linkov @ 2022-06-09 16:58 UTC (permalink / raw)
To: dick; +Cc: 55863, Lars Ingebrigtsen
> (let ((debug-on-error t))
> (error "No chads please."))
>
> Then type "q", "C-x C-b", and note the empty lurker *Backtrace*.
>
> Apparently I'm the only one irked by this recurring bugaboo.
A better question is why *Backtrace* is erased?
Often I accidentally quit the backtrace, then
try to switch to the *Backtrace* buffer to check
the backtrace again, but to no avail.
^ permalink raw reply [flat|nested] 24+ messages in thread
* bug#55863: 29.0.50; [PATCH] Avoid hanging chad of *Backtrace*
2022-06-09 16:58 ` Juri Linkov
@ 2022-06-09 17:34 ` Lars Ingebrigtsen
2022-06-09 17:58 ` Juri Linkov
` (2 more replies)
2022-06-09 18:56 ` Eli Zaretskii
2022-06-09 19:17 ` Eric Abrahamsen
2 siblings, 3 replies; 24+ messages in thread
From: Lars Ingebrigtsen @ 2022-06-09 17:34 UTC (permalink / raw)
To: Juri Linkov; +Cc: 55863, dick
Juri Linkov <juri@linkov.net> writes:
> A better question is why *Backtrace* is erased?
> Often I accidentally quit the backtrace, then
> try to switch to the *Backtrace* buffer to check
> the backtrace again, but to no avail.
I don't think you can usefully interact with it after exiting the
recursive edit? That is, I think all the stuff that's bound in the
`debug' command (debugger-outer-match-data etc etc) has to continue to
be bound...
But perhaps that can be fixed?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 24+ messages in thread
* bug#55863: 29.0.50; [PATCH] Avoid hanging chad of *Backtrace*
2022-06-09 17:34 ` Lars Ingebrigtsen
@ 2022-06-09 17:58 ` Juri Linkov
2022-06-09 18:44 ` Lars Ingebrigtsen
2022-06-09 18:50 ` Drew Adams
2022-06-09 18:57 ` Eli Zaretskii
2 siblings, 1 reply; 24+ messages in thread
From: Juri Linkov @ 2022-06-09 17:58 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: 55863, dick
>> A better question is why *Backtrace* is erased?
>> Often I accidentally quit the backtrace, then
>> try to switch to the *Backtrace* buffer to check
>> the backtrace again, but to no avail.
>
> I don't think you can usefully interact with it after exiting the
> recursive edit? That is, I think all the stuff that's bound in the
> `debug' command (debugger-outer-match-data etc etc) has to continue to
> be bound...
>
> But perhaps that can be fixed?
I have no idea what will happen when it's not erased, need to try.
Hmm, interesting, after this all backtrace links are still valid:
diff --git a/lisp/emacs-lisp/debug.el b/lisp/emacs-lisp/debug.el
index 6c172d6c31..eb71b12341 100644
--- a/lisp/emacs-lisp/debug.el
+++ b/lisp/emacs-lisp/debug.el
@@ -308,13 +308,13 @@ debug
;; Restore previous state of debugger-buffer in case we were
;; in a recursive invocation of the debugger, otherwise just
;; erase the buffer.
- (when (buffer-live-p debugger-buffer)
- (with-current-buffer debugger-buffer
- (if debugger-previous-state
- (debugger--restore-buffer-state debugger-previous-state)
- (setq backtrace-insert-header-function nil)
- (setq backtrace-frames nil)
- (backtrace-print))))
+ ;; (when (buffer-live-p debugger-buffer)
+ ;; (with-current-buffer debugger-buffer
+ ;; (if debugger-previous-state
+ ;; (debugger--restore-buffer-state debugger-previous-state)
+ ;; (setq backtrace-insert-header-function nil)
+ ;; (setq backtrace-frames nil)
+ ;; (backtrace-print))))
(with-timeout-unsuspend debugger-with-timeout-suspend)
(set-match-data debugger-outer-match-data)))
(setq debug-on-next-call debugger-step-after-exit)
^ permalink raw reply related [flat|nested] 24+ messages in thread
* bug#55863: 29.0.50; [PATCH] Avoid hanging chad of *Backtrace*
2022-06-09 17:58 ` Juri Linkov
@ 2022-06-09 18:44 ` Lars Ingebrigtsen
0 siblings, 0 replies; 24+ messages in thread
From: Lars Ingebrigtsen @ 2022-06-09 18:44 UTC (permalink / raw)
To: Juri Linkov; +Cc: 55863, dick
Juri Linkov <juri@linkov.net> writes:
> I have no idea what will happen when it's not erased, need to try.
> Hmm, interesting, after this all backtrace links are still valid:
But doing commands like `e' doesn't work, because the context has been
lost.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 24+ messages in thread
* bug#55863: 29.0.50; [PATCH] Avoid hanging chad of *Backtrace*
2022-06-09 17:34 ` Lars Ingebrigtsen
2022-06-09 17:58 ` Juri Linkov
@ 2022-06-09 18:50 ` Drew Adams
2022-06-09 18:57 ` Eli Zaretskii
2 siblings, 0 replies; 24+ messages in thread
From: Drew Adams @ 2022-06-09 18:50 UTC (permalink / raw)
To: Lars Ingebrigtsen, Juri Linkov; +Cc: 55863@debbugs.gnu.org, dick
(Apologies for not following this thread.
Please ignore if not relevant.)
I'm just wondering whether option
`debugger-bury-or-kill' might be relevant here.
The default value is `bury'. I'm guessing
maybe setting the value to `kill' would help
with what's being requested.
------------8<----------------
debugger-bury-or-kill is a variable defined in `debug.el'.
Its value is 'bury'
Documentation:
What to do with the debugger buffer when exiting `debug'.
The value affects the behavior of operations on any window
previously showing the debugger buffer.
nil means that if its window is not deleted when exiting the
debugger, invoking `switch-to-prev-buffer' will usually show
the debugger buffer again.
`append' means that if the window is not deleted, the debugger
buffer moves to the end of the window's previous buffers so
it's less likely that a future invocation of
`switch-to-prev-buffer' will switch to it. Also, it moves the
buffer to the end of the frame's buffer list.
`bury' means that if the window is not deleted, its buffer is
removed from the window's list of previous buffers. Also, it
moves the buffer to the end of the frame's buffer list. This
value provides the most reliable remedy to not have
`switch-to-prev-buffer' switch to the debugger buffer again
without killing the buffer.
`kill' means to kill the debugger buffer.
The value used here is passed to `quit-restore-window'.
You can customize this variable.
This variable was introduced, or its default value was changed, in
version 24.3 of Emacs.
------------8<----------------
^ permalink raw reply [flat|nested] 24+ messages in thread
* bug#55863: 29.0.50; [PATCH] Avoid hanging chad of *Backtrace*
2022-06-09 16:58 ` Juri Linkov
2022-06-09 17:34 ` Lars Ingebrigtsen
@ 2022-06-09 18:56 ` Eli Zaretskii
2022-06-09 19:17 ` Eric Abrahamsen
2 siblings, 0 replies; 24+ messages in thread
From: Eli Zaretskii @ 2022-06-09 18:56 UTC (permalink / raw)
To: Juri Linkov; +Cc: 55863, larsi, dick.r.chiang
> Cc: 55863@debbugs.gnu.org, Lars Ingebrigtsen <larsi@gnus.org>
> From: Juri Linkov <juri@linkov.net>
> Date: Thu, 09 Jun 2022 19:58:33 +0300
>
> > (let ((debug-on-error t))
> > (error "No chads please."))
> >
> > Then type "q", "C-x C-b", and note the empty lurker *Backtrace*.
> >
> > Apparently I'm the only one irked by this recurring bugaboo.
>
> A better question is why *Backtrace* is erased?
> Often I accidentally quit the backtrace, then
> try to switch to the *Backtrace* buffer to check
> the backtrace again, but to no avail.
Happened to me as well, indeed.
^ permalink raw reply [flat|nested] 24+ messages in thread
* bug#55863: 29.0.50; [PATCH] Avoid hanging chad of *Backtrace*
2022-06-09 17:34 ` Lars Ingebrigtsen
2022-06-09 17:58 ` Juri Linkov
2022-06-09 18:50 ` Drew Adams
@ 2022-06-09 18:57 ` Eli Zaretskii
2022-06-09 19:02 ` Lars Ingebrigtsen
2 siblings, 1 reply; 24+ messages in thread
From: Eli Zaretskii @ 2022-06-09 18:57 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: 55863, dick.r.chiang, juri
> Cc: 55863@debbugs.gnu.org, dick <dick.r.chiang@gmail.com>
> From: Lars Ingebrigtsen <larsi@gnus.org>
> Date: Thu, 09 Jun 2022 19:34:42 +0200
>
> I don't think you can usefully interact with it after exiting the
> recursive edit? That is, I think all the stuff that's bound in the
> `debug' command (debugger-outer-match-data etc etc) has to continue to
> be bound...
Even if the links don't work, the backtrace itself provides valuable
information (and fining the functions is trivial with M-. so we don't
really need the links).
^ permalink raw reply [flat|nested] 24+ messages in thread
* bug#55863: 29.0.50; [PATCH] Avoid hanging chad of *Backtrace*
2022-06-09 18:57 ` Eli Zaretskii
@ 2022-06-09 19:02 ` Lars Ingebrigtsen
0 siblings, 0 replies; 24+ messages in thread
From: Lars Ingebrigtsen @ 2022-06-09 19:02 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 55863, dick.r.chiang, juri
Eli Zaretskii <eliz@gnu.org> writes:
>> I don't think you can usefully interact with it after exiting the
>> recursive edit? That is, I think all the stuff that's bound in the
>> `debug' command (debugger-outer-match-data etc etc) has to continue to
>> be bound...
>
> Even if the links don't work, the backtrace itself provides valuable
> information (and fining the functions is trivial with M-. so we don't
> really need the links).
I was mostly thinking about the eval-in-frame stuff, which is what I
find most useful.
If it's hard to keep that around after exiting from the recursive edit,
we might just have an `inactive-backtrace' mode that disables the
commands that don't work?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 24+ messages in thread
* bug#55863: 29.0.50; [PATCH] Avoid hanging chad of *Backtrace*
2022-06-09 16:58 ` Juri Linkov
2022-06-09 17:34 ` Lars Ingebrigtsen
2022-06-09 18:56 ` Eli Zaretskii
@ 2022-06-09 19:17 ` Eric Abrahamsen
2022-06-09 19:34 ` dick
2 siblings, 1 reply; 24+ messages in thread
From: Eric Abrahamsen @ 2022-06-09 19:17 UTC (permalink / raw)
To: Juri Linkov; +Cc: 55863, Lars Ingebrigtsen, dick
Juri Linkov <juri@linkov.net> writes:
>> (let ((debug-on-error t))
>> (error "No chads please."))
>>
>> Then type "q", "C-x C-b", and note the empty lurker *Backtrace*.
>>
>> Apparently I'm the only one irked by this recurring bugaboo.
>
> A better question is why *Backtrace* is erased?
> Often I accidentally quit the backtrace, then
> try to switch to the *Backtrace* buffer to check
> the backtrace again, but to no avail.
FWIW I agree with this: I'm often annoyed that the backtrace is removed.
What's the harm in leaving it there?
^ permalink raw reply [flat|nested] 24+ messages in thread
* bug#55863: 29.0.50; [PATCH] Avoid hanging chad of *Backtrace*
2022-06-09 19:17 ` Eric Abrahamsen
@ 2022-06-09 19:34 ` dick
2022-06-09 21:02 ` Eric Abrahamsen
2022-06-10 9:27 ` Lars Ingebrigtsen
0 siblings, 2 replies; 24+ messages in thread
From: dick @ 2022-06-09 19:34 UTC (permalink / raw)
To: Eric Abrahamsen; +Cc: 55863
> FWIW I agree with this: I'm often annoyed that the backtrace is
> removed. What's the harm in leaving it there?
Because inhibit-debugger silently won't let you have more than one
active session. This was as confusing to me as a edebug beginner as
when gdb inexplicably flies past a breakpoint.
^ permalink raw reply [flat|nested] 24+ messages in thread
* bug#55863: 29.0.50; [PATCH] Avoid hanging chad of *Backtrace*
2022-06-09 19:34 ` dick
@ 2022-06-09 21:02 ` Eric Abrahamsen
2022-06-10 9:27 ` Lars Ingebrigtsen
1 sibling, 0 replies; 24+ messages in thread
From: Eric Abrahamsen @ 2022-06-09 21:02 UTC (permalink / raw)
To: dick; +Cc: 55863
On 06/09/22 15:34 PM, dick wrote:
>> FWIW I agree with this: I'm often annoyed that the backtrace is
>> removed. What's the harm in leaving it there?
>
> Because inhibit-debugger silently won't let you have more than one
> active session. This was as confusing to me as a edebug beginner as
> when gdb inexplicably flies past a breakpoint.
Fair enough -- I'm not surprised it's more complicated than I'd
considered. I do feel like I "lose" backtraces a lot, though.
^ permalink raw reply [flat|nested] 24+ messages in thread
* bug#55863: 29.0.50; [PATCH] Avoid hanging chad of *Backtrace*
2022-06-09 19:34 ` dick
2022-06-09 21:02 ` Eric Abrahamsen
@ 2022-06-10 9:27 ` Lars Ingebrigtsen
2022-06-10 10:03 ` dick
1 sibling, 1 reply; 24+ messages in thread
From: Lars Ingebrigtsen @ 2022-06-10 9:27 UTC (permalink / raw)
To: dick; +Cc: Eric Abrahamsen, 55863
dick <dick.r.chiang@gmail.com> writes:
>> FWIW I agree with this: I'm often annoyed that the backtrace is
>> removed. What's the harm in leaving it there?
>
> Because inhibit-debugger silently won't let you have more than one
> active session. This was as confusing to me as a edebug beginner as
> when gdb inexplicably flies past a breakpoint.
Removing the text from the *Backtrace* buffer (or not) doesn't affect
whether `inhibit-debugger' is bound or not. The `q' from the buffer
exits the recursive edit, which makes `inhibit-debugger' go back to its
normal value.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 24+ messages in thread
* bug#55863: 29.0.50; [PATCH] Avoid hanging chad of *Backtrace*
2022-06-10 9:27 ` Lars Ingebrigtsen
@ 2022-06-10 10:03 ` dick
2022-06-10 10:06 ` Lars Ingebrigtsen
0 siblings, 1 reply; 24+ messages in thread
From: dick @ 2022-06-10 10:03 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: 55863
No one wants to see "*Backtrace*<2>" and "*Backtrace*<3>".
^ permalink raw reply [flat|nested] 24+ messages in thread
* bug#55863: 29.0.50; [PATCH] Avoid hanging chad of *Backtrace*
2022-06-10 10:03 ` dick
@ 2022-06-10 10:06 ` Lars Ingebrigtsen
2022-06-10 10:24 ` dick
0 siblings, 1 reply; 24+ messages in thread
From: Lars Ingebrigtsen @ 2022-06-10 10:06 UTC (permalink / raw)
To: dick; +Cc: 55863
dick <dick.r.chiang@gmail.com> writes:
> No one wants to see "*Backtrace*<2>" and "*Backtrace*<3>".
I don't think anybody has proposed that? Reusing the *Backtrace* buffer
is fine whether we erase the text in it or not on `q'.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 24+ messages in thread
* bug#55863: 29.0.50; [PATCH] Avoid hanging chad of *Backtrace*
2022-06-10 10:06 ` Lars Ingebrigtsen
@ 2022-06-10 10:24 ` dick
2022-06-10 11:39 ` dick
0 siblings, 1 reply; 24+ messages in thread
From: dick @ 2022-06-10 10:24 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: 55863
I'm down for burying on "q" so long as subsequent debug's don't
generate-new-buffer to admit *Backtrace<2>* and *Backtrace<3>*.
^ permalink raw reply [flat|nested] 24+ messages in thread
* bug#55863: 29.0.50; [PATCH] Avoid hanging chad of *Backtrace*
2022-06-10 10:24 ` dick
@ 2022-06-10 11:39 ` dick
2022-06-14 12:39 ` Lars Ingebrigtsen
0 siblings, 1 reply; 24+ messages in thread
From: dick @ 2022-06-10 11:39 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: 55863
So I set about replacing kill-buffer with bury-buffer, then demoting
the *Backtrace* buffer from debugger-mode to backtrace-mode, and
realized maybe kill-buffer is best.
The confusion is we're accustomed to "q" as a passive bury, when
in fact "q" in debugger-mode corresponds to the highly un-passive
"debugger-quit". To emphasize that, perhaps "q" in debugger-mode
should be gated by an "Are you sure?" yes-or-no-p.
Toting around old *Backtrace* buffers is fraught. As GNU is really a
preservationist society moonlighting as software developers, I expect I
am, as usual, in the minority and will bow out of this particular
discuz.
>>>>> dick <dick.r.chiang@gmail.com> writes:
> I'm down for burying on "q" so long as subsequent debug's don't
> generate-new-buffer to admit *Backtrace<2>* and *Backtrace<3>*.
^ permalink raw reply [flat|nested] 24+ messages in thread
* bug#55863: 29.0.50; [PATCH] Avoid hanging chad of *Backtrace*
2022-06-10 11:39 ` dick
@ 2022-06-14 12:39 ` Lars Ingebrigtsen
0 siblings, 0 replies; 24+ messages in thread
From: Lars Ingebrigtsen @ 2022-06-14 12:39 UTC (permalink / raw)
To: dick; +Cc: 55863
dick <dick.r.chiang@gmail.com> writes:
> So I set about replacing kill-buffer with bury-buffer, then demoting
> the *Backtrace* buffer from debugger-mode to backtrace-mode, and
> realized maybe kill-buffer is best.
Ah, we already have a nice mode for "dead" backtrace buffers like this
(i.e., where `e' and friends don't work), so that makes it even easier.
So I've now done this on the trunk.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 24+ messages in thread
end of thread, other threads:[~2022-06-14 12:39 UTC | newest]
Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-08 21:28 bug#55863: 29.0.50; [PATCH] Avoid hanging chad of *Backtrace* dick.r.chiang
2022-06-09 5:45 ` Eli Zaretskii
2022-06-09 6:46 ` Juri Linkov
2022-06-09 10:11 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-06-09 12:59 ` Lars Ingebrigtsen
2022-06-09 13:51 ` dick
2022-06-09 16:01 ` Lars Ingebrigtsen
2022-06-09 16:58 ` Juri Linkov
2022-06-09 17:34 ` Lars Ingebrigtsen
2022-06-09 17:58 ` Juri Linkov
2022-06-09 18:44 ` Lars Ingebrigtsen
2022-06-09 18:50 ` Drew Adams
2022-06-09 18:57 ` Eli Zaretskii
2022-06-09 19:02 ` Lars Ingebrigtsen
2022-06-09 18:56 ` Eli Zaretskii
2022-06-09 19:17 ` Eric Abrahamsen
2022-06-09 19:34 ` dick
2022-06-09 21:02 ` Eric Abrahamsen
2022-06-10 9:27 ` Lars Ingebrigtsen
2022-06-10 10:03 ` dick
2022-06-10 10:06 ` Lars Ingebrigtsen
2022-06-10 10:24 ` dick
2022-06-10 11:39 ` dick
2022-06-14 12:39 ` Lars Ingebrigtsen
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.