unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Thierry Volpiatto <thierry.volpiatto@gmail.com>
To: emacs-devel@gnu.org
Subject: Re: start-process somehow expands *.org
Date: Tue, 01 Mar 2011 07:19:33 +0100	[thread overview]
Message-ID: <87sjv7tlai.fsf@gmail.com> (raw)
In-Reply-To: AANLkTimj-hkKPGWR-4K9LTtw6skN+Z9uDtrb2bDt5PU1@mail.gmail.com

Lennart Borgman <lennart.borgman@gmail.com> writes:

> On Tue, Mar 1, 2011 at 3:27 AM, Glenn Morris <rgm@gnu.org> wrote:
>>
>> Lennart Borgman wrote (on Tue, 1 Mar 2011 at 03:07 +0100):
>>
>>> I am calling start-process with one of the program-args beeing
>>> "*.org". Somehow this is expanded to just the first of matching file.
>>>
>>> What is happening? Is this the way it is supposed to work?
>>
>> Will you PLEASE learn to give complete examples, rather than always
>> this "I saw a thing; is it a problem?" kind of mail.
>
> Sorry, I thought I was clear enough. start-process has a "&rest" arg
> called "program-args".
>
>> Maybe the following is relevant, how should I know what you doing.
>>
>> Functions that Create Subprocesses
>>
>>   All three of the subprocess-creating functions have a `&rest'
>>   argument, ARGS. The ARGS must all be strings, and they are supplied
>>   to PROGRAM as separate command line arguments. Wildcard characters
>>   and other shell constructs have no special meanings in these
>>   strings, since the strings are passed directly to the specified
>>   program.
>
> Yes, it might be relevant. However I do not understand what is happening.
>
> I have something like this
>
>    (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.

Maybe use --filepatt as last arg and file-expand-wildcards on *.org.

(setq command "a b c d e --filepatt")
(apply 'start-process (downcase mode-name) outbuf command
   (file-expand-wildcards "*.org"))

Or even better use start-process-shell-command.

-- 
A+ Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997 




  reply	other threads:[~2011-03-01  6:19 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-01  2:07 start-process somehow expands *.org Lennart Borgman
2011-03-01  2:27 ` Glenn Morris
2011-03-01  2:51   ` Lennart Borgman
2011-03-01  6:19     ` Thierry Volpiatto [this message]
2011-03-01 10:37       ` Lennart Borgman
2011-03-01 10:46         ` Thierry Volpiatto
2011-03-01 11:35           ` Lennart Borgman
2011-03-01 13:04             ` Thierry Volpiatto
2011-03-01 13:14               ` Lennart Borgman
2011-03-01 18:12                 ` Thierry Volpiatto
2011-03-01 20:04                   ` Lennart Borgman
2011-03-01 15:14     ` Davis Herring
2011-03-01 15:20       ` Lennart Borgman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87sjv7tlai.fsf@gmail.com \
    --to=thierry.volpiatto@gmail.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).