From unknown Sun Jun 22 11:33:50 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#43188 <43188@debbugs.gnu.org> To: bug#43188 <43188@debbugs.gnu.org> Subject: Status: 28.0.50; [PATCH] Don't move point in vc-dir on vc-register/vc-checkin Reply-To: bug#43188 <43188@debbugs.gnu.org> Date: Sun, 22 Jun 2025 18:33:50 +0000 retitle 43188 28.0.50; [PATCH] Don't move point in vc-dir on vc-register/vc= -checkin reassign 43188 emacs submitter 43188 Andrii Kolomoiets severity 43188 minor tag 43188 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 03 15:22:37 2020 Received: (at submit) by debbugs.gnu.org; 3 Sep 2020 19:22:37 +0000 Received: from localhost ([127.0.0.1]:36240 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kDuof-0001r3-ES for submit@debbugs.gnu.org; Thu, 03 Sep 2020 15:22:37 -0400 Received: from lists.gnu.org ([209.51.188.17]:41004) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kDuoe-0001qw-45 for submit@debbugs.gnu.org; Thu, 03 Sep 2020 15:22:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56064) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kDuod-0001Eu-Tn for bug-gnu-emacs@gnu.org; Thu, 03 Sep 2020 15:22:35 -0400 Received: from mail-lj1-x22e.google.com ([2a00:1450:4864:20::22e]:34475) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kDuoc-0000qO-1x for bug-gnu-emacs@gnu.org; Thu, 03 Sep 2020 15:22:35 -0400 Received: by mail-lj1-x22e.google.com with SMTP id v23so5149420ljd.1 for ; Thu, 03 Sep 2020 12:22:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version; bh=z4XfA61E6PGJdovy7oL9sPTUczn4NIO+IRalaOxcvMA=; b=nJFPUwwKHQUeGiQUdO9NSkZFzhcXvM8w+FWddf28CGPkbZxzuPYkQyiZAfnfoL2/06 Lj2bwz5ItrDUWJ6sm9UswFGam8rmfgUnbNbW8biDQPrx/Q2+rE5t1etp1ce/hTfbccV7 MmBZlWUfNoUORDBaYQT8yeuKAvr2HpqPaRbX+Upj7bLoJOvpd3tew02CQicpoCkKEx3y 63k+ZMV06kf2I2i0dtIOCBaplxwEsIm05jUkm3+G1nsSk7erWaU1n6YXXbes/CenVAfH CDPyOTsvcRGAJZ1Y8qTK/t7wwe7iHTJxA3yn/pMdrxsYveLpgoHgHuGjjE+1KwVOOq5I OM7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=z4XfA61E6PGJdovy7oL9sPTUczn4NIO+IRalaOxcvMA=; b=KapokH96XSaN/kDgBnw6UXtTxhMul69qAFydBXo/NqkyHV76G7bjblPGAI8hU+I9Y3 NEdPbUdkAFH0cM3mG3DMzylwXl0bqplOPc6CnZGjOCtBXTI6HFyZVcvQ+uNp5MNmKRFY MgWKZfsbChVXHKM56K/KGB25Polm8eLizjuaxF8WKC4ZXK4Fj2JV1VkC+x1Uu2Fn/V9Z Vp56EfITh6WflYRDr4OjFeAjUNjfI7Ml42nxLWGXTEVVO2d5rCVj1MPpptThQivTW5Yf KToFwyBMqrYvEgMdHgpu3cbGf64HVKWcqml8WvrT8IR+hZ6YiVEI8jj4Ruz5e956117L 5R5Q== X-Gm-Message-State: AOAM531WkaGpC9G2KkjdJKh6R1uQ2Eit4TY0F+UKeq+Hm2ENZfMi2qLj hSpOcN0WIdZ8oxK0O4k49RSBeyhJEEs= X-Google-Smtp-Source: ABdhPJyl6Zl3g7zW8TlkI9PO/3odXDsweOhZf/VZmRAE1kqM1g2mY2g4UmTslHiR7rXqcxUKQPYBmg== X-Received: by 2002:a2e:851a:: with SMTP id j26mr1909606lji.251.1599160951289; Thu, 03 Sep 2020 12:22:31 -0700 (PDT) Received: from muffinmac ([91.206.110.135]) by smtp.gmail.com with ESMTPSA id w26sm787534ljm.30.2020.09.03.12.22.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Sep 2020 12:22:30 -0700 (PDT) From: Andrii Kolomoiets To: bug-gnu-emacs@gnu.org Subject: 28.0.50; [PATCH] Don't move point in vc-dir on vc-register/vc-checkin Date: Thu, 03 Sep 2020 22:22:20 +0300 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2a00:1450:4864:20::22e; envelope-from=andreyk.mad@gmail.com; helo=mail-lj1-x22e.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --=-=-= Content-Type: text/plain Severity: minor Proposed patch aimed to fix following point movements in vc-dir: 1. Create git repo: mkdir gittest && cd gittest && git init && touch foo.txt 2. Open vc-dir for that repo in Emacs (C-x v d). Point is 1. 3. Run vc-next-action (v). Point is moved to 26. 4. revert-buffer (g) to move point to 1. 5. Run vc-next-action (v). Enter commit message and C-c C-c. Point is moved to 26 again. 6. Create another file in the repo: touch bar.txt 7. In vc-dir move to the last file: g n n 8. revert-buffer (g) Point is moved to the beginning of the line. 9. revert-buffer (g) Point is moved to the previous line. Thanks! --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Don-t-move-point-in-vc-dir-on-vc-register-vc-checkin.patch >From f162b1f6629bf1faafe0b28c6ea9df458fee1af8 Mon Sep 17 00:00:00 2001 From: Andrii Kolomoiets Date: Thu, 3 Sep 2020 22:13:36 +0300 Subject: [PATCH] Don't move point in vc-dir on vc-register/vc-checkin * lisp/vc/vc-dir.el (vc-dir-update): Save and restore point on 'ewoc-invalidate'. * lisp/vc/vc-dispatcher.el (vc-finish-logentry): Don't call 'vc-dir-move-to-goal-column'. * lisp/vc/vc.el (vc-register): Don't call 'vc-dir-move-to-goal-column'. --- lisp/vc/vc-dir.el | 6 +++++- lisp/vc/vc-dispatcher.el | 3 --- lisp/vc/vc.el | 4 ---- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/lisp/vc/vc-dir.el b/lisp/vc/vc-dir.el index cdf8ab984e..6c219005ce 100644 --- a/lisp/vc/vc-dir.el +++ b/lisp/vc/vc-dir.el @@ -451,7 +451,11 @@ vc-dir-update (setf (vc-dir-fileinfo->state (ewoc-data node)) (nth 1 entry)) (setf (vc-dir-fileinfo->extra (ewoc-data node)) (nth 2 entry)) (setf (vc-dir-fileinfo->needs-update (ewoc-data node)) nil) - (ewoc-invalidate vc-ewoc node)) + ;; `ewoc-invalidate' will kill line and insert new text, + ;; let's keep point column. + (let ((p (point))) + (ewoc-invalidate vc-ewoc node) + (goto-char p))) ;; If the state is nil, the file does not exist ;; anymore, so remember the entry so we can remove ;; it after we are done inserting all ENTRIES. diff --git a/lisp/vc/vc-dispatcher.el b/lisp/vc/vc-dispatcher.el index 4a04c9365a..99bf5bf9b6 100644 --- a/lisp/vc/vc-dispatcher.el +++ b/lisp/vc/vc-dispatcher.el @@ -691,7 +691,6 @@ vc-start-logentry (message "%s Type C-c C-c when done" msg) (vc-finish-logentry (eq comment t))))) -(declare-function vc-dir-move-to-goal-column "vc-dir" ()) ;; vc-finish-logentry is typically called from a log-edit buffer (see ;; vc-start-logentry). (defun vc-finish-logentry (&optional nocomment) @@ -740,8 +739,6 @@ vc-finish-logentry (mapc (lambda (file) (vc-resynch-buffer file t t)) log-fileset)) - (when (vc-dispatcher-browsing) - (vc-dir-move-to-goal-column)) (run-hooks after-hook 'vc-finish-logentry-hook))) (defun vc-dispatcher-browsing () diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 5561292d8c..f0a08044e2 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -1346,8 +1346,6 @@ vc-create-repo nil t))))) (vc-call-backend backend 'create-repo)) -(declare-function vc-dir-move-to-goal-column "vc-dir" ()) - ;;;###autoload (defun vc-register (&optional vc-fileset comment) "Register into a version control system. @@ -1398,8 +1396,6 @@ vc-register (vc-resynch-buffer file t t)) files) - (when (derived-mode-p 'vc-dir-mode) - (vc-dir-move-to-goal-column)) (message "Registering %s... done" files))) (defun vc-register-with (backend) -- 2.15.1 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 04 17:18:25 2020 Received: (at 43188-done) by debbugs.gnu.org; 4 Sep 2020 21:18:25 +0000 Received: from localhost ([127.0.0.1]:40933 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kEJ6H-0007bD-Gi for submit@debbugs.gnu.org; Fri, 04 Sep 2020 17:18:25 -0400 Received: from mail-lf1-f42.google.com ([209.85.167.42]:38124) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kEJ6G-0007b1-7j for 43188-done@debbugs.gnu.org; Fri, 04 Sep 2020 17:18:24 -0400 Received: by mail-lf1-f42.google.com with SMTP id y11so4579085lfl.5 for <43188-done@debbugs.gnu.org>; Fri, 04 Sep 2020 14:18:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=vddRR1HZF8bQV+94ZCpZoJdt8mHe3ZCgFTWZiMUcB8M=; b=AlxpFrM+JDiWJ6VVcfR5CMyeiqNxQS0nwNwFgymtdrcpC7d5idg/G1963WXt8UTe7O +RtKDAHhOD46SH6qcBnKU+LvFHnLz/dvcVtz/8nZ1IOiW03yFz6WXBZyH886aLFiOE+7 wldnZbtbPcSJoLJH5L1wu2Os1UWGQQ4UYesM31lTmmgkrz0Sa7oiCScMXz5ELII7VmyF tn6WP/wOpL2JvZDffZaqwDPAjIISY+I6W2W5nTluPgmW/Tlv7UjB5oYS3cFFWjO2yMtc nHuXmgemvgMvxkq5d6OE3WCQX3t/8BkIU9qk/ZVo6nIVGqTvUEMqycVbd6esNb9k7yJP l27Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=vddRR1HZF8bQV+94ZCpZoJdt8mHe3ZCgFTWZiMUcB8M=; b=OfABtcT+UU2E0hOg4LBqfugdVvybnF2wqrMYmp2zTJjNoDO/qeciZpnijP92JHweYG SVazGk4UADmFqF9Q/VNGMzJNVOIspqtiZv3oJ/XdgPKq3WzJ8lFUDMfxZT0i7Oa45dsJ RwgbgCNu2vL++nc5Himb8HJsEK/X66YK7kT7fokQjdzvvMGAl+PkerImeUnIkL/QZUmk +cXl5kC7dDfAFyT44LfbQoh5jIW34YoezLVdEwdtFgTtW0fEPPSJRSjUR3utVnJEcLPt H7XPqX+t4xreV3PCPjdq7a7F1yGx+yiRsH/Iz9Qb/6wtaPu2DwNxAlJix8dDi+VyQxZO vxoQ== X-Gm-Message-State: AOAM531p0JV2K0PLxsRAr1CVlh1+JOh5pStkA81PvI6NzxQw/vJBx0Y2 0i0bVlB00bLqW8Xj+YxrLZ/cR2pAb/k= X-Google-Smtp-Source: ABdhPJxSnxZdau7JrMbSSj3T8YZgkUE43CovcQjgZcnf0KDvc2Rr88NowV/13u353v8B9Ui1lQSHtA== X-Received: by 2002:a19:7904:: with SMTP id u4mr4695903lfc.152.1599254297846; Fri, 04 Sep 2020 14:18:17 -0700 (PDT) Received: from [192.168.0.104] ([94.229.108.16]) by smtp.googlemail.com with ESMTPSA id m1sm1493396lfr.32.2020.09.04.14.18.16 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 04 Sep 2020 14:18:17 -0700 (PDT) Subject: Re: bug#43188: 28.0.50; [PATCH] Don't move point in vc-dir on vc-register/vc-checkin To: Andrii Kolomoiets , 43188-done@debbugs.gnu.org References: From: Dmitry Gutov Message-ID: <0c96813e-76d9-6aec-47c5-f2ba81cf2cca@yandex.ru> Date: Sat, 5 Sep 2020 00:18:16 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 3.7 (+++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Version 28.1 On 03.09.2020 22:22, Andrii Kolomoiets wrote: > Severity: minor > > Proposed patch aimed to fix following point movements in vc-dir: > > 1. Create git repo: mkdir gittest && cd gittest && git init && [...] Content analysis details: (3.7 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (raaahh[at]gmail.com) 0.0 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.167.42 listed in list.dnswl.org] 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [94.229.108.16 listed in zen.spamhaus.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.167.42 listed in wl.mailspike.net] 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different -0.1 NICE_REPLY_A Looks like a legit reply (A) X-Debbugs-Envelope-To: 43188-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 2.7 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Version 28.1 On 03.09.2020 22:22, Andrii Kolomoiets wrote: > Severity: minor > > Proposed patch aimed to fix following point movements in vc-dir: > > 1. Create git repo: mkdir gittest && cd gittest && git init && [...] Content analysis details: (2.7 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.167.42 listed in wl.mailspike.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.167.42 listed in list.dnswl.org] 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [94.229.108.16 listed in zen.spamhaus.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (dgutov[at]yandex.ru) 0.0 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different -0.1 NICE_REPLY_A Looks like a legit reply (A) Version 28.1 On 03.09.2020 22:22, Andrii Kolomoiets wrote: > Severity: minor > > Proposed patch aimed to fix following point movements in vc-dir: > > 1. Create git repo: mkdir gittest && cd gittest && git init && touch foo.txt > 2. Open vc-dir for that repo in Emacs (C-x v d). Point is 1. > 3. Run vc-next-action (v). > Point is moved to 26. > 4. revert-buffer (g) to move point to 1. > 5. Run vc-next-action (v). Enter commit message and C-c C-c. > Point is moved to 26 again. > 6. Create another file in the repo: touch bar.txt > 7. In vc-dir move to the last file: g n n > 8. revert-buffer (g) > Point is moved to the beginning of the line. > 9. revert-buffer (g) > Point is moved to the previous line. Looks like am improvement. Installed, thanks! From unknown Sun Jun 22 11:33:50 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 03 Oct 2020 11:24:06 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator