emacs-devel
[Top][All Lists]
Advanced

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

Re: master fe7c015b20: Support XFCE in wallpaper.el


From: Thierry Volpiatto
Subject: Re: master fe7c015b20: Support XFCE in wallpaper.el
Date: Tue, 20 Sep 2022 06:16:34 +0000

Stefan Monnier <monnier@iro.umontreal.ca> writes:

> Tomas Hlavaty [2022-09-19 22:16:07] wrote:
>> On Mon 19 Sep 2022 at 18:05, Thierry Volpiatto <thievol@posteo.net> wrote:
>>>     (let* ((screen  (shell-command-to-string "echo -n $DISPLAY"))
>> would (getenv "DISPLAY") be better?
>
> BTW, the two will *usually* return the same result, except in the case
> where the selected frame is a tty frame created via an `emacsclient`, in
> which case the `DISPLAY` passed to the subprocess depends on the
> `display` frame parameter.
>
> So better use (getenv "DISPLAY" (selected-frame)) if you want to
> preserve the `shell-command-to-string` behavior.

Yes, sure getenv is better, however here:

From emacs (display-graphic-p)==t:

(getenv "DISPLAY" (selected-frame))
=> nil
(getenv "DISPLAY")
=> ":0.0"

From emacs -nw both return ":0.0".

-- 
Thierry

Attachment: signature.asc
Description: PGP signature


reply via email to

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