From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: wael-zwaiter@gmx.com Newsgroups: gmane.emacs.help Subject: Re: ediff on two files in two side by side emacs windows Date: Sun, 2 May 2021 06:19:35 +0200 Message-ID: References: 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="2633"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Help Gnu Emacs To: Patrick Mahan Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sun May 02 06:20:27 2021 Return-path: Envelope-to: geh-help-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 1ld3al-0000bc-9D for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 02 May 2021 06:20:27 +0200 Original-Received: from localhost ([::1]:60286 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ld3ak-0004iG-Bs for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 02 May 2021 00:20:26 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58906) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ld3a0-0004ht-4p for help-gnu-emacs@gnu.org; Sun, 02 May 2021 00:19:40 -0400 Original-Received: from mout.gmx.net ([212.227.17.20]:54029) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ld3Zy-0007RO-1r for help-gnu-emacs@gnu.org; Sun, 02 May 2021 00:19:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1619929175; bh=BMgKDd6Uf4agYyl3N6nBnktgzVvVJmeji3cwilIT6y8=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=JbQs60Tu+2d+gFVGTvtwauPIg8gU9N4YOGbVciZFTmmau/TcMUsADSe+iTbrcbYhC 76WkwWGqtUM9LgrC23ZdhI5YCiiKXIyU1P7fU/0MNAqbO82cqjC0l+EQ+EilFgmcKU PRkIg/j46Cb/FPl7BmcNa5hS837RpgQHmuBCPRv8= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from [213.165.168.94] ([213.165.168.94]) by web-mail.gmx.net (3c-app-mailcom-bs01.server.lan [172.19.170.58]) (via HTTP); Sun, 2 May 2021 06:19:35 +0200 Importance: normal Sensitivity: Normal In-Reply-To: X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:hUp47rmGBqAUBTiSsoNOWRVHxodUF/YwFS7tPN6dwF2hr7ue5MDeVoYN7eeC51mEJRhgN B8qVvjEPf6Pus4yG5XzNhV99+XoRO7uWkSmgOUjlpcqV7RCIccpT0g/1jQnTBXl8zYp7K4uzmr9H yOE9iRuuLgk4WZjBf1PyKbRykGtZb1nfr2YKkdXVE0W6einEidp2WGAmGzSpKzuM9mLVk53O3ZLl thJmCDAz/mkbYaG+bcieDwAvBTv1T3OFiFYizZy972nib/qIDfjGgrTmA+ROlamQZUWBGUaLfKjH ds= X-UI-Out-Filterresults: notjunk:1;V03:K0:DJnRTUrgt54=:JjCgpHAxiRY21cWhvQQrYo quOqoNYnJjieu0PvwJ676BxQFqnULcHnszFg3jA/GvaJD/4iN8mRMN0fTNx5LDVuA831Smxym abZ6TkpoNjiMeMXlor9d+0NpBecoOnQ9JeZwTmqoBowl/totBb4IKZ0RFEwB9j55sG9MGV7Dp 7gxvyQhjYdAgH3xVyD+KQcjRTWLt3oDt/MVOyRqAgOzbijyASWD/kIPVXcx91X0nhknDRynG6 9u9oFndyXGYsTs40XT5myUK7e5A0gsJ4NbqXeb/cCpa2tENvDRiTSy0JJxWNkPgbvYHopYVBi RmhKQlByzus8VVdvhLoc/AQH9rsw5TJXgIXbuOFbFusrPbz1pNlqlwPOvmcRx1O/6JAObuVav qRY+R8EUioi9hOsNZk/wT/EcSJv43qQwRqI+OonaK1xqKXyNdQ+KXHcLitVpRqFyLUYiGqNXM /lAek3KoJOju9pOCOJQLTFcEDV38CUuO5LWnGMwafM7zsCABytRIiikzcearMPIO73oFlBpe8 z8dPgekokYMVwVSfbO/5WpW6VwrLasceD+lZZG9eHuoeMGxSKrrbOj+d4k7PRc0Qk4GehHTEF pQi2k6GLTtdMzhXmFOY55ERoza2nPNltP78jZPIThhqBh9deJTLKzzozS/5ww/6HPJFz3TRT+ Tl3WhmlnrzjMIdppWBtyXw7547CcmWybLI4sb9EGSE6oDXh1PHJ1XpF84DtkpXPzWNmkc9dEE HRvFr2thyM9upd/3h/sT5L/OnfN+1F75jMyx+LycWbOxsS+v/8hNQ7oxO56QQIlqN09Cu+QD Received-SPF: pass client-ip=212.227.17.20; envelope-from=wael-zwaiter@gmx.com; helo=mout.gmx.net X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, MIME_HTML_ONLY=0.1, RCVD_IN_DNSWL_LOW=-0.7, 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-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:129299 Archived-At: I have a problem seeing what "command-line-diff" does and how to use it. Sent: Sunday, May 02, 2021 at 12:13 PM From: "Patrick Mahan" To: wael-zwaiter@gmx.com Cc: "Help Gnu Emacs" Subject: Re: ediff on two files in two side by side emacs windows On Sat, May 1, 2021 at 3:16 PM <[1]wael-zwaiter@gmx.com> wrote: Would it be possible to write an elisp function to run ediff on two windows that I have in my emacs frame? Do you mean something similar to the following: ;; ;; Add support for 'emacs -diff ' ;; (defun command-line-diff (switch) (let ((file1 (pop command-line-args-left)) (file2 (pop command-line-args-right))) (setq ediff-window-setup-funciton 'ediff-setup-windows-plain) (setq ediff-split-window-function (if (> (frame-width) 150) 'split-window-horizontally 'split-window-vertically)) (ediff file1 file2))) (add-to-list 'command-switch-alist '("-diff" . command-line-diff)) Though I spend more time using vcs-ediff because of the various SCMs I work with. Patrick References 1. mailto:wael-zwaiter@gmx.com