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 17:15:25 +0800 Message-ID: <87o85vquoi.fsf@yahoo.com> References: <87ilwd7zaq.fsf.ref@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> <87k0gkjzj3.fsf@dick> <87r1astsle.fsf@yahoo.com> <87ee6rubcz.fsf@yahoo.com> <83v9034j9z.fsf@gnu.org> <871r2rserm.fsf@yahoo.com> <83ilw34eui.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="38120"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.60 (gnu/linux) Cc: dick.r.chiang@gmail.com, 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 10:18:25 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 1mtnf7-0009gX-Fo for ged-emacs-devel@m.gmane-mx.org; Sun, 05 Dec 2021 10:18:25 +0100 Original-Received: from localhost ([::1]:57586 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mtnf5-0004HL-Vh for ged-emacs-devel@m.gmane-mx.org; Sun, 05 Dec 2021 04:18:23 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:38984) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mtncS-0001oq-Os for emacs-devel@gnu.org; Sun, 05 Dec 2021 04:15:40 -0500 Original-Received: from sonic305-20.consmr.mail.ne1.yahoo.com ([66.163.185.146]:39461) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mtncQ-0005Ym-ML for emacs-devel@gnu.org; Sun, 05 Dec 2021 04:15:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1638695736; bh=Xe4TIzPR9Fh8rxwN9knWXy+wjaT1/8dVohJUxCfz7io=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From:Subject:Reply-To; b=rq665mYDim9Ur3yvWyamaxLXKAIz5a32skuJxDH2Ba7KfZwo0VRWhDajEo4wTYlNzoaLDbQ/7q9jN44tsrchK1xl6iIEWEMBQdij1PoYSGHV8T7Wx8+8dhD8C1BPF4g9iRSscNLZj/fjAhNf1iHUT4otY1n0pf6vmRO3J7R09QjZz2Dup6zua2fsrVwwk12JGlJ8qHiyD9CR/TJHxVDE8Gw3MyXXi/NjCa+GnIc4YkbmZgatJtBUItR9SRWTSaD6dAdsqkGXB4asGb6II6hia7njL4aY9r+tTuUNJzTeSKi40eADfw50kw2baWJmMpZ1H1CHiVcD9LuHnNeN1Tkx9w== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1638695736; bh=i37cWYiOT+qbrn8v51irZthazTpt5sjxC9O6j4oDQpN=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=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j49JcyAhZeku_X4 82Xi0m3SEUDYY74j0KROVlBOmlyHSoD08qx_zemug8pz_Gm.2dB_d3m4douFmv3UIgsM4144RN3B OD4DmU9yCsU4_IYQX5Y6A_LtNg90arnYD5pGS4nDEU 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 09:15:36 +0000 Original-Received: by kubenode510.mail-prod1.omega.sg3.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID 17bbf8125a7b88937c7e2b7f6130799d; Sun, 05 Dec 2021 09:15:29 +0000 (UTC) In-Reply-To: <83ilw34eui.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 05 Dec 2021 10:48:21 +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.146; envelope-from=luangruo@yahoo.com; helo=sonic305-20.consmr.mail.ne1.yahoo.com X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.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, FREEMAIL_REPLY=1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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:280972 Archived-At: Eli Zaretskii writes: >> From: Po Lu >> Cc: dick.r.chiang@gmail.com, emacs-devel@gnu.org >> Date: Sun, 05 Dec 2021 15:16:13 +0800 >> >> >> Can that value be relied on? >> > >> > Depends what for and how you want to rely on it. It basically says >> > that the cursor position inside the window is unknown. The "normal" >> > redisplay must always calculate some reasonable coordinates and put >> > them there, otherwise the cursor will not be visible, which is a >> > display bug. If that is enough for you, then yes, you can rely on it. >> >> I meant to ask whether or not I can forgo calculating whether point is >> outside the window, and just test whether or not cursor.vpos is -1 to >> determine if the cursor should be displayed, when point is allowed to be >> outside the window. > > No. I think it should be the other way around: first see if point is > outside of the window, then force cursor.vpos to be negative. That's > because redisplay resets that value to -1 whenever it isn't sure the > cursor will stay in its old position. Thanks. Another question or two: I can't use the value "-1" for cursor.vpos to indicate that point is outside the window, as it's already treated specially by redisplay, correct? Also, where should I put the code to test if cursor is invisible? I think it should be after the label force_start, as forcing the start could potentially adjust point to be inside the window.