emacs-devel
[Top][All Lists]
Advanced

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

Re: start-process somehow expands *.org


From: Davis Herring
Subject: Re: start-process somehow expands *.org
Date: Tue, 1 Mar 2011 07:14:32 -0800 (PST)
User-agent: SquirrelMail/1.4.8-5.el5_4.10.lanl3

>    (setq command
>       ("ruby.exe" "c:\\path-to\\idxsearch.rb" "--root"
> "c:/where-to-search/" "--filepatt" "*.org" "--query" "word1,word2")
>
>    (apply 'start-process (downcase mode-name) outbuf command)
>
> It looks like idxsearch.rb recieves the first file matching *.org, in
> my case "act.org" - instead of "*.org" as I expected.
>
> It might be ruby.exe that expands *.org, but if I try a similar
> command line ruby.exe does not expand *.org.
>
> This is on w32, as usual with my patched version.

The system shell on w32 does not expand wildcards (or even split words),
so programs built for w32 must do any expansion themselves.  The various
Unix-on-Windows approaches typically try to do splitting/expansion before
calling main() so that the ported programs see what they would expect from
a Unix shell.

So it's likely that ruby is choosing to do the expansion itself (and then
doing who knows what with the other matches).  You might be able to fix it
by passing the argument with double quotes or so; it depends on the
details of the Unix emulation layer in use.

Davis

-- 
This product is sold by volume, not by mass.  If it appears too dense or
too sparse, it is because mass-energy conversion has occurred during
shipping.



reply via email to

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