unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: michael_heerdegen@web.de
Cc: 12921@debbugs.gnu.org
Subject: bug#12921: 24.2.50; resizing backtrace buffer not persistent (again)
Date: Sun, 18 Nov 2012 12:36:52 +0100	[thread overview]
Message-ID: <50A8C854.1000302@gmx.at> (raw)
In-Reply-To: <87r4nr4n6h.fsf@web.de>

 > In emacs -Q, type M-x debug.  The frame gets split vertically.  The
 > window below displays *Backtrace*.  But dragging the mode-line in the
 > middle doesn't resize the window persistently when you step in the
 > debugger.
 >
 > Resizing is performed here in these lines of `debug':
 >
 >       (if (eq debugger-previous-window debugger-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-size debugger-window)))
 > 	      (error nil)))
 > 	(setq debugger-previous-window debugger-window))
 >
 > However, in the above case, (eq debugger-previous-window
 > debugger-window) is never true, probably because the vertical splitting
 > into two windows is performed and undone on each step.
 >
 > Would it be harmful to perform resizing unconditionally?  This fixes
 > the problem for me, but I'm not sure if it could be harmful in certain
 > situations.  OTOH, if the window was created newly when the debugger had
 > been reentered, we already changed the window layout, so forcing a
 > certain size should not be dangerous, in general.

You mean a patch like the below?  Note that I have no idea how the
debugger should behave when the window layout is changed by the debugged
code.

martin


*** lisp/emacs-lisp/debug.el	2012-11-11 01:16:25 +0000
--- lisp/emacs-lisp/debug.el	2012-11-18 09:55:27 +0000
***************
*** 228,247 ****
   	       debugger-buffer
   	       `((display-buffer-reuse-window
   		  display-buffer-in-previous-window)
! 		  . (,(when debugger-previous-window
! 			`(previous-window . ,debugger-previous-window)))))
   	      (setq debugger-window (selected-window))
! 	      (if (eq debugger-previous-window debugger-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-size debugger-window)))
! 		      (error nil)))
! 		(setq debugger-previous-window debugger-window))
   	      (debugger-mode)
   	      (debugger-setup-buffer debugger-args)
   	      (when noninteractive
--- 228,246 ----
   	       debugger-buffer
   	       `((display-buffer-reuse-window
   		  display-buffer-in-previous-window)
! 		 . (,(when debugger-previous-window
! 		       `(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-size debugger-window)))
! 		  (error nil)))
! 	      (setq debugger-previous-window debugger-window)
   	      (debugger-mode)
   	      (debugger-setup-buffer debugger-args)
   	      (when noninteractive






  reply	other threads:[~2012-11-18 11:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-18  3:14 bug#12921: 24.2.50; resizing backtrace buffer not persistent (again) Michael Heerdegen
2012-11-18 11:36 ` martin rudalics [this message]
2012-11-19  0:18   ` Michael Heerdegen
2012-11-19  8:01     ` martin rudalics
2020-08-25 12:07       ` Lars Ingebrigtsen
2021-09-06 10:48         ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50A8C854.1000302@gmx.at \
    --to=rudalics@gmx.at \
    --cc=12921@debbugs.gnu.org \
    --cc=michael_heerdegen@web.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).