From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Patrick Mahan Newsgroups: gmane.emacs.help Subject: Re: ediff on two files in two side by side emacs windows Date: Sat, 1 May 2021 17:13:14 -0700 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="16662"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Help Gnu Emacs To: wael-zwaiter@gmx.com Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sun May 02 02:14:04 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 1lczkK-0004F3-7j for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 02 May 2021 02:14:04 +0200 Original-Received: from localhost ([::1]:35490 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lczkI-00047N-V3 for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 01 May 2021 20:14:02 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33360) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lczjp-00047D-Uh for help-gnu-emacs@gnu.org; Sat, 01 May 2021 20:13:34 -0400 Original-Received: from mail-lf1-x133.google.com ([2a00:1450:4864:20::133]:37685) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lczjm-0006Tv-3N for help-gnu-emacs@gnu.org; Sat, 01 May 2021 20:13:33 -0400 Original-Received: by mail-lf1-x133.google.com with SMTP id 2so2744636lft.4 for ; Sat, 01 May 2021 17:13:27 -0700 (PDT) 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; bh=dJgy/G0pvgBqQ8KTwQc9ow8ajBTfH11uqF6ReqT6vE0=; b=oRWheHRD3B3kvh5dBhgj6prfHHiqGUfnyzZDA3RU7Uj3ZD4l2OEg9Ar7E2MydFxF/B B4iVcC0/vozVFIKa8lYbK39tNkA5v0M9DPcz9mBSySQuEaz4fPLcFaC/jgNUHnRtntS7 u3zXgQtzIzG5FBjeL/CCesiur9cajfYZ64KSzzXL0MYYgMUgp1mU3ANWEnphNelcZPGg k70oL8FpZaE951m965fbiJCrUnuPsSbkGdLQCsHgvoaRyvFu4HdBW73LNdzCnUEGFSse KxvFV/fSidocN7oty2+SYCzfEgj9T39EFC8Eemdi8gC2DoIYrO/RNr2a9+LLWv2xDg2Y r8cg== 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=dJgy/G0pvgBqQ8KTwQc9ow8ajBTfH11uqF6ReqT6vE0=; b=YlUK1VIR48P9rFkzK49a0vY91q737wE5PdpI8aCCLgQncPHGaHOlrNbcdVSQJOa4hY ObBSYZiIMLd3C8v6BvWPYMYqqLmFEV3SNEgoFJar538kOQlElJjMpRB/RWL0gkrO4nSJ lX5u97CxE8nfUL0pRJOEMcWr+EPvoj8OVwjsfG/2AaOJEvafFnEz4PwQUq2bhPxscRbF 0aght4q20XkWLsK5Bg5LsQrngJa2EImcG4PM8SjILOqDUAusJa5pZwMk1evxk6I9RYcQ AFs6zWzxhmqcGNdHL591MO0Mm5yKima7VY+UN9G5+rCn7AQ1VK43wzBnnRIVlkrqziYX p/lw== X-Gm-Message-State: AOAM530mMXAaKzFC4DPo1YSXVss3OYDiE0v6Ddodg/ssNtXDCjRmLTFr pjxm39ePRyMOT7d6jcAPFUAxv6pLgbtbk29mgt0= X-Google-Smtp-Source: ABdhPJzb0GSjEQw4DP9cejd0rm56t9VxFehyCCfvOxW4LHj9Xw1lzuB6VzCEC0Mr96TefdQe97in4qf1tIdQdXXEfmo= X-Received: by 2002:a05:6512:acc:: with SMTP id n12mr8506715lfu.9.1619914405929; Sat, 01 May 2021 17:13:25 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2a00:1450:4864:20::133; envelope-from=plmahan@gmail.com; helo=mail-lf1-x133.google.com 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, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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:129298 Archived-At: On Sat, May 1, 2021 at 3:16 PM 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