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: Stefan Kangas
Subject: Re: master fe7c015b20: Support XFCE in wallpaper.el
Date: Tue, 27 Sep 2022 09:57:50 -0400

Thierry Volpiatto <thievol@posteo.net> writes:

> 1) The function wallpaper--format-arg is evaluating the format-specs each
> time it is called and when display-graphic-p returns nil, user is
> prompted for height and width at each call.
>
> Here the xfce args:
>
> ("-c" "xfce4-desktop" "-p" 
> "/backdrop/screen%S/monitor%M/workspace%W/last-image" "-s" "%f")
>
> We are prompted for height and width for each of these args.

The problem here is that all arguments to `format-spec' are evaluated
unconditionally.

Could we change `format-spec' to accept functions in the substitutions,
that are then only called when actually needed?

For example, from its docstring:

  (format-spec "su - %u %l"
               `((?u . ,(user-login-name))
                 (?l . "ls")))

Could then instead be:

  (format-spec "su - %u %l"
               `((?u . #'user-login-name)
                 (?l . "ls")))

Perhaps we should hide that behind a new optional argument though.



reply via email to

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