From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Piet van Oostrum Newsgroups: gmane.emacs.devel Subject: Re: Emacs 21.3.50 grep.el/executable.el problems Date: 15 Feb 2004 13:59:31 +0100 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: <6B9B1FA0-5DEE-11D8-B4C8-000A958866C4@qwest.net> <200402141504.i1EF4gGP000494@beta.mvs.co.il> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1076850300 12030 80.91.224.253 (15 Feb 2004 13:05:00 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 15 Feb 2004 13:05:00 +0000 (UTC) Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Sun Feb 15 14:04:47 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AsLx1-0002vf-00 for ; Sun, 15 Feb 2004 14:04:47 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1AsLx1-0007rB-00 for ; Sun, 15 Feb 2004 14:04:47 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AsLva-0003GH-B9 for emacs-devel@quimby.gnus.org; Sun, 15 Feb 2004 08:03:18 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AsLt0-0002ep-Qe for emacs-devel@gnu.org; Sun, 15 Feb 2004 08:00:38 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AsLs1-0002EI-H3 for emacs-devel@gnu.org; Sun, 15 Feb 2004 08:00:08 -0500 Original-Received: from [213.116.160.237] (helo=ordesa.cs.uu.nl) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AsLrl-000235-T9 for emacs-devel@gnu.org; Sun, 15 Feb 2004 07:59:22 -0500 Original-Received: from ordesa (localhost [127.0.0.1]) by ordesa.cs.uu.nl (Postfix) with ESMTP id 44005E998E for ; Sun, 15 Feb 2004 13:59:34 +0100 (CET) X-Mailer: emacs 21.3.50.1 (via feedmail 8 I) Original-To: emacs-devel@gnu.org In-Reply-To: <200402151143.i1FBh9pU011407@beta.mvs.co.il> Original-Lines: 32 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:19950 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:19950 >>>>> "Ehud Karni" (EK) wrote: EK> On Sat, 14 Feb 2004 17:04:42 +0200, Ehud Karni wrote: >> >> 2. progmodes/executable.el calls `find-if' which is defined in >> cl-seq.el and requires the cl.el . EK> Actually `executable-command-find-posix-p' does not work well if EK> (car load-path) is a symbolic link name (and because of this it EK> failed for me on both GNU\Linux and Cygwin - both posix systems). EK> The following patch will fix this. EK> ! (let* ((dir (car load-path)) EK> ! files file) EK> ! (setq dir (or (file-symlink-p dir) dir)) EK> ! (setq files (directory-files dir)) EK> ! (while files EK> ! (setq file (car files)) EK> ! (if (string-match "^\\.\\.?$" file) EK> ! (setq files (cdr files)) EK> ! (setq files nil))) Actually I think it can be done easier by replacing the find-if with a directory-files call with a match regexp: Something like (directory-files dir nil "^\\([^.]\\|\.[^.]\\|\.\..\\)") -- Piet van Oostrum URL: http://www.cs.uu.nl/~piet [PGP] Private email: P.van.Oostrum@hccnet.nl