[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: "Why is emacs so square?"
From: |
Clément Pit-Claudel |
Subject: |
Re: "Why is emacs so square?" |
Date: |
Fri, 17 Apr 2020 16:57:41 -0400 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 |
On 17/04/2020 16.14, Stefan Monnier wrote:
>> (with-current-buffer (get-buffer-create "button")
>> (insert (propertize "[" 'display '(when (display-graphic-p
>> (selected-frame)) . "")))
>> (insert (propertize "button" 'face 'my-button))
>> (insert (propertize "]" 'display '(when (display-graphic-p
>> (selected-frame)) . ""))))
>
> My guess is that the (selected-frame) at the time the code is run might
> not be the one you think. Maybe we should change/fix that (we had the
> same problem when computing the mode/header lines).
Doesn't look like it, from this test:
(with-current-buffer (get-buffer-create "button")
(insert (propertize "[" 'display '(when (and (message "[%f] On frame %S: %S"
(float-time)
(selected-frame)
(display-graphic-p
(selected-frame)))
(display-graphic-p
(selected-frame))) . "graphic")))
(insert (propertize "button" 'face 'my-button))
(insert (propertize "]" 'display '(when (display-graphic-p (selected-frame))
. ""))))
Clicking in the graphical frame reevaluates in both, and the terminal one does
see nil. Clicking in the terminal frame reevaluates only there. In both cases
the display is updated in all windows (on all frames).
- Re: "Why is emacs so square?", (continued)
- Re: "Why is emacs so square?", Eli Zaretskii, 2020/04/17
- Re: "Why is emacs so square?", Clément Pit-Claudel, 2020/04/17
- Re: "Why is emacs so square?", Eli Zaretskii, 2020/04/17
- Re: "Why is emacs so square?", Clément Pit-Claudel, 2020/04/17
- Re: "Why is emacs so square?", Eli Zaretskii, 2020/04/17
- Re: "Why is emacs so square?", Clément Pit-Claudel, 2020/04/17
- Re: "Why is emacs so square?", Eli Zaretskii, 2020/04/17
- Re: "Why is emacs so square?", Eli Zaretskii, 2020/04/17
- Re: "Why is emacs so square?", Clément Pit-Claudel, 2020/04/17
- Re: "Why is emacs so square?", Stefan Monnier, 2020/04/17
- Re: "Why is emacs so square?",
Clément Pit-Claudel <=
- Re: "Why is emacs so square?", Andreas Schwab, 2020/04/15
Re: "Why is emacs so square?", Emanuel Berg, 2020/04/15
Re: "Why is emacs so square?", Christopher Lemmer Webber, 2020/04/15
Re: "Why is emacs so square?", ndame, 2020/04/15
Re: "Why is emacs so square?", ndame, 2020/04/16
Re: "Why is emacs so square?", ndame, 2020/04/24