From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: chming Newsgroups: gmane.emacs.help Subject: Re: `scroll-conservatively' Date: 27 May 2007 12:37:10 -0700 Organization: http://groups.google.com Message-ID: <1180294630.076187.205470@i13g2000prf.googlegroups.com> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: sea.gmane.org 1180301166 31244 80.91.229.12 (27 May 2007 21:26:06 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 27 May 2007 21:26:06 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun May 27 23:26:04 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HsQFX-00030l-TE for geh-help-gnu-emacs@m.gmane.org; Sun, 27 May 2007 23:26:04 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HsQFX-0004DY-EP for geh-help-gnu-emacs@m.gmane.org; Sun, 27 May 2007 17:26:03 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!i13g2000prf.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 44 Original-NNTP-Posting-Host: 75.32.186.245 Original-X-Trace: posting.google.com 1180294645 8515 127.0.0.1 (27 May 2007 19:37:25 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Sun, 27 May 2007 19:37:25 +0000 (UTC) In-Reply-To: User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: i13g2000prf.googlegroups.com; posting-host=75.32.186.245; posting-account=0sO21A0AAAD-5GxMpFEoE70QXzu9CWxo Original-Xref: shelby.stanford.edu gnu.emacs.help:148899 X-Mailman-Approved-At: Sun, 27 May 2007 17:25:50 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:44489 Archived-At: flet it go. try this way: (defun scroll-one-line-up (&optional arg) "Scroll the selected window up (forward in the text) one line (or N lines)." (interactive "p") (let ((pos (save-excursion (forward-line (* arg -1)) (point)))) (if (not (pos-visible-in-window-p pos)) (progn (scroll-down (or arg 1)) (forward-line -1)) (forward-line (* arg -1))))) (defun scroll-one-line-down (&optional arg) "Scroll the selected window down (backward in the text) one line (or N)." (interactive "p") (let ((pos (save-excursion (forward-line (or arg 1)) (point)))) (if (not (pos-visible-in-window-p pos)) (progn (scroll-up (or arg 1)) (forward-line (or arg 1))) (forward-line (or arg 1))))) (global-set-key (kbd "C-p") 'scroll-one-line-up) (global-set-key (kbd "C-n") 'scroll-one-line-down) On May 27, 11:17 am, Leo wrote: > Hi all, > > I try to set scroll-conservatively to an integer, however I fail to see > the difference for different integers. Ideas? > > Thanks, > -- > Leo (GPG Key: 9283AA3F)