From mboxrd@z Thu Jan 1 00:00:00 1970 From: Martyn Jago Subject: Re: org-program-exists vs executable-find Date: Fri, 20 Apr 2012 21:42:43 +0100 Message-ID: References: <80mx69us0v.fsf@somewhere.org> <874nshjhnq.fsf@altern.org> <80aa29umso.fsf@somewhere.org> <87mx66zlz1.fsf@altern.org> <80ehrinobo.fsf@somewhere.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:43752) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SLKfa-0004nA-Uq for emacs-orgmode@gnu.org; Fri, 20 Apr 2012 16:43:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SLKfZ-000185-3s for emacs-orgmode@gnu.org; Fri, 20 Apr 2012 16:43:06 -0400 Received: from plane.gmane.org ([80.91.229.3]:53556) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SLKfY-00016S-TX for emacs-orgmode@gnu.org; Fri, 20 Apr 2012 16:43:05 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1SLKfS-0001nL-C2 for emacs-orgmode@gnu.org; Fri, 20 Apr 2012 22:42:58 +0200 Received: from 88-96-171-142.dsl.zen.co.uk ([88.96.171.142]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 20 Apr 2012 22:42:58 +0200 Received: from martyn.jago by 88-96-171-142.dsl.zen.co.uk with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 20 Apr 2012 22:42:58 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Hi "Sebastien Vauban" writes: > Hi Bastien, > > Bastien wrote: >> "Sebastien Vauban" writes: >> >>>> The name `org-program-exists' is actually misleading, it should be >>>> `org-executable-call' instead, while still checking if the executable >>>> exists before calling it. >>> >>> Nope, the name is not misleading. The documentation string is false -- what >>> I hadn't noticed, btw. >>> >>> That function just checks if the executable can be found; it does _not_ >>> call it afterward. >> >> You're right, I just fixed the docstring. >> >>> On Linux and Mac OS, it just calls "which + ", no more... On >>> Windows, it simply fails immediately (even if the program could be found). >> >> If there is an equivalent of `which' on windows let me know, > > Not that I know, reason why I (must) have Cygwin... > >> we can generalize this function. > > Why not replacing it simply by `executable-find': I don't see what it adds to > it? I would not say so if it was some upper abstraction, but I do feel > they're simply the same. > > If not, the opposite should be done: replacing the 10 calls to > `executable-find' by calls to `org-program-exists'... > > Best regards, > Seb IIRC on Mac OS `which' is not guaranteed to work anyway, since by default the `which database' is not instantiated or maintained. I had to kick that off manually here to have use of `which'. Best, Martyn