unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Kevin Rodgers <kevin.d.rodgers@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Using emacs to view scrollback-buffer (from gnu-screen)
Date: Mon, 23 Feb 2009 21:48:19 -0700	[thread overview]
Message-ID: <gnvu5v$tp0$1@ger.gmane.org> (raw)
In-Reply-To: <2bdf908c0902221132n7ffe75bcv2c6dacb29995823c@mail.gmail.com>

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





  reply	other threads:[~2009-02-24  4:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-22 19:32 Using emacs to view scrollback-buffer (from gnu-screen) Hugo Heden
2009-02-24  4:48 ` Kevin Rodgers [this message]
2009-03-06 22:12   ` Hugo Heden

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='gnvu5v$tp0$1@ger.gmane.org' \
    --to=kevin.d.rodgers@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).