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:25:15 +0200 Message-ID: <83czmb4d50.fsf@gnu.org> 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> <87o85vquoi.fsf@yahoo.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35697"; mail-complaints-to="usenet@ciao.gmane.io" Cc: dick.r.chiang@gmail.com, 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:26:54 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 1mtnnJ-00092f-OL for ged-emacs-devel@m.gmane-mx.org; Sun, 05 Dec 2021 10:26:53 +0100 Original-Received: from localhost ([::1]:33572 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mtnnI-0007Xw-7V for ged-emacs-devel@m.gmane-mx.org; Sun, 05 Dec 2021 04:26:52 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:40290) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mtnlt-0006kg-S7 for emacs-devel@gnu.org; Sun, 05 Dec 2021 04:25:25 -0500 Original-Received: from [2001:470:142:3::e] (port=35038 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 1mtnlt-0002iV-Jq; Sun, 05 Dec 2021 04:25:25 -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=2TeGVZlfWcD6XdCIqX61ugFY7LwxqecijgD3IpdfbSo=; b=jPLxSBVKm0xE 9yHXmscDeKVKEBnISNTI8u6012X8h//tSmS58URIA6yVCUDC0egPSpnujHpmeNBR0APXU6o6nOfYv vObrAMTup3djVFWNyvujf5iOgAI3l2cwodYT1ZSqAwr00OOh2KGf84bvAeqZw8wZzp3k6+jcrivtx uYF5W8NztWkMb0BM+i8egi34NrMwLAfmJDEf1EYccU/An9WpnEJ0/OtReGv3fEcoQe5q/5WgGhTeH Hv7ZI3nwREWRYUglastmDlg3gYMiBIqRMkEExvQ2/bAfFTs9qwenadmRJzkbhtEPiAtNGYVBRM3QJ pqc8BDq2jVYmAJE3A5d23g==; Original-Received: from [87.69.77.57] (port=3157 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 1mtnls-0006Qg-OM; Sun, 05 Dec 2021 04:25:25 -0500 In-Reply-To: <87o85vquoi.fsf@yahoo.com> (message from Po Lu on Sun, 05 Dec 2021 17:15:25 +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:280973 Archived-At: > 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?