From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Giorgos Keramidas Newsgroups: gmane.emacs.devel Subject: Re: ediff maximum line length? Date: Fri, 11 Feb 2011 13:45:11 -0800 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1297460780 2328 80.91.229.12 (11 Feb 2011 21:46:20 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 11 Feb 2011 21:46:20 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Feb 11 22:46:15 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Po0oX-0003Cx-12 for ged-emacs-devel@m.gmane.org; Fri, 11 Feb 2011 22:46:15 +0100 Original-Received: from localhost ([127.0.0.1]:40659 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Po0oT-0007ks-D7 for ged-emacs-devel@m.gmane.org; Fri, 11 Feb 2011 16:46:01 -0500 Original-Received: from [140.186.70.92] (port=54779 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Po0oN-0007kT-7M for emacs-devel@gnu.org; Fri, 11 Feb 2011 16:45:58 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Po0ny-0004BT-1m for emacs-devel@gnu.org; Fri, 11 Feb 2011 16:45:31 -0500 Original-Received: from igloo.linux.gr ([62.1.205.36]:33836) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Po0nx-0004BA-Ek for emacs-devel@gnu.org; Fri, 11 Feb 2011 16:45:29 -0500 X-Hellug-MailScanner-From: keramida@ceid.upatras.gr X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-2.9, required 5, autolearn=not spam, ALL_TRUSTED -1.00, BAYES_00 -1.90) X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-ID: p1BLjBLC028673 Original-Received: from gkeramidas-glaptop.linux.gr (216-239-45-4.google.com [216.239.45.4]) (authenticated bits=0) by igloo.linux.gr (8.14.3/8.14.3/Debian-9.4) with ESMTP id p1BLjBLC028673 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 11 Feb 2011 23:45:19 +0200 In-Reply-To: (Stefan Monnier's message of "Fri, 11 Feb 2011 09:27:26 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 62.1.205.36 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:135912 Archived-At: On Fri, 11 Feb 2011 09:27:26 -0500, Stefan Monnier wrote: >> I am looking for something that can compare two files, so that I can >> launch Emacs as my diff tool, e.g. from Perforce, Subversion, etc. I >> don't know if diff-mode can compare two files instead of a buffer and >> its file. > > diff-mode is not a replacement for ediff in that it only helps you read > contextual diffs (i.e. the output of `diff' or other tools that output > in the same format). > So, if you do > > exec emacs --eval "(diff \"$1\" \"$2\")" > > the resulting *diff* buffer will be in diff-mode. Without fine diff highlighting though. In the pathological case of very long lines that I find myself often into lately (looking at diffs of auto-generated code), fine diff highlighting is not only convenient, but often necessary to spot tiny changes in the middle of a long line of text that includes command-line options, removed arguments, new options that replace old ones, etc. >> Is it possible to use diff-mode for the same sort of comparison? > > Yes, see above. > > > Stefan > > > PS: For 3-way "diffs", smerge-mode provides a similar alternative to > ediff3, and also supports highlighting of fine diffs. And there's > probably a way to get diff3-style output from `diff', so as to use > smerge-mode for 2-way comparisons. That's nice. I can produce a diff3 style patch by running: diff3 -m -L local -L base -L other \ "my-file" /dev/null "other-file" Then smerge-mode seems to be able to highlight fine diffs, as long as there are non-word separators somewhere in the line. It may take a bit of getting used to, but I'll give it a try. In the meantime, I'll try to read some ediff source to understand where the fine-diff highlighting limitation comes from.