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: Thu, 09 Dec 2021 17:22:52 +0800 Message-ID: <87lf0ub09f.fsf@yahoo.com> References: <87ilwd7zaq.fsf.ref@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> <83h7bn4e55.fsf@gnu.org> <877dcipjmk.fsf@yahoo.com> <83mtld254e.fsf@gnu.org> <87lf0xjgxu.fsf@yahoo.com> <83ilw0zg38.fsf@gnu.org> <87mtlbgajq.fsf@yahoo.com> <83czm7vx0s.fsf@gnu.org> <87mtlad3sv.fsf@yahoo.com> <83mtlaurxj.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="39180"; 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 Thu Dec 09 10:24:16 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 1mvFey-000A1e-4B for ged-emacs-devel@m.gmane-mx.org; Thu, 09 Dec 2021 10:24:16 +0100 Original-Received: from localhost ([::1]:53588 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mvFew-0000gv-Qg for ged-emacs-devel@m.gmane-mx.org; Thu, 09 Dec 2021 04:24:14 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:46146) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mvFdp-0008Po-OV for emacs-devel@gnu.org; Thu, 09 Dec 2021 04:23:05 -0500 Original-Received: from sonic316-22.consmr.mail.ne1.yahoo.com ([66.163.187.148]:42096) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mvFdo-0005Ii-1y for emacs-devel@gnu.org; Thu, 09 Dec 2021 04:23:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1639041782; bh=nRlDMdByKdgamau7G9ugPdINinAUmvK/5oRtnfcMzK0=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From:Subject:Reply-To; b=MoNGdv8iOlQoIyLl6bZ6ExNaMT+TJX+XDgKk8s7hcy0UYG6jh1/PD1X3NtjR94ZaKAaxo+H1MD9NJLQz65tTM6qziwGICEuWMzCY5LEN0VCdnWwn8eXvAKTO226NfN4hBrBzfciNr2VmqfHsmtmjwa/ouhuhYV4P74g9+kHwMaMd7HmjV0+tKjTNTDeoQ8v6QD7JZx9HonDEQBacwY0iYf1muwGp30QFt3yO9OUa2I5HuYWh0aCEtqyM7uIiFqEyjIygkLsvWQxIlzz+FuHx9eSQP3de6+gkWTfJvJJoqVTPPIZVqESDYlzyguKM4u6l/4G1JHI0PRi/uviiPrE5rQ== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1639041782; bh=2nh4TsrJS1L/va48TqwS3q30qIcOX9zB0axgURIqh3o=; h=X-Sonic-MF:From:To:Subject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UDWomoCEl14mTM8wFeZxiWdMUCwYeqKux8Sx7UJ6ovKYA2IPSfiYHs slvTLB2__Ty6CWsjCOAqUkwIHZPAAnS95Dkaz8wGWtb0agCCYXhu.4Yy5pyzS7xjiUUS.e0UbEmf QvjYxMnsQas69uTmWiLEBhrcEmpv7jfY0ACI64Ipd9 X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic316.consmr.mail.ne1.yahoo.com with HTTP; Thu, 9 Dec 2021 09:23:02 +0000 Original-Received: by kubenode518.mail-prod1.omega.sg3.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID 4059ed1bd12ecd5a22a806b607c03305; Thu, 09 Dec 2021 09:22:56 +0000 (UTC) In-Reply-To: <83mtlaurxj.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 09 Dec 2021 10:02:32 +0200") X-Mailer: WebService/1.1.19415 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Received-SPF: pass client-ip=66.163.187.148; envelope-from=luangruo@yahoo.com; helo=sonic316-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=ham 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:281467 Archived-At: Eli Zaretskii writes: > Now, window-start is a marker, so theoretically we could use the same > marker with the buffer position updated due to the insertion, in which > case the stuff displayed in the window may stay unchanged. I don't know, because I can't think of what other programs do in this situation, as they generally don't have commands that insert text outside the visible area. Perhaps someone else can chime in at this point. > But is this what users will expect? And if this is not what users > expect, i.e. if we will need to recompute window-start anew in that > case, we cannot use the "recenter around point" fallback. Likewise > with bringing point into the view: will this be what users expect in > the described situation? I see what you mean now. We could have a user option that says one of the following: - If the text before the window start changes, use the current value of the window start marker. - If the text before the window start changes, bring point into view. - If the text before the window start changes, try to move window start so that point appears in the middle of the window. If that is not possible, move window start to the location that will cause point to appear closest to the middle of the window. BTW, how would you recommend to determine inside redisplay whether the text before the start of the window has changed? Thanks.