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:31:03 +0800 Message-ID: <87a6hfqtyg.fsf@yahoo.com> References: <87ilwd7zaq.fsf.ref@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> <87o85vquoi.fsf@yahoo.com> <83czmb4d50.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="18740"; 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:32:09 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 1mtnsO-0004fe-RU for ged-emacs-devel@m.gmane-mx.org; Sun, 05 Dec 2021 10:32:08 +0100 Original-Received: from localhost ([::1]:38430 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mtnsN-0002jM-B5 for ged-emacs-devel@m.gmane-mx.org; Sun, 05 Dec 2021 04:32:07 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:41048) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mtnrZ-00021v-Px for emacs-devel@gnu.org; Sun, 05 Dec 2021 04:31:17 -0500 Original-Received: from sonic306-20.consmr.mail.ne1.yahoo.com ([66.163.189.82]:36107) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mtnrX-0003Y7-BR for emacs-devel@gnu.org; Sun, 05 Dec 2021 04:31:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1638696673; bh=vmp9JuHrRuB1SgtRV08nWu9HYUZvN1DTtVjiC9pyw4c=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From:Subject:Reply-To; b=mvL1kDHLAG00YeB4FOo/vaRt7Mii/qz3yDA2t5CbQhp2Len6b9PEEAmI2SS4scT0mgwEm4QW3hO3JOAjtqpd5q9+v0Xq9A6h8uepDWmmYHcv61MwUing3gpc/mxH58uFOGyuIE1cPQzwlO9wB+NYoEY+uBuNzZ4lOWQ3wFQ4u3A/HrlcCefoPOmCaMPGuYr2K/Ad6mYscqzkchTB5vbgkcIrlqvoXOdPv/FvZTYt4bgoRVUo5ICiWNukIcLxQJ5+Nn2CHurnzI/oxqSLwwviiWHfpVagPNg8xTtQqxbFTcWJqueHkUhNEZ8xV8TLQe2RKgu3HalhNX0gxOSHI+jZkg== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1638696673; bh=m0c9+yEFSm7+5N0OGj0tR+tJH/dBbNr9U2NVC9w390b=; h=X-Sonic-MF:From:To:Subject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7nN5DS_NxPX7OLJvUqyEOKhjOf0bohtKuqyi MlvWiphsydLNwXZnkHCNBNGjjxOUy30mfglCbJf6LARCfU1DmMMagl2sNVvZEcdaJE2EPoOmHw5z LGNorzY9MaR2Po1rl7qPILIJNZS2GsmVBj_fzFd5To X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic306.consmr.mail.ne1.yahoo.com with HTTP; Sun, 5 Dec 2021 09:31:13 +0000 Original-Received: by kubenode519.mail-prod1.omega.sg3.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID b2772bd0597a189e583ed013bb6d07ae; Sun, 05 Dec 2021 09:31:09 +0000 (UTC) In-Reply-To: <83czmb4d50.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 05 Dec 2021 11:25:15 +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.189.82; envelope-from=luangruo@yahoo.com; helo=sonic306-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:280974 Archived-At: Eli Zaretskii writes: >> From: Po Lu >> Cc: dick.r.chiang@gmail.com, emacs-devel@gnu.org >> Date: Sun, 05 Dec 2021 17:15:25 +0800 >> >> >> 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? > > No, you can't. But the question is why do you need to? -1 there > means the cursor position is unknown. Why do you need to know more > than that, plus the fact that point is _allowed_ to be outside of the > window? > >> 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. > > It goes back to the same question I asked above: why do you need to > know that point is outside of the window? for what purposes? > > IOW, why not just let redisplay do its thing, without bothering to > bring point into the window, when that is allowed? I need to erase the phys cursor and to tell display_and_set_cursor to not draw it: otherwise, the ghost of the cursor remains on-screen even after point is moved out. Thanks.