* Scroll down *Schell Command Output* buffer when output arrives
@ 2003-02-24 15:45 Jens Persson
2003-02-24 16:37 ` Benjamin Rutt
2003-03-04 22:28 ` Kevin Rodgers
0 siblings, 2 replies; 5+ messages in thread
From: Jens Persson @ 2003-02-24 15:45 UTC (permalink / raw)
Hi!
I have made a couple of functions that performs single shell-command
calls, for example like this:
(defun csound-compile-curr-osc-sco ()
(interactive)
(shell-command (concat "csound -A -d -o test.aif "
(file-name-sans-extension (buffer-name)) ".orc "
(file-name-sans-extension (buffer-name)) ".sco"))
)
(global-set-key [f8] 'csound-compile-curr-osc-sco)
The ouput of these shell-command calls goes into the *Shell Command
Output* buffer, and now I only want it to automatically scroll down
every time new output arrives to it so that the last lines of the output
is visable, how can i do this? Is there some hook that i can add a
"end-of-buffer" to or something?
(I've searched the internet for hours and I'm getting frustrated here!)
/Jens
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Scroll down *Schell Command Output* buffer when output arrives
2003-02-24 15:45 Scroll down *Schell Command Output* buffer when output arrives Jens Persson
@ 2003-02-24 16:37 ` Benjamin Rutt
2003-02-25 11:59 ` Jens Persson
2003-03-04 22:28 ` Kevin Rodgers
1 sibling, 1 reply; 5+ messages in thread
From: Benjamin Rutt @ 2003-02-24 16:37 UTC (permalink / raw)
Jens Persson <jens.persson.1833@student.uu.se> writes:
> The ouput of these shell-command calls goes into the *Shell Command
> Output* buffer, and now I only want it to automatically scroll down
> every time new output arrives to it so that the last lines of the
> output is visable, how can i do this? Is there some hook that i can
> add a "end-of-buffer" to or something?
Why not run them under `compile', which will do the scrolling for you
automatically.
e.g.
(defun csound-compile-curr-osc-sco ()
(interactive)
(compile (concat "csound -A -d -o test.aif "
(file-name-sans-extension (buffer-name)) ".orc "
(file-name-sans-extension (buffer-name)) ".sco")))
(global-set-key [f8] 'csound-compile-curr-osc-sco)
--
Benjamin
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Scroll down *Schell Command Output* buffer when output arrives
2003-02-24 16:37 ` Benjamin Rutt
@ 2003-02-25 11:59 ` Jens Persson
2003-03-05 16:14 ` Robert Figura
0 siblings, 1 reply; 5+ messages in thread
From: Jens Persson @ 2003-02-25 11:59 UTC (permalink / raw)
Ok, thanks! Guess I should have thought of that ... But is it impossible
to (if you just wanted to do it that way for some reason) make the Shell
Command Output buffer scroll down automatically every time it gets new
output?
Benjamin Rutt wrote:
> Jens Persson <jens.persson.1833@student.uu.se> writes:
>
>
>>The ouput of these shell-command calls goes into the *Shell Command
>>Output* buffer, and now I only want it to automatically scroll down
>>every time new output arrives to it so that the last lines of the
>>output is visable, how can i do this? Is there some hook that i can
>>add a "end-of-buffer" to or something?
>>
>
> Why not run them under `compile', which will do the scrolling for you
> automatically.
>
> e.g.
>
> (defun csound-compile-curr-osc-sco ()
> (interactive)
> (compile (concat "csound -A -d -o test.aif "
> (file-name-sans-extension (buffer-name)) ".orc "
> (file-name-sans-extension (buffer-name)) ".sco")))
>
> (global-set-key [f8] 'csound-compile-curr-osc-sco)
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Scroll down *Schell Command Output* buffer when output arrives
2003-02-24 15:45 Scroll down *Schell Command Output* buffer when output arrives Jens Persson
2003-02-24 16:37 ` Benjamin Rutt
@ 2003-03-04 22:28 ` Kevin Rodgers
1 sibling, 0 replies; 5+ messages in thread
From: Kevin Rodgers @ 2003-03-04 22:28 UTC (permalink / raw)
Jens Persson wrote:
> (defun csound-compile-curr-osc-sco ()
> (interactive)
> (shell-command (concat "csound -A -d -o test.aif "
> (file-name-sans-extension (buffer-name)) ".orc "
> (file-name-sans-extension (buffer-name)) ".sco"))
> )
That won't work if you happen to be visiting 2 files with the same name but
in different directories, which usually results in buffers named e.g. foo.bar
and foo.bar<2>. I would write that as:
(let* ((file (file-name-nondirectory buffer-file-name))
(sound (file-name-sans-extension file)))
(shell-command (format "csound -A -d -o test.aif %s.orc %s.sco"
sound sound)))
--
<a href="mailto:<kevin.rodgers@ihs.com>">Kevin Rodgers</a>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Scroll down *Schell Command Output* buffer when output arrives
2003-02-25 11:59 ` Jens Persson
@ 2003-03-05 16:14 ` Robert Figura
0 siblings, 0 replies; 5+ messages in thread
From: Robert Figura @ 2003-03-05 16:14 UTC (permalink / raw)
Jens Persson <jens.persson.1833@student.uu.se> writes:
> Ok, thanks! Guess I should have thought of that ... But is it
> impossible to (if you just wanted to do it that way for some reason)
> make the Shell Command Output buffer scroll down automatically every
> time it gets new output?
My question was on how to scroll the *Messages* buffer. Tiny-scroll
from tiny-tools (url below) can do it. (Why are these tools called
tiny, btw?)
http://tiny-tools.sourceforge.net/emacs-tiny-tools-toc.html
- R
--
/* mandlsig.c v0.23 (c) by Robert Figura */
I=1702;float O,o,i;main(l){for(;I--;putchar("oO .,\nm>cot.bitamea\
@urigrf <raguFit erobR"[I%74?I>837&874>I?I^833:l%5:5]))for(O=o=l=
0;O*O+o*o<(16^l++);o=2*O*o+I/74/11.-1,O=i)i=O*O-o*o+I%74*.04-2.2;}
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2003-03-05 16:14 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-02-24 15:45 Scroll down *Schell Command Output* buffer when output arrives Jens Persson
2003-02-24 16:37 ` Benjamin Rutt
2003-02-25 11:59 ` Jens Persson
2003-03-05 16:14 ` Robert Figura
2003-03-04 22:28 ` Kevin Rodgers
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).