From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#35860: Delayed window positioning after buffer display Date: Thu, 23 May 2019 23:56:17 +0300 Organization: LINKOV.NET Message-ID: <87a7fc51qm.fsf@mail.linkov.net> References: <87o93ucjsi.fsf@mail.linkov.net> <83ef4p7prf.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="47122"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) Cc: 35860@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu May 23 23:11:18 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 esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hTuzb-000C3l-9k for geb-bug-gnu-emacs@m.gmane.org; Thu, 23 May 2019 23:11:16 +0200 Original-Received: from localhost ([127.0.0.1]:43412 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hTuzZ-00027H-TK for geb-bug-gnu-emacs@m.gmane.org; Thu, 23 May 2019 17:11:13 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:42788) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hTuzQ-0001zh-C9 for bug-gnu-emacs@gnu.org; Thu, 23 May 2019 17:11:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hTuzO-0005RH-OG for bug-gnu-emacs@gnu.org; Thu, 23 May 2019 17:11:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:60137) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hTuzO-0005Q3-9U for bug-gnu-emacs@gnu.org; Thu, 23 May 2019 17:11:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hTuzO-0006kb-3g for bug-gnu-emacs@gnu.org; Thu, 23 May 2019 17:11:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 23 May 2019 21:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35860 X-GNU-PR-Package: emacs Original-Received: via spool by 35860-submit@debbugs.gnu.org id=B35860.155864583925893 (code B ref 35860); Thu, 23 May 2019 21:11:02 +0000 Original-Received: (at 35860) by debbugs.gnu.org; 23 May 2019 21:10:39 +0000 Original-Received: from localhost ([127.0.0.1]:45442 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hTuz1-0006jY-1U for submit@debbugs.gnu.org; Thu, 23 May 2019 17:10:39 -0400 Original-Received: from gecko.birch.relay.mailchannels.net ([23.83.209.66]:43637) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hTuyz-0006jQ-44 for 35860@debbugs.gnu.org; Thu, 23 May 2019 17:10:38 -0400 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id D96748C38DB; Thu, 23 May 2019 21:10:35 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a94.g.dreamhost.com (100-96-88-48.trex.outbound.svc.cluster.local [100.96.88.48]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 4518D8C38CD; Thu, 23 May 2019 21:10:35 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from pdx1-sub0-mail-a94.g.dreamhost.com ([TEMPUNAVAIL]. [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.17.2); Thu, 23 May 2019 21:10:35 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Glossy-Trade: 62940ded10d1fbce_1558645835708_178969826 X-MC-Loop-Signature: 1558645835707:4283541437 X-MC-Ingress-Time: 1558645835707 Original-Received: from pdx1-sub0-mail-a94.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a94.g.dreamhost.com (Postfix) with ESMTP id 242B78015E; Thu, 23 May 2019 14:10:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=linkov.net; bh=yLuXUUFCTCnvbAXFHIZ/+nmVwgY=; b= uPL8MVy5gbGj+P6Ylun0sp2jaLGgJ0+Qs2/+IUqMRMkllvVmjg0f+zmffQVIGz8z N6ljU3DLjrhu1e76W3EqiRBPulDCyZZ3IkDux6I4XyC1Nb0YkOj1eCcXMf3SVGcX hgRrXgIKfq7BOouuqdpSjCO5d2040y+r6E2e5BB5O1Y= Original-Received: from mail.jurta.org (m91-129-96-230.cust.tele2.ee [91.129.96.230]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by pdx1-sub0-mail-a94.g.dreamhost.com (Postfix) with ESMTPSA id 8866D8013D; Thu, 23 May 2019 14:10:28 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a94 In-Reply-To: <83ef4p7prf.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 23 May 2019 07:34:28 +0300") X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduuddruddugedgudeitdcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffuohhfffgjkfgfgggtsehttdertddtredtnecuhfhrohhmpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqnecukfhppeeluddruddvledrleeirddvfedtnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledrleeirddvfedtpdhrvghtuhhrnhdqphgrthhhpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhhrtghpthhtohepvghlihiisehgnhhurdhorhhgnecuvehluhhsthgvrhfuihiivgeptd 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:159691 Archived-At: >> There are commands that set point while the buffer is not displayed, >> and after displaying the buffer point remains at an old position, >> not where it was moved while the buffer was undisplayed. > > That's a feature, isn't it? See switch-to-buffer-preserve-window-point. IIUC, it tries to preserve the previous position of window-point, but the required feature should set point when the buffer is displayed for the first time. >> One solution is to generalize the variable 'help-window-point-marker' >> currently described as: >> >> ;; `help-window-point-marker' is a marker you can move to a valid >> ;; position of the buffer shown in the help window in order to override >> ;; the standard positioning mechanism (`point-min') chosen by >> ;; `with-output-to-temp-buffer' and `with-temp-buffer-window'. >> ;; `with-help-window' has this point nowhere before exiting. Currently >> ;; used by `view-lossage' to assert that the last keystrokes are always >> ;; visible. >> (defvar help-window-point-marker (make-marker) >> "Marker to override default `window-point' in help windows.") > > Why not bind switch-to-buffer-preserve-window-point to nil instead? I don't know. I tried to replace (set-marker help-window-point-marker (point)) with (goto-char (point-max)) (setq-local switch-to-buffer-preserve-window-point nil) and it doesn't set point to the end of the Help buffer when it's displayed for the first time.