From unknown Sun Jun 15 08:01:24 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#46876 <46876@debbugs.gnu.org> To: bug#46876 <46876@debbugs.gnu.org> Subject: Status: [PATCH] Find conflict markers in opened buffers as well Reply-To: bug#46876 <46876@debbugs.gnu.org> Date: Sun, 15 Jun 2025 15:01:24 +0000 retitle 46876 [PATCH] Find conflict markers in opened buffers as well reassign 46876 emacs submitter 46876 Konstantin Kharlamov severity 46876 normal tag 46876 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 02 11:24:06 2021 Received: (at submit) by debbugs.gnu.org; 2 Mar 2021 16:24:06 +0000 Received: from localhost ([127.0.0.1]:54061 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lH7oc-0004vr-6Z for submit@debbugs.gnu.org; Tue, 02 Mar 2021 11:24:06 -0500 Received: from lists.gnu.org ([209.51.188.17]:43638) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lH7oY-0004vh-4N for submit@debbugs.gnu.org; Tue, 02 Mar 2021 11:24:05 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:35234) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lH7oX-0003Ou-UW for bug-gnu-emacs@gnu.org; Tue, 02 Mar 2021 11:24:01 -0500 Received: from forward100p.mail.yandex.net ([77.88.28.100]:37902) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lH7oU-0000t7-Nt for bug-gnu-emacs@gnu.org; Tue, 02 Mar 2021 11:24:01 -0500 Received: from forward102q.mail.yandex.net (forward102q.mail.yandex.net [IPv6:2a02:6b8:c0e:1ba:0:640:516:4e7d]) by forward100p.mail.yandex.net (Yandex) with ESMTP id 097CD59819E0 for ; Tue, 2 Mar 2021 19:23:53 +0300 (MSK) Received: from vla1-eeea27dff809.qloud-c.yandex.net (vla1-eeea27dff809.qloud-c.yandex.net [IPv6:2a02:6b8:c0d:5184:0:640:eeea:27df]) by forward102q.mail.yandex.net (Yandex) with ESMTP id 059633A2000B for ; Tue, 2 Mar 2021 19:23:53 +0300 (MSK) Received: from vla1-cde8305024b9.qloud-c.yandex.net (vla1-cde8305024b9.qloud-c.yandex.net [2a02:6b8:c0d:4201:0:640:cde8:3050]) by vla1-eeea27dff809.qloud-c.yandex.net (mxback/Yandex) with ESMTP id 11YUnCI3a7-NqHGCOuN; Tue, 02 Mar 2021 19:23:52 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1614702233; bh=4gI6ylZnTkUxtvArl9tgHEeVnwDNd2/2yI/mH2l6Qzw=; h=Date:Subject:To:From:Message-Id; b=a/GaQyy6vbT2ebKdQXLd3NytuAdQcj3opemf6dgsGR+ToQlHHz+II0HzOXrncW2NK LK3R4M9H5f/0MvlPKX8EgjjvBO6T5CQWBpDwnWKGhzaUYIKEOj6ur857dZNNws2bxT 0RecIx4io8lJILdMY5i0hhaBo2E4sEk+07GbpRHc= Authentication-Results: vla1-eeea27dff809.qloud-c.yandex.net; dkim=pass header.i=@yandex.ru Received: by vla1-cde8305024b9.qloud-c.yandex.net (smtp/Yandex) with ESMTPSA id 2v75UyJwZa-NqJmJgHo; Tue, 02 Mar 2021 19:23:52 +0300 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client certificate not present) From: Konstantin Kharlamov To: bug-gnu-emacs@gnu.org Subject: [PATCH] Find conflict markers in opened buffers as well Date: Tue, 2 Mar 2021 19:23:49 +0300 Message-Id: <20210302162349.709999-1-Hi-Angel@yandex.ru> X-Mailer: git-send-email 2.30.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=77.88.28.100; envelope-from=Hi-Angel@yandex.ru; helo=forward100p.mail.yandex.net 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_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.7 (/) 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 (--) Call to (vc-find-conflicted-file) will only result in jump to a conflict marker when file is a newly opened one. When a file is already open in Emacs, (vc-find-conflicted-file) only switches to that buffer, so we need to explicitly jump to a conflict marker. * lisp/vc/smerge-mode.el (smerge-vc-next-conflict): Search for a conflict marker if call to (vc-find-conflicted-file) haven't resulted in a jump to one. --- lisp/vc/smerge-mode.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lisp/vc/smerge-mode.el b/lisp/vc/smerge-mode.el index 782c799273..383f8435f5 100644 --- a/lisp/vc/smerge-mode.el +++ b/lisp/vc/smerge-mode.el @@ -1468,8 +1468,10 @@ smerge-vc-next-conflict (if (and (buffer-modified-p) buffer-file-name) (save-buffer)) (vc-find-conflicted-file) - (when (eq buffer (current-buffer)) - ;; Try to find a conflict marker in current file above the point. + ;; At this point, the caret will only be at a conflict marker + ;; if the file did not correspond to an opened + ;; buffer. Otherwise, we need to jump to a marker explicitly. + (unless (looking-at "^<<<<<<<") (let ((prev-pos (point))) (goto-char (point-min)) (unless (ignore-errors (not (smerge-next))) -- 2.30.1 From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 02 14:37:21 2021 Received: (at 46876) by debbugs.gnu.org; 2 Mar 2021 19:37:21 +0000 Received: from localhost ([127.0.0.1]:54232 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lHApc-00035i-QD for submit@debbugs.gnu.org; Tue, 02 Mar 2021 14:37:21 -0500 Received: from forward104j.mail.yandex.net ([5.45.198.247]:39080) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lHApa-00035T-QW for 46876@debbugs.gnu.org; Tue, 02 Mar 2021 14:37:20 -0500 Received: from myt5-1892386aa303.qloud-c.yandex.net (myt5-1892386aa303.qloud-c.yandex.net [IPv6:2a02:6b8:c12:4323:0:640:1892:386a]) by forward104j.mail.yandex.net (Yandex) with ESMTP id E46374A016D for <46876@debbugs.gnu.org>; Tue, 2 Mar 2021 22:37:11 +0300 (MSK) Received: from myt3-07a4bd8655f2.qloud-c.yandex.net (myt3-07a4bd8655f2.qloud-c.yandex.net [2a02:6b8:c12:693:0:640:7a4:bd86]) by myt5-1892386aa303.qloud-c.yandex.net (mxback/Yandex) with ESMTP id EEGFalT5Hs-bBIS8xXc; Tue, 02 Mar 2021 22:37:11 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1614713831; bh=RssG4nlBKz7MhZcqXOS1/GN3oOkfsxHchKbEWxkQdes=; h=To:From:Subject:Message-ID:Date; b=ReTGd0RPPfrRABw4ijYhqeWnmAYFDkB3SrcMCOMCvZyIKJE9qpcAwJyaUa00QLqvn w6d0OmBNXW7LUJI/C+H40SJdEkpqFAvf85jkGoTVw1dqn32+MmQupEwOdkyoEwwbk/ ZE5djChzg/DKy/aAFkEYCbjUXE91YV6k9jLEv69I= Authentication-Results: myt5-1892386aa303.qloud-c.yandex.net; dkim=pass header.i=@yandex.ru Received: by myt3-07a4bd8655f2.qloud-c.yandex.net (smtp/Yandex) with ESMTPSA id 43x5Z4QtZm-bBne8Rj6; Tue, 02 Mar 2021 22:37:11 +0300 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client certificate not present) Message-ID: Subject: [PATCH] Find conflict markers in opened buffers as well From: Konstantin Kharlamov To: 46876@debbugs.gnu.org Date: Tue, 02 Mar 2021 22:37:10 +0300 Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.38.4 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 46876 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: -1.7 (-) Hello! Sorry, it seems like debbugs notifications got broken, at least for me. I never got a notifications about this report creation; and it seems not a coincidence because while working with bug #46400 at some point notifications stopped coming in. I'll create a separate report on this, but please add me to CC for now because otherwise I can't know if someone is replying. With that said, right after I sent the patch I figured there an unused variable appeared after my changes, so I'll sent in a moment the newer version of the changes, with it removed. From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 02 14:40:35 2021 Received: (at 46876) by debbugs.gnu.org; 2 Mar 2021 19:40:35 +0000 Received: from localhost ([127.0.0.1]:54253 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lHAsl-0003By-EA for submit@debbugs.gnu.org; Tue, 02 Mar 2021 14:40:35 -0500 Received: from forward102o.mail.yandex.net ([37.140.190.182]:45288) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lHAsj-0003Bf-PR for 46876@debbugs.gnu.org; Tue, 02 Mar 2021 14:40:34 -0500 Received: from forward103q.mail.yandex.net (forward103q.mail.yandex.net [IPv6:2a02:6b8:c0e:50:0:640:b21c:d009]) by forward102o.mail.yandex.net (Yandex) with ESMTP id 722736681526 for <46876@debbugs.gnu.org>; Tue, 2 Mar 2021 22:40:26 +0300 (MSK) Received: from vla5-7026d7bc498f.qloud-c.yandex.net (vla5-7026d7bc498f.qloud-c.yandex.net [IPv6:2a02:6b8:c18:351e:0:640:7026:d7bc]) by forward103q.mail.yandex.net (Yandex) with ESMTP id 6E06061E0004 for <46876@debbugs.gnu.org>; Tue, 2 Mar 2021 22:40:26 +0300 (MSK) Received: from vla1-1bc5b51c612f.qloud-c.yandex.net (vla1-1bc5b51c612f.qloud-c.yandex.net [2a02:6b8:c0d:89c:0:640:1bc5:b51c]) by vla5-7026d7bc498f.qloud-c.yandex.net (mxback/Yandex) with ESMTP id TAZYy9Ya2p-eQH8JHUf; Tue, 02 Mar 2021 22:40:26 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1614714026; bh=QrK0oecLtrnyYoixS3i98fQaJ+qOhXxCgEhMDiSDKvU=; h=Date:Subject:To:From:Message-Id; b=QAf1rsrePrLBlyWzzICftjoHEpGdL0GTBFn+D4eQOvWJTd0wQRGbKuznnrTnOMFhY 2Ob/RnlBZB+BCcyOBUbms4tgJBcWOO4u00ewwZXppJbjWgW64eWKzAiJluYA3GDdTl AJRNsylFAjRm6hGB0LxzB6pLL+/YZdFKQP/qtwNc= Authentication-Results: vla5-7026d7bc498f.qloud-c.yandex.net; dkim=pass header.i=@yandex.ru Received: by vla1-1bc5b51c612f.qloud-c.yandex.net (smtp/Yandex) with ESMTPSA id 9JQQrzgECI-ePn4j6ao; Tue, 02 Mar 2021 22:40:25 +0300 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client certificate not present) From: Konstantin Kharlamov To: 46876@debbugs.gnu.org Subject: [PATCH] Find conflict markers in opened buffers as well Date: Tue, 2 Mar 2021 22:40:19 +0300 Message-Id: <20210302194019.714751-1-Hi-Angel@yandex.ru> X-Mailer: git-send-email 2.30.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 46876 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: -1.0 (-) Call to (vc-find-conflicted-file) will only result in jump to a conflict marker when file is a newly opened one. When a file is already open in Emacs, (vc-find-conflicted-file) only switches to that buffer, so we need to explicitly jump to a conflict marker. * lisp/vc/smerge-mode.el (smerge-vc-next-conflict): Search for a conflict marker if call to (vc-find-conflicted-file) haven't resulted in a jump to one. And remove `buffer` variable that becomes unused. --- lisp/vc/smerge-mode.el | 49 +++++++++++++++++++++--------------------- 1 file changed, 25 insertions(+), 24 deletions(-) diff --git a/lisp/vc/smerge-mode.el b/lisp/vc/smerge-mode.el index 782c799273..694d4529b9 100644 --- a/lisp/vc/smerge-mode.el +++ b/lisp/vc/smerge-mode.el @@ -1450,30 +1450,31 @@ smerge-vc-next-conflict First tries to go to the next conflict in the current buffer, and if not found, uses VC to try and find the next file with conflict." (interactive) - (let ((buffer (current-buffer))) - (condition-case nil - ;; FIXME: Try again from BOB before moving to the next file. - (smerge-next) - (error - (if (and (or smerge-change-buffer-confirm - (and (buffer-modified-p) buffer-file-name)) - (not (or (eq last-command this-command) - (eq ?\r last-command-event)))) ;Called via M-x!? - ;; FIXME: Don't emit this message if `vc-find-conflicted-file' won't - ;; go to another file anyway (because there are no more conflicted - ;; files). - (message (if (buffer-modified-p) - "No more conflicts here. Repeat to save and go to next buffer" - "No more conflicts here. Repeat to go to next buffer")) - (if (and (buffer-modified-p) buffer-file-name) - (save-buffer)) - (vc-find-conflicted-file) - (when (eq buffer (current-buffer)) - ;; Try to find a conflict marker in current file above the point. - (let ((prev-pos (point))) - (goto-char (point-min)) - (unless (ignore-errors (not (smerge-next))) - (goto-char prev-pos))))))))) + (condition-case nil + ;; FIXME: Try again from BOB before moving to the next file. + (smerge-next) + (error + (if (and (or smerge-change-buffer-confirm + (and (buffer-modified-p) buffer-file-name)) + (not (or (eq last-command this-command) + (eq ?\r last-command-event)))) ;Called via M-x!? + ;; FIXME: Don't emit this message if `vc-find-conflicted-file' won't + ;; go to another file anyway (because there are no more conflicted + ;; files). + (message (if (buffer-modified-p) + "No more conflicts here. Repeat to save and go to next buffer" + "No more conflicts here. Repeat to go to next buffer")) + (if (and (buffer-modified-p) buffer-file-name) + (save-buffer)) + (vc-find-conflicted-file) + ;; At this point, the caret will only be at a conflict marker + ;; if the file did not correspond to an opened + ;; buffer. Otherwise we need to jump to a marker explicitly. + (unless (looking-at "^<<<<<<<") + (let ((prev-pos (point))) + (goto-char (point-min)) + (unless (ignore-errors (not (smerge-next))) + (goto-char prev-pos)))))))) (provide 'smerge-mode) -- 2.30.1 From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 02 14:52:58 2021 Received: (at 46876) by debbugs.gnu.org; 2 Mar 2021 19:52:58 +0000 Received: from localhost ([127.0.0.1]:54278 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lHB4j-0003WZ-OD for submit@debbugs.gnu.org; Tue, 02 Mar 2021 14:52:57 -0500 Received: from forward103p.mail.yandex.net ([77.88.28.106]:57652) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lHB4f-0003WL-CY for 46876@debbugs.gnu.org; Tue, 02 Mar 2021 14:52:56 -0500 Received: from myt5-ca2cc4399680.qloud-c.yandex.net (myt5-ca2cc4399680.qloud-c.yandex.net [IPv6:2a02:6b8:c12:3a16:0:640:ca2c:c439]) by forward103p.mail.yandex.net (Yandex) with ESMTP id 4E5B718C0E7B for <46876@debbugs.gnu.org>; Tue, 2 Mar 2021 22:52:46 +0300 (MSK) Received: from myt6-016ca1315a73.qloud-c.yandex.net (myt6-016ca1315a73.qloud-c.yandex.net [2a02:6b8:c12:4e0e:0:640:16c:a131]) by myt5-ca2cc4399680.qloud-c.yandex.net (mxback/Yandex) with ESMTP id tW0ukDHApa-qjHOeZrG; Tue, 02 Mar 2021 22:52:46 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1614714766; bh=+Gaw7vA8kS86d1L9jOZTntuWiJPQUcBoGh4mBbXCGYo=; h=In-Reply-To:To:From:Subject:Message-ID:References:Date; b=AozhbXRQSLoTEWzw/fos+mp1hZZHgXXKR/Geoc27YtJysT6iQrBjnhgrHJmfROMmw Pk2NghFbMguZ9WB2sIzm5u7+uFIHhRfC8e8g5ccQHebT80MGn4U+sYeL8os7qkm+5t 0fFQCl/Srlf+RV2roPK3TxrjXzQHwvk/5iqZ1Tls= Authentication-Results: myt5-ca2cc4399680.qloud-c.yandex.net; dkim=pass header.i=@yandex.ru Received: by myt6-016ca1315a73.qloud-c.yandex.net (smtp/Yandex) with ESMTPSA id go2WFggm33-qjo8b75D; Tue, 02 Mar 2021 22:52:45 +0300 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client certificate not present) Message-ID: <0337ba1d43d001eab1917028e74d1a958b0bb038.camel@yandex.ru> Subject: Re: [PATCH] Find conflict markers in opened buffers as well From: Konstantin Kharlamov To: 46876@debbugs.gnu.org Date: Tue, 02 Mar 2021 22:52:45 +0300 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.38.4 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 46876 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: -1.0 (-) On Tue, 2021-03-02 at 22:37 +0300, Konstantin Kharlamov wrote: > Hello! Sorry, it seems like debbugs notifications got broken, at least for me. > I never got a notifications about this report creation; and it seems not a > coincidence because while working with bug #46400 at some point notifications > stopped coming in. > > I'll create a separate report on this, but please add me to CC for now because > otherwise I can't know if someone is replying. Ah, nvm, it seems it was a coincidence, combined with odd timings of various events. If anyone is curious: when I sent the patch, I did not get a notification: not immediately, nor after 10 minutes, not after 20 minutes… I checked the spam folder, and there was nothing as well. This looked very suspicious, so when after 3 hours I still didn't get anything, I thought it is the problem as in #46400, apparently something is happening. Well, it turned out I did get the notification, and it got into spam folder. But I did check spam folder, you remember, right? Well, the notification was only sent 43 minutes after my patch, so no surprise at this point I did not look at spam folder anymore (also, this is the only false-positive by my email-provider in, like, years, I think). From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 08 21:31:41 2021 Received: (at 46876) by debbugs.gnu.org; 9 Mar 2021 02:31:41 +0000 Received: from localhost ([127.0.0.1]:45277 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lJS9t-0004Vx-2Q for submit@debbugs.gnu.org; Mon, 08 Mar 2021 21:31:41 -0500 Received: from mail-wr1-f51.google.com ([209.85.221.51]:45012) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lJS9r-0004Vf-O5 for 46876@debbugs.gnu.org; Mon, 08 Mar 2021 21:31:40 -0500 Received: by mail-wr1-f51.google.com with SMTP id h98so13509053wrh.11 for <46876@debbugs.gnu.org>; Mon, 08 Mar 2021 18:31:39 -0800 (PST) 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=xfc7ORZOmbvkE7wkI+QRMDdGAGqUYUphjCpALAvuO/8=; b=u1kyTF7ENTmNYxIVhwyGzH4d4+Ypdyg86p7NC1vY/ykmmCCtc2y5ZQGxGR4zi/MDMo 7bVQTvJ4KMbNs8S05XMgvroFS3ZjZZ+78PYfRTlUJ6y93dnsquSNKS1P+9Wbts/a5Q3R PcXI3mxMIenhv+KQupRhfZER4d3M2qesVkwvbyqZg0pOb8dRPYWDcqlEJo77Owqe+dYq /87LeqpOyG6+N6MfX/pgYJgbk0h2P9Wa0su7ZYOp8/jQFjxs8roayyzxI1+yeXklatgp uFAZAw93oO9zTS60tNgQYQox/MViEh8YhgyCcMQc27A3drLo/j/ZmboTQ+ASk7rjFmZu A48Q== 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=xfc7ORZOmbvkE7wkI+QRMDdGAGqUYUphjCpALAvuO/8=; b=B3bgBQx5QOZkCGoEGh0j4aeCWLGmQGcaATjAOyvMYur6zNDjJbUz6+c25jtmc0vWOA Yi/NezV1Taem8DA90uVjHbslXSvs3FOuulyMzZhZxWE4pUnLAfBO5rDrGdcyE1gr/0so JBYs67GgZ2XuefsEDVQf5OfToPf+SqeJZOcQyas8KiVGoJNI0Z9IHvogZfhXreVXerN4 W2RVaj6aKCo13tdCXwDaiZPIaVAgOUaO3W1cbR5KZ45oTVJkQJDxbyox2mmLQ+YTvX+U py4TQUoz3S9v8IMKb0yPniMcfBKpJw7GN0dknVG2z7nLeg7hu5zS3+rBaCGhHnS1xfvM MjBA== X-Gm-Message-State: AOAM531srcpanTHtIjoU/bY6acNfsfe0J7vbgMY8z6Uic2JEVaGD/Awd ZElkWjHg+nnkeKhMY/73b3BnhpoSVRs= X-Google-Smtp-Source: ABdhPJzbANYUViu9BaGSUTUsSMr4zxRZfIgLdrMl83APCmodq74Ncf0CpXEwvH02C3giceCpBxFohg== X-Received: by 2002:adf:d84d:: with SMTP id k13mr26542013wrl.164.1615257093915; Mon, 08 Mar 2021 18:31:33 -0800 (PST) Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id t188sm1799411wma.25.2021.03.08.18.31.33 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 08 Mar 2021 18:31:33 -0800 (PST) Subject: Re: bug#46876: [PATCH] Find conflict markers in opened buffers as well To: Konstantin Kharlamov , 46876@debbugs.gnu.org References: <0337ba1d43d001eab1917028e74d1a958b0bb038.camel@yandex.ru> From: Dmitry Gutov Message-ID: <30e351f7-c0df-e42f-11e5-6dd352ca2984@yandex.ru> Date: Tue, 9 Mar 2021 04:31:32 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: <0337ba1d43d001eab1917028e74d1a958b0bb038.camel@yandex.ru> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 46876 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: -0.5 (/) On 02.03.2021 21:52, Konstantin Kharlamov wrote: > Well, the notification was only sent 43 minutes after my patch, so no surprise at this point I did not look at spam folder anymore (also, this is the only false-positive by my email-provider in, like, years, I think). Yeah, the bug tracker can be slow with the notifications. Mailing lists deliver some messages pretty late too. From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 08 21:51:12 2021 Received: (at 46876-done) by debbugs.gnu.org; 9 Mar 2021 02:51:12 +0000 Received: from localhost ([127.0.0.1]:45305 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lJSSm-00052P-Df for submit@debbugs.gnu.org; Mon, 08 Mar 2021 21:51:12 -0500 Received: from mail-wm1-f48.google.com ([209.85.128.48]:46628) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lJSSi-000526-PC for 46876-done@debbugs.gnu.org; Mon, 08 Mar 2021 21:51:10 -0500 Received: by mail-wm1-f48.google.com with SMTP id d139-20020a1c1d910000b029010b895cb6f2so5009062wmd.5 for <46876-done@debbugs.gnu.org>; Mon, 08 Mar 2021 18:51:08 -0800 (PST) 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=Ewx7PgUBmILQUpPHIBI/seS1/Lob8mBcOJ9DvNVEpLs=; b=md0ZUQCb5CfB5TVgJSwZp5MZo4+hMjq9uJ+7aadJP+jAryhigoYY9sNqBMN1cJ2TXQ HqNHjtjVuObtEAPcweEbMkickPxYCPO3i/FxiTI346hQPFlYKuhIC1BOGlSfYe/psRyR ylgRz1KhfUVfSEVNDcvOafP7hm3RR9jeSu1v+5OsL1F+EAgtwlOs2KLDpRW8I3dyHjCN OqAX38NNct/i0V83H7aklwGLcSl0uEJZYkznybcf5hOMw+lBgayWsRa66ZblYhHwDdfR hWJrRNKtNLKB5I/eVnbtLfQ4YpaklgsIZ6bHbqTF17Z+VrZKeC0JYCvuW9d3QmRs1os0 9p8w== 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=Ewx7PgUBmILQUpPHIBI/seS1/Lob8mBcOJ9DvNVEpLs=; b=XTcvQOeWF58kyTuahbxxiLUMPNnntO8reXDIAvBECcyGCiwzXd5w0IfIYK1QrqDMF2 bCJwRO6iQt1mz3AXBf4Z1DT726g2+hM/+YfZQfxZ6H0s7JV5k/hvf8/crI07F3fKCmdr T9IES4eo0Svx+WkZlxJ6AdlzHg/kqv7MskeJCqO3EyHlRznhHnnDVh1D5SOx5ylZ0Osl XCFTelR79YL8d//RkA3XD/b7OIzGRoYXbO1CCOSHYAnKlxdvQtSSeLUzN5O2XlimWjH/ 2noZkoga4OQerJfyY8XFaZ1WK5qHxlqGIrlpiJYKFcFzFX1eX2bs8XYiiWVqI4rWM4VK cqyw== X-Gm-Message-State: AOAM530+MOR+/mO/1MCCSaxPa28ReRbwDOlAyp267Je3yCX5YNsrc8zv 9g791d8tQYb4zAwZE3HBblRgbyifu2s= X-Google-Smtp-Source: ABdhPJwZhBaAf1SFr+SHtIybhWKLAALv9ktDGigew7peem4sDks3eS8nVCA+Mm2zYkO5i2SWTiH2oQ== X-Received: by 2002:a7b:c041:: with SMTP id u1mr1519907wmc.161.1615258262635; Mon, 08 Mar 2021 18:51:02 -0800 (PST) Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id j11sm21176595wrm.13.2021.03.08.18.51.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 08 Mar 2021 18:51:02 -0800 (PST) Subject: Re: bug#46876: [PATCH] Find conflict markers in opened buffers as well To: Konstantin Kharlamov , 46876-done@debbugs.gnu.org References: <20210302162349.709999-1-Hi-Angel@yandex.ru> <20210302194019.714751-1-Hi-Angel@yandex.ru> From: Dmitry Gutov Message-ID: Date: Tue, 9 Mar 2021 04:51:00 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: <20210302194019.714751-1-Hi-Angel@yandex.ru> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 46876-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: -0.5 (/) On 02.03.2021 21:40, Konstantin Kharlamov wrote: > Call to (vc-find-conflicted-file) will only result in jump to a conflict > marker when file is a newly opened one. When a file is already open in > Emacs, (vc-find-conflicted-file) only switches to that buffer, so we > need to explicitly jump to a conflict marker. > > * lisp/vc/smerge-mode.el (smerge-vc-next-conflict): Search for a > conflict marker if call to (vc-find-conflicted-file) haven't resulted in > a jump to one. And remove `buffer` variable that becomes unused. Thank you, this makes sense. Applied and pushed to master. This part is suboptimal: > When a file is already open in > Emacs, (vc-find-conflicted-file) only switches to that buffer ...and I had to spend some time figuring out why that happens (hint: vc-git-find-file-hook), and that kind of unpredictable behavior is Not Good(tm). I don't have an alternative fix to propose, though. At least not at this time. From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 09 01:32:34 2021 Received: (at 46876-done) by debbugs.gnu.org; 9 Mar 2021 06:32:34 +0000 Received: from localhost ([127.0.0.1]:45457 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lJVv0-0006aQ-6l for submit@debbugs.gnu.org; Tue, 09 Mar 2021 01:32:34 -0500 Received: from forward102p.mail.yandex.net ([77.88.28.102]:44153) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lJVux-0006Vr-Rw for 46876-done@debbugs.gnu.org; Tue, 09 Mar 2021 01:32:33 -0500 Received: from forward101q.mail.yandex.net (forward101q.mail.yandex.net [IPv6:2a02:6b8:c0e:4b:0:640:4012:bb98]) by forward102p.mail.yandex.net (Yandex) with ESMTP id AA56E1D4010B for <46876-done@debbugs.gnu.org>; Tue, 9 Mar 2021 09:32:24 +0300 (MSK) Received: from vla1-85d2a0988c40.qloud-c.yandex.net (vla1-85d2a0988c40.qloud-c.yandex.net [IPv6:2a02:6b8:c0d:511a:0:640:85d2:a098]) by forward101q.mail.yandex.net (Yandex) with ESMTP id A661CCF40021 for <46876-done@debbugs.gnu.org>; Tue, 9 Mar 2021 09:32:24 +0300 (MSK) Received: from vla1-1bc5b51c612f.qloud-c.yandex.net (vla1-1bc5b51c612f.qloud-c.yandex.net [2a02:6b8:c0d:89c:0:640:1bc5:b51c]) by vla1-85d2a0988c40.qloud-c.yandex.net (mxback/Yandex) with ESMTP id qzTJUysiIe-WOHKt3nh; Tue, 09 Mar 2021 09:32:24 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1615271544; bh=crapl74lNQQzCTsEcuxdnzNnHYmzIaqBGugJNUp5YoU=; h=In-Reply-To:References:Date:To:From:Subject:Message-ID; b=UTcMpCiSI/KIn3e7eNLpJQNUB7yU3eVz/k8nsTZh+kLP+snpiCZAA28Hfgc9YiuHg mAx55cX4suzRhMsagMEKrz342kZgQdIbBVPr26Oj7itYlwt98sSEv7Mtvrw6/3URDq aK2nKnbIiKzTnB++bQN/HWQ6MpwG9KllfTGNPYIw= Authentication-Results: vla1-85d2a0988c40.qloud-c.yandex.net; dkim=pass header.i=@yandex.ru Received: by vla1-1bc5b51c612f.qloud-c.yandex.net (smtp/Yandex) with ESMTPSA id q3yH7hS23O-WNJO8BpI; Tue, 09 Mar 2021 09:32:24 +0300 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client certificate not present) Message-ID: <969164031c7e35971eaa4dedefd4e5acb2827613.camel@yandex.ru> Subject: Re: bug#46876: [PATCH] Find conflict markers in opened buffers as well From: Konstantin Kharlamov To: Dmitry Gutov , 46876-done@debbugs.gnu.org Date: Tue, 09 Mar 2021 09:32:23 +0300 In-Reply-To: References: <20210302162349.709999-1-Hi-Angel@yandex.ru> <20210302194019.714751-1-Hi-Angel@yandex.ru> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.38.4 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 46876-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: -1.0 (-) On Tue, 2021-03-09 at 04:51 +0200, Dmitry Gutov wrote: > On 02.03.2021 21:40, Konstantin Kharlamov wrote: > > Call to (vc-find-conflicted-file) will only result in jump to a conflict > > marker when file is a newly opened one. When a file is already open in > > Emacs, (vc-find-conflicted-file) only switches to that buffer, so we > > need to explicitly jump to a conflict marker. > > > > * lisp/vc/smerge-mode.el (smerge-vc-next-conflict): Search for a > > conflict marker if call to (vc-find-conflicted-file) haven't resulted in > > a jump to one. And remove `buffer` variable that becomes unused. > > Thank you, this makes sense. Applied and pushed to master. Thank you! > This part is suboptimal: > >  > When a file is already open in >  > Emacs, (vc-find-conflicted-file) only switches to that buffer > > ...and I had to spend some time figuring out why that happens (hint: > vc-git-find-file-hook), and that kind of unpredictable behavior is Not > Good(tm). Back when I stumbled upon this behaviour, I didn't research into it because I thought it could be deliberate. The reasoning might have been: if you didn't have a file opened, it doesn't really matter where your point would be once it is. So it shouldn't hurt to just jump to a conflict marker, and so it does. On the other hand, if you did have the file opened, you might not want to lose position of your point (for example, you could have a selection, which you don't want to lose for some reason), IOW initial point position in this case might matter. I'm just speculating though, I do not know if it's true, neither I remember having a usecase as the one I imagine it's trying to cover. FWIW, usually when I want to save positions in a buffer, I use (evil-set-marker) from Evil package. From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 09 09:15:13 2021 Received: (at 46876-done) by debbugs.gnu.org; 9 Mar 2021 14:15:13 +0000 Received: from localhost ([127.0.0.1]:46051 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lJd8i-0005gn-Rm for submit@debbugs.gnu.org; Tue, 09 Mar 2021 09:15:13 -0500 Received: from mail-wm1-f42.google.com ([209.85.128.42]:44863) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lJd8g-0005gV-Dk for 46876-done@debbugs.gnu.org; Tue, 09 Mar 2021 09:15:11 -0500 Received: by mail-wm1-f42.google.com with SMTP id j4-20020a05600c4104b029010c62bc1e20so6481915wmi.3 for <46876-done@debbugs.gnu.org>; Tue, 09 Mar 2021 06:15:10 -0800 (PST) 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=f2mYldDzOPAP1e0qIQ92hYZxg5nqIu/b2JTO+oZGzeY=; b=i/y1/BUYvjA6MLwYcXJQ0pJ4uTp/cdY/bvtr0MqZ2VDsbc5MckOK3gQAB8LXM5Enb3 s8knFrAs49XmlFErzA1AOrWPJWQhUB/I7pUk592S4xX9GDB1DELVD9DLfU36jPuoTFUr 6ylcZkiwrYtlnOXz/hhG9ZfShqzY6RL5egoyN8OQ3VXUU+poLp2CHAww5QVpxDMqGDr1 3i7b6WcFNUKg1k2r20/XKEbIp/xed3MK5stEHNUFQSykbWrzvjXrYk4HLbx204AGsX6t NtDXBd0IBLG3qb/ZmEtaP3eguZa/fupg2freDDN1sQW3ol/RPaRSOrdU+fc/GkmZc21q Ox9A== 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=f2mYldDzOPAP1e0qIQ92hYZxg5nqIu/b2JTO+oZGzeY=; b=D1Gu4efT5VLIXfXIXbs3D0GcqinuWjOHmq87NhqcAMoacZKLaS+vDfT06UqZPwOXkq fOXH0W6nvE8qiuk0BSqF8qAfCgdWEJnpuXJ4YktB8IOlEHcwLNCsvbXeBzoyhM3edgEu yN89qQKKCKQa0Wkdkzg16bUP1j/gEZ2mkaY8dqzV0brogrrSboWv37uCRtZu6HOQDv2q TjtfKGBKzkzXbaH8CDtN52TukE+mpv89h6bKiycK23Mi6q77vyvAsRN0WbILpulxXZRv nFQeAmbc+dFnKK2kMpWLzVSJkd1aTNSdnQf6HVdF61kyPdxT9KLjmD94lfpXpW8qaU2Y mEzQ== X-Gm-Message-State: AOAM530mPmtBWnQ3TqO6McwUEluXXw6F/LtaoZfbgP6DWQRkpOZcHPiq QmB89n5nf0j0+NPlX+f04IvDUkQyeQI= X-Google-Smtp-Source: ABdhPJyzy/5gMkSl6oTdbsSwuFMBJ/iYbaieElE2ky9f0TLyReKnedqG6V/SXFoEURVcT+bpfmE/Iw== X-Received: by 2002:a1c:7402:: with SMTP id p2mr4175473wmc.43.1615299304632; Tue, 09 Mar 2021 06:15:04 -0800 (PST) Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id p27sm4553336wmi.12.2021.03.09.06.15.03 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 09 Mar 2021 06:15:03 -0800 (PST) Subject: Re: bug#46876: [PATCH] Find conflict markers in opened buffers as well To: Konstantin Kharlamov , 46876-done@debbugs.gnu.org References: <20210302162349.709999-1-Hi-Angel@yandex.ru> <20210302194019.714751-1-Hi-Angel@yandex.ru> <969164031c7e35971eaa4dedefd4e5acb2827613.camel@yandex.ru> From: Dmitry Gutov Message-ID: Date: Tue, 9 Mar 2021 16:15:02 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: <969164031c7e35971eaa4dedefd4e5acb2827613.camel@yandex.ru> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 46876-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: -0.5 (/) On 09.03.2021 08:32, Konstantin Kharlamov wrote: >> This part is suboptimal: >> >>  > When a file is already open in >>  > Emacs, (vc-find-conflicted-file) only switches to that buffer >> >> ...and I had to spend some time figuring out why that happens (hint: >> vc-git-find-file-hook), and that kind of unpredictable behavior is Not >> Good(tm). > > Back when I stumbled upon this behaviour, I didn't research into it because I thought it could be deliberate. The reasoning might have been: if you didn't have a file opened, it doesn't really matter where your point would be once it is. So it shouldn't hurt to just jump to a conflict marker, and so it does. On the other hand, if you did have the file opened, you might not want to lose position of your point (for example, you could have a selection, which you don't want to lose for some reason), IOW initial point position in this case might matter. > > I'm just speculating though, I do not know if it's true, neither I remember having a usecase as the one I imagine it's trying to cover. FWIW, usually when I want to save positions in a buffer, I use (evil-set-marker) from Evil package. I don't use Evil, but set-mark should work. In any case, when the user is calling vc-find-conflicted-file, they probably want to either always go to the conflict markers (whether the file has been visited or not), or never. And "always" probably makes more sense. It's not urgent, though, especially with neither command having a default binding. From unknown Sun Jun 15 08:01:24 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 07 Apr 2021 11:24:05 +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