GNU bug report logs - #10882
bs cannot recover from error splitting

Previous Next

Package: emacs;

Reported by: Juanma Barranquero <lekktu <at> gmail.com>

Date: Fri, 24 Feb 2012 18:46:01 UTC

Severity: minor

Done: Juanma Barranquero <lekktu <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 10882 in the body.
You can then email your comments to 10882 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#10882; Package emacs. (Fri, 24 Feb 2012 18:46:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Juanma Barranquero <lekktu <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 24 Feb 2012 18:46:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Juanma Barranquero <lekktu <at> gmail.com>
To: Bug-Gnu-Emacs <bug-gnu-emacs <at> gnu.org>
Subject: bs cannot recover from error splitting
Date: Fri, 24 Feb 2012 19:42:15 +0100
Package: emacs
Severity: minor

emacs -Q
C-x 2
C-x b test <RET>
M-: (setq window-size-fixed 'height) <RET>   ;; in buffer "test"
M-x bs-show <RET>  =>  Window #<window 3 on *scratch*> too small for splitting
;; ok, let's kill that window
C-x 0
;; now the only window shows "*scrach*"
M-x bs-show <RET>  =>  we're back to the old config and the "too small" error.

The problem is that bs--show-with-configuration errs out, so bs-show
ends and the saved configuration is never reset to nil. Each new
attempt to use bs-show finds a saved configuration and restores it
before anything else.

The simplest way to fix it is using ignore-errors to protect against
split-window-below failing, so the code acts as if the window was too
small in the first place. It causes no harm because, once bs-show is
exited normally, the current window configuration is restored.

OK to install now?

    Juanma



=== modified file 'lisp/bs.el'
--- lisp/bs.el	2012-01-19 07:21:25 +0000
+++ lisp/bs.el	2012-02-24 18:37:28 +0000
@@ -1415,5 +1415,5 @@
 	(setq bs--window-config-coming-from (current-window-configuration))
 	(when (> (window-height (selected-window)) 7)
-          (select-window (split-window-below))))
+          (ignore-errors (select-window (split-window-below)))))
       (bs-show-in-buffer liste)
       (bs-message-without-log "%s" (bs--current-config-message)))))




Reply sent to Juanma Barranquero <lekktu <at> gmail.com>:
You have taken responsibility. (Sat, 25 Feb 2012 23:32:02 GMT) Full text and rfc822 format available.

Notification sent to Juanma Barranquero <lekktu <at> gmail.com>:
bug acknowledged by developer. (Sat, 25 Feb 2012 23:32:03 GMT) Full text and rfc822 format available.

Message #10 received at 10882-done <at> debbugs.gnu.org (full text, mbox):

From: Juanma Barranquero <lekktu <at> gmail.com>
To: 10882-done <at> debbugs.gnu.org
Subject: Re: bug#10882: bs cannot recover from error splitting
Date: Sun, 26 Feb 2012 00:27:56 +0100
Committed in revno:107431.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 25 Mar 2012 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 12 years and 57 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.