From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Allowing point to be outside the window? Date: Sun, 05 Dec 2021 11:03:34 +0200 Message-ID: <83h7bn4e55.fsf@gnu.org> References: <87ilwd7zaq.fsf.ref@yahoo.com> <87ilwd7zaq.fsf@yahoo.com> <83bl24yaed.fsf@gnu.org> <87sfvg7l51.fsf@yahoo.com> <83zgpowu23.fsf@gnu.org> <87zgpo5tws.fsf@yahoo.com> <83pmqkwi6r.fsf@gnu.org> <87v90c5su6.fsf@yahoo.com> <83o864wg2a.fsf@gnu.org> <87ilwb68ck.fsf@yahoo.com> <83zgpnunfo.fsf@gnu.org> <87fsrf3xmd.fsf@yahoo.com> <83y257ulfp.fsf@gnu.org> <8735ne4e0e.fsf@yahoo.com> <87czmcvcs1.fsf@yahoo.com> <83sfv85y36.fsf@gnu.org> <87v904tsvv.fsf@yahoo.com> <83h7bo5m1x.fsf@gnu.org> <87ilw3ubfp.fsf@yahoo.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11168"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Po Lu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Dec 05 10:04:22 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 1mtnRV-0002fU-7w for ged-emacs-devel@m.gmane-mx.org; Sun, 05 Dec 2021 10:04:21 +0100 Original-Received: from localhost ([::1]:47092 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mtnRT-0005lI-TE for ged-emacs-devel@m.gmane-mx.org; Sun, 05 Dec 2021 04:04:19 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:37010) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mtnQr-000556-FL for emacs-devel@gnu.org; Sun, 05 Dec 2021 04:03:41 -0500 Original-Received: from [2001:470:142:3::e] (port=34266 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mtnQq-0004fr-NU; Sun, 05 Dec 2021 04:03:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=Cczm8SclGVMdOMVT5qqi2fwxkbjen3X4CWOQZT28V6Q=; b=m1o0/P8HhcM4 SEy/VgpvvYKAyyOi5aXhEP0qtn9CqWbuJvicZxlNsln19H62hug2xDFV47sgm+LBQnaI0Df6mG5vF /m/wVFKsIukB4s2eoV6wEqs90yQR/lZqPzFHW9uPrnbVxsdHNPN46oaRV0OsyPqbI3mWTHMss0mVl wPCL5xnI+NC15WBhBukCMeVRuzBCG44YT6YLxFyUv1mnZRwL6H4sU5awyZnlxW1QymNyfC50Xz77b AVIN1Qe48ciTz+nfvW2AYcrCw2ZUTbvAZkXKgUw8Z8cR5KUdJjsPtpUHdGsMRZh7N43WJJ4Ct47Nn ihLv8LHHmBb/OvCZwp+A2g==; Original-Received: from [87.69.77.57] (port=1726 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mtnQp-00011L-Q6; Sun, 05 Dec 2021 04:03:40 -0500 In-Reply-To: <87ilw3ubfp.fsf@yahoo.com> (message from Po Lu on Sun, 05 Dec 2021 08:45:14 +0800) 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:280971 Archived-At: > From: Po Lu > Cc: emacs-devel@gnu.org > Date: Sun, 05 Dec 2021 08:45:14 +0800 > > Eli Zaretskii writes: > > > Btw, one issue that I couldn't figure out from reading the patch is > > how do you intend to distinguish between point going out of the > > viewport by an explicit user command (which AFAIU is what we want to > > support in this new mode), and point going out of the viewport for > > some other reason, for example text insertion before point? > > Specifically, the bother is this: if we just disable/bypass all the > > places where Emacs brings point back into the window, we could find > > point outside of the window without the user meaning that to happen, > > and the disabled/bypassed code will then leave point invisible. > > Hmm, how about not allowing point to _move_ out of the window, instead > only allowing window start to move so that point becomes invisible? That'd cover scrolling a window in a way that leaves point outside of it. But Emacs also sets the window-start position in other situations. Moreover, the display engine itself does that, see redisplay_window. So some logic and/or flags will be needed to distinguish between the cases. > For instance, we could enable the code that scrolls the window to follow > point if PT != w->point (if that makes sense). So any change in the numerical value of point will scroll the window to bring point into the view? That'd be fine if that's what users expect. But do they? E.g., what happens if point is below the window, and you paste (with the mouse) some text into the visible portion of the window (which doesn't show point)?