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: Wed, 28 Dec 2022 19:14:29 +0200 Message-ID: <83v8lv8n7u.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31097"; 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 Wed Dec 28 18:15:28 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 1pAa1Y-0007w9-4y for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 28 Dec 2022 18:15:28 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pAa1C-00013o-V4; Wed, 28 Dec 2022 12:15: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 1pAa19-00013B-18 for bug-gnu-emacs@gnu.org; Wed, 28 Dec 2022 12:15: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 1pAa18-0003lo-Jl for bug-gnu-emacs@gnu.org; Wed, 28 Dec 2022 12:15:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pAa18-0000ay-Bf for bug-gnu-emacs@gnu.org; Wed, 28 Dec 2022 12:15: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: Wed, 28 Dec 2022 17:15: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.16722476712220 (code B ref 60381); Wed, 28 Dec 2022 17:15:02 +0000 Original-Received: (at 60381) by debbugs.gnu.org; 28 Dec 2022 17:14:31 +0000 Original-Received: from localhost ([127.0.0.1]:58522 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pAa0Z-0000Zd-4O for submit@debbugs.gnu.org; Wed, 28 Dec 2022 12:14:30 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:52716) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pAa0X-0000ZO-5X for 60381@debbugs.gnu.org; Wed, 28 Dec 2022 12:14:25 -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 1pAa0R-0003ge-Vo; Wed, 28 Dec 2022 12:14:20 -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=60ntRp+Hb+aFp4+gzLLtbGXUIu4oFRZZsJN76/XBeEs=; b=IbGqFpegICc1 KTa+/7RPkX1Ldkgc0IcHvGMlbOi4xgeRy0JRzLHaACtEgLUgqIDaGMoxA0xNZleZ8PNuFCbuznGUs u0rpKAkOhGC5oqNNMpl4Y2MPAAOJSyzxb1yExwOLdKVhHc+NJAM875oByVhO/N7yW5UJbadyOYPkq +fy8eQuipDR6R3VW3riWP26hrzDqELyF9V2qEho6RCbHHvHGfh2pV/1xMpYi3oMlDIN4usWQKciwb wcxy1i5H101/DRr50OyAhJdEDLtFdNwYsVNFED8/EAt45ecS0MGaDuzLkeJYHbqXxBiFIjK9nZ8NM LUMd/hPKDVhI4LLR3tJ2dQ==; 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 1pAa0Q-0006SV-7f; Wed, 28 Dec 2022 12:14:19 -0500 In-Reply-To: (message from Laurence Warne on Wed, 28 Dec 2022 15:55:20 +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:251992 Archived-At: > From: Laurence Warne > Date: Wed, 28 Dec 2022 15:55:20 +0000 > > This patch addresses this by setting the window point (if applicable) whenever a proced buffer is updated, > and the second issue by not updating a proced buffer if it is not displayed in any window. 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. Why cannot we simply save and restore point across updates? If the old value of point ends up in a slightly different position (because many processes have died, for example), that is not a disaster. Alternatively, record the process on whose line point was before the update, and try to find the same process after update.