GNU bug report logs - #24193
25.1; `window-min-size' fails for horizontal width when margins >= body text

Previous Next

Package: emacs;

Reported by: Paul Rankin <hello <at> paulwrankin.com>

Date: Tue, 9 Aug 2016 09:15:01 UTC

Severity: normal

Found in version 25.1

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: martin rudalics <rudalics <at> gmx.at>
To: Paul Rankin <hello <at> paulwrankin.com>
Cc: 24193 <at> debbugs.gnu.org
Subject: bug#24193: 25.1; `window-min-size' fails for horizontal width when margins >= body text
Date: Tue, 09 Aug 2016 18:08:23 +0200
> https://gfycat.com/ZestyBeautifulEmeraldtreeskink
>
> How about we maybe focus instead on solving this?

I supoose you have designed a mode to auto-adjust margins so that text
appears centered in a window.  You can add the following function

(defun split-window-right-ignore (&optional size)
  (if (car size) size (list (/ (window-total-width) 2))))

and use

(add-function
 :filter-args (symbol-function 'split-window-right) #'split-window-right-ignore)

when activating your mode and

(remove-function
 (symbol-function 'split-window-right) #'split-window-right-ignore)

when deactivating it.

martin




This bug report was last modified 4 years and 317 days ago.

Previous Next


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