From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Paul W. Rankin" via Users list for the GNU Emacs text editor Newsgroups: gmane.emacs.help Subject: Troubleshooting window-toggle-side-windows command with olivetti Date: Sun, 24 Sep 2023 16:53:44 +1000 Message-ID: <89a804939082c1c6a1e8aa6f5d839144@purelymail.com> Reply-To: "Paul W. Rankin" Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11076"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Purely Mail via Roundcube/1.6.3 To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sun Sep 24 08:54:42 2023 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qkJ0r-0002f4-HB for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 24 Sep 2023 08:54:41 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qkJ0C-0003LB-9H; Sun, 24 Sep 2023 02:54:00 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qkJ0A-0003Ki-BC for help-gnu-emacs@gnu.org; Sun, 24 Sep 2023 02:53:58 -0400 Original-Received: from sendmail.purelymail.com ([34.202.193.197]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qkJ08-0007hm-JC for help-gnu-emacs@gnu.org; Sun, 24 Sep 2023 02:53:58 -0400 DKIM-Signature: a=rsa-sha256; b=cTeB4VdkeXzvufmod8fq4SXzc77s9UgiduQTKdefYUj52z7zAWzGk0rFvh7tL69iaMQ4kfAFQmSO24RF3MpG0QtEHyvxFb7vfd0y4DKkfsaT2aHL9j/Jy4jvs1rKRkpDsxUVf2+ISXFpCwsbOLhnfF0bepprzYKEa7LcYgmCYdZgjhhEZ4SHJWUY3trHIA5jK3IyRv0KaBtCKmZD+cCeAGSa2oY4hbGQ+o3d7RdhQkCY+CtV3irqBeZLGJlODjwW1N/sBNt/9iZbnQMdhSofY7eHLuv5pZZE3QXTExz8FLNiHE/qWfuU0GAgMoZo665VsIHxXWby6xOxeqmXaj/lTg==; s=purelymail2; d=paulwrankin.com; v=1; bh=hZ8pcbBtryvtYhcaNSfeqMfvES5PrCd2Fa9YPvABFTI=; h=Received:From:To:Subject; DKIM-Signature: a=rsa-sha256; b=rgEqQdGmqeB9Zh5MPcQGjyCjv1dPhb/OQsAykeGSwl9UXKPTZqiGDmmPqoNhDrjqTQsdPJFnQ1koFwXGJTKwTffBkQftxsGzb4wmSUaKBBh5b2PTDUb8X5dbo6qe0mjPgtmbZXymsH4KYcSrB5WCvGrvhYHcXcsY8pV6EADUABqQIG2cQlZLgAKakhAkF4Gs2B5aTgnIjj7ZdGkBTP865GcdQhh0DNOfRN6X75QP6HOqIWTNjVRj044gHATvv9BO9Y7DEGEYSgBXY/TPQ0OFZebjs9Mqgnb99M2qhLls3q8JvF7tEK9QRA3wkiEX4BWxRY9z17hcN4HZOgMYh/+Aig==; s=purelymail2; d=purelymail.com; v=1; bh=hZ8pcbBtryvtYhcaNSfeqMfvES5PrCd2Fa9YPvABFTI=; h=Feedback-ID:Received:From:To:Subject; Feedback-ID: 791:353:null:purelymail X-Pm-Original-To: help-gnu-emacs@gnu.org Original-Received: by smtp.purelymail.com (Purelymail SMTP) with ESMTPA id -1798401305 for ; Sun, 24 Sep 2023 06:53:44 +0000 (UTC) X-Sender: hello@paulwrankin.com Received-SPF: pass client-ip=34.202.193.197; envelope-from=hello@paulwrankin.com; helo=sendmail.purelymail.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:145158 Archived-At: A package I maintain is causing an error with the command `window-toggle-side-windows' and I'm at a loss for answers. The package is olivetti and it automatically balances the window margins to create a word processor style UI. Here is the source (509 L): https://github.com/rnkn/olivetti/blob/master/olivetti.el Sorry I really hate to ask about an issue that requires loading third-party code but I'm kinda at a dead end... To reproduce: 1. emacs -Q 2. M-x load-file RET path/to/olivetti.el 3. M-x olivetti-mode 4. M-: (display-buffer-in-side-window (get-buffer-create "side") '((side . left))) 5. M-x window-toggle-side-windows [2 times] Results: Error backtrace: Debugger entered--Lisp error: (wrong-type-argument window-live-p nil) select-window(nil) window--state-put-2(t 855) window-state-put((((min-height . 4) (min-width . 70) (min-height-ignore . 3) (min-width-ignore . 62) (min-height-safe . 1) (min-width-safe . 4) (min-pixel-height . 60) (min-pixel-width . 560) (min-pixel-height-ignore . 45) (min-pixel-width-ignore . 496) (min-pixel-height-safe . 15) (min-pixel-width-safe . 32)) hc (pixel-width . 1408) (pixel-height . 855) (total-width . 176) (total-height . 57) (normal-height . 1.0) (normal-width . 1.0) (combination-limit . t) (parameters (clone-of . #)) (leaf (pixel-width . 352) (pixel-height . 855) (total-width . 44) (total-height . 57) (normal-height . 1.0) (normal-width . 0.25) (parameters (clone-of . #) (window-side . left) (window-slot . 0)) (buffer # (selected) (hscroll . 0) (fringes 0 0 nil nil) (margins nil) (scroll-bars nil 0 t nil 0 t nil) (vscroll . 0) (dedicated . side) (point . #) (start . #))) (leaf (last . t) (pixel-width . 1056) (pixel-height . 855) (total-width . 132) (total-height . 57) (normal-height . 1.0) (normal-width . 0.75) (parameters (clone-of . #)) (buffer # (selected . t) (hscroll . 0) (fringes 168 168 t nil) (margins 8 . 8) (scroll-bars nil 0 t nil 0 t nil) (vscroll . 0) (dedicated) (point . #) (start . #)))) # t) window-toggle-side-windows() funcall-interactively(window-toggle-side-windows) call-interactively(window-toggle-side-windows record nil) command-execute(window-toggle-side-windows record) execute-extended-command(nil "window-toggle-side-windows" nil) funcall-interactively(execute-extended-command nil "window-toggle-side-windows" nil) call-interactively(execute-extended-command nil nil) command-execute(execute-extended-command) I've followed the debugger to `window--state-put-2' where it retrieves `window-state-put-list' and seems to want a live window as the car of that list, however when olivetti is enabled it is getting nil. I don't know why. Any help would be much appreciated. I'm sure it's something dumb like I don't have the right hooks enabled... Thanks, -- Paul W. Rankin https://www.paulwrankin.com