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: Tue, 08 Apr 2008 12:20:29 +0200 Message-ID: <47FB46ED.6080509@gmail.com> References: <47F945C3.1060103@harpegolden.net> <20080406230056.GB5362@muc.de> <47F961D2.7080002@harpegolden.net> <20080407212617.GC2078@muc.de> <47FA9405.2090907@gmail.com> <20080408100517.GB2937@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 1207650060 21405 80.91.229.12 (8 Apr 2008 10:21:00 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 8 Apr 2008 10:21:00 +0000 (UTC) Cc: Glenn Morris , David De La Harpe Golden , emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Apr 08 12:21:32 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 1JjAxB-0001Xf-Cl for ged-emacs-devel@m.gmane.org; Tue, 08 Apr 2008 12:21:25 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JjAwX-0001Mb-VR for ged-emacs-devel@m.gmane.org; Tue, 08 Apr 2008 06:20:45 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JjAwT-0001M5-UQ for emacs-devel@gnu.org; Tue, 08 Apr 2008 06:20:41 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JjAwS-0001Ll-G2 for emacs-devel@gnu.org; Tue, 08 Apr 2008 06:20:41 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JjAwS-0001Li-6C for emacs-devel@gnu.org; Tue, 08 Apr 2008 06:20:40 -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 1JjAwN-0005qA-Kf; Tue, 08 Apr 2008 06:20:36 -0400 Original-Received: from c83-254-150-27.bredband.comhem.se ([83.254.150.27]:63893 helo=[127.0.0.1]) by ch-smtp02.sth.basefarm.net with esmtp (Exim 4.68) (envelope-from ) id 1JjAwL-0005Wc-80; Tue, 08 Apr 2008 12:20:33 +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: <20080408100517.GB2937@muc.de> X-Antivirus: avast! (VPS 080408-0, 2008-04-08), Outbound message X-Antivirus-Status: Clean X-Originating-IP: 83.254.150.27 X-Scan-Result: No virus found in message 1JjAwL-0005Wc-80. X-Scan-Signature: ch-smtp02.sth.basefarm.net 1JjAwL-0005Wc-80 39c46806284d8f7cd2db329803d09d54 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:94689 Archived-At: Alan Mackenzie wrote: > Morning, Lennart! Morning, Alan! > On Mon, Apr 07, 2008 at 11:37:09PM +0200, Lennart Borgman (gmail) wrote: >> 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 to: > >> - Regard the buffer in a kind of read-only state when the window-point >> is outside the window ;-) > > Hmm. > >> - 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. > > Sorry, I can't parse that. What is "window-point"? Does "where it was" > refer to the buffer position, or the position on the screen relative to > the top of the window? window-point? Just a little joke. We are talking about the buffer point in the current window. The function window-point returns that. window-point may in the situation pictured above still return the point, but it is outside the window ... (or maybe it could return nil?) "where it was": I meant the position on the screen. >> Don't do more (ie do not execute the command), just tell that point was >> outside of the window therefore have been brought back. > > Don't execute the command? Yikes!! Yet one more frivolous item of state > to clog up one's brain. Yes, I think that must be the price if you always want to be able to see what you are doing. (This could be made an option - perhaps.) > And a few million "..., except when ...."s to > clog up commands' doc strings. Not much to add there I think. A note somewhere about scrolling is all I can see is really needed.