From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Lennart Borgman (gmail)" Newsgroups: gmane.emacs.help Subject: Re: make ctrl+v (page-down) move even when near the end of document Date: Wed, 02 Apr 2008 18:57:34 +0200 Message-ID: <47F3BAFE.4030803@gmail.com> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1207155493 27151 80.91.229.12 (2 Apr 2008 16:58:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 2 Apr 2008 16:58:13 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Apr 02 18:58:45 2008 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 1Jh6IM-0000gP-Jc for geh-help-gnu-emacs@m.gmane.org; Wed, 02 Apr 2008 18:58:42 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jh6Hk-0002aT-Fb for geh-help-gnu-emacs@m.gmane.org; Wed, 02 Apr 2008 12:58:04 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Jh6HR-0002aH-VS for help-gnu-emacs@gnu.org; Wed, 02 Apr 2008 12:57:45 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Jh6HO-0002Zl-J2 for help-gnu-emacs@gnu.org; Wed, 02 Apr 2008 12:57:45 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jh6HO-0002Zf-7H for help-gnu-emacs@gnu.org; Wed, 02 Apr 2008 12:57:42 -0400 Original-Received: from ch-smtp01.sth.basefarm.net ([80.76.149.212]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Jh6HM-0007t0-HF for help-gnu-emacs@gnu.org; Wed, 02 Apr 2008 12:57:41 -0400 Original-Received: from c83-254-150-27.bredband.comhem.se ([83.254.150.27]:62605 helo=[127.0.0.1]) by ch-smtp01.sth.basefarm.net with esmtp (Exim 4.68) (envelope-from ) id 1Jh6HK-0000um-5z for help-gnu-emacs@gnu.org; Wed, 02 Apr 2008 18:57:39 +0200 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666 In-Reply-To: X-Antivirus: avast! (VPS 080401-0, 2008-04-01), Outbound message X-Antivirus-Status: Clean X-Originating-IP: 83.254.150.27 X-Scan-Result: No virus found in message 1Jh6HK-0000um-5z. X-Scan-Signature: ch-smtp01.sth.basefarm.net 1Jh6HK-0000um-5z 8645c55b0040a15eab00a73216ba3278 X-detected-kernel: by monty-python.gnu.org: Linux 2.6? (barebone, rare!) 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:52980 Archived-At: B. T. Raven wrote: > Pavol Murin wrote: >> hello fellow emacs users, >> I would like to make ctrl+v like page-down (and page-up) do in other >> applications when near the beginning or end of the document. This >> means that when the point cannot move by a full page, it moves to the >> first or last position in the document. I can program it in elisp, but >> there might be a simpler solution (maybe a different function to >> bind)? >> >> thanks, muro >> >> > > The pertinent code that would have to be hacked is in window.c and the > only other candidate I see is the variable next-screen-context-lines, > also in window.c Maybe if you can make a good case for the usefulness > of this behavior, someone will change the code for you. Out of > curiosity, why do you care if the cursor is exactly at top or bottom of > buffer as long as you can see the text there. Immediately after the last > M-v or C-v you can M-< or M-> if you need extreme cursor movement. cua-mode has the code for this. It is however bound to PgUp/Down.