From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Laurence Warne Newsgroups: gmane.emacs.bugs Subject: bug#60381: [PATCH] Preserve Window Position with Proced Date: Wed, 28 Dec 2022 20:30:41 +0000 Message-ID: References: <83v8lv8n7u.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000a9b34405f0e93e53" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9559"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 60381@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Dec 28 21:31:25 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 1pAd5B-0002OF-C9 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 28 Dec 2022 21:31:25 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pAd4r-0008FX-BN; Wed, 28 Dec 2022 15:31:05 -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 1pAd4p-0008FN-Di for bug-gnu-emacs@gnu.org; Wed, 28 Dec 2022 15:31:03 -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 1pAd4o-000138-VE for bug-gnu-emacs@gnu.org; Wed, 28 Dec 2022 15:31:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pAd4o-000573-Fs for bug-gnu-emacs@gnu.org; Wed, 28 Dec 2022 15:31:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Laurence Warne Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 28 Dec 2022 20:31: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.167225946219647 (code B ref 60381); Wed, 28 Dec 2022 20:31:02 +0000 Original-Received: (at 60381) by debbugs.gnu.org; 28 Dec 2022 20:31:02 +0000 Original-Received: from localhost ([127.0.0.1]:58786 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pAd4n-00056o-J8 for submit@debbugs.gnu.org; Wed, 28 Dec 2022 15:31:01 -0500 Original-Received: from mail-ua1-f42.google.com ([209.85.222.42]:46886) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pAd4k-00056X-NH for 60381@debbugs.gnu.org; Wed, 28 Dec 2022 15:30:59 -0500 Original-Received: by mail-ua1-f42.google.com with SMTP id n9so3778738uao.13 for <60381@debbugs.gnu.org>; Wed, 28 Dec 2022 12:30:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=UqQ0w7NhwXnPGzgGjnMjV+3aPq//vBUlUqFwRPkFUc8=; b=PXgFOJpHC7AY141PItfXCPgzaW5ZwvD/+gjrCCdAvaWZRhZLR+X58yeITWCTfgNKp5 JHcWESVWr0WEylqoDGy7KwNOMp2SkBpKTvm9alzxe4O0W2VGR2cty/vkHffjHW4557c/ tN65OWWLR5t5YH0dZoR06IjyRNI8BM78WcA7hzN46avG0DPTpTorwNSRGFyQTKSNCHJC lbjwjEhT8DGagyA0XXRmO4eVU8++QPDldBQMqejHxlBpwSTYxUMBvoVhmOUHkEZv9W2s K8a5QjKRbOATcL7N4/j0lftO0tC8AtrxtcsSqDKFQ8AuT6ScLCuRX0ScIimElRnbjlj/ jVTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=UqQ0w7NhwXnPGzgGjnMjV+3aPq//vBUlUqFwRPkFUc8=; b=7Qf59jwEDMNp0HJplZEhAcWVspFNStW5VU2rsaSwgEeQbfW9RPBmD5xdx8qd+sVDOk Ow5vj9BvukBrg+aasSsaqvIQpSnxd+Sro061McGi1jsmFCqJ2vK5hJ2NMbjMrMWoEyq3 KILGbOYDLD7Wydx9+3XBGSkoncABy51Jx/VFA9Px4w8b/Uv7h0kBmHMJ35Q69ZiegdAP /1VTFkMYrSagYioekcKBHgdpAsFE3dbx1KiEfAr7LMxC53Bl5ebdDR0UqjpyJkGSYpY4 mRUPxiyk5FD+sTGT98eDCSD9/wwJu510ykjvcgR6eKgSPYmYYZopvjr1LLpTIAQDcWTu sV8Q== X-Gm-Message-State: AFqh2kp3sbXcc8DIsbKKTe2poC9lnUa9VPCA/jtlDQXFvEPSvKpa7eCU 3KI4wuFLHE04Br3muuHh0yrRvQiz06HIvnACUrugzUFhJ+s= X-Google-Smtp-Source: AMrXdXvZNlO6ysqclSxn2OTeU9s8J4xn8s1t764KBBCthKzmG+NbxLG9PjFSkJHTCNkp+T5kQf/uuM93L7ufJ1NPtfE= X-Received: by 2002:ab0:6253:0:b0:404:3611:fb13 with SMTP id p19-20020ab06253000000b004043611fb13mr2237974uao.54.1672259452907; Wed, 28 Dec 2022 12:30:52 -0800 (PST) In-Reply-To: <83v8lv8n7u.fsf@gnu.org> 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:252000 Archived-At: --000000000000a9b34405f0e93e53 Content-Type: text/plain; charset="UTF-8" > I don't think I like the solution for the second issue, since it is a > backward-incompatible change. It is not at all obvious that not > updating a proced buffer which isn't shown in a window is TRT. Fair enough, I'll revert this and try and think of another solution. > 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. In the end of proced-update, the patch sets all the window points to the new buffer point (recently set by proced-update to reflect the position of the new process), similar to what append-to-buffer does, if that makes sense. --000000000000a9b34405f0e93e53 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

> I don't think I like t= he solution for the second issue, since it is a
> backward-incompatible change.=C2=A0 It is not at all obvious that not<= br>
> updating a proced buffer which isn't shown in a window is TRT.

Fair enough, I'll revert this and try and think o= f another solution.

> Alternatively, record the= process on whose line point was before the
> update, and try to find the same process after update.

<= /div>
I believe this is currently what proced-update tries to do, it wo= rks as expected when an update occurs and the buffer is displayed in the se= lected window (so if the process your point is on moves down a row, the poi= nt will follow), but when the buffer is not displayed in the selected windo= w, I find the point is always reset to the beginning of the buffer regardle= ss of the process which was under point prior to the update.=C2=A0 In the e= nd of proced-update, the patch sets all the window points to the new buffer= point (recently set by proced-update to reflect the position of the new pr= ocess), similar to what append-to-buffer does, if that makes sense.
--000000000000a9b34405f0e93e53--