unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#10882: bs cannot recover from error splitting
@ 2012-02-24 18:42 Juanma Barranquero
  2012-02-25 23:27 ` Juanma Barranquero
  0 siblings, 1 reply; 2+ messages in thread
From: Juanma Barranquero @ 2012-02-24 18:42 UTC (permalink / raw)
  To: 10882

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)))))





^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#10882: bs cannot recover from error splitting
  2012-02-24 18:42 bug#10882: bs cannot recover from error splitting Juanma Barranquero
@ 2012-02-25 23:27 ` Juanma Barranquero
  0 siblings, 0 replies; 2+ messages in thread
From: Juanma Barranquero @ 2012-02-25 23:27 UTC (permalink / raw)
  To: 10882-done

Committed in revno:107431.





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-02-25 23:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-24 18:42 bug#10882: bs cannot recover from error splitting Juanma Barranquero
2012-02-25 23:27 ` Juanma Barranquero

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).