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: Sun, 16 Jun 2019 22:32:08 +0300 Organization: LINKOV.NET Message-ID: <87h88p8e5z.fsf@mail.linkov.net> References: <87o93ucjsi.fsf@mail.linkov.net> <83ef4p7prf.fsf@gnu.org> <87a7fc51qm.fsf@mail.linkov.net> <83k1eg5pmx.fsf@gnu.org> <87k1efhkgp.fsf@mail.linkov.net> <2347769f-9ab3-c1b6-699e-4e89a7d8eb1c@gmx.at> <875zpb4zdw.fsf@mail.linkov.net> <878su5i67f.fsf@mail.linkov.net> <87muik3svu.fsf@mail.linkov.net> <4d0733b1-4ee0-222b-395a-8f26ff76f2da@gmx.at> <87imt6jva7.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="224031"; 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: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jun 16 22:38:50 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.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hcbvN-000wAA-RT for geb-bug-gnu-emacs@m.gmane.org; Sun, 16 Jun 2019 22:38:50 +0200 Original-Received: from localhost ([::1]:42770 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hcbvM-0000RW-Au for geb-bug-gnu-emacs@m.gmane.org; Sun, 16 Jun 2019 16:38:48 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56582) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hcbug-0000P4-EG for bug-gnu-emacs@gnu.org; Sun, 16 Jun 2019 16:38:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hcbue-00083f-Fc for bug-gnu-emacs@gnu.org; Sun, 16 Jun 2019 16:38:06 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:56244) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hcbuc-000831-SG for bug-gnu-emacs@gnu.org; Sun, 16 Jun 2019 16:38:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hcbuc-0004QP-OS for bug-gnu-emacs@gnu.org; Sun, 16 Jun 2019 16:38: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: Sun, 16 Jun 2019 20:38: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.156071742716903 (code B ref 35860); Sun, 16 Jun 2019 20:38:02 +0000 Original-Received: (at 35860) by debbugs.gnu.org; 16 Jun 2019 20:37:07 +0000 Original-Received: from localhost ([127.0.0.1]:41551 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hcbti-0004OZ-MM for submit@debbugs.gnu.org; Sun, 16 Jun 2019 16:37:06 -0400 Original-Received: from bonobo.elm.relay.mailchannels.net ([23.83.212.22]:39251) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hcbte-0004Nf-FO for 35860@debbugs.gnu.org; Sun, 16 Jun 2019 16:37:03 -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 6E8941A1774; Sun, 16 Jun 2019 20:37:01 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a70.g.dreamhost.com (100-96-38-146.trex.outbound.svc.cluster.local [100.96.38.146]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id B97DE1A138B; Sun, 16 Jun 2019 20:37:00 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from pdx1-sub0-mail-a70.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); Sun, 16 Jun 2019 20:37:01 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Army-Macabre: 1b80f8991d129d6f_1560717421113_593878480 X-MC-Loop-Signature: 1560717421113:734121385 X-MC-Ingress-Time: 1560717421113 Original-Received: from pdx1-sub0-mail-a70.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a70.g.dreamhost.com (Postfix) with ESMTP id 2952D81060; Sun, 16 Jun 2019 13:36:59 -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=HUrJcJIe4bJQm7EU7WRzcxzgHxk=; b= gUvlFflCNH2/R/RvbLxmq/sJ2f1IoCUpHB+J13MBWb8ovYo8wXjI+Y7PZw5H6z9t fZNZw5qqv4vkqXKgRvT0gfi1Oy7O2lOseouP7rwfaDoDXZGZLJiMeqkNTBRV5rhW vc8tFm5YTFTBDdp3t5RvdNkw01VBm1ASeIf03FZeuhs= Original-Received: from mail.jurta.org (m91-129-109-209.cust.tele2.ee [91.129.109.209]) (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-a70.g.dreamhost.com (Postfix) with ESMTPSA id 637A581061; Sun, 16 Jun 2019 13:36:56 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a70 In-Reply-To: (martin rudalics's message of "Sun, 16 Jun 2019 10:16:20 +0200") X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduuddrudeihedgudehhecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffuohhfffgjkfgfgggtsehttdertddtredtnecuhfhrohhmpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqnecukfhppeeluddruddvledruddtledrvddtleenucfrrghrrghmpehmohguvgepshhmthhppdhhvghlohepmhgrihhlrdhjuhhrthgrrdhorhhgpdhinhgvthepledurdduvdelrddutdelrddvtdelpdhrvghtuhhrnhdqphgrthhhpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhhrtghpthhtoheprhhuuggrlhhitghssehgmhigrdgrthenucevlhhushhtvghrufhiiigvpedv 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:160700 Archived-At: > Currently 'temp-buffer-window-show' has > > (goto-char (point-min)) > > and 'internal-temp-output-buffer-show' has > > (set-window-start window (point-min) t) > ;; This should not be necessary. > (set-window-point window (point-min)) BTW, there is a strange comment before the first line: ;; Don't try this with NOFORCE non-nil! (set-window-start window (point-min) t) but its NOFORCE is non-nil here. Is this a FIXME-like reminder? > Then 'help-window-point-marker' may be set by the BODY of > 'with-help-window' and 'help-window-setup' will pick that up guarded > as > > (when (eq (marker-buffer help-window-point-marker) help-buffer) > (set-window-point window help-window-point-marker) > ;; Reset `help-window-point-marker'. > (set-marker help-window-point-marker nil)) > > thus (1) checking whether the marker buffer matches and (2) > immediately resetting that marker to nil. > > Can you provide equivalent security guards when generalizing that > variable? In my previous patch there is no need to check for the buffer, because a new general variable is declared as buffer-local. > What happens with these markers when 'display-buffer-no-window' gets > called? Or some user provided routine provokes an unhandled error? > You don't even check the marker buffer of these variables so some old, > completely unrelated marker could get reused here. There is no global effect because this feature is localized to a single buffer by its buffer-local scope. > So we'd carefully have to examine first how the mechanism you propose > could be abused, how to handle any errors in using and failing to > reset these markers and last but not least tell why we don't provide > 'window-point' and 'window-start' action alist entries instead of such > global variables. We could support an action alist too in addition to buffer-local variables, but we should leave an ability to set buffer-local variables, because neither view-lossage nor vc-git-print-log (two primary cases to test this feature) have no access to the 'action' arg of display-buffer.