[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using emacs to view scrollback-buffer (from gnu-screen)

From: Kevin Rodgers
Subject: Re: Using emacs to view scrollback-buffer (from gnu-screen)
Date: Mon, 23 Feb 2009 21:48:19 -0700
User-agent: Thunderbird (Macintosh/20081209)

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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]