From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [PATCH] gnu: guix: Set 'guix-dot-program' emacs variable. Date: Sun, 18 Oct 2015 18:50:26 +0200 Message-ID: <871tcsi0j1.fsf@gnu.org> References: <877fmnkj61.fsf@gmail.com> <87si5buswd.fsf@gnu.org> <87twpqy8qp.fsf@gmail.com> <87wpulk49m.fsf@gnu.org> <87oafxsdkm.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39888) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZnrAG-0004MW-Bj for guix-devel@gnu.org; Sun, 18 Oct 2015 12:50:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZnrAD-00062z-6W for guix-devel@gnu.org; Sun, 18 Oct 2015 12:50:32 -0400 In-Reply-To: <87oafxsdkm.fsf@gmail.com> (Alex Kost's message of "Sat, 17 Oct 2015 18:46:17 +0300") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Alex Kost Cc: guix-devel@gnu.org Alex Kost skribis: > Ludovic Court=C3=A8s (2015-10-17 16:34 +0300) wrote: [...] >> The docstring should mention that it can be the empty string. >> Alternately, =E2=80=98configure=E2=80=99 could set DOT_USER_PROGRAM to = =E2=80=9Cdot=E2=80=9D when it=E2=80=99s >> 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=3D "" guix-config-dot-program) >>> + (executable-find "dot") >>> + guix-config-dot-program) >> >> Thus here we=E2=80=99d be checking whether =E2=80=98guix-config-dot-prog= ram=E2=80=99 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 =E2=80=98dot=E2=80=99 would be aesthetically more pleasing. 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? Ludo=E2=80=99.