From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Hi-Angel Newsgroups: gmane.emacs.help Subject: Re: How to navigate to next git conflict? Date: Wed, 6 Feb 2019 14:37:06 +0300 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="265779"; mail-complaints-to="usenet@blaine.gmane.org" Cc: help-gnu-emacs@gnu.org To: Stefan Monnier Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Feb 06 12:37:56 2019 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1grLWe-0016wi-2S for geh-help-gnu-emacs@m.gmane.org; Wed, 06 Feb 2019 12:37:56 +0100 Original-Received: from localhost ([127.0.0.1]:49064 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1grLWd-0000bU-1e for geh-help-gnu-emacs@m.gmane.org; Wed, 06 Feb 2019 06:37:55 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:57430) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1grLWB-0000bA-G0 for help-gnu-emacs@gnu.org; Wed, 06 Feb 2019 06:37:28 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1grLW9-0001Uj-PW for help-gnu-emacs@gnu.org; Wed, 06 Feb 2019 06:37:27 -0500 Original-Received: from mail-it1-x12c.google.com ([2607:f8b0:4864:20::12c]:37466) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1grLW5-0001Sc-Iq for help-gnu-emacs@gnu.org; Wed, 06 Feb 2019 06:37:21 -0500 Original-Received: by mail-it1-x12c.google.com with SMTP id b5so5589317iti.2 for ; Wed, 06 Feb 2019 03:37:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=PKUP4oTHt9yNj7bfKE4QaG90rsgRbY2Pa9w/2qfhyTM=; b=HFZioIS8QxZGq+f2wBMQVnMLfoS2+62sSeo68WomeWdiNKiHFwJSgTE2vEkO7VHdXv FSA8Q2MHs9z7FkXdWHz38VtCLH3Vts/yPRrXM0yhR9qMoj6RB4QTH9H4z3lNJQY90Z8m z2/DFaQKvDG/gZzHXZGeqFcPPo8bLLK/YFctwpuRkcL9u5YJJ9hZApQZh1c3EMmqNA2N m5wPIBQEdS2ZiEgLrfaPMYN/RsWqSIHkV+TGCjIOX6N9cCaBkx6pEfDllfOiUklxyDEl s5gCI6rDlk5Kz7am3MaJGaoOH3S0eAHJSoi4KYxjEx5Yh2l6QzVisu1MfpjCiTmBqjEh +Wbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=PKUP4oTHt9yNj7bfKE4QaG90rsgRbY2Pa9w/2qfhyTM=; b=GO2LdchrthIQkh8THyONZ9U/l+AwP2n81QfetgxRYFVYPmbwhoe9tjgztiU29VizrS Zfk/QXmlnMXwGrg++uCKk/LDxee0d/SA4G1JaCUyZ9jod71VVr/72KBy5YgDmohwW418 /mfx908kL0ERn/KzEML9QOjdrkPZUNNr+aexd2UHkq6+pAh/BuDOJHvahnoLW8C/x5RR 7n/gYR7tW/1vozMh3TsbrblwH+fq4UTjx2WggKhos1o4pXYm1A9oC1zeTrMXB5Ejeugf zDG2LIv23pgCfoJAUgKYA26K3fSTVRY4H8Fg/i0TpBbxPdWIsaFJgpHIcWb/hxvFOWjN WHNQ== X-Gm-Message-State: AHQUAuZ8jYIF8oYKhUaR7CCH1AQbolx0T4TTmPwR1Ncod85ogPHyl6EJ /Q3o/L3NG0dfup07niQbO4UI6Ylm3CDLaAOtO0JohC6/ X-Google-Smtp-Source: AHgI3IZ8DUngKeshtEl/DQuLORLBVd/+xxSAMZX5EgaWouP2evjogeD/9KHNlMA+nVD5pz74fhLHModGBUCLWgAd/QQ= X-Received: by 2002:a5d:8906:: with SMTP id b6mr4598351ion.13.1549453037438; Wed, 06 Feb 2019 03:37:17 -0800 (PST) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::12c X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:119215 Archived-At: Thanks! So, for now I wrote the following function, hope this helps someone (defun smerge-next-safe () "returns t on success, nil otherwise" (condition-case err (not (smerge-next)) ('error nil))) (defun next-conflict () (interactive) (let ((buffer (current-buffer))) (when (not (smerge-next-safe)) (vc-find-conflicted-file) (if (eq buffer (current-buffer)) (message "No conflicts found")) (smerge-next-safe))) ) I guess I'll try to contribute a similar functional to Emacs on the weekend= . On Tue, 29 Jan 2019 at 12:43, Stefan Monnier wro= te: > > > For working with git I noted one of frequent actions I do is resolving > > conflicts. I'm comfortable to work with most of that from terminal > > (I've got a completion in zsh and what not=E2=80=A6) except that confli= ct > > navigation could use a bit of automation. > > > > So far I only managed to find `smerge-next`, but it is limited to the > > focused buffer, in there I can as well search for a HEAD or <<< > > markers, so not really useful. > > There's also `vc-find-conflicted-file` to go to the next file with > conflicts when you're done with one. > > > Stefan > >