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: Eli Zaretskii
Subject: Re: Using `call-process-shell-command' in `process-lines'
Date: Mon, 26 Nov 2007 22:50:56 +0200

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




reply via email to

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