* Read Only Buffers On compilation
@ 2011-05-05 12:45 flebber
2011-05-05 13:54 ` Stefan Monnier
2011-05-05 14:04 ` Marco Parrone
0 siblings, 2 replies; 4+ messages in thread
From: flebber @ 2011-05-05 12:45 UTC (permalink / raw)
To: help-gnu-emacs
I seem to have an odd behaviour when executing scripts in emacs. The
scripts work fine if no input is required. But when input is required
the compilation buffer is read-only. How can I make the buffer read-
write so that input can be taken. So for example a very basic script
asking for input such as below would work in emacs.
puts "What Directory do you want"
STDOUT.flush
file = gets.chomp
Dir.foreach("C:/"[file]) do |entry|
puts entry
end
Sayth
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Read Only Buffers On compilation
2011-05-05 12:45 Read Only Buffers On compilation flebber
@ 2011-05-05 13:54 ` Stefan Monnier
2011-05-05 14:13 ` despen
2011-05-05 14:04 ` Marco Parrone
1 sibling, 1 reply; 4+ messages in thread
From: Stefan Monnier @ 2011-05-05 13:54 UTC (permalink / raw)
To: help-gnu-emacs
> I seem to have an odd behaviour when executing scripts in emacs. The
> scripts work fine if no input is required. But when input is required
> the compilation buffer is read-only. How can I make the buffer read-
> write so that input can be taken. So for example a very basic script
> asking for input such as below would work in emacs.
C-h f compile RET says:
[...]
Additionally, with universal prefix arg, compilation buffer will be in
comint mode, i.e. interactive.
So try C-u M-x compile RET
Stefan
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Read Only Buffers On compilation
2011-05-05 13:54 ` Stefan Monnier
@ 2011-05-05 14:13 ` despen
0 siblings, 0 replies; 4+ messages in thread
From: despen @ 2011-05-05 14:13 UTC (permalink / raw)
To: help-gnu-emacs
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> I seem to have an odd behaviour when executing scripts in emacs. The
>> scripts work fine if no input is required. But when input is required
>> the compilation buffer is read-only. How can I make the buffer read-
>> write so that input can be taken. So for example a very basic script
>> asking for input such as below would work in emacs.
>
> C-h f compile RET says:
>
> [...]
> Additionally, with universal prefix arg, compilation buffer will be in
> comint mode, i.e. interactive.
>
> So try C-u M-x compile RET
Cool, did not know that.
Another alternative, use echo to provide standard input.
--
Dan Espen
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Read Only Buffers On compilation
2011-05-05 12:45 Read Only Buffers On compilation flebber
2011-05-05 13:54 ` Stefan Monnier
@ 2011-05-05 14:04 ` Marco Parrone
1 sibling, 0 replies; 4+ messages in thread
From: Marco Parrone @ 2011-05-05 14:04 UTC (permalink / raw)
To: help-gnu-emacs
flebber <flebber.crue@gmail.com> writes:
> I seem to have an odd behaviour when executing scripts in emacs. The
> scripts work fine if no input is required. But when input is required
> the compilation buffer is read-only. How can I make the buffer read-
> write so that input can be taken. So for example a very basic script
> asking for input such as below would work in emacs.
>
> puts "What Directory do you want"
> STDOUT.flush
> file = gets.chomp
> Dir.foreach("C:/"[file]) do |entry|
> puts entry
> end
>
> Sayth
I don't know how to do what you ask.
Usually on GNU/Linux programs are compiled by using batch files that
don't require interactive input, they are configured either by editing
some files, or by passing command line arguments, or by setting some
environment variables.
Interactive text-mode programs usually are started from within the
shell, either from inside the shell-mode buffer `M-x shell RET' or from
an external terminal.
Goodbye
--
Marco Parrone <marco@marcoparrone.com>
PGP Key fingerprint = 5E21 BED2 BF47 B3FB F17F 1DB4 D9BE B2B7 3C3A 07E2
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-05-05 14:13 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-05 12:45 Read Only Buffers On compilation flebber
2011-05-05 13:54 ` Stefan Monnier
2011-05-05 14:13 ` despen
2011-05-05 14:04 ` Marco Parrone
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.