From: kai.grossjohann@uni-duisburg.de (Kai Großjohann)
Subject: Re: Emacs pager?
Date: Thu, 19 Dec 2002 12:24:48 +0100 [thread overview]
Message-ID: <84isxqjlof.fsf@lucy.cs.uni-dortmund.de> (raw)
In-Reply-To: 87lm2mzeom.fsf@blind-bat.une.edu.au
Tim X <timx@spamto.devnul.com> writes:
> Actually, on a serious note, if you do maintain an emacs session (I
> start mine at boot and only close it down when I turn-off/reboot -
> about 2-4 times a year), you should be able to setup the emacs server
> or gnuserv and a fake "more/less" so that the file is sent to emacs
> and you can do your paging there.
I like to use eshell. Very nifty. Here is my version of less for
eshell:
(defun eshell/less (&rest args)
"Invoke `view-file' on the file.
\"less +42 foo\" also goes to line 42 in the buffer."
(while args
(if (string-match "\\`\\+\\([0-9]+\\)\\'" (car args))
(let* ((line (string-to-number (match-string 1 (pop args))))
(file (pop args)))
(view-file file)
(goto-line line))
(view-file (pop args)))))
The voodoo is for the line numbers. If you don't need it, this should
do, as well:
(defun eshell/less (&rest args)
"Invoke `view-file' on the given file(s)."
(while args (view-file (pop args))))
You can configure the key bindings of view-file, too. view-mode-map
is the variable I believe.
--
~/.signature is: umop ap!sdn (Frank Nobis)
next prev parent reply other threads:[~2002-12-19 11:24 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-12-18 23:26 Emacs pager? Da Witch
2002-12-18 23:30 ` David Kastrup
2002-12-19 6:49 ` Tim X
2002-12-19 11:24 ` Kai Großjohann [this message]
2002-12-19 22:36 ` Tim X
2002-12-22 19:42 ` Lowell Gilbert
2002-12-22 19:49 ` Kai Großjohann
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=84isxqjlof.fsf@lucy.cs.uni-dortmund.de \
--to=kai.grossjohann@uni-duisburg.de \
/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.
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.