From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#60381: [PATCH] Preserve Window Position with Proced Date: Thu, 29 Dec 2022 08:09:01 +0200 Message-ID: <83pmc291xe.fsf@gnu.org> References: <83v8lv8n7u.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11026"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 60381@debbugs.gnu.org To: Laurence Warne Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Dec 29 07:09:26 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1pAm6X-0002cu-UY for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 29 Dec 2022 07:09:26 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pAm6F-00062L-0s; Thu, 29 Dec 2022 01:09:07 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pAm6B-000627-Rz for bug-gnu-emacs@gnu.org; Thu, 29 Dec 2022 01:09:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pAm6A-0006Uo-MU for bug-gnu-emacs@gnu.org; Thu, 29 Dec 2022 01:09:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pAm6A-0005Wy-4b for bug-gnu-emacs@gnu.org; Thu, 29 Dec 2022 01:09: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: Thu, 29 Dec 2022 06:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60381 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 60381-submit@debbugs.gnu.org id=B60381.167229413921250 (code B ref 60381); Thu, 29 Dec 2022 06:09:02 +0000 Original-Received: (at 60381) by debbugs.gnu.org; 29 Dec 2022 06:08:59 +0000 Original-Received: from localhost ([127.0.0.1]:59145 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pAm66-0005Wg-GU for submit@debbugs.gnu.org; Thu, 29 Dec 2022 01:08:58 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:38122) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pAm63-0005WO-VO for 60381@debbugs.gnu.org; Thu, 29 Dec 2022 01:08:56 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pAm5y-0006U7-Pf; Thu, 29 Dec 2022 01:08:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=U5niAyz2T/CLnFETmcr2YG9bFbEP3qDugJCAG0CI+QQ=; b=hcmdBwIjCTDT o54BYrV1oZDmczaKy9+23lf/pcrXaj0pBLu4fHVM7lgBsyRGFzdPhOJnTwFawSdMzqSVblzRvTyFt xZQpwjbsY/Gzi9B9LEuC3f4bpPiXz2MadOKCPXC1eWXbm6xjQFNTHCZYG8b2B3WykyUny4D0PgXaU 5nZ6j2tfh/NYqWS5AFMbrMWeidi+ZqWTM4MmhJCHXS+ONm5EJdUpBTypvaLRzVv6iQHvYdZN3QgAs FLMvnB4NesXf4apCBs5ddEP74e6VQ2fx/eMeflIW3/MUz3+q3P41lTbmrGScH6vMSVguERJe7QSZw Euhzlfvrl1ado3OECW5atQ==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pAm5y-0000AB-2u; Thu, 29 Dec 2022 01:08:50 -0500 In-Reply-To: (message from Laurence Warne on Wed, 28 Dec 2022 20:30:41 +0000) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:252008 Archived-At: > From: Laurence Warne > Date: Wed, 28 Dec 2022 20:30:41 +0000 > Cc: 60381@debbugs.gnu.org > > > Alternatively, record the process on whose line point was before the > > update, and try to find the same process after update. > > I believe this is currently what proced-update tries to do, it works as expected when an update occurs and > the buffer is displayed in the selected window (so if the process your point is on moves down a row, the > point will follow), but when the buffer is not displayed in the selected window, I find the point is always reset > to the beginning of the buffer regardless of the process which was under point prior to the update. This sounds like some kind of bug, or perhaps we have some knob to control this behavior. So I think you should investigate why the difference between selected and non-select windows, and why a buffer that is not displayed behaves like that. When you find the reason(s), we could discuss possible solutions. The solutions you describe (both of them, actually) sound like workarounds to me: we let Emacs do whatever nonsensical thing it does, and the correct the results. It is better to find a way of avoiding the wrong behavior in the first place. Btw, the variable switch-to-buffer-preserve-window-point may have something to do with at least some of the behaviors you see. Thanks.