GNU bug report logs - #34771
27.0.50; object is a window sometimes although it should be a buffer in conditional display spec

Previous Next

Package: emacs;

Reported by: Tassilo Horn <tsdh <at> gnu.org>

Date: Wed, 6 Mar 2019 17:43:01 UTC

Severity: normal

Found in version 27.0.50

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: Eli Zaretskii <eliz <at> gnu.org>
To: Tassilo Horn <tsdh <at> gnu.org>
Cc: 34771 <at> debbugs.gnu.org
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 <at> 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.




This bug report was last modified 6 years and 81 days ago.

Previous Next


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