From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#34038: 26.1; set-window-start sometimes fails to set window start Date: Fri, 11 Jan 2019 15:36:13 +0200 Message-ID: <83d0p3gvua.fsf@gnu.org> References: <83sgxzhe04.fsf@gnu.org> <87ef9je67i.fsf@metalevel.at> NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1547213706 17383 195.159.176.226 (11 Jan 2019 13:35:06 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 11 Jan 2019 13:35:06 +0000 (UTC) Cc: 34038@debbugs.gnu.org To: Markus Triska Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jan 11 14:35:02 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ghwxi-0004Og-6w for geb-bug-gnu-emacs@m.gmane.org; Fri, 11 Jan 2019 14:35:02 +0100 Original-Received: from localhost ([127.0.0.1]:53908 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ghwzp-00053v-3t for geb-bug-gnu-emacs@m.gmane.org; Fri, 11 Jan 2019 08:37:13 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:39873) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ghwzf-000533-6L for bug-gnu-emacs@gnu.org; Fri, 11 Jan 2019 08:37:03 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ghwze-0006wP-HC for bug-gnu-emacs@gnu.org; Fri, 11 Jan 2019 08:37:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55474) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ghwze-0006ub-DX for bug-gnu-emacs@gnu.org; Fri, 11 Jan 2019 08:37:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ghwze-0007d2-4m for bug-gnu-emacs@gnu.org; Fri, 11 Jan 2019 08:37:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 11 Jan 2019 13:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34038 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 34038-submit@debbugs.gnu.org id=B34038.154721379829297 (code B ref 34038); Fri, 11 Jan 2019 13:37:02 +0000 Original-Received: (at 34038) by debbugs.gnu.org; 11 Jan 2019 13:36:38 +0000 Original-Received: from localhost ([127.0.0.1]:54755 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ghwzE-0007cQ-Rt for submit@debbugs.gnu.org; Fri, 11 Jan 2019 08:36:38 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:57665) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ghwzA-0007cA-L4 for 34038@debbugs.gnu.org; Fri, 11 Jan 2019 08:36:35 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:44516) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ghwz1-00055T-Hf; Fri, 11 Jan 2019 08:36:24 -0500 Original-Received: from [176.228.60.248] (port=3452 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1ghwz1-0005Vf-5H; Fri, 11 Jan 2019 08:36:23 -0500 In-reply-to: <87ef9je67i.fsf@metalevel.at> (message from Markus Triska on Fri, 11 Jan 2019 13:20:33 +0100) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:154345 Archived-At: > From: Markus Triska > Cc: 34038@debbugs.gnu.org > Date: Fri, 11 Jan 2019 13:20:33 +0100 > > Eli Zaretskii writes: > > > I think this happens because you call set-window-start with last > > argument non-nil. Doing that tells the display engine that the > > window-start point is just a suggestion, not a hard requirement. > > In the documentation of set-window-start, the last argument is described > as: > > Optional third arg NOFORCE non-nil inhibits next redisplay from > overriding motion of point in order to display at this exact start. > > >From this text, this seems to be precisely what I need: I want to retain > point at this exact place, and I only want to change the window start, > not the point. In my use case, if I set this argument to "nil", then I > get unexpected point motion. If displaying the window at the start point you request means point will be outside of the window (or in the window margins, if you set them), then redisplay has no alternative but move point to bring it back into view. If you prevent that, redisplay will not move point, but it will also not necessarily obey the window-start value. IOW, if there's a contradiction between the requested window-start and showing point, the latter always wins in Emacs. > Is there a way to reliably set window point while at the same time > preventing motion of point? How can you expect Emacs to do something like that? It cannot possibly do something that will leave point not displayed, can it?