* Problem to run shell-command
@ 2010-08-23 15:26 filebat
2010-08-24 19:47 ` Oleksandr Gavenko
0 siblings, 1 reply; 6+ messages in thread
From: filebat @ 2010-08-23 15:26 UTC (permalink / raw)
To: help-gnu-emacs
Hi all
Any idea why below shell-command fails?
,----------- command
| M-! etags -a -I `find -iname *.py`
`-----------
,----------- output of the error message
| `find: No such file or directory
| *.py`: No such file or directory
`-----------
If I try "M-! find -iname *.py | etags -a -", I will get complain of "Access is denied".
--
Thanks,
Denny
Smile for difficulty, Denny!
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Problem to run shell-command
2010-08-23 15:26 Problem to run shell-command filebat
@ 2010-08-24 19:47 ` Oleksandr Gavenko
2010-08-25 16:16 ` filebat Mark
[not found] ` <mailman.0.1282753005.3946.help-gnu-emacs@gnu.org>
0 siblings, 2 replies; 6+ messages in thread
From: Oleksandr Gavenko @ 2010-08-24 19:47 UTC (permalink / raw)
To: help-gnu-emacs
On 2010-08-23 18:26, filebat wrote:
> Hi all
>
> Any idea why below shell-command fails?
>
> ,----------- command
> | M-! etags -a -I `find -iname *.py`
> `-----------
>
> ,----------- output of the error message
> | `find: No such file or directory
> | *.py`: No such file or directory
> `-----------
>
> If I try "M-! find -iname *.py | etags -a -", I will get complain of "Access is denied".
>
'find' utility expect dir as first arg where it start look to files ))
And dont forget escape special shell chars like '*' ))
try 'find . -iname "*.py"'
--
Best regards!
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Problem to run shell-command
2010-08-24 19:47 ` Oleksandr Gavenko
@ 2010-08-25 16:16 ` filebat Mark
2010-08-25 18:04 ` Peter Dyballa
2010-08-26 6:43 ` Oleksandr Gavenko
[not found] ` <mailman.0.1282753005.3946.help-gnu-emacs@gnu.org>
1 sibling, 2 replies; 6+ messages in thread
From: filebat Mark @ 2010-08-25 16:16 UTC (permalink / raw)
To: Oleksandr Gavenko; +Cc: help-gnu-emacs
[-- Attachment #1: Type: text/plain, Size: 905 bytes --]
Thanks, gavenkoa.
Well, could you have a try on your environment?
I am suspicious that shell-command of emacs doesn't support pipe, thus the
two commands fail.
Regards,
Denny
On Wed, Aug 25, 2010 at 3:47 AM, Oleksandr Gavenko <gavenkoa@gmail.com>wrote:
> On 2010-08-23 18:26, filebat wrote:
>
>> Hi all
>>
>> Any idea why below shell-command fails?
>>
>> ,----------- command
>> | M-! etags -a -I `find -iname *.py`
>> `-----------
>>
>> ,----------- output of the error message
>> | `find: No such file or directory
>> | *.py`: No such file or directory
>> `-----------
>>
>> If I try "M-! find -iname *.py | etags -a -", I will get complain of
>> "Access is denied".
>>
>> 'find' utility expect dir as first arg where it start look to files ))
> And dont forget escape special shell chars like '*' ))
>
> try 'find . -iname "*.py"'
>
> --
> Best regards!
>
>
>
--
Thanks & Regards
Denny Zhang
[-- Attachment #2: Type: text/html, Size: 1542 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Problem to run shell-command
2010-08-25 16:16 ` filebat Mark
@ 2010-08-25 18:04 ` Peter Dyballa
2010-08-26 6:43 ` Oleksandr Gavenko
1 sibling, 0 replies; 6+ messages in thread
From: Peter Dyballa @ 2010-08-25 18:04 UTC (permalink / raw)
To: filebat Mark; +Cc: help-gnu-emacs, Oleksandr Gavenko
Am 25.08.2010 um 18:16 schrieb filebat Mark:
> I am suspicious that shell-command of emacs doesn't support pipe,
> thus the
> two commands fail.
Try this shell command: ls -lt1 | sort
The output in *Shell Command Output* will be alphabetically sorted
while ls produces a listing according to modification time.
--
Greetings
Pete
Time is an illusion. Lunchtime, doubly so.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Problem to run shell-command
[not found] ` <mailman.0.1282753005.3946.help-gnu-emacs@gnu.org>
@ 2010-08-26 0:40 ` Barry Margolin
0 siblings, 0 replies; 6+ messages in thread
From: Barry Margolin @ 2010-08-26 0:40 UTC (permalink / raw)
To: help-gnu-emacs
In article <mailman.0.1282753005.3946.help-gnu-emacs@gnu.org>,
filebat Mark <filebat.mark@gmail.com> wrote:
> Thanks, gavenkoa.
>
> Well, could you have a try on your environment?
>
> I am suspicious that shell-command of emacs doesn't support pipe, thus the
> two commands fail.
What OS are you running on? I primarily use OS X, and shell-command
works fine with pipes and backticks. The only things you can't run
using shell-command are interactive or full-screen applications.
--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Problem to run shell-command
2010-08-25 16:16 ` filebat Mark
2010-08-25 18:04 ` Peter Dyballa
@ 2010-08-26 6:43 ` Oleksandr Gavenko
1 sibling, 0 replies; 6+ messages in thread
From: Oleksandr Gavenko @ 2010-08-26 6:43 UTC (permalink / raw)
To: help-gnu-emacs
On 25.08.2010 19:16, filebat Mark wrote:
> Thanks, gavenkoa.
>
> Well, could you have a try on your environment?
>
> I am suspicious that shell-command of emacs doesn't support pipe, thus
> the two commands fail.
>
What OS you run?
shell-command pass typed string to command interpreter like 'sh' or
'cmdproxy.exe'.
So you must type command that correspond to your command interpreter
language syntax.
Under Linux all work fine out of the box.
For Windows I use Cygwin (be ware put 'cygwin/bin' before
'windows/system32' in PATH).
Also check 'shell-file-name ' and try play with:
(setq shell-file-name (concat exec-directory "cmdproxy.exe"))
or like
(setq shell-file-name "bash")
(setq shell-command-switch "-c")
(setenv "SHELL" shell-file-name)
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-08-26 6:43 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-23 15:26 Problem to run shell-command filebat
2010-08-24 19:47 ` Oleksandr Gavenko
2010-08-25 16:16 ` filebat Mark
2010-08-25 18:04 ` Peter Dyballa
2010-08-26 6:43 ` Oleksandr Gavenko
[not found] ` <mailman.0.1282753005.3946.help-gnu-emacs@gnu.org>
2010-08-26 0:40 ` Barry Margolin
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).