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

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

3 problems with executable-command-find-unix-p


From: Markus Rost
Subject: 3 problems with executable-command-find-unix-p
Date: Mon, 02 Feb 2004 17:04:59 +0100

Symptoms:

There are still 3 problems with executable-command-find-unix-p which
make say `grep-find' unusable.

First, the unix/posix typo (see patch below).

Second, the function executable-command-find-posix-p tries to test the
find program, and chooses as directory for this (car load-path).
However if that directory is not existent, one gets an error (on
calling say `grep-find'):

executable-command-find-posix-p: Opening directory: no such file or
directory, /var/tmp/local/share/emacs/21.3.50/site-lisp

The patch below uses `data-directory' for the test.  I don't know if
this is a perfect choice.

Third, one still gets an error:

executable-command-find-posix-p: Symbol's function definition is void: find-if

The patch below fixes this with (require 'cl).  However, it is
probably not good to load 'cl when loading executable.el.  Using
(eval-when-compile (require 'cl)) does not work, since `find-if' is a
function, not a macro.

In GNU Emacs 21.3.50.1 (i686-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2004-02-02 on yui26
configured using `configure '--prefix=/var/tmp/local''



===Buffer *vc-diff*=========================================
*** executable.el.~1.30.~       Sun Feb  1 17:27:00 2004
--- executable.el       Mon Feb  2 16:50:03 2004
***************
*** 52,57 ****
--- 52,59 ----
  
  ;;; Code:
  
+ (require 'cl)
+ 
  (defgroup executable nil
    "Base functionality for executable interpreter scripts"
    :group 'processes)
***************
*** 145,151 ****
    "Check if PROGRAM handles arguments Posix-style.
  If PROGRAM is non-nil, use that instead of \"find\"."
    ;;  Pick file to search from location we know
!   (let* ((dir   (car load-path))
           (file  (find-if
                   (lambda (x)
                     ;; Filter directories . and ..
--- 147,153 ----
    "Check if PROGRAM handles arguments Posix-style.
  If PROGRAM is non-nil, use that instead of \"find\"."
    ;;  Pick file to search from location we know
!   (let* ((dir data-directory)
           (file  (find-if
                   (lambda (x)
                     ;; Filter directories . and ..
============================================================

===Buffer *vc-diff*=========================================
*** grep.el.~1.5.~      Thu Jan 29 18:54:36 2004
--- grep.el     Mon Feb  2 16:46:11 2004
***************
*** 318,324 ****
              'gnu)))
    (unless grep-find-command
      (setq grep-find-command
!           (cond ((not (executable-command-find-unix-p "find"))
                 (message
                  (concat "compile.el: Unix type find(1) not found. "
                          "Please set `grep-find-command'."))
--- 318,324 ----
              'gnu)))
    (unless grep-find-command
      (setq grep-find-command
!           (cond ((not (executable-command-find-posix-p "find"))
                 (message
                  (concat "compile.el: Unix type find(1) not found. "
                          "Please set `grep-find-command'."))
============================================================




reply via email to

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