From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eliza Velasquez Newsgroups: gmane.emacs.devel Subject: Re: ediff merge wrapper Date: Tue, 3 Nov 2020 10:44:05 -0800 Message-ID: References: <838sbicrqi.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39568"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Nov 03 19:46:09 2020 Return-path: Envelope-to: ged-emacs-devel@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 1ka1Jp-000AAr-Ki for ged-emacs-devel@m.gmane-mx.org; Tue, 03 Nov 2020 19:46:09 +0100 Original-Received: from localhost ([::1]:54148 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ka1Jo-0005F7-MR for ged-emacs-devel@m.gmane-mx.org; Tue, 03 Nov 2020 13:46:08 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48226) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ka1I4-0004GA-4G for emacs-devel@gnu.org; Tue, 03 Nov 2020 13:44:20 -0500 Original-Received: from mail-io1-xd2d.google.com ([2607:f8b0:4864:20::d2d]:38464) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ka1I2-0000R2-6b for emacs-devel@gnu.org; Tue, 03 Nov 2020 13:44:19 -0500 Original-Received: by mail-io1-xd2d.google.com with SMTP id n129so221264iod.5 for ; Tue, 03 Nov 2020 10:44:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=KS3NOXnVGJBorQ3hHURsrgaShj5C33ICCFDKKhbVc78=; b=sArIX8OZLoJpW8BsvivJambqSBhuq08TWhcsqdk3wc7IlOVJaIwkf6sinPBuTO08k7 dX35joGt/9HKhzu/cvfC1ezUSWXdpmfSi5weqwF95ey55/+P9rcqas50lhNwtBftouI1 Nv7jGBt+FLPTh0eHCMjbofXI7ZWtjn51w5/nFbbXuz7qc8gIyhHSHHibjXA97/N9X7tK q8ngZnvzVPwI2RdbXy/QxWSScU2sdm+E+Z4rAWeO7EZRlx0JByG4dzU6M2sjMp7961Yw 6j7C9FKeGi1gTJcHZz6sAhE8xxAu/IyNcJclrDSlXCPc4p7lqMUFFHWOVOFEafssVfrs 00Hg== 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; bh=KS3NOXnVGJBorQ3hHURsrgaShj5C33ICCFDKKhbVc78=; b=UBlirJnYtDX4CRDcTThGZvj8y3yqZoSxA4+kuyuV2h/8yxQ39WailP8EDOwYSrNg92 pHZidoWw4bma9WfpP+i+uq7ZUQZn2P7Di4M9D1bkaakASZvxY4pWmCxttC7ZfPDK4aYf 8zOfT5L40CgoxLpYp3l5/8oonrgFX++9IvLjaeg1VKjtJzv9D+QsMK3pK6hPdG+KHQ6N N1JqLRgtKnZHH1b22fgCklaguUBb+whavtAxgR8rA+9GTb075iNZpYcmR4cxvoWYikxb wXREqXU3LTsJlfBPJfRr4xGmYN9VC4c7GbZJBw7cz4t1/3ZeyvHPOgqswEiqsFPvGwBh dbkA== X-Gm-Message-State: AOAM531hnBoCYKrGPQVtmNGPse/QqPzuUGfbjBT59hKgcJijTfTbCjoc KfZwu86QPgb00YkrERPpplISZOlwyBoljzl1B4EiA+xrsgudV5zD X-Google-Smtp-Source: ABdhPJxQX+MDGnwFCsdbYNUaY4P4RISQjpigEWnzFm07SOh0g2t9YVJIM74jsJ7vZZ6trPmXJXbakOwZURahyenAtxQ= X-Received: by 2002:a02:b68e:: with SMTP id i14mr11955967jam.36.1604429056580; Tue, 03 Nov 2020 10:44:16 -0800 (PST) In-Reply-To: <838sbicrqi.fsf@gnu.org> Received-SPF: pass client-ip=2607:f8b0:4864:20::d2d; envelope-from=exv@google.com; helo=mail-io1-xd2d.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: -175 X-Spam_score: -17.6 X-Spam_bar: ----------------- X-Spam_report: (-17.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, ENV_AND_HDR_SPF_MATCH=-0.5, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, USER_IN_DEF_DKIM_WL=-7.5, USER_IN_DEF_SPF_WL=-7.5 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:258657 Archived-At: I replied with more details about how it works, but it seems I accidentally sent them in a private email to Stefan. Sorry about that, I'm not quite used to mailing lists. I'll copy what I wrote here. Google's ediff_merge tool is invoked like: ediff_merge /path/to/base_file /path/to/ancestor /path/to/file-a /path/to/file-b /path/to/output-file This command blocks until the merge operation is complete, i.e. when the user quits ediff. Upon further investigation of its source code, it seems that the need for this tool may be obsoleted if this bug were to be fixed instead: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=25547. Most of the purpose of this tool seems to be a workaround for this behavior, and it could probably be replaced with a call to `emacsclient -c -e '(ediff-merge-with-ancestor "$a" "$b" "$ancestor" nil "$output")'` if it were fixed. Stefan and I had some additional discussion on the bug thread. On Tue, Nov 3, 2020 at 8:47 AM Eli Zaretskii wrote: > > > From: Eliza Velasquez > > Date: Mon, 2 Nov 2020 12:01:33 -0800 > > > > Internally at Google, we have a wrapper performing an ediff merge with > > emacs/emacsclient which blocks until the merge operation has > > completed. It automatically handles edge cases such as creating a new > > frame over ssh in tty mode or being invoked as an emacs subprocess. I > > think it would be really useful to upstream a tool like this, given > > that using emacs as a merge tool that can be invoked by software such > > as mercurial or perforce can be very fiddly or have unexpected > > behavior. > > Can you describe the use of this tool in more detail, and what > enhancements it implements beyond what emacsclient provides? I don't > think I understand that from your short description. > > Thanks.