guix-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] gnu: guix: Set 'guix-dot-program' emacs variable.


From: Alex Kost
Subject: Re: [PATCH] gnu: guix: Set 'guix-dot-program' emacs variable.
Date: Mon, 19 Oct 2015 17:49:10 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Ludovic Courtès (2015-10-18 19:50 +0300) wrote:

> Alex Kost <address@hidden> skribis:
>
>> Ludovic Courtès (2015-10-17 16:34 +0300) wrote:
>
> [...]
>
>>> The docstring should mention that it can be the empty string.
>>> Alternately, ‘configure’ could set DOT_USER_PROGRAM to “dot” when it’s
>>> not found, which I think is ever preferable.  WDYT?
>>
>> IMO an empty string is preferable (explained below), so I would like to
>> leave it like this (with an improved docstring as you pointed), if you
>> don't mind.
>>
>>>> +(defcustom guix-dot-program
>>>> +  (if (string= "" guix-config-dot-program)
>>>> +      (executable-find "dot")
>>>> +    guix-config-dot-program)
>>>
>>> Thus here we’d be checking whether ‘guix-config-dot-program’ is an
>>> absolute file name.
>>
>> I think (executable-find "dot") is more reliable than just "dot" which
>> may not exist.
>
> Agreed!  I was just saying that an empty string is odd, and that setting
> it to ‘dot’ would be aesthetically more pleasing.

Not for me, but OK.

> So the only different is that the above would become:
>
>   (defcustom guix-dot-program
>     (if (absolute-file-name-p guix-config-dot-program)
>          guix-config-dot-program
>       (executable-find "dot")))
>
> Does it make sense?

Yes, now I see what you mean.  I still prefer an empty string, but I
don't mind the variant you suggest.  The updated patch is attached,
thanks!

Attachment: 0001-build-Set-DOT_USER_PROGRAM-for-Emacs-interface.patch
Description: Text Data


reply via email to

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