From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: Allowing point to be outside the window? Date: Sun, 28 Nov 2021 14:03:23 +0000 Message-ID: References: <87ilwd7zaq.fsf.ref@yahoo.com> <87ilwd7zaq.fsf@yahoo.com> <83bl24yaed.fsf@gnu.org> <87sfvg7l51.fsf@yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13132"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , emacs-devel@gnu.org To: Po Lu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Nov 28 15:19:13 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mrL1N-0003Ff-DX for ged-emacs-devel@m.gmane-mx.org; Sun, 28 Nov 2021 15:19:13 +0100 Original-Received: from localhost ([::1]:39192 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mrL1L-0004IA-ED for ged-emacs-devel@m.gmane-mx.org; Sun, 28 Nov 2021 09:19:11 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:47052) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mrKmC-00043C-Hf for emacs-devel@gnu.org; Sun, 28 Nov 2021 09:03:32 -0500 Original-Received: from colin.muc.de ([193.149.48.1]:33968 helo=mail.muc.de) by eggs.gnu.org with smtp (Exim 4.90_1) (envelope-from ) id 1mrKm9-0005US-Aa for emacs-devel@gnu.org; Sun, 28 Nov 2021 09:03:32 -0500 Original-Received: (qmail 2183 invoked by uid 3782); 28 Nov 2021 14:03:27 -0000 Original-Received: from acm.muc.de (p4fe159fa.dip0.t-ipconnect.de [79.225.89.250]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Sun, 28 Nov 2021 15:03:26 +0100 Original-Received: (qmail 9946 invoked by uid 1000); 28 Nov 2021 14:03:23 -0000 Content-Disposition: inline In-Reply-To: <87sfvg7l51.fsf@yahoo.com> X-Submission-Agent: TMDA/1.3.x (Ph3nix) X-Primary-Address: acm@muc.de Received-SPF: pass client-ip=193.149.48.1; envelope-from=acm@muc.de; helo=mail.muc.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:280414 Archived-At: Hello, Po. On Sun, Nov 28, 2021 at 16:13:46 +0800, Po Lu wrote: > Eli Zaretskii writes: > >> From: Po Lu > >> Date: Sun, 28 Nov 2021 11:07:57 +0800 > >> I wonder what would be involved in allowing point to be outside a > >> window's visible area. Why would anybody want this? Why do you want this? This isn't a rhetorical question. Because other programs do it isn't a satisfactory reason. I detest this behaviour, and that Emacs doesn't (currently) do it is a large part of the reason why I use Emacs. With these other programs I experience a constant background stress, that the careless or accidental depression of a key causes BANG!!! and the text I was reading disappears for ever, being overwritten by the text around point. Also, as Eli has asked, how would you bring point back into the currently displayed window position? Please assume the user doesn't have a mouse, or dislikes using it. It would also be good to have some means of setting the mark there. > > Two steps: > > 1. Design the feature: how would it work? which operations would > > bring point back into the viewport, and which won't? For > > example, a simple question: if point is outside of the viewport, > > what is the effect of C-f or C-n on display? > The effect would be move point forward, or to the next line, and then to > recenter the window, so point is at the center of the window. In other words, a complete replacement of the window's previously displayed text by other text some arbitrary distance away. This is what I dislike so much, so hopefully this part of the feature would be optional. > Inserting text should probably recenter the window as well, if point is > outside the visible area (this is also how other programs behave). Again, this doesn't seem a good reason. > This is how other programs behave as well. > > IMO, it's a large job if done cleanly. Patches welcome. > Thanks, I will take a look at it. I think Eli was underestimating when he said it would be a large job. ;-) -- Alan Mackenzie (Nuremberg, Germany).