GNU bug report logs -
#57781
missing wallpaper command
Previous Next
Reported by: Felix <felix.dick <at> web.de>
Date: Tue, 13 Sep 2022 20:31:01 UTC
Severity: normal
Fixed in version 29.1
Done: Stefan Kangas <stefankangas <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Thierry Volpiatto <thievol <at> posteo.net> writes:
> The xconf-query command is detected and working fine, thanks.
> Perhaps you can store last wallpapers used and use it as default for the
> read-file-name?
> Something like this:
Hmm, maybe. But shouldn't the default rather be something like
`ffap-file-at-point'? Or maybe even
(cons (ffap-file-at-point) wallpaper-last-used)
?
> diff --git a/lisp/image/wallpaper.el b/lisp/image/wallpaper.el
> index 4572a8c0628..8426fc4b126 100644
> --- a/lisp/image/wallpaper.el
> +++ b/lisp/image/wallpaper.el
> @@ -227,6 +227,8 @@ See also `wallpaper-default-height'.")
> This is only used when it can't be detected automatically.
> See also `wallpaper-default-width'.")
>
> +(defvar wallpaper-last-used nil)
> +
> (defun wallpaper--get-height-or-width (desc fun default)
> (if (display-graphic-p)
> (funcall fun)
> @@ -246,7 +248,10 @@ options `wallpaper-command' and `wallpaper-command-args'.
> On MS-Windows and Haiku systems, no external command is needed,
> so the value of `wallpaper-commands' is ignored."
> (interactive (list (read-file-name "Set desktop background to: "
> - default-directory nil t nil
> + (and wallpaper-last-used
> + (file-name-directory
> + (car (last wallpaper-last-used))))
> + wallpaper-last-used t nil
> (lambda (fn)
> (or (file-directory-p fn)
> (string-match (image-file-name-regexp) fn))))))
> @@ -257,6 +262,7 @@ so the value of `wallpaper-commands' is ignored."
> (unless (file-readable-p file)
> (error "File is not readable: %s" file))
> (wallpaper-debug "Using image %S:" file)
> + (push file wallpaper-last-used)
> (cond ((eq system-type 'windows-nt)
> (w32-set-wallpaper file))
> ((featurep 'haiku)
This bug report was last modified 2 years and 283 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.