GNU bug report logs - #44080
27.1; Display behavior of overlays `after-string` in resizable minibuffer frames

Previous Next

Package: emacs;

Reported by: Clemens <clemens.radermacher <at> posteo.de>

Date: Mon, 19 Oct 2020 18:40:02 UTC

Severity: normal

Found in version 27.1

Done: Clemens <clemens.radermacher <at> posteo.de>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Clemens <clemens.radermacher <at> posteo.de>
To: martin rudalics <rudalics <at> gmx.at>, Eli Zaretskii <eliz <at> gnu.org>
Cc: 44080 <at> debbugs.gnu.org
Subject: bug#44080: 27.1; Display behavior of overlays `after-string` in resizable minibuffer frames
Date: Wed, 21 Oct 2020 11:11:34 +0200
On 20.10.20 19:02, Clemens wrote:
> For now I will recommend users to 
> use the following workaround:
> 
> (define-advice fit-frame-to-buffer (:around (f &rest args) 
> dont-skip-ws-for-mini-frame)
>    (cl-letf (((symbol-function #'window-text-pixel-size)
>               (lambda (win from to &rest args)
>                 (apply #'window-text-pixel-size
>                        (append (list win from (if (and 
> (window-minibuffer-p win) (eq t to)) nil to) args))))))
>      (apply f args)))
> 

The version above invokes infinite recursion so I would rather recommend
something like the following for affected users (to avoid spamming this 
bug report with other versions here is the link to the corresponding 
issue on selectrums side: https://github.com/raxod502/selectrum/issues/169

(define-advice fit-frame-to-buffer (:around (f &rest args) 
dont-skip-ws-for-mini-frame)
  (cl-letf* ((orig (symbol-function #'window-text-pixel-size))
            ((symbol-function #'window-text-pixel-size)
             (lambda (win from to &rest args)
               (apply orig
                      (append (list win from
                                    (if (and (window-minibuffer-p win)
                                             (frame-root-window-p win)
                                             (eq t to))
                                        nil
                                      to)
                                    args))))))
    (apply f args)))




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

Previous Next


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