emacs-devel
[Top][All Lists]
Advanced

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

Re: Using `call-process-shell-command' in `process-lines'


From: Lennart Borgman (gmail)
Subject: Re: Using `call-process-shell-command' in `process-lines'
Date: Mon, 26 Nov 2007 22:25:43 +0100
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666

Eli Zaretskii wrote:
Date: Mon, 26 Nov 2007 20:58:55 +0100
From: "Lennart Borgman (gmail)" <address@hidden>
Cc: Stefan Monnier <address@hidden>,
        Emacs Devel <address@hidden>

- This gives the error "paths must precede expressions"

   (apply #'call-process "find.exe" nil
          (get-buffer-create "output")
          nil
          '("c:/emacs-lisp/old/" "-name" "*.el" ))

- The same for this in cmd.exe

   find -name *.el

Yes, you need to quote the *.el, so that find.exe gets it intact.

- These two works:

   (apply #'call-process "find.exe" nil
          (get-buffer-create "output")
          nil
          '("c:/emacs-lisp/old/" "-name" "*l.el" ))

   (apply #'call-process "find.exe" nil
          (get-buffer-create "output")
          nil
          '("c:/emacs-lisp/old/" "-name" "m*.el" ))


- and these works in cmd.exe:

   find -name *l.el
   find -name m*.el
   find -name "*.el"

Sheer luck, the first tow ones.  You _must_ quote the wildcard to get
predictable behavior.

Is anyone able to understand what is going on?

I explained that in another message.

I think there is more to it. I suspect that the find arg parsing code handles a single "*" differently and that this is a bug. (But I am not sure, that code takes long time to read.)




reply via email to

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