* Using emacs to view scrollback-buffer (from gnu-screen)
@ 2009-02-22 19:32 Hugo Heden
2009-02-24 4:48 ` Kevin Rodgers
0 siblings, 1 reply; 3+ messages in thread
From: Hugo Heden @ 2009-02-22 19:32 UTC (permalink / raw)
To: help-gnu-emacs
Good day all,
I am trying to write a little script that in certain situations lets
emacs show a file containing a scrollback-buffer. I am using emacs
with multi-tty support ("emacs --version" yields "GNU Emacs
23.0.60.1"). There's a daemon running ("emacs --daemon"), so I thought
it might be quick enough to view the scrollback buffer with
"emacsclient -t <file>". I am experimenting with gnu-screen,
http://www.gnu.org/software/screen/ , and would like to use
"emacsclient -t" to view, and get keyboard access to, the scrollback
buffer (with emacs-style cursor navigation, copy/paste etc).
The buffer is written to a file, /tmp/screenscrollbackbuffer. I'd like
to do the following:
(A) make emacs show the file in read-only mode.
(B) have the cursor automatically moved to the end of the file at start-up.
(C) possibly have emacs starting with auto-revert-tail-mode or
auto-revert-mode enabled as well..
How do I do this? Can I configure this stuff on the command line? How?
Or should I write an .emacs-style configuration file that this scripts
somehow passes to emacsclient?
Best regards
Hugo Heden
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Using emacs to view scrollback-buffer (from gnu-screen)
2009-02-22 19:32 Using emacs to view scrollback-buffer (from gnu-screen) Hugo Heden
@ 2009-02-24 4:48 ` Kevin Rodgers
2009-03-06 22:12 ` Hugo Heden
0 siblings, 1 reply; 3+ messages in thread
From: Kevin Rodgers @ 2009-02-24 4:48 UTC (permalink / raw)
To: help-gnu-emacs
Hugo Heden wrote:
> Good day all,
>
> I am trying to write a little script that in certain situations lets
> emacs show a file containing a scrollback-buffer. I am using emacs
> with multi-tty support ("emacs --version" yields "GNU Emacs
> 23.0.60.1"). There's a daemon running ("emacs --daemon"), so I thought
> it might be quick enough to view the scrollback buffer with
> "emacsclient -t <file>". I am experimenting with gnu-screen,
> http://www.gnu.org/software/screen/ , and would like to use
> "emacsclient -t" to view, and get keyboard access to, the scrollback
> buffer (with emacs-style cursor navigation, copy/paste etc).
>
> The buffer is written to a file, /tmp/screenscrollbackbuffer. I'd like
> to do the following:
>
> (A) make emacs show the file in read-only mode.
emacs -t FILE --eval '(setq buffer-read-only t)'
> (B) have the cursor automatically moved to the end of the file at start-up.
emacs -t FILE --eval '(goto-char (point-max))'
> (C) possibly have emacs starting with auto-revert-tail-mode or
> auto-revert-mode enabled as well..
emacs -t FILE --eval '(auto-revert-tail-mode 1)'
> How do I do this? Can I configure this stuff on the command line? How?
> Or should I write an .emacs-style configuration file that this scripts
> somehow passes to emacsclient?
You can do it on the command line. See the [Appendix C Command Line
Arguments for] Emacs Invocation node in the Emacs manual.
--
Kevin Rodgers
Denver, Colorado, USA
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Using emacs to view scrollback-buffer (from gnu-screen)
2009-02-24 4:48 ` Kevin Rodgers
@ 2009-03-06 22:12 ` Hugo Heden
0 siblings, 0 replies; 3+ messages in thread
From: Hugo Heden @ 2009-03-06 22:12 UTC (permalink / raw)
Cc: help-gnu-emacs
>> (A) make emacs show the file in read-only mode.
>
> emacs -t FILE --eval '(setq buffer-read-only t)'
>
>> (B) have the cursor automatically moved to the end of the file at
>> start-up.
>
> emacs -t FILE --eval '(goto-char (point-max))'
>
>> (C) possibly have emacs starting with auto-revert-tail-mode or
>> auto-revert-mode enabled as well..
>
> emacs -t FILE --eval '(auto-revert-tail-mode 1)'
>
[snip]
> --
> Kevin Rodgers
> Denver, Colorado, USA
>
Kevin, thanks a lot, this is excellent.
Best regards
Hugo Heden
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-03-06 22:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-22 19:32 Using emacs to view scrollback-buffer (from gnu-screen) Hugo Heden
2009-02-24 4:48 ` Kevin Rodgers
2009-03-06 22:12 ` Hugo Heden
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).