From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juanma Barranquero Newsgroups: gmane.emacs.bugs Subject: bug#10882: bs cannot recover from error splitting Date: Fri, 24 Feb 2012 19:42:15 +0100 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1330109020 18492 80.91.229.3 (24 Feb 2012 18:43:40 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 24 Feb 2012 18:43:40 +0000 (UTC) To: 10882@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Feb 24 19:43:39 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1S107B-0002OB-IB for geb-bug-gnu-emacs@m.gmane.org; Fri, 24 Feb 2012 19:43:34 +0100 Original-Received: from localhost ([::1]:55023 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S107B-00070H-0S for geb-bug-gnu-emacs@m.gmane.org; Fri, 24 Feb 2012 13:43:33 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:33289) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S1077-0006rI-3i for bug-gnu-emacs@gnu.org; Fri, 24 Feb 2012 13:43:29 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S1076-0003GU-0D for bug-gnu-emacs@gnu.org; Fri, 24 Feb 2012 13:43:28 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:52587) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S1075-0003GQ-SA for bug-gnu-emacs@gnu.org; Fri, 24 Feb 2012 13:43:27 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1S109Z-0000Cd-NK for bug-gnu-emacs@gnu.org; Fri, 24 Feb 2012 13:46:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juanma Barranquero Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 24 Feb 2012 18:46:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 10882 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: Bug-Gnu-Emacs Original-Received: via spool by submit@debbugs.gnu.org id=B.1330109145740 (code B ref -1); Fri, 24 Feb 2012 18:46:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 24 Feb 2012 18:45:45 +0000 Original-Received: from localhost ([127.0.0.1]:54481 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S109J-0000Bl-2l for submit@debbugs.gnu.org; Fri, 24 Feb 2012 13:45:45 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:53059) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S109H-0000BY-OQ for submit@debbugs.gnu.org; Fri, 24 Feb 2012 13:45:44 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S106d-0003EL-Bk for submit@debbugs.gnu.org; Fri, 24 Feb 2012 13:43:03 -0500 Original-Received: from lists.gnu.org ([140.186.70.17]:38991) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S106d-0003EH-63 for submit@debbugs.gnu.org; Fri, 24 Feb 2012 13:42:59 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:33211) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S106c-0006qs-0p for bug-gnu-emacs@gnu.org; Fri, 24 Feb 2012 13:42:58 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S106a-0003E4-Rs for bug-gnu-emacs@gnu.org; Fri, 24 Feb 2012 13:42:57 -0500 Original-Received: from mail-pw0-f41.google.com ([209.85.160.41]:60225) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S106a-0003Dx-JT for bug-gnu-emacs@gnu.org; Fri, 24 Feb 2012 13:42:56 -0500 Original-Received: by pbcwz17 with SMTP id wz17so3099561pbc.0 for ; Fri, 24 Feb 2012 10:42:55 -0800 (PST) Received-SPF: pass (google.com: domain of lekktu@gmail.com designates 10.68.135.34 as permitted sender) client-ip=10.68.135.34; Authentication-Results: mr.google.com; spf=pass (google.com: domain of lekktu@gmail.com designates 10.68.135.34 as permitted sender) smtp.mail=lekktu@gmail.com; dkim=pass header.i=lekktu@gmail.com Original-Received: from mr.google.com ([10.68.135.34]) by 10.68.135.34 with SMTP id pp2mr10187818pbb.106.1330108975278 (num_hops = 1); Fri, 24 Feb 2012 10:42:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type :content-transfer-encoding; bh=hs2CVJ4QAs1J6IuRm4BpT0UJoMP3PAXmYnvdr3ewZ3c=; b=u8N7GuhukgaAbzSGMYVzTfcHL6vGsg7XFT3gvkDCwkccA3Tqoo8R35+GBHKxTe9CXQ dWsj5GopxUtUUc1fkA+M5TFqJbCPFJuNnsdwmu9b4QTtnwmE7CTyC5+z2t5HQ+2zE+0G NyliMLQngdpWkQYDmUbVjJqcouv0k9wFitUoQ= Original-Received: by 10.68.135.34 with SMTP id pp2mr8411086pbb.106.1330108975238; Fri, 24 Feb 2012 10:42:55 -0800 (PST) Original-Received: by 10.142.241.5 with HTTP; Fri, 24 Feb 2012 10:42:15 -0800 (PST) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:57186 Archived-At: Package: emacs Severity: minor emacs -Q C-x 2 C-x b test M-: (setq window-size-fixed 'height) ;; in buffer "test" M-x bs-show =3D> Window # too small for spli= tting ;; ok, let's kill that window C-x 0 ;; now the only window shows "*scrach*" M-x bs-show =3D> we're back to the old config and the "too small" e= rror. 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? =C2=A0 =C2=A0 Juanma =3D=3D=3D 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)))))