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#65380: [PATCH] Add command to copy contents in a diff-mode buffer Date: Sun, 18 Aug 2024 21:00:19 +0300 Message-ID: <861q2lzp70.fsf@gnu.org> References: <87wmxrwe6h.fsf@posteo.net> <83o7j3z4wm.fsf@gnu.org> <87pm3jwboc.fsf@posteo.net> <83lee7z3xs.fsf@gnu.org> <87jztrvxx2.fsf@posteo.net> <83r0nyyhlz.fsf@gnu.org> <86o7j2qgmc.fsf@mail.linkov.net> <83cyzhwpcj.fsf@gnu.org> <87a5ultvuy.fsf@posteo.net> <83a5ulwos6.fsf@gnu.org> <87fs4bgwuj.fsf@posteo.net> <83fs4btiw1.fsf@gnu.org> <871q2n152u.fsf@posteo.net> <87frr1zw6i.fsf@posteo.net> <864j7hzviv.fsf@gnu.org> <87bk1pztsr.fsf@posteo.net> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29607"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 65380@debbugs.gnu.org, juri@linkov.net To: Philip Kaludercic Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Aug 18 20:02:02 2024 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 1sfkE5-0007YP-LU for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 18 Aug 2024 20:02:01 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sfkDh-0007Lx-Rq; Sun, 18 Aug 2024 14:01:41 -0400 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 1sfkDT-0007LU-J0 for bug-gnu-emacs@gnu.org; Sun, 18 Aug 2024 14:01:24 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sfkDR-00087L-98 for bug-gnu-emacs@gnu.org; Sun, 18 Aug 2024 14:01:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=References:In-Reply-To:From:Date:To:Subject; bh=MXvf/CMM0SLokJxlHDd/lXQB6HCO8aVKZ2dWHpsAhvk=; b=mYdjRBdVGAHXf2K0Gchlgw2cPZuKbU3RvsllDJVHM/vOhz0xO/UfRK1SWlvIFEC6xYku+3M+mWsMYPTz3uXch4nunOqu4zKa56t4n323yy3uP7jTMDIKhtNgelJbrnXZ2k3WajtCcvA2HQQAiNTGbn8ipsosEa1THgpw7zmx+3pgE5UldNvmy+RoZ5ClI8cfVTdo4WBL+zqpkmhQN2aGnsE+RfG9b92GCIfKIY3keGZCmiYtha4mJ/Ra1WWgAcMl9wbQhqk4xc/Z5qrNfMC2MSmfk9NDg7vlKZXVoYtY2UWhZSn3/vHnp+cYXYMvmsvv5WW6il1k4IT5fdzClT7oDg==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sfkE5-0005zi-RQ for bug-gnu-emacs@gnu.org; Sun, 18 Aug 2024 14:02:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 18 Aug 2024 18:02:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65380 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 65380-submit@debbugs.gnu.org id=B65380.172400407422979 (code B ref 65380); Sun, 18 Aug 2024 18:02:01 +0000 Original-Received: (at 65380) by debbugs.gnu.org; 18 Aug 2024 18:01:14 +0000 Original-Received: from localhost ([127.0.0.1]:56768 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sfkDK-0005yZ-0C for submit@debbugs.gnu.org; Sun, 18 Aug 2024 14:01:14 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:49028) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sfkDH-0005yI-PG for 65380@debbugs.gnu.org; Sun, 18 Aug 2024 14:01:12 -0400 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 1sfkCW-0007w4-0h; Sun, 18 Aug 2024 14:00:24 -0400 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=MXvf/CMM0SLokJxlHDd/lXQB6HCO8aVKZ2dWHpsAhvk=; b=Uu8eb4grkseA SEYMcx+qUBaxNFNO+a0YCkYehO+MRnkW/7v1VhKTVOtlC/EfvvdbAkcIsbgNr2zr8pns5mKjzbck3 a/VmeNKcQ2xcrldwuFluZxiAOsnoNXDzKpGUA7RrzGuCrnD30GdxKgaWERWL4vu3gLsUe33RI5zp0 CpyeBICIPBflnH6jsl25XtHnGVbARKU/ZQf4ak/1xVGNtgw+urtkiS6PteO+/vZuubmqQHGbSyYWn FQdIFmfI1Ttk4q4/qMhDm5Rn4jykC6k12YUovc0pto6RiyFZ3xHtxMqhfQLnzh35N0e3ABd1AIC1q 405XAns1EauKsdupDWZHxQ==; In-Reply-To: <87bk1pztsr.fsf@posteo.net> (message from Philip Kaludercic on Sun, 18 Aug 2024 16:20:52 +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:290342 Archived-At: > From: Philip Kaludercic > Cc: juri@linkov.net, 65380@debbugs.gnu.org > Date: Sun, 18 Aug 2024 16:20:52 +0000 > > >> To fix this I have written a general macro for subr.el to restore > >> the scroll position: > > > > Let's first make sure we understand what happens here before we add > > such a macro. (It also has some conceptual problems of its own, but > > let's defer that until we actually sure it is needed.) > > It is not needed, but I would be interested in what the conceptual > errors are. Forcing window-start has some side-effects that could look like bugs. For example, the window's vscroll is reset, and if the original window started its display with an overlay or display property, set-window-start will not necessarily restore the original display, due to boring technical issues. So my recommendation is to avoid calling set-window-start as a means to return to some previous display, because it is not guaranteed that you can do it like that.