From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Markus Triska Newsgroups: gmane.emacs.bugs Subject: bug#34038: 26.1; set-window-start sometimes fails to set window start Date: Fri, 11 Jan 2019 13:20:33 +0100 Message-ID: <87ef9je67i.fsf@metalevel.at> References: <83sgxzhe04.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1547209155 7113 195.159.176.226 (11 Jan 2019 12:19:15 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 11 Jan 2019 12:19:15 +0000 (UTC) User-Agent: Emacs/24.5 Cc: 34038@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jan 11 13:19:11 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 1ghvmH-0001h0-3N for geb-bug-gnu-emacs@m.gmane.org; Fri, 11 Jan 2019 13:19:09 +0100 Original-Received: from localhost ([127.0.0.1]:33114 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ghvoN-0002BU-Qm for geb-bug-gnu-emacs@m.gmane.org; Fri, 11 Jan 2019 07:21:19 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:47790) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ghvoB-0002B6-TS for bug-gnu-emacs@gnu.org; Fri, 11 Jan 2019 07:21:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ghvo6-0001bD-FA for bug-gnu-emacs@gnu.org; Fri, 11 Jan 2019 07:21:07 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55422) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ghvo6-0001b8-CE for bug-gnu-emacs@gnu.org; Fri, 11 Jan 2019 07:21:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ghvo6-0003wB-7m for bug-gnu-emacs@gnu.org; Fri, 11 Jan 2019 07:21:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Markus Triska Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 11 Jan 2019 12:21: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.154720923915097 (code B ref 34038); Fri, 11 Jan 2019 12:21:02 +0000 Original-Received: (at 34038) by debbugs.gnu.org; 11 Jan 2019 12:20:39 +0000 Original-Received: from localhost ([127.0.0.1]:54703 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ghvnh-0003vQ-R6 for submit@debbugs.gnu.org; Fri, 11 Jan 2019 07:20:38 -0500 Original-Received: from metalevel.at ([78.46.218.83]:59572) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ghvnf-0003vH-R4 for 34038@debbugs.gnu.org; Fri, 11 Jan 2019 07:20:36 -0500 Original-Received: by metalevel.at (Postfix, from userid 1000) id 58A2AA0227; Fri, 11 Jan 2019 13:20:33 +0100 (CET) In-Reply-To: <83sgxzhe04.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 11 Jan 2019 09:03:55 +0200") 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:154343 Archived-At: 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. Is there a way to reliably set window point while at the same time preventing motion of point? I tried adding (redisplay) at strategic places in my code, and this seems to work somewhat better then, though at the cost of causing display flickering. Thank you and all the best! Markus