From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu Newsgroups: gmane.emacs.devel Subject: Re: Allowing point to be outside the window? Date: Sun, 05 Dec 2021 08:40:51 +0800 Message-ID: <87mtlfubn0.fsf@yahoo.com> 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> <83mtlg5oeq.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5436"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.60 (gnu/linux) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Dec 05 01:42:44 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 1mtfc4-0001HI-02 for ged-emacs-devel@m.gmane-mx.org; Sun, 05 Dec 2021 01:42:44 +0100 Original-Received: from localhost ([::1]:45168 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mtfc2-0004r7-IX for ged-emacs-devel@m.gmane-mx.org; Sat, 04 Dec 2021 19:42:42 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:55756) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mtfaT-0004Af-SJ for emacs-devel@gnu.org; Sat, 04 Dec 2021 19:41:06 -0500 Original-Received: from sonic305-22.consmr.mail.ne1.yahoo.com ([66.163.185.148]:34875) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mtfaP-0005Ov-Ik for emacs-devel@gnu.org; Sat, 04 Dec 2021 19:41:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1638664859; bh=qZ4ahLzM+FjWH5e93WT35OW7apfchK2MWIP1ioYKNl8=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From:Subject:Reply-To; b=ANf+mq090o7pOYUZylZrwNOYJVtYnIlK2sEq0KBTQEw+cjMwIfTpTQglvidfGrJlk5TSJEa8jWFjjVeuDrShCu1Njg9mL8cfdOocL7dq9SeGqGMAj4Lq8yJE/3eHV791yuLF/KsJNLWC/YLhdzm0fWOX4s+uXx+iWe0nk23bVYZNtEvBI6L22k1isohrKnROxX/j8HEX66ufiN3qYf81SOdAvKHuBiuuaDrfhbe1ed1qt8iyO2ETui2/aOyF7P0U3hckvuZrjdZxVi7wC9W3sBaGiT3zmfgoZwlxE1M2LxWu0Yh+NhxnIEdZBOvZc55H8k+NIiQUMQXj2oKGhzJ+xQ== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1638664859; bh=Flnlj9FwQhpIa//6fvbS8VXTp2cFYj/iOaiIQVfE3EP=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=EYJPn5CAbb1tic4H/rJWD9hnpX99draju0w5mv0FZs9wk9W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Fr61AzyjdQ7JW95tALCf1Oo4QusW5xhmswoBZGugEcC7gPcBVc851fQ lyVHeQqsdmTcL2CP1IRn_H_6NusGmoQBL3YrmheNE3 X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic305.consmr.mail.ne1.yahoo.com with HTTP; Sun, 5 Dec 2021 00:40:59 +0000 Original-Received: by kubenode518.mail-prod1.omega.sg3.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID fb49b1ba44b51ded94e98f8589d1a299; Sun, 05 Dec 2021 00:40:56 +0000 (UTC) In-Reply-To: <83mtlg5oeq.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 04 Dec 2021 18:24:13 +0200") X-Mailer: WebService/1.1.19306 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Received-SPF: pass client-ip=66.163.185.148; envelope-from=luangruo@yahoo.com; helo=sonic305-22.consmr.mail.ne1.yahoo.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, 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:280949 Archived-At: Eli Zaretskii writes: > Which commands did you try in addition to goto-char? What about > scrolling commands? I haven't worked on any of the scrolling commands yet: they still keep point inside the window. >> The idea is that if `set_cursor_from_row' returns false (say if the >> cursor was not found to be in the row), w->cursor_visible will also be >> set to false. > But you are just wasting cycles that way. When it is known that point > is outside of the window, that function will end up being called for > every screen line we lay out. Instead, just set the result without > calling it in those cases. >> I don't understand why set_cursor_from_row should be disabled though: >> isn't it responsible for placing the cursor on the display (and as such, >> isn't it required for the cursor to be displayed when point is _inside_ >> the window?). > Yes. I meant when you know that point is outside of the window. Thanks, I understand your point now. >> Doesn't `try_scrolling' try to constrain point inside if it is too near >> the end of the window? > Among other things, yes. But its main purpose is not to move point, > it's to find a suitable window-start position. Thanks. >> (And isn't the optimization that tries to decide whether or not to >> blit the display if appropriate `scrolling_window' in dispextern.c?) > scrolling_window belongs to the second phase of a redisplay cycle, > where we actually deliver glyphs to the glass. try_scrolling is from > the first phase, where we decide what should be on the glass. > > In any case, both try_scrolling and scrolling_window are not about > bringing point back into view, they are about redrawing the window so > that it correctly reflects the buffer contents. So these functions > cannot and shouldn't be bypassed, even in this mode. > >> > The condition above doesn't check the keep_point_visible flag, why? >> w->cursor_visible_p should always be true if keep_point_visible is not >> nil by the time we get there. > There should be a comment there about this, and perhaps also an > assertion. Okay, I will do that. Thanks.