From: Eli Zaretskii <eliz@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: Troubleshooting window-toggle-side-windows command with olivetti
Date: Sun, 24 Sep 2023 15:58:31 +0300 [thread overview]
Message-ID: <83o7hr3eyw.fsf@gnu.org> (raw)
In-Reply-To: <89a804939082c1c6a1e8aa6f5d839144@purelymail.com> (help-gnu-emacs@gnu.org)
> Date: Sun, 24 Sep 2023 16:53:44 +1000
> From: "Paul W. Rankin" via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org>
>
> 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 . #<window 6>)) (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 7>) (window-side . left) (window-slot .
> 0)) (buffer #<buffer side> (selected) (hscroll . 0) (fringes 0 0 nil
> nil) (margins nil) (scroll-bars nil 0 t nil 0 t nil) (vscroll . 0)
> (dedicated . side) (point . #<marker at 1 in side>) (start . #<marker at
> 1 in side>))) (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 . #<window 3>)) (buffer
> #<buffer *scratch*> (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 . #<marker at 1 in *scratch*>) (start . #<marker at 1
> in *scratch*>)))) #<window 11 on *scratch*> 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.
Crystal ball says this has something to do with the fact that
olivetti.el does
(set-window-parameter window 'split-window 'olivetti-split-window)
and window-state-put calls split-window.
prev parent reply other threads:[~2023-09-24 12:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-24 6:53 Troubleshooting window-toggle-side-windows command with olivetti Paul W. Rankin via Users list for the GNU Emacs text editor
2023-09-24 12:58 ` Eli Zaretskii [this message]
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=83o7hr3eyw.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=help-gnu-emacs@gnu.org \
/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.
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).