From: Peter Graves <peter@ar...> - 2003-04-04 17:35:04
This morning's development snapshot (j 0.18.1.2, lisp 0.0.0.23) is up:
http://armedbear.org/j-jar.zip (just j.jar)
For a long time, j has provided the commands cvsDiff and p4Diff, which
run the appropriate CVS or Perforce command to diff the current file
against the repository and present the output in a syntax-highlighted
output buffer. (In the output buffer, you can use diffGotoFile, mapped
by default to Enter, to jump to the corresponding location in the local
By request, diff mode is now available for normal files, too. By
default, files with names ending in ".diff" are opened in diff mode.
Such files are assumed to contain the redirected output of the "diff -u"
At least for now, the diffGotoFile command is unlikely to work in such
a file-backed diff output buffer, unless by coincidence or design the
file names in the diff file happen to correspond to files that actually
exist in your current environment.
Not all diff files show up on your doorstep with names ending in
".diff". To make it a bit easier to deal with this situation, j now has
the "mode" command. You can now do Alt X, "mode diff", to put the
current buffer into diff mode. (Odd things may happen if you do this in
a mail composition buffer.)
In principle, the "mode" command works for all modes; you can do, for
example, Alt X, "mode java", when you're looking at a Java preprocessor
file with an extension other than ".java", to coerce it into Java mode.
The mode name for the "mode" command should be the string that appears
in the status bar when you're in that particular mode. For example,
it's "plain text" for a plain text file. (I should probably add a few
aliases to make this a bit more friendly.) The mode name is case-
(In the past you could use the "Mode:" combo box in the Properties
dialog to change the mode of a buffer. You can still do it that way if
you want, but not all buffers have a Properties dialog, and Alt X,
"mode diff" is much less pointy-clicky.)
Finally, j now supports the diff command directly. You can do something
like this (after Alt X, of course):
diff -u % ~/backup
to diff the current file ("%") against its backup (the file of the same
name in the directory ~/backup). You can, of course, just type in the
whole filename(s) if you want.
The diff command provides various formatting options (-u and -c being
the most common). Currently j just supports -u. Nothing disastrous will
happen if you use a different format, but the output might be presented
with sub-optimal syntax highlighting.
Please let me know if you notice any anomalies related to these new
features. They have been tested on Linux, but they should also work on
Windows; obviously diff needs to be in your PATH for the diff command
Thanks for your support.