unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: Emacs 21.3.50 on cygwin bootstrap failed. (Jason Rumney)
@ 2004-02-13  6:32 Steven Wu
  2004-02-14 15:04 ` Emacs 21.3.50 grep.el/executable.el problems Ehud Karni
  0 siblings, 1 reply; 18+ messages in thread
From: Steven Wu @ 2004-02-13  6:32 UTC (permalink / raw)


I was compiling the cygwin emacs, an X based application, built using 
gcc and libs and dlls provided by cygwin.

steve

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Emacs 21.3.50 grep.el/executable.el problems
  2004-02-13  6:32 Emacs 21.3.50 on cygwin bootstrap failed. (Jason Rumney) Steven Wu
@ 2004-02-14 15:04 ` Ehud Karni
  2004-02-15 11:43   ` Ehud Karni
  2004-02-15 13:20   ` Thien-Thi Nguyen
  0 siblings, 2 replies; 18+ messages in thread
From: Ehud Karni @ 2004-02-14 15:04 UTC (permalink / raw)
  Cc: Jari Aalto

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I just loaded Emacs 21.3.50 from CVS and built it.

I found the following problems:

1. progmodes/gerp.el calls `executable-command-find-unix-p' instead
   of `executable-command-find-posix-p'.

2. progmodes/executable.el calls `find-if' which is defined in
   cl-seq.el and requires the cl.el .

Below are my suggested changes.

Ehud.



cd /lnx1/gnu/src/emacs/lisp/progmodes/
diff -c /lnx1/gnu/src/emacs/lisp/progmodes/grep.el.\~1.6.\~ /lnx1/gnu/src/emacs/lisp/progmodes/grep.el
*** /lnx1/gnu/src/emacs/lisp/progmodes/grep.el.~1.6.~	Sat Feb 14 15:02:38 2004
- --- /lnx1/gnu/src/emacs/lisp/progmodes/grep.el	Sat Feb 14 15:37:27 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'."))

Diff finished at Sat Feb 14 16:27:32


cd /lnx1/gnu/src/emacs/lisp/progmodes/
diff -c /lnx1/gnu/src/emacs/lisp/progmodes/executable.el.\~1.30.\~ /lnx1/gnu/src/emacs/lisp/progmodes/executable.el
*** /lnx1/gnu/src/emacs/lisp/progmodes/executable.el.~1.30.~	Wed Feb  4 14:33:38 2004
- --- /lnx1/gnu/src/emacs/lisp/progmodes/executable.el	Sat Feb 14 16:17:15 2004
***************
*** 146,156 ****
  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 ..
!                    (not (string-match "^\\.\\.?$" x)))
!                  (directory-files dir))))
      (with-temp-buffer
        (call-process (or program "find")
                      nil
- --- 146,158 ----
  If PROGRAM is non-nil, use that instead of \"find\"."
    ;;  Pick file to search from location we know
    (let* ((dir   (car load-path))
!          (files (directory-files dir))
!          file)
!     (while files
!        (setq file (car files))
!        (if (string-match "^\\.\\.?$" file)
!            (setq files (cdr files))
!            (setq files nil)))
      (with-temp-buffer
        (call-process (or program "find")
                      nil

Diff finished at Sat Feb 14 16:25:28


- --
 Ehud Karni           Tel: +972-3-7966-561  /"\
 Mivtach - Simon      Fax: +972-3-7966-667  \ /  ASCII Ribbon Campaign
 Insurance agencies   (USA) voice mail and   X   Against   HTML   Mail
 http://www.mvs.co.il  FAX:  1-815-5509341  / \
 GnuPG: 98EA398D <http://www.keyserver.net/>    Better Safe Than Sorry
-----BEGIN PGP SIGNATURE-----
Comment: use http://www.keyserver.net/ to get my key (and others)

iD8DBQFALjkJLFvTvpjqOY0RAjIZAJ0QbNkgV7bSrOhVoGva0sKOTt8qWwCZAYMT
3OLE1dHNpFQqh1rXjXeGCpY=
=pOIJ
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Emacs 21.3.50 grep.el/executable.el problems
  2004-02-14 15:04 ` Emacs 21.3.50 grep.el/executable.el problems Ehud Karni
@ 2004-02-15 11:43   ` Ehud Karni
  2004-02-15 12:59     ` Piet van Oostrum
  2004-02-15 13:20   ` Thien-Thi Nguyen
  1 sibling, 1 reply; 18+ messages in thread
From: Ehud Karni @ 2004-02-15 11:43 UTC (permalink / raw)
  Cc: jari.aalto

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sat, 14 Feb 2004 17:04:42 +0200, Ehud Karni <ehud@unix.mvs.co.il> wrote:
>
> 2. progmodes/executable.el calls `find-if' which is defined in
>    cl-seq.el and requires the cl.el .

Actually `executable-command-find-posix-p' does not work well if
(car load-path) is a symbolic link name (and because of this it
failed for me on both GNU\Linux and Cygwin - both posix systems).


The following patch will fix this.

Ehud.


cd /lnx1/gnu/src/emacs/lisp/progmodes/
diff -c /lnx1/gnu/src/emacs/lisp/progmodes/executable.el.\~1.30.\~ /lnx1/gnu/src/emacs/lisp/progmodes/executable.el
*** /lnx1/gnu/src/emacs/lisp/progmodes/executable.el.~1.30.~	Wed Feb  4 14:33:38 2004
- --- /lnx1/gnu/src/emacs/lisp/progmodes/executable.el	Sun Feb 15 13:30:16 2004
***************
*** 146,156 ****
  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 ..
!                    (not (string-match "^\\.\\.?$" x)))
!                  (directory-files dir))))
      (with-temp-buffer
        (call-process (or program "find")
                      nil
- --- 146,159 ----
  If PROGRAM is non-nil, use that instead of \"find\"."
    ;;  Pick file to search from location we know
!   (let* ((dir (car load-path))
!          files file)
!     (setq dir (or (file-symlink-p dir) dir))
!     (setq files (directory-files dir))
!     (while files
!        (setq file (car files))
!        (if (string-match "^\\.\\.?$" file)
!            (setq files (cdr files))
!            (setq files nil)))
      (with-temp-buffer
        (call-process (or program "find")
                      nil

Diff finished at Sun Feb 15 13:31:55


- --
 Ehud Karni           Tel: +972-3-7966-561  /"\
 Mivtach - Simon      Fax: +972-3-7966-667  \ /  ASCII Ribbon Campaign
 Insurance agencies   (USA) voice mail and   X   Against   HTML   Mail
 http://www.mvs.co.il  FAX:  1-815-5509341  / \
 GnuPG: 98EA398D <http://www.keyserver.net/>    Better Safe Than Sorry
-----BEGIN PGP SIGNATURE-----
Comment: use http://www.keyserver.net/ to get my key (and others)

iD8DBQFAL1tMLFvTvpjqOY0RAht0AJ4lZJjOoIAId6hhMpZytAVpKwwo8gCfYiEM
XMCxSdqTvy+vKutl/KMMM+4=
=giEk
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Emacs 21.3.50 grep.el/executable.el problems
  2004-02-15 11:43   ` Ehud Karni
@ 2004-02-15 12:59     ` Piet van Oostrum
  0 siblings, 0 replies; 18+ messages in thread
From: Piet van Oostrum @ 2004-02-15 12:59 UTC (permalink / raw)


>>>>> "Ehud Karni" <ehud@unix.mvs.co.il> (EK) wrote:

EK> On Sat, 14 Feb 2004 17:04:42 +0200, Ehud Karni <ehud@unix.mvs.co.il> 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 <piet@cs.uu.nl>
URL: http://www.cs.uu.nl/~piet [PGP]
Private email: P.van.Oostrum@hccnet.nl

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Emacs 21.3.50 grep.el/executable.el problems
  2004-02-14 15:04 ` Emacs 21.3.50 grep.el/executable.el problems Ehud Karni
  2004-02-15 11:43   ` Ehud Karni
@ 2004-02-15 13:20   ` Thien-Thi Nguyen
  1 sibling, 0 replies; 18+ messages in thread
From: Thien-Thi Nguyen @ 2004-02-15 13:20 UTC (permalink / raw)
  Cc: Jari Aalto, emacs-devel

"Ehud Karni" <ehud@unix.mvs.co.il> writes:

   1. progmodes/gerp.el calls `executable-command-find-unix-p' instead
      of `executable-command-find-posix-p'.

fyi, progmodes/grep.el in cvs has been changed.
(this was independently reported by Dan Nicolaescu.)

thi

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Emacs 21.3.50 grep.el/executable.el problems
@ 2004-02-16 14:35 Markus Rost
  2004-02-16 15:17 ` Ehud Karni
                   ` (2 more replies)
  0 siblings, 3 replies; 18+ messages in thread
From: Markus Rost @ 2004-02-16 14:35 UTC (permalink / raw)


I got the impression that the grep/executable problems don't get
fixed, because there should be perhaps a more extensive change.
However, it seems that quite a few people spent some time to fix it,
probably because grep is used a lot.

I suggest following simple fix, at least as a temporary solution.
I'll install it, if one of the maintainers agrees.

===Buffer *vc-diff*=========================================
*** executable.el.~1.30.~	Thu Feb 12 14:48:19 2004
--- executable.el	Mon Feb 16 15:22:31 2004
***************
*** 145,156 ****
    "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 ..
!                    (not (string-match "^\\.\\.?$" x)))
!                  (directory-files dir))))
      (with-temp-buffer
        (call-process (or program "find")
                      nil
--- 145,152 ----
    "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 (car (directory-files dir nil "^[^.]"))))
      (with-temp-buffer
        (call-process (or program "find")
                      nil
============================================================

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Emacs 21.3.50 grep.el/executable.el problems
  2004-02-16 14:35 Markus Rost
@ 2004-02-16 15:17 ` Ehud Karni
  2004-02-16 16:14 ` Stefan Monnier
  2004-02-16 16:30 ` Kim F. Storm
  2 siblings, 0 replies; 18+ messages in thread
From: Ehud Karni @ 2004-02-16 15:17 UTC (permalink / raw)
  Cc: emacs-pretest-bug, emacs-devel

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Mon, 16 Feb 2004 15:35:22 +0100, Markus Rost <rost@mathematik.uni-bielefeld.de> wrote:
>
> I suggest following simple fix, at least as a temporary solution.
> I'll install it, if one of the maintainers agrees.
>
> ===Buffer *vc-diff*=========================================
> *** executable.el.~1.30.~	Thu Feb 12 14:48:19 2004
> --- executable.el	Mon Feb 16 15:22:31 2004
> ***************
> *** 145,156 ****
>     "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 ..
> !                    (not (string-match "^\\.\\.?$" x)))
> !                  (directory-files dir))))
>       (with-temp-buffer
>         (call-process (or program "find")
>                       nil
> --- 145,152 ----
>     "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)

`find' fails if dir is a symbolic link. I'll change this to:
      (let* ((dir  (or (file-symlink-p data-directory) data-directory))

> !          (file (car (directory-files dir nil "^[^.]"))))
>       (with-temp-buffer
>         (call-process (or program "find")
>                       nil
> ============================================================

Ehud.


- --
 Ehud Karni           Tel: +972-3-7966-561  /"\
 Mivtach - Simon      Fax: +972-3-7966-667  \ /  ASCII Ribbon Campaign
 Insurance agencies   (USA) voice mail and   X   Against   HTML   Mail
 http://www.mvs.co.il  FAX:  1-815-5509341  / \
 GnuPG: 98EA398D <http://www.keyserver.net/>    Better Safe Than Sorry
-----BEGIN PGP SIGNATURE-----
Comment: use http://www.keyserver.net/ to get my key (and others)

iD8DBQFAMN72LFvTvpjqOY0RAsKzAJ4qEekJL7uGQjt3HSbGLeZhDJkQeQCeJLDi
Cx/+iIjSfZ6v8QfE3vQOs7U=
=N/ig
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Emacs 21.3.50 grep.el/executable.el problems
  2004-02-16 14:35 Markus Rost
  2004-02-16 15:17 ` Ehud Karni
@ 2004-02-16 16:14 ` Stefan Monnier
  2004-02-16 19:57   ` Eli Zaretskii
  2004-02-17 17:27   ` Richard Stallman
  2004-02-16 16:30 ` Kim F. Storm
  2 siblings, 2 replies; 18+ messages in thread
From: Stefan Monnier @ 2004-02-16 16:14 UTC (permalink / raw)
  Cc: emacs-pretest-bug, emacs-devel

> I got the impression that the grep/executable problems don't get
> fixed, because there should be perhaps a more extensive change.

My opinion is that the "extensive" change would be to rip out the recent
change altogether.  What's the point of testing whether `find' is
a unix-like find or not since if it isn't we have no good alternative
anyway.  The only point I could see is to give a more meaningful error
message for those few W32 folks who end up running some unrelated find.exe.
But even then, I highly doubt it'll make any significant difference or is
worth the trouble: the problem seem to be fairly infrequent and for those
people who do end up posting on gnu.emacs.help, I expect they would post as
well if the message said "you need to install a unix-like `find'" because
they have no idea what the message is telling them and where to find
a unix-like `find'.


        Stefan

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Emacs 21.3.50 grep.el/executable.el problems
  2004-02-16 16:30 ` Kim F. Storm
@ 2004-02-16 16:23   ` Markus Rost
  0 siblings, 0 replies; 18+ messages in thread
From: Markus Rost @ 2004-02-16 16:23 UTC (permalink / raw)
  Cc: emacs-devel

   > I suggest following simple fix, at least as a temporary solution.
   > I'll install it, if one of the maintainers agrees.

   Please go ahead and install it together with Ehud's additional
   patch for symlinks.

I did not install anything, because I did not experience any problems
with symlinks, but perhaps found another bug:

I have the following value of data-directory:

data-directory  => "/var/tmp/cvs/emacs/etc/"

I renamed directory etc to etc1 and symlinked it back:

  /var/tmp/cvs/emacs:
Y lrwxrwxrwx    1 rost     users          23 Feb 16 17:05 etc -> /var/tmp/cvs/emacs/etc1

Now I get the following confusing returns:

(file-symlink-p "/var/tmp/cvs/emacs/etc/") => nil 
(file-symlink-p "/var/tmp/cvs/emacs/etc") => "/var/tmp/cvs/emacs/etc1"

Note the missing slash in the second call.  If I use relative
symlinks, I get:

  /var/tmp/cvs/emacs:
S lrwxrwxrwx    1 rost     users           4 Feb 16 17:17 etc -> etc1

(file-symlink-p "/var/tmp/cvs/emacs/etc/") => nil 
(file-symlink-p "/var/tmp/cvs/emacs/etc") => "etc1"

Note that the latter would not be useful for
executable-command-find-posix-p anyway, because one would need an absolute
file name.

PS:  I don't have any time at all to go further into any of these
problems.  Sorry.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Emacs 21.3.50 grep.el/executable.el problems
  2004-02-16 14:35 Markus Rost
  2004-02-16 15:17 ` Ehud Karni
  2004-02-16 16:14 ` Stefan Monnier
@ 2004-02-16 16:30 ` Kim F. Storm
  2004-02-16 16:23   ` Markus Rost
  2 siblings, 1 reply; 18+ messages in thread
From: Kim F. Storm @ 2004-02-16 16:30 UTC (permalink / raw)
  Cc: emacs-devel

Markus Rost <rost@mathematik.uni-bielefeld.de> writes:

> I got the impression that the grep/executable problems don't get
> fixed, because there should be perhaps a more extensive change.

Yes, it seems everybody is waiting for someone to take action
here, but no takers so far.

> However, it seems that quite a few people spent some time to fix it,
> probably because grep is used a lot.
> 
> I suggest following simple fix, at least as a temporary solution.
> I'll install it, if one of the maintainers agrees.

Please go ahead and install it together with Ehud's additional
patch for symlinḱs.

-- 
Kim F. Storm  http://www.cua.dk

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Emacs 21.3.50 grep.el/executable.el problems
  2004-02-16 16:14 ` Stefan Monnier
@ 2004-02-16 19:57   ` Eli Zaretskii
  2004-02-16 20:16     ` Stefan Monnier
  2004-02-16 21:10     ` Markus Rost
  2004-02-17 17:27   ` Richard Stallman
  1 sibling, 2 replies; 18+ messages in thread
From: Eli Zaretskii @ 2004-02-16 19:57 UTC (permalink / raw)
  Cc: rost, emacs-devel, emacs-pretest-bug

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Date: 16 Feb 2004 11:14:35 -0500
> 
> > I got the impression that the grep/executable problems don't get
> > fixed, because there should be perhaps a more extensive change.
> 
> My opinion is that the "extensive" change would be to rip out the recent
> change altogether.

I already did that, at Richard's request.

> What's the point of testing whether `find' is
> a unix-like find or not since if it isn't we have no good alternative
> anyway.  The only point I could see is to give a more meaningful error
> message for those few W32 folks who end up running some unrelated find.exe.
> But even then, I highly doubt it'll make any significant difference or is
> worth the trouble: the problem seem to be fairly infrequent and for those
> people who do end up posting on gnu.emacs.help, I expect they would post as
> well if the message said "you need to install a unix-like `find'" because
> they have no idea what the message is telling them and where to find
> a unix-like `find'.

In my experience, on a Windows system this problem is pretty frequent,
and when it happens, the error message that comes from the non-Posix
`find' is so cryptic that even occasional gurus get confused.

So IMHO a better error message from Emacs _is_ worth the trouble,
just not the kind of trouble that Jari got us into ;-)

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Emacs 21.3.50 grep.el/executable.el problems
  2004-02-16 19:57   ` Eli Zaretskii
@ 2004-02-16 20:16     ` Stefan Monnier
  2004-02-16 20:31       ` Jason Rumney
  2004-02-16 21:10     ` Markus Rost
  1 sibling, 1 reply; 18+ messages in thread
From: Stefan Monnier @ 2004-02-16 20:16 UTC (permalink / raw)
  Cc: rost, emacs-devel, emacs-pretest-bug

> In my experience, on a Windows system this problem is pretty frequent,
> and when it happens, the error message that comes from the non-Posix
> `find' is so cryptic that even occasional gurus get confused.

Is it possible for Emacs to recognize this cryptic thing?
Maybe we could give a meaningful message after running `find' rather
than before.
Is MS-find the only real source of problem?  If so, is its absolute file
name always the same?


        Stefan

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Emacs 21.3.50 grep.el/executable.el problems
  2004-02-16 20:16     ` Stefan Monnier
@ 2004-02-16 20:31       ` Jason Rumney
  0 siblings, 0 replies; 18+ messages in thread
From: Jason Rumney @ 2004-02-16 20:31 UTC (permalink / raw)
  Cc: rost, Eli Zaretskii, emacs-pretest-bug, emacs-devel

Stefan Monnier <monnier@iro.umontreal.ca> writes:

> Is MS-find the only real source of problem?  If so, is its absolute file
> name always the same?

It can be C:\WINNT\SYSTEM32\FIND.EXE, C:\WINDOWS\SYSTEM32\FIND.EXE, 
C:\WINDOWS\SYSTEM\FIND.EXE or maybe C:\WINDOWS\COMMAND\FIND.EXE.

I think if it is under C:\WINDOWS or C:\WINNT it can be assumed to be
the windows find (maybe need to cater for D:\WINDOWS etc too, I think
some versions of Windows can run off a drive other than C:\).

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Emacs 21.3.50 grep.el/executable.el problems
  2004-02-16 19:57   ` Eli Zaretskii
  2004-02-16 20:16     ` Stefan Monnier
@ 2004-02-16 21:10     ` Markus Rost
  2004-02-17  6:34       ` Eli Zaretskii
  2004-02-18  8:39       ` Richard Stallman
  1 sibling, 2 replies; 18+ messages in thread
From: Markus Rost @ 2004-02-16 21:10 UTC (permalink / raw)
  Cc: emacs-pretest-bug, monnier, emacs-devel

   > My opinion is that the "extensive" change would be to rip out the recent
   > change altogether.

   I already did that, at Richard's request.

Great, so now grep-find works again.  In fact, it tells that there is
another use of executable-command-find-posix-p, namely in
filecache.el.  Maybe one should change that as well and then remove
executable-command-find-posix-p.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Emacs 21.3.50 grep.el/executable.el problems
  2004-02-16 21:10     ` Markus Rost
@ 2004-02-17  6:34       ` Eli Zaretskii
  2004-02-18  8:39       ` Richard Stallman
  1 sibling, 0 replies; 18+ messages in thread
From: Eli Zaretskii @ 2004-02-17  6:34 UTC (permalink / raw)
  Cc: emacs-pretest-bug, emacs-devel

> From: Markus Rost <rost@mathematik.uni-bielefeld.de>
> Date: Mon, 16 Feb 2004 22:10:03 +0100
> 
> there is another use of executable-command-find-posix-p, namely in
> filecache.el.  Maybe one should change that as well and then remove
> executable-command-find-posix-p.

I didn't remove executable-command-find-posix-p entirely in the hope
that the ensuing discussions will come up with a better alternatives,
or suggest some different ways of solving the original problem(s) that
led to its inclusion.  So I opted for making only those changes that
would prevent the urgent problems with `grep'.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Emacs 21.3.50 grep.el/executable.el problems
  2004-02-16 16:14 ` Stefan Monnier
  2004-02-16 19:57   ` Eli Zaretskii
@ 2004-02-17 17:27   ` Richard Stallman
  1 sibling, 0 replies; 18+ messages in thread
From: Richard Stallman @ 2004-02-17 17:27 UTC (permalink / raw)
  Cc: rost, emacs-devel, emacs-pretest-bug

    My opinion is that the "extensive" change would be to rip out the recent
    change altogether.

A week ago I asked Eli to do just that, but he has been busy since then
and may not have done it yet.

The reason I installed that change is that I wanted to alter some
superficial details before installing it.  I did not notice that it
had deeper problems.  If I had known, I would not have installed it.

If someone already knows how to entirely fix this, please do.
Otherwise, please take out all of that change.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Emacs 21.3.50 grep.el/executable.el problems
  2004-02-16 21:10     ` Markus Rost
  2004-02-17  6:34       ` Eli Zaretskii
@ 2004-02-18  8:39       ` Richard Stallman
  2004-02-18 20:55         ` Markus Rost
  1 sibling, 1 reply; 18+ messages in thread
From: Richard Stallman @ 2004-02-18  8:39 UTC (permalink / raw)
  Cc: emacs-pretest-bug, eliz, monnier, emacs-devel

    Great, so now grep-find works again.  In fact, it tells that there is
    another use of executable-command-find-posix-p, namely in
    filecache.el.  Maybe one should change that as well and then remove
    executable-command-find-posix-p.

Someone said that filecache.el previously failed entirely to cope with
a nonstandard find, so perhaps we lose nothing by leaving it in
and we may as well fix it instead.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Emacs 21.3.50 grep.el/executable.el problems
  2004-02-18  8:39       ` Richard Stallman
@ 2004-02-18 20:55         ` Markus Rost
  0 siblings, 0 replies; 18+ messages in thread
From: Markus Rost @ 2004-02-18 20:55 UTC (permalink / raw)
  Cc: emacs-pretest-bug, eliz, monnier, emacs-devel

       another use of executable-command-find-posix-p, namely in
       filecache.el.  Maybe one should change that as well and then remove
       executable-command-find-posix-p.

   Someone said that filecache.el previously failed entirely to cope with
   a nonstandard find, so perhaps we lose nothing by leaving it in
   and we may as well fix it instead.

I just applied the following patch which ought to fix the mentioned
problems.  It uses `file-truename' to avoid possible symlink problems.

===Buffer *vc-diff*=========================================
Index: executable.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/progmodes/executable.el,v
retrieving revision 1.30
retrieving revision 1.31
diff -c -r1.30 -r1.31
*** executable.el	1 Feb 2004 16:27:00 -0000	1.30
--- executable.el	18 Feb 2004 20:47:46 -0000	1.31
***************
*** 145,156 ****
    "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 ..
!                    (not (string-match "^\\.\\.?$" x)))
!                  (directory-files dir))))
      (with-temp-buffer
        (call-process (or program "find")
                      nil
--- 145,152 ----
    "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 (file-truename data-directory))
!          (file (car (directory-files dir nil "^[^.]"))))
      (with-temp-buffer
        (call-process (or program "find")
                      nil
============================================================

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2004-02-18 20:55 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-02-13  6:32 Emacs 21.3.50 on cygwin bootstrap failed. (Jason Rumney) Steven Wu
2004-02-14 15:04 ` Emacs 21.3.50 grep.el/executable.el problems Ehud Karni
2004-02-15 11:43   ` Ehud Karni
2004-02-15 12:59     ` Piet van Oostrum
2004-02-15 13:20   ` Thien-Thi Nguyen
  -- strict thread matches above, loose matches on Subject: below --
2004-02-16 14:35 Markus Rost
2004-02-16 15:17 ` Ehud Karni
2004-02-16 16:14 ` Stefan Monnier
2004-02-16 19:57   ` Eli Zaretskii
2004-02-16 20:16     ` Stefan Monnier
2004-02-16 20:31       ` Jason Rumney
2004-02-16 21:10     ` Markus Rost
2004-02-17  6:34       ` Eli Zaretskii
2004-02-18  8:39       ` Richard Stallman
2004-02-18 20:55         ` Markus Rost
2004-02-17 17:27   ` Richard Stallman
2004-02-16 16:30 ` Kim F. Storm
2004-02-16 16:23   ` Markus Rost

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).