bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#34771: 27.0.50; object is a window sometimes although it should be a


From: Eli Zaretskii
Subject: bug#34771: 27.0.50; object is a window sometimes although it should be a buffer in conditional display spec
Date: Wed, 06 Mar 2019 21:08:54 +0200

> From: Tassilo Horn <tsdh@gnu.org>
> Date: Wed, 06 Mar 2019 18:42:19 +0100
> 
> So in a conditional display spec, object should always be a buffer.

(It could also be a string, although not in your case.)

> However, that doesn't seem to be the reality.  Sometimes, it is also a
> window.
> 
> Here's a recipe for the current master:
> 
> $ emacs -q
> 
> In *scratch* insert and evaluate:
> 
> (insert (propertize "foobar" 'display
>                   `(when (get-buffer-window object)
>                      . ,(format "%s" (random)))) "\n")
> 
> Now move point over the displayed random number, hit and hold C-l, or
> do whatever triggers redisplay.
> 
> Now I have this in *Messages*:
> 
> Error during redisplay: (eval (get-buffer-window object)) signaled 
> (wrong-type-argument stringp #<window 3 on *scratch*>) [33 times]

The documentation is correct, but the code had a bug.  I hope I fixed
it now.

Thanks.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]