bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#33984: 26.1; fortune-compile does not search exec-path for strfile p


From: Lars Ingebrigtsen
Subject: bug#33984: 26.1; fortune-compile does not search exec-path for strfile program
Date: Wed, 10 Jul 2019 00:32:28 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

"Benjamin Ragheb" <ben@benzado.com> writes:

> I have attached a patch which corrects this problem by using
> executable-find before calling shell-command. If strfile cannot be
> found, it signals an error.

Makes sense.

> I tried to keep the patch as small as possible, and resisted the
> temptation to replace the call to shell-command with
> call-process. Doing so would have broken compatibility with the
> fortune-quiet-strfile-options variable, which people may have
> customized.

Yeah, that would be better, but would be incompatible as you say.

> -                     (concat fortune-file fortune-database-extension)))))
> +                     (concat fortune-file fortune-database-extension))))
> +         (strfile (or (executable-find fortune-strfile)
> +                      (error "Can't find strfile program %s" 
> fortune-strfile)))
>    (cond ((file-exists-p fortune-file)
>           (cond ((file-newer-than-file-p fortune-file fortune-dat)
>                  (message "Compiling new fortune database %s" fortune-dat)
>                  (shell-command
> -                 (concat fortune-strfile fortune-strfile-options
> +                 (concat strfile fortune-strfile-options

I've now applied this patch to the Emacs trunk.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





reply via email to

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