From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Lennart Borgman (gmail)" Newsgroups: gmane.emacs.devel Subject: Re: Preserving sanity in Emacs [Re: rampant region highlighting] Date: Mon, 07 Apr 2008 23:37:09 +0200 Message-ID: <47FA9405.2090907@gmail.com> References: <47F945C3.1060103@harpegolden.net> <20080406230056.GB5362@muc.de> <47F961D2.7080002@harpegolden.net> <20080407212617.GC2078@muc.de> 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 1207604286 1741 80.91.229.12 (7 Apr 2008 21:38:06 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 7 Apr 2008 21:38:06 +0000 (UTC) Cc: Glenn Morris , emacs-devel@gnu.org, David De La Harpe Golden To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Apr 07 23:38:38 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Jiz2z-0000HR-SZ for ged-emacs-devel@m.gmane.org; Mon, 07 Apr 2008 23:38:38 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jiz2M-0004LD-KH for ged-emacs-devel@m.gmane.org; Mon, 07 Apr 2008 17:37:58 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Jiz2J-0004JQ-0E for emacs-devel@gnu.org; Mon, 07 Apr 2008 17:37:55 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Jiz2H-0004I9-Fo for emacs-devel@gnu.org; Mon, 07 Apr 2008 17:37:54 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jiz2H-0004I2-CV for emacs-devel@gnu.org; Mon, 07 Apr 2008 17:37:53 -0400 Original-Received: from ch-smtp02.sth.basefarm.net ([80.76.149.213]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Jiz2C-0004h9-U1; Mon, 07 Apr 2008 17:37:49 -0400 Original-Received: from c83-254-150-27.bredband.comhem.se ([83.254.150.27]:62717 helo=[127.0.0.1]) by ch-smtp02.sth.basefarm.net with esmtp (Exim 4.68) (envelope-from ) id 1Jiz29-0005BS-7B; Mon, 07 Apr 2008 23:37:45 +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: <20080407212617.GC2078@muc.de> X-Antivirus: avast! (VPS 080407-1, 2008-04-07), Outbound message X-Antivirus-Status: Clean X-Originating-IP: 83.254.150.27 X-Scan-Result: No virus found in message 1Jiz29-0005BS-7B. X-Scan-Signature: ch-smtp02.sth.basefarm.net 1Jiz29-0005BS-7B fd772f20f2bc39814c5c28f77b2929db X-detected-kernel: by monty-python.gnu.org: Linux 2.6? (barebone, rare!) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:94629 Archived-At: Alan Mackenzie wrote: >> I acknowledge that having the point always on-screen has benefits too >> (though e.g. a fringe indicator could "point towards the offscreen >> point" to address some concerns there...), but what if I'm just >> scrolling up to look at something? Martin's hack ensured that I can >> scroll away to have a look, and the point will reliably be where I left >> it when I scrolled back. > > The functions you're talking about are fulfilled in Emacs by the mark, > not the point. I frequently scoll a bit to look at things. Then I > scroll back to get where I was, unless I want to stay where I've got to. > > The point is, by your mechanism, having scrolled away from point (leaving > point off the screen), how do you then indicate where on the screen you > want point to be set to, and how do you set point there? The general > Emacs answer is that you indicate a position by setting point. Hmm. > We're going round in circles. (You're presumably going to say "you click > the mouse to set point." This violates the Emacs principle that > everything must be doable without a mouse.) Another way to look at this would perhaps be too: - Regard the buffer in a kind of read-only state when the window-point is outside the window ;-) - If a command concerns the current buffer and it is not a scroll command then just bring back window-point to where it was inside the window before scrolling. Don't do more (ie do not execute the command), just tell that point was outside of the window therefore have been brought back.