From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#46876: [PATCH] Find conflict markers in opened buffers as well Date: Tue, 9 Mar 2021 04:51:00 +0200 Message-ID: References: <20210302162349.709999-1-Hi-Angel@yandex.ru> <20210302194019.714751-1-Hi-Angel@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9337"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 To: Konstantin Kharlamov , 46876-done@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Mar 09 03:52:17 2021 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 1lJSTp-0002LD-6Z for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 09 Mar 2021 03:52:17 +0100 Original-Received: from localhost ([::1]:36936 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lJSTo-00035H-8z for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 08 Mar 2021 21:52:16 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48670) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lJSTb-00034y-5M for bug-gnu-emacs@gnu.org; Mon, 08 Mar 2021 21:52:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:33760) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lJSTZ-0004W8-NM for bug-gnu-emacs@gnu.org; Mon, 08 Mar 2021 21:52:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lJSTZ-00053i-Mv for bug-gnu-emacs@gnu.org; Mon, 08 Mar 2021 21:52:01 -0500 Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Tue, 09 Mar 2021 02:52:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 46876 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Mail-Followup-To: 46876@debbugs.gnu.org, dgutov@yandex.ru, Hi-Angel@yandex.ru Original-Received: via spool by 46876-done@debbugs.gnu.org id=D46876.161525827219374 (code D ref 46876); Tue, 09 Mar 2021 02:52:01 +0000 Original-Received: (at 46876-done) by debbugs.gnu.org; 9 Mar 2021 02:51:12 +0000 Original-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 Original-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 Original-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) Original-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) In-Reply-To: <20210302194019.714751-1-Hi-Angel@yandex.ru> Content-Language: en-US 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" Xref: news.gmane.io gmane.emacs.bugs:201895 Archived-At: 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.