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: Lennart Borgman
Subject: Re: start-process somehow expands *.org
Date: Tue, 1 Mar 2011 16:20:03 +0100

On Tue, Mar 1, 2011 at 4:14 PM, Davis Herring <address@hidden> wrote:
>>    (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.

But if I give "*.ext" to ruby the same way I thought Emacs did it does
not expand "*.ext".

So I thought that maybe Emacs does this expansion, but since know one
seems to know about it I guess it does not. Now I am a bit puzzled...



reply via email to

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