From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.help Subject: RE: how to highlight fine differences in Diff mode? Date: Fri, 6 Jan 2006 17:58:31 -0800 Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1136599137 3784 80.91.229.2 (7 Jan 2006 01:58:57 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 7 Jan 2006 01:58:57 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Jan 07 02:58:53 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Ev3M1-0000zn-KC for geh-help-gnu-emacs@m.gmane.org; Sat, 07 Jan 2006 02:58:49 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ev3Np-0002Rg-H3 for geh-help-gnu-emacs@m.gmane.org; Fri, 06 Jan 2006 21:00:41 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ev3Ng-0002R8-0c for help-gnu-emacs@gnu.org; Fri, 06 Jan 2006 21:00:32 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ev3Nc-0002Pf-Ke for help-gnu-emacs@gnu.org; Fri, 06 Jan 2006 21:00:30 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ev3Nc-0002Pb-9i for help-gnu-emacs@gnu.org; Fri, 06 Jan 2006 21:00:28 -0500 Original-Received: from [141.146.126.228] (helo=agminet01.oracle.com) by monty-python.gnu.org with esmtp (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.34) id 1Ev3PS-00042W-KU for help-gnu-emacs@gnu.org; Fri, 06 Jan 2006 21:02:22 -0500 Original-Received: from rgmsgw300.us.oracle.com (rgmsgw300.us.oracle.com [138.1.186.49]) by agminet01.oracle.com (Switch-3.1.7/Switch-3.1.7) with ESMTP id k071wYK1022478 for ; Fri, 6 Jan 2006 19:58:34 -0600 Original-Received: from rgmsgw300.us.oracle.com (localhost [127.0.0.1]) by rgmsgw300.us.oracle.com (Switch-3.1.7/Switch-3.1.7) with ESMTP id k071wX2j027476 for ; Fri, 6 Jan 2006 18:58:33 -0700 Original-Received: from dradamslap (dhcp-amer-rmdc-csvpn-gw6-141-144-112-96.vpn.oracle.com [141.144.112.96]) by rgmsgw300.us.oracle.com (Switch-3.1.7/Switch-3.1.7) with SMTP id k071wX6l027465 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO) for ; Fri, 6 Jan 2006 18:58:33 -0700 Original-To: X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) Importance: Normal In-Reply-To: X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506 X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:32518 Archived-At: >I don't have an answer for you, unfortunately. I do have some code that >improves the highlighting of regular `diff' output slightly: >http://www.emacswiki.org/cgi-bin/wiki/diff-mode-.el, but it >doesn't do what you're asking. 1: "diff-mode": never heard of it. Yes, there is one in the lisp subdirectory, at least of 22.0.50.1 (old) cvs. The library I mentioned was diff-mode-.el, not diff-mode.el. The former is a minor enhancement to the latter. The latter has recently been updated in CVS, and is now very similar to the former. If you are using CVS Emacs, you can use just the latter. If you are using Emacs 21, you might want to use both. In any case, as I said, this does not respond directly to your question. 2: So, I suppose the diff-mode.el in the wiki, vs the one that comes "in the box", have no relation to each other. (Well, at least the on in the lisp dir says nothing about "drew adams".) See above. I think the confusion is because of the similarity in library names. I use a + or - after a standard library name when I write a library that tweaks a standardard library. Sorry about the confusion. 3: not seeing much doc in the built-in one (or in info, either), what does diff-mode enable me to do (easily) that ediff-mode doesn't? Diff-mode highlights an existing `diff' buffer, regardless of its source. Ediff runs `diff' and then formats the result in a particularly useful way. Ediff works on buffers, not just files. If you just want to compare two buffers, use `ediff'. 4: In fact, are the two packages (for lack of better word) based on different concepts of what a "diff in emacs" should do? Yes. It's harder to describe than to see - just try using `diff' on two files and then using `ediff' on them. 5: Here's the tail end of the info-node "comparing files": Differences between versions of files are often distributed as "patches", which are the output from `diff' or a version control system that uses `diff'. `M-x diff-mode' turns on Diff mode, a major mode for viewing and editing patches, either as "unified diffs" or "context diffs." You can use `M-x smerge-mode' to turn on Smerge mode, a minor mode for editing output from the `diff3' program. This is typically the result of a failed merge from a version control system "update" outside VC, due to conflicting changes to a file. Smerge mode provides commands to resolve conflicts by selecting specific changes. See also *Note Emerge::, and *Note Top: (ediff)Top, for convenient facilities for merging two similar files. Sure doesn't say much about diff-mode -- and suggests looking at ediff ONLY IF YOU NEED TO *MERGE* FILES. Methinks ediff has more uses than that???? Yes, `ediff' is very useful. `diff-mode' just provides highlighting for the output from `diff'. If someone gives you `diff' output (e.g. a patch), then you can browse (and even edit) it while it is highlighted by `diff-mode'.