unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* compilation-start without shell?
@ 2010-12-24  3:43 Lennart Borgman
  2010-12-24 10:11 ` Eli Zaretskii
  0 siblings, 1 reply; 7+ messages in thread
From: Lennart Borgman @ 2010-12-24  3:43 UTC (permalink / raw)
  To: Emacs-Devel devel

Would it be possible to allow compilation start to not use a shell?

With some programs it is quite hard to use a shell, at least on w32.
And you do not always want to be able to edit the `command' argument.
(Or, that editing might be done on another level.) However reusing the
code in compilation-start may still be good.

A simple logic for calling conventions could be that if `command' is a
list then a shell should not be used, but instead start-process should
be used directly.

But what technical difficulties are their doing this?



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: compilation-start without shell?
  2010-12-24  3:43 compilation-start without shell? Lennart Borgman
@ 2010-12-24 10:11 ` Eli Zaretskii
  2010-12-24 11:07   ` Lennart Borgman
  0 siblings, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2010-12-24 10:11 UTC (permalink / raw)
  To: Lennart Borgman; +Cc: emacs-devel

> From: Lennart Borgman <lennart.borgman@gmail.com>
> Date: Fri, 24 Dec 2010 04:43:14 +0100
> 
> Would it be possible to allow compilation start to not use a shell?
> 
> With some programs it is quite hard to use a shell, at least on w32.

Please describe this problem in more detail, and please give a couple
of examples.

Not using a shell is one possible solution, but it's hard to reason
about its merits and demerits without knowing more about the
problem(s) you are trying to solve.



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: compilation-start without shell?
  2010-12-24 10:11 ` Eli Zaretskii
@ 2010-12-24 11:07   ` Lennart Borgman
  2010-12-24 11:48     ` Eli Zaretskii
  0 siblings, 1 reply; 7+ messages in thread
From: Lennart Borgman @ 2010-12-24 11:07 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

On Fri, Dec 24, 2010 at 11:11 AM, Eli Zaretskii <eliz@gnu.org> wrote:
>> From: Lennart Borgman <lennart.borgman@gmail.com>
>> Date: Fri, 24 Dec 2010 04:43:14 +0100
>>
>> Would it be possible to allow compilation start to not use a shell?
>>
>> With some programs it is quite hard to use a shell, at least on w32.
>
> Please describe this problem in more detail, and please give a couple
> of examples.
>
> Not using a shell is one possible solution, but it's hard to reason
> about its merits and demerits without knowing more about the
> problem(s) you are trying to solve.

I tried to get PowerShell scripts working from inside Emacs. That was
quite tricky so I decided to try to bypass the cmd.exe shell by
changing compilation-start the way I suggested.

At least that made debugging a bit easier (though it did not work).

Making the change I suggested can be useful. It is just a few lines
changes. I can send a patch for it.



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: compilation-start without shell?
  2010-12-24 11:07   ` Lennart Borgman
@ 2010-12-24 11:48     ` Eli Zaretskii
  2010-12-24 12:05       ` Lennart Borgman
  0 siblings, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2010-12-24 11:48 UTC (permalink / raw)
  To: Lennart Borgman; +Cc: emacs-devel

> From: Lennart Borgman <lennart.borgman@gmail.com>
> Date: Fri, 24 Dec 2010 12:07:40 +0100
> Cc: emacs-devel@gnu.org
> 
> I tried to get PowerShell scripts working from inside Emacs. That was
> quite tricky so I decided to try to bypass the cmd.exe shell by
> changing compilation-start the way I suggested.

It's not clear how using PowerShell scripts is related to compilation.

Anyway, the proper way of doing that is to set shell-file-name to
PowerShell, and maybe customize w32-system-shells to include it.

> Making the change I suggested can be useful. It is just a few lines
> changes. I can send a patch for it.

I still don't understand the problem.  Can you show an example and
some error message?



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: compilation-start without shell?
  2010-12-24 11:48     ` Eli Zaretskii
@ 2010-12-24 12:05       ` Lennart Borgman
  2010-12-24 12:21         ` Óscar Fuentes
  0 siblings, 1 reply; 7+ messages in thread
From: Lennart Borgman @ 2010-12-24 12:05 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

On Fri, Dec 24, 2010 at 12:48 PM, Eli Zaretskii <eliz@gnu.org> wrote:
>> From: Lennart Borgman <lennart.borgman@gmail.com>
>> Date: Fri, 24 Dec 2010 12:07:40 +0100
>> Cc: emacs-devel@gnu.org
>>
>> I tried to get PowerShell scripts working from inside Emacs. That was
>> quite tricky so I decided to try to bypass the cmd.exe shell by
>> changing compilation-start the way I suggested.
>
> It's not clear how using PowerShell scripts is related to compilation.

I started the script with compilation-start (since I wanted the output
to be processed the way it will be done then).

>> Making the change I suggested can be useful. It is just a few lines
>> changes. I can send a patch for it.
>
> I still don't understand the problem.  Can you show an example and
> some error message?

PowerShell just hangs when run under Emacs. However it is not clear to me why.

I have tested that (without going that far as changing the C sources).
The only way I could get it to work under Emacs was by setting .ps1 to
be run by powershell.exe (ftype ...).

However there are more reasons to avoid the shell. You can more easily
send parameters to a script started without a shell.

So what I want is being able to use the frame work setup by
compilation-start without it starting a shell since this makes sending
parameters more easy.



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: compilation-start without shell?
  2010-12-24 12:05       ` Lennart Borgman
@ 2010-12-24 12:21         ` Óscar Fuentes
  2010-12-24 12:42           ` Lennart Borgman
  0 siblings, 1 reply; 7+ messages in thread
From: Óscar Fuentes @ 2010-12-24 12:21 UTC (permalink / raw)
  To: Lennart Borgman; +Cc: emacs-devel

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

[snip]

> PowerShell just hangs when run under Emacs. However it is not clear to
> me why.

Maybe it is in interactive mode?

[snip]



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: compilation-start without shell?
  2010-12-24 12:21         ` Óscar Fuentes
@ 2010-12-24 12:42           ` Lennart Borgman
  0 siblings, 0 replies; 7+ messages in thread
From: Lennart Borgman @ 2010-12-24 12:42 UTC (permalink / raw)
  To: Óscar Fuentes; +Cc: emacs-devel

On Fri, Dec 24, 2010 at 1:21 PM, Óscar Fuentes <ofv@wanadoo.es> wrote:
> Lennart Borgman <lennart.borgman@gmail.com> writes:
>
> [snip]
>
>> PowerShell just hangs when run under Emacs. However it is not clear to
>> me why.
>
> Maybe it is in interactive mode?

Perhaps, but trying to give it switches so it will not be in
interactive mode does not seem to help.



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-12-24 12:42 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-24  3:43 compilation-start without shell? Lennart Borgman
2010-12-24 10:11 ` Eli Zaretskii
2010-12-24 11:07   ` Lennart Borgman
2010-12-24 11:48     ` Eli Zaretskii
2010-12-24 12:05       ` Lennart Borgman
2010-12-24 12:21         ` Óscar Fuentes
2010-12-24 12:42           ` Lennart Borgman

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