From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: kai.grossjohann@uni-duisburg.de (Kai =?iso-8859-1?q?Gro=DFjohann?=) Newsgroups: gmane.emacs.help Subject: Re: Emacs pager? Date: Thu, 19 Dec 2002 12:24:48 +0100 Organization: University of Dortmund, Germany Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <84isxqjlof.fsf@lucy.cs.uni-dortmund.de> References: <87lm2mzeom.fsf@blind-bat.une.edu.au> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1040297155 2549 80.91.224.249 (19 Dec 2002 11:25:55 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 19 Dec 2002 11:25:55 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18OyoM-0000ez-00 for ; Thu, 19 Dec 2002 12:25:54 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18Oyo4-00031Q-00 for gnu-help-gnu-emacs@m.gmane.org; Thu, 19 Dec 2002 06:25:36 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!skynet.be!skynet.be!fu-berlin.de!uni-berlin.de!lucy.is.informatik.uni-duisburg.DE!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 34 Original-NNTP-Posting-Host: lucy.is.informatik.uni-duisburg.de (134.91.35.216) Original-X-Trace: fu-berlin.de 1040297085 2328692 134.91.35.216 (16 [73968]) User-Agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.2.93 (i686-pc-linux-gnu) Cancel-Lock: sha1:zY8J5p7bIRVUE+d6w1BcfEv1qp8= Original-Xref: shelby.stanford.edu gnu.emacs.help:108292 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:4821 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:4821 Tim X 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)