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; 5+ 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] 5+ 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; 5+ 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] 5+ 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; 5+ 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] 5+ 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; 5+ 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] 5+ 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; 5+ 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] 5+ messages in thread

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

Thread overview: 5+ 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

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).