• Apr 11 2010 - Version 0.23.0

    This release contains ABCL 0.19.1 along with support for svn and updated icons. Java 1.5 is now required and 1.6 is suggested.

    Subversion support has been added in this release and can be used with the svn* commands. A new StatusMode has been added for version control status output buffers. Please see the version control documentation for more information.

    J's icons have been refreshed to the current Gnome icon set. In addition, you may now change the size of the toolbar icons to either 16 or 24 (the default) by setting ToolBar.iconSize in your prefs file.

    When opening files with the location bar or using a shell buffer, the <Tab> key completes the filename. The completion feature will now ignore any files that match the filenameCompletionsExcludePattern regular expression. The find in files dialog has a new default excludes option that will skip files that match the filenameCompletionsExcludePattern regex which is very useful when searching across files that would have included the .svn metadata directories.

    To quickly locate and edit the prefs file, a new editPrefs command has been added.

  • Mar 24 2009 - Version 0.22.0

    First release in years! This release contains ABCL 0.13.0 along with many bug fixes and numerous small enhancements.

    Improved lisp shell editor support for OpenMCL, AllegroCL, and CMUCL. Editor indentation fixes for java, cpp, lisp, python, ruby, perl, and html. Darcs is now supported and the p4 commands have had many bug fixes.

    New commands:
    electricQuote
    enlargeWindow
    justOneSpace
    shrinkWindowIfLargerThanBuffer
    tempBufferQuit
    darcs
    describe
    describeBindings
    endMacro
    electricCloseParen
    markSexp
    mouseCopyToInput
    startMacro

  • Sep 24 2004 4:45 PM - Version 0.21.0

    Some minor problems that prevented j from working correctly with the Java 1.5 betas are fixed in this release.

    It is now possible to use drag/drop in the sidebar buffer list to reorder the buffers, so that navigating between buffers using nextBuffer and prevBuffer (mapped by default to Alt Right and Alt Left, respectively) is more efficient. Thanks to Mike Rutter for providing the code to do this.

    By request, the command wrapParagraphsInRegion has been added. It is mapped by default to Ctrl Shift F12 in plain text and mail composition buffers. wrapParagraphsInRegion walks through the region (or the whole buffer if no region is selected) and, in effect, calls wrapParagraph on each paragraph.

    The wrap commands should now do a better job of handling lines that break on the hyphen of a hyphenated word (like "wrap-paragraph"). If the paragraph is subsequently reformatted in such a way that the line break no longer falls on the hyphen in question, the parts of the hyphenated word are now put back together properly. In previous versions of j, you were likely to end up with "wrap- paragraph", with a bogus extra space after the hyphen.

    The commands pageUpOtherWindow and pageDownOtherWindow have been added. They are mapped by default to Alt Page Down and Alt Page Up, respectively, in all modes. These commands are helpful in a split-window situation when you want to scroll the other window without switching to it.

    The commmand findOccurrenceAtDotAndKillList has been added. It is mapped by default to Ctrl Enter in List Occurrences buffers. It works like findOccurrenceAtDot, but in addition it closes the List Occurrences buffer.

    The commands shellNextPrompt and shellPreviousPrompt have been added. They are mapped by default to Ctrl Alt N and Ctrl Alt P, respectively, in shell buffers and their derivatives (including Lisp shells), and they help you find the next or previous prompt, starting from the current location of the caret.

    The command p4Log has been added. It runs the Perforce command "filelog -l" on the file associated with the current buffer.

    The command p4Diff now runs the Perforce command "p4 diff -f -du", instead of "p4 diff -du". This change means that p4Diff will display potentially useful output even if the file associated with the current buffer has not, in Perforce's opinion, been officially opened for editing.

    J's ssh-related code now recognizes "Response:" as a password prompt, in addition the to other password prompts it recognized already.

    Compilation buffers are now supported on Windows NT 4. Thanks to Pete Kirkham for pointing out that this was possible.

    In previous versions of j, there was an incorrect optimization in the display code which malfunctioned on very rare occasions and caused lines to disappear from the display, even though they were still present in the buffer (there was never any loss of data). This bug has been fixed by removing the optimization in question.

    There are a number of new features and minor improvements in Lisp mode and in Lisp shells. Thanks to Sam Steingold for help with many of these.

    This release includes version 0.0.4 of Armed Bear Common Lisp. ABCL 0.0.4 passes 17778 out of 17942 tests in the GCL ANSI Common Lisp test suite, for a nominal compliance of 99.0859%. The test suite is still not complete, however, so ABCL's actual percentage of ANSI compliance, whatever that may mean, is undoubtedly lower. In any case, version 0.0.4 represents a substantial improvement over version 0.0.3, back when it was still called Armed Bear Lisp, which passed 12986 out of 14127 tests (91.92%).

    ABCL includes a compiler, written in Lisp, that generates JVM bytecode from Lisp source. The compiler is not finished, and there are valid Lisp constructs that it doesn't know how to compile. In most situations, when the compiler encounters code that it can't compile correctly, it is smart enough to leave the code alone so that it will continue to work correctly with the interpreter. Compiled code and interpreted code can coexist happily in the same running instance of ABCL.

    The 0.21.0 binary distribution contains a compiled version of the Lisp library code (i.e. a full set of .abcl and .cls files), as well as the Lisp source files for the library code that is implemented in Lisp. If you build j from source, using either configure/make or Ant, the Lisp library code will be compiled as part of the build. There is no longer any need to do COMPILE-SYSTEM manually.

    ABCL 0.0.4 is better at some things than others. In particular, it's not very good at CLOS. ABCL's CLOS correctness is reasonable, but its CLOS performance is terrible (for one thing, the compiler doesn't even attempt to compile generic functions). This deficiency is due more to simple neglect than to any intrinsic limitation, and the CLOS implementation should improve in future releases.

    You can start ABCL from within j by doing Alt X, "abcl", or by selecting "Run Lisp as Separate Process" from the Lisp menu. Note that the "Run Embedded Lisp" menu selection opens a Lisp shell using an instance of ABCL that runs in the editor process; it only makes sense to do this if you're planning to interact with the running instance of j, which is not normally the case. If you just want to experiment with ABCL, "Run Lisp as Separate Process" (or Alt X, "abcl") is your friend.

    If you're truly adventurous, you can also start ABCL from within j by doing Alt X, "slime". J's version of slime is adapted from the "Superior Lisp Interaction Mode for Emacs", originally written by Eric Marsden, Luke Gorrie and Helmut Eller. Slime-for-j is less than a month old, so it is nowhere near as robust or featureful as slime-for-emacs, but in principle it offers more functionality than Alt X, "abcl". In particular, the tab key can be used for symbol completion, function argument lists are displayed in the status bar when you type a space, and Alt . should work to find function definitions (if you've built ABCL from source). In addition, the evaluation of forms and regions in Lisp source files makes an attempt to set *PACKAGE* to the right thing first. I don't think any of these features works 100% correctly yet, but even so, slime-for-j feels like an improvement over the basic Lisp shell functionality available in previous versions of j. For more information, see slime.lisp.

    More (and more timely) details about recent changes in j and ABCL are available on the J Development Mailing List, the archives of which are here (or on Gmane).

  • Oct 23 2003 10:46 AM - Version 0.20.2

    This release introduces a number of minor editor improvements and fixes a few minor bugs.

    In addition, this release includes (at no extra charge) version 0.0.3 of Armed Bear Lisp. ABL now passes 12986 of the 14127 tests in the GCL ANSI Common Lisp test suite (91.92%), up from 7918 of 12842 tests (61.66%) at the end of June. The test suite doesn't cover everything, however, so the percentage of ANSI CL compliance (if that concept is meaningful at all) is really quite a bit lower. And as the saying goes, the last 1141 test failures are always the hardest ones to fix.

    There is a bit more glue in this release to support using Lisp to script editor functionality. Both interface and implementation are still very much subject to change, but what's there now can be found in LispAPI.java and j.lisp, and there are a couple of real-world examples in the examples directory.

    By request, starting with this release, antialiasing is applied to menus, toolbars, dialogs, etc., as well as to the text in the edit window.

    To enable antialiasing, add this line to ~/.j/prefs:

          antialias = true

    Antialiasing is off by default.

    In previous versions, j has followed a policy of not relocating the caret to stay in the edit window if you did mousewheel- or scrollbar-based scrolling (or used windowUp or windowDown).

    A problem with this approach is that if you scroll a few pages and decide you like where you've ended up, you can't just start typing or hit a cursor key, because that will take you summarily back to whence you came before you started scrolling; you need to click in the edit window first, and it's easy to forget to do this.

    Despite this problem, this behavior was (I seem to recall) the standard behavior of most Windows-based editors at some point in the distant past when I paid more attention to Windows-based editors than I do today.

    By request, this behavior is changed in this release.

    Generally speaking, the caret is now forced to stay with you in the edit window when you scroll.

    So, for example, if the caret scrolls off the top of the window, it gets reeled back in and placed in the leftmost column of the top line, where it stays while the text continues to scroll up, as long as you keep scrolling.

    If you wander away in this manner and do want to return to your starting point, undo (Ctrl Z) is your friend.

    There is one exception to this new behavior: if a selection is active in the edit window, scrolling does not move the caret.

    If you decide you prefer the old behavior, you can have it back by adding this line to ~/.j/prefs:

          scrollCaret = false

    By request, the command selectToMarker has been added. You can now drop a bookmark by doing (for example) Alt 1 at the location of interest, then go somewhere else in the same file and do Alt X, "selectToMarker 1", and the region between the caret and marker 1 (which is the same thing as bookmark 1) will be selected.

    I didn't map "selectToMarker 1" to Ctrl Shift 1, because (for one thing) Ctrl Shift 9 is already spoken for in certain modes (it's mapped to insertParentheses in Java and Lisp modes, for example).

    And I didn't map selectToMarker (by itself) to any key combination either, because no compelling mapping came to mind. Suggestions are welcome. You can always do

          (global-map-key "Alt F11" "selectToMarker")
    in ~/.j/init.lisp, if you find Alt F11 compelling (for example).

    The commands dropTemporaryMarker, gotoTemporaryMarker, and selectToTemporaryMarker have been added, mapped by default to Alt \, Ctrl \, and Ctrl Shift \, respectively. These commands do what their names suggest and are like the similarly named bookmark commands, except that they act on a single, global temporary marker which is recycled for each use, and there is no prompting for confirmation when you try to re-use the marker.

    Since the beginning of time, findInFiles and replaceInFiles have used the Java definition of a word (from a delimiter perspective) when the "Whole words only" checkbox was checked, which works well enough for Java, C and C++.

    This behavior is suboptimal, however, if you're searching (say) Lisp files, where searching for the word "complete" with "Whole words only" checked would find a match in the string "ilisp-complete", which is clearly wrong.

    In this respect, the behavior of findInFiles was also not consistent with the behavior of find in a single buffer, which used the method isIdentifierPart() from the mode of the buffer to determine whether a particular substring match was actually word-delimited.

    This release makes an attempt to remedy this deficiency.

    The findInFiles dialog now offers a "Mode" combo box if you check the "Whole words only" option.

    The combo box should come up prefilled with a plausible mode, based on the contents of the "Files" textfield. If there are multiple entries in the "Files" textfield, the first one is used to set the default. If the contents of the textfield don't correspond to a known mode, Java mode is used as the default.

    You can change the mode in the combo box to force the search to follow the word-delimiter rules of a different mode of your choosing, but this should not be necessary in most cases.

    The search then follows the word-delimiter rules of the specified mode. In addition, the occurrences list uses the rules of the specified mode to control its highlighting of the found pattern (which was another inconsistency in previous versions).

    Since the beginning of time, the command findMatchingChar has been mapped by default to Ctrl M. This command finds the match for the parenthesis, brace, or bracket at (or near) the current location of the caret.

    In previous versions, if what you were trying to match was a left delimiter ('(', '{', or '['), the caret would be placed to the left of the matching right delimiter (')', '}', or ']').

    This is well and good, but it is inconsistent with the way matching delimiters are highlighted when the highlightBrackets preference is turned on: the right delimiter is highlighted when the caret is to the right of it, not to the left of it.

    So, starting with this snapshot, findMatchingChar puts the caret to the right of, rather than to the left of, the matching delimiter, if the matching delimiter is a right delimiter (')', '}', or ']').

    Now, if you have the highlightBrackets preference turned on, both delimiters will be highlighted at both ends of the match operation.

    I don't think this will cause any confusion once you get used to it, but it might take a little getting used to.

    While I was thinking about this issue, it occurred to me that it might also be useful to provide a way to select the region from one delimiter to another, so I've added the command selectSyntax, which does just that.

    selectSyntax is mapped by default to Ctrl Shift M, which makes a certain amount of sense from a mnemonic point of view, considering the use of Ctrl M for findMatchingChar and the common application of Shift as a modifier meaning "select this". Sadly, however, this forces the previous tenant of Ctrl Shift M, showMessage, to move to Ctrl Alt M, which might even have made more sense to begin with, but that's what hindsight can do for you.

    In Lisp mode, Ctrl Shift M is now mapped by default to lispSelectSyntax, which has the added virtue that if a region is already selected, the selection is extended to the enclosing syntactic expression, making it useful (in some situations) to do Ctrl Shift M two (or more) times in a row.

    By request, you can now disable the paste command's auto-detection and special handling of line blocks by adding this line to ~/.j/prefs:

          autoPasteLines = false
    or by adding this line to ~/.j/init.lisp:
          (setf (variable-value 'auto-paste-lines :global) nil)

    By request, when you use the "here" dynamic alias as part of the compile command (e.g. "javac here"), the substituted string (to wit, the name of the file in the current buffer) is now enclosed in double quotes if it contains any embedded spaces.

    By request, a top-level "Lisp" menu has been added, to make it easier (or possible) to figure out how to run Lisp from within j.

    The new menu is invoked with the Alt L key combination, so the previous occupant of Alt L, listOccurrences, has been moved to Ctrl L.

    Ctrl L, moreover, was previously assigned to listFiles, which is really listOccurrences for findInFiles, so listFiles has been moved to Ctrl Shift L, which makes more sense in the big picture anyway (cf. Ctrl F, Ctrl Shift F, Ctrl R, Ctrl Shift R).

    Ctrl Shift L, however, was previously assigned to sidebarListTags, which all along would have been assigned to Ctrl Shift T, were it not for an odd bug in some ancient version of Java that prevented the Ctrl Shift T mapping from being recognized at all. That version of Java being no longer in the game, sidebarListTags has now been moved to Ctrl Shift T, where it rightfully belonged from the beginning.

    This is normally where I say, "All bugs reported to j's official bug tracker on SourceForge have been fixed for this release," but that's not quite true this time. There's one unfixed bug, involving incorrect indentation in C mode after a particular construct in a #define/#endif block.

    More (and more timely) details about recent changes are available on the J Development Mailing List, the archives of which are here (or on Gmane).

  • Jul 8 2003 9:48 AM - Version 0.20.1

    This release fixes several non-critical bugs in 0.20.0. All bugs reported to j's official bug tracker on SourceForge have now been fixed.

    Starting with this release, BeanShell is no longer bundled with j, and init.bsh is no longer loaded at startup. Use init.lisp instead.

    More details about recent changes are available on the J Development Mailing List, the archives of which are here (or on Gmane).

  • Jun 26 2003 10:56 AM - Version 0.20.0

    Java 1.4 or later is now required.

    This release officially introduces j's new built-in extension language, which has been lurking in the code since version 0.18.1. At that time, the language itself was an ad-hoc, bug-ridden and slow implementation of half of Common Lisp. Since then, it has gotten faster (by a factor of 2), and it's now up to 61% of Common Lisp (it passes 7918 of the 12842 tests in the GCL ANSI test suite). I don't think it's particularly bug-ridden, but it's still very ad hoc, in terms of exactly what features have been implemented.

    Initially, the only functionality that's officially supported is exactly the same functionality that has been supported since version 0.11.0 for BeanShell and init.bsh. More details are available in the documentation; there are also a couple of relevant example files in the examples directory of the distribution.

    In the future, the plan is to extend the extension language to provide editor-specific functionality that's more or less in the spirit of Emacs Lisp (arguably, j is architecturally closer to Hemlock than to Emacs, but that's not important now).

    Future releases of j will no longer bundle BeanShell or load init.bsh, so if you're doing customizations in init.bsh, this would be a good time to move them into init.lisp. Converting uses of the officially supported API should be absolutely trivial. If you have trouble, or if you're using BeanShell beyond the scope of the official API and would like to convert your code, let me know and I'll try to help.

    Note that j's Lisp can call arbitrary Java code, so in principle it should be possible to do anything in Lisp that you might have been doing in BeanShell.

    Since Java 1.4 includes an XML parser, j no longer bundles Ælfred. You can still use an external XML parser if you prefer.

    The command xmlValidateBuffer has been added, which validates the contents of the current buffer against its DTD. Both xmlValidateBuffer and xmlParseBuffer now use a transient output buffer to display errors and warnings. The transient output buffer works just like a compilation buffer in programming modes: the commands nextError, previousError, and showMessage are available to help you make sense of the situation there.

    Some modes (including XML mode) now have a "Mode" menu, to make it easier to find mode-specific features, such as the ones described in the preceding paragraph.

    Early on, j's support for customized key mappings involved writing out a keymap file (using writeGlobalKeyMap or writeLocalKeyMap), editing it to taste and then pointing to it from ~/.j/prefs.

    This approach works and is still supported, but it's unwieldy to have to do all that if you just want to change one or two key mappings.

    The solution to that problem was to support ad hoc key mappings, first in init.bsh (which is deprecated as of the current release) and now in init.lisp.

    This led to a new problem, however: if you're using custom keymaps, and also have some ad hoc mappings in init.lisp, then, when you edit a keymap, the reloading of that keymap is likely to discard some or all of the ad hoc mappings.

    Starting with this release, by default, saving ~/.j/prefs (or the file containing a custom keymap that's pointed to in ~/.j/prefs) no longer automatically reloads the affected keymap(s) or makes any change to the key mappings that are in effect, so your ad hoc key mappings are (by default) preserved.

    There's a new command, reloadKeyMaps, that does what its name suggests: all the custom keymaps (or j's internal defaults, if there are no custom keymaps) are reloaded, and any ad hoc key mappings are discarded.

    If you do use custom keymaps and don't care about ad hoc key mappings, you can add this line to ~/.j/prefs:

            autoReloadKeyMaps = true
    and things will work just like they used to: your keymaps will be reloaded automatically when you edit them (or when you edit ~/.j/prefs).

    While I was at it, I added another new command, defaultKeyMaps, that discards all custom key mappings (including ad hoc key mappings) and restores j's internal defaults.

    The command apropos has been added. It's not mapped to any keystroke by default, but it's available on the Help menu.

    The preference patchMode has been added. If you specify an extension such as ".orig" as the value for this preference, the specified extension is used to create the initial backup when a file is first edited (so, for example, "foo.java" gets backed up for the first time in "foo.java.orig"). The diff command, when invoked with no arguments, now looks for the .orig file corresponding to the file in the current buffer and diffs the current contents of the buffer against that file. You can reset this behavior by deleting all the .orig files.

    Thanks for your support.

  • May 28 2003 10:09 AM - Version 0.19.0

    Other things being equal, this will be the last release of j that runs with Java 1.3. For future releases, Java 1.4 or later will be required.

    This release formally introduces j's built-in JPDA-based Java debugger.

    The debugger has actually been lurking quietly in the code base for a long time as an undocumented feature. It is now documented in doc/jdb.html and doc/jdbcommands.html. From within j, Alt X, "help jdb" (or Alt X, "help jdb.html") should get you started.

    (Note that there are better debuggers than this one; the main advantage of this debugger is its integration with j. If you need a more powerful debugger, consider JSwat.)

    In order for the debugger to work, tools.jar (which is part of the JDK) needs to be in j's CLASSPATH, which will not be the case if you just do "java -jar j.jar". See the installation section of doc/jdb.html for full details.

    In other news, j now opens .diff and .patch files in diff mode by default. Patches embedded in mail messages are now syntax-highlighted appropriately.

    The command diff has been added, available via Alt X. For useful output this command requires two filenames. One of them can be "%", which is a dynamic alias for the name of the file in the current buffer. For example, at the command prompt after Alt X:

            diff -ub % ~/backup
    This command line compares the file in the current buffer against its backup copy in the directory ~/backup. You need to supply the complete command line at the command prompt. If you don't explicitly specify any switches, j will run "diff -u"; diff mode works best with unified diffs.

    The preference restrictCaret now defaults to true, meaning that the caret's perambulations are restricted to the actual text on the line. If you prefer the virtual space concept, which was the old default, add this line to ~/.j/prefs:

            restrictCaret = false
    The command killWindow is now mapped by default to Ctrl Shift F10, which makes some sense when you consider that unsplitWindow is mapped by default to Shift F10.

    The command dirOpenFileAndKillDirectory has been added. It is mapped by default to Ctrl Enter in directory buffers. It does what its name suggests.

    The preference confirmSend is now true by default.

    All bugs reported to j's official bug tracker on SourceForge have been fixed for this release, as well as quite a few that never made it that far.

    Plus a larger-than-usual accumulation of code cleanups, subliminal enhancements, and minor adjustments to the user experience.

    Thanks for your support.

  • Mar 31 2003 11:53 AM - Version 0.18.1

    This release fixes a number of non-critical bugs. The worst of these caused a memory leak in certain situations when j kept a reference to a closed buffer for no good reason. Most of the others were either of very minor consequence or very hard to trigger.

    Officially, there isn't much new functionality in this release. Syntax highlighting and indentation should work a bit better in Lisp mode. The command backwardSexp, mentioned in the documentation for 0.18.0, has now actually been implemented (and mapped to Ctrl Alt B in Lisp mode, as the aforementioned documentation promised).

    Unofficially, the infrastructure for j's new extension language is present for the first time in this release, albeit a bit sub rosa. The language itself, at the moment, is an ad-hoc, bug-ridden and slow implementation of half of Common Lisp, but it does try to conform to the official ANSI specification. More information is available in the archives of the j development mailing list (for example here).

    Thanks for your support.

  • Jan 8 2003 9:04 AM - Version 0.18.0

    By default, the caret now blinks.

    You can make it stop by adding this line to ~/.j/prefs:

            blinkCaret = false

    Since the beginning of time, the openFile command (mapped by default to Ctrl O) has provided filename completions when you type in part of the filename and press the Tab key.

    In previous versions, you had to keep hitting the Tab key to cycle through all of the possibilities.

    Starting with this release, this feature has a fancier UI, which is enabled by default.

    There are two new preferences to control the new behavior (shown here with their default values):

            showCompletionList = true
            selectCompletion = true

    You can have things the old way, with no completion list and no fancy UI, by adding this line to ~/.j/prefs:

            showCompletionList = false

    When the completion list is enabled, and when selectCompletion is true (which is the default), the part of the filename that you didn't actually type (i.e., the part that's supplied by the completion facility) is selected in the location bar textfield, so that the next character you type (if you keep typing) replaces the completion, as if it never happened. (This is probably the behavior you want, if you like this sort of thing at all.)

    Regardless of the value of selectCompletion, you can always use Escape to clear the completion (and remove the completion list), in case none of the possibilities presented to you is exactly what you had in mind.

    The command renumberRegion has been added. It's not mapped to any key by default, but it's available via executeCommand (Alt X).

    renumberRegion changes the first number in each line of the selected region so that the it is one more than the first number in the preceding line. By default, the smallest value in the entire region is used as the value for the first line. The order of the lines is not changed. Only the first number in each line is considered, and lines that don't contain a number at all are ignored.

    For example, suppose you start with a region that looks like this:

            private static final int DEFUN       = 52;
            private static final int DEFVAR      = 6;
            private static final int DO          = 17;
            private static final int DOLIST      = 81; // Not 82!
            private static final int IF          = 9;
            private static final int LAMBDA      = 1;
            private static final int LET         = 3;

    When invoked with no arguments, renumberRegions starts by looking at the first number in each line of the region to find the smallest value (which in this case is 1). The first number in the first line of the region (52) is replaced with this value (1), and the first number in each subsequent line is changed so that it is one more than the first number on the preceding line. So the region ends up looking like this:

            private static final int DEFUN       = 1;
            private static final int DEFVAR      = 2;
            private static final int DO          = 3;
            private static final int DOLIST      = 4; // Not 82!
            private static final int IF          = 5;
            private static final int LAMBDA      = 6;
            private static final int LET         = 7;

    Note that the comment ("Not 82!") is unchanged, since 82 is not the first number on that particular line.

    You can also explicitly specify what number to start with by providing a numeric argument with the command. For example, if you do Alt X, "renumberRegion 100", the region ends up looking like this:

            private static final int DEFUN       = 100;
            private static final int DEFVAR      = 101;
            private static final int DO          = 102;
            private static final int DOLIST      = 103; // Not 82!
            private static final int IF          = 104;
            private static final int LAMBDA      = 105;
            private static final int LET         = 106;

    The code that does syntax highlighting in Lisp mode has been completely rewritten.

    The default list of "keywords" (which in this context is a confusing term) in LispMode.keywords now supports ANSI Common Lisp, and ANSI Common Lisp only, rather than the previous hodgepodge. After all, no one in his right mind uses j to edit Emacs Lisp... ;)

    Symbols representing official Common Lisp functions (e.g. "list") are now highlighted as keywords only when they are the first element of their containing form (and only when the containing form itself isn't quoted). So, for example, "list" is highlighted in "(list 1 2 3)", but not in "(member x list)", which is as it should be. (There are still some cases where things aren't quite perfect; "list" is still erroneously highlighted in "(let ((list x)) ...)", for example.)

    There are four new syntactic elements (quoting here from Kodiak):

            LispMode.color.substitution             = 153 0 153
            LispMode.color.punctuation              = 102 102 102
            LispMode.color.parenthesis              = 102 102 102
            LispMode.color.secondaryKeyword         = 0 102 153

    substitution is used for symbols preceded by "," or ",@" within a backquoted expression.

    punctuation is used for backquote itself, and for "," and ",@".

    parenthesis is used for parentheses.

    secondaryKeyword is used for lambda-list keywords ("@optional", "@rest", etc.) and symbols that start with ':' (i.e. symbols in the keyword package).

    I've updated Kodiak, AnokhaClassic and Freefloater to support the new syntactic elements. Sensible fallbacks are in place, so you shouldn't notice anything particularly amiss if you use a different theme, but the new syntactic elements won't be highlighted in the new way if you're using an old theme.

    (The real point of color.parenthesis, BTW, is to help you overcome your fear of parentheses by choosing a color that makes them less conspicuous, and hence less fearsome.)

    The command hyperspec has been added. It's mapped by default to Alt F1 in Lisp mode.

    hyperspec displays the Common Lisp HyperSpec documentation for the symbol at the current location of the caret.

    The documentation is displayed in a second window, splitting the current window if necessary. This transient window can be dismissed using the command escape, mapped by default to the Escape key.

    You can also invoke the hyperspec command with Alt X, giving the symbol name as an argument (e.g. Alt X, "hyperspec mapcar", or Alt X, "hs mapcar", "hs" being a built-in abbreviation for "hyperspec").

    The Common Lisp HyperSpec is available for download here:

          http://www.lispworks.com/reference/HyperSpec/index.html

    or:

            apt-get install hyperspec

    For the hyperspec command to work, you may need to add a line to your preferences file specifying the location of the HyperSpec root directory on your system:

            clhsRoot = /usr/share/doc/hyperspec

    (This should not be necessary on a Debian system.)

    Finally, all bugs reported to j's official bug tracker on SourceForge have been fixed (or otherwise dealt with) in this release.

  • Nov 18 2002 4:47 PM - Version 0.17.2

    This release fixes three problems with 0.17.1.

    To start with the worst of the three, if you were running Sun Java 1.4.1 fcs on either Windows or Linux, the version of j.jar in the 0.17.1 binary distribution would fail to load, although it did work with Sun 1.4.1_01 and many other versions of Java (I haven't tested them all). This was a build problem rather than a bug in the code.

    For this release, I've verified that the version of j.jar in the binary distribution loads correctly (in my environment, at least) with Sun 1.4.1 fcs, Sun 1.4.1_01, and Blackdown 1.4.1 beta on Linux, and with Sun 1.3.1_05, Sun 1.4.0_02, Sun 1.4.1 fcs, and Sun 1.4.1_01 on Windows 2000. Note that Java 1.3 or better is required in any case; on platforms where Java 1.4.1 (or 1.4.1_01) is available, that's what you should use.

    The second problem was that loadSession was broken in both 0.17.0 and 0.17.1. It should work again now.

    Finally, on Unix, directory buffers parse the output of "ls -l" in order to provide additional information such as file permissions and user/group ownership. In at least one situation (on a German system running SuSE 8.1), "ls -l" was apparently using the "long-iso" time style by default, which confused j's parser and prevented directory buffers from working correctly. Starting with this release, the parser should be smart enough to handle this situation.

    Thanks for your support.

  • Nov 12 2002 7:39 AM - Version 0.17.1

    This release introduces custom toolbars, a shellCommand feature (on Linux only), and a number of minor improvements, including support for automatic indentation in Lisp mode. There are also fixes for a large number of bugs, most of them minor or rarely triggered or both.

    By request, j now supports custom toolbars.

    To customize your Java mode toolbar (for example), create an XML file that looks something like this:

            <?xml version="1.0"?>
            <toolbar>
                <button label="New" icon="stock_new.png" command="newBuffer"/>
                <button label="Open" icon="stock_open.png" command="openFile"/>
                <button label="Save" icon="stock_save.png" command="save"/>
                <button label="Close" icon="stock_cancel.png" command="killBuffer"/>
                <separator/>
                <button label="Undo" icon="stock_undo.png" command="undo"/>
                <button label="Redo" icon="stock_redo.png" command="redo"/>
                <separator/>
                <button label="Cut" icon="stock_cut.png" command="killRegion"/>
                <button label="Copy" icon="stock_copy.png" command="copyRegion"/>
                <button label="Paste" icon="stock_paste.png" command="paste"/>
                <separator/>
                <button label="Find" icon="stock_search.png" command="find"/>
                <button label="Replace" icon="stock_search_and_replace.png" command="replace"/>
                <separator/>
                <button label="Directory" icon="stock_index.png" command="dir"/>
                <button label="Home" icon="stock_home.png" command="dirHomeDir"/>
                <button label="Inbox" icon="mail.png" command="inbox"/>
                <separator/>
                <button label="Compile" icon="stock_refresh.png" command="compile javac here"/>
                <separator/>
                <button label="Exit" icon="stock_exit.png" command="quit"/>
            </toolbar>
        

    You can give this file any filename you want. For the purposes of this example, let's say it's "/home/peter/tb.xml".

    Then add a line like this to ~/.j/prefs:

            JavaMode.toolBar = /home/peter/tb.xml

    And you're done.

    Compared to the default Java mode toolbar, the custom toolbar defined above has one additional button for "Compile". This button invokes j's "compile" command with the argument(s) "javac here" to compile the file that's open in the current buffer ("here" being a dynamic alias for the current file).

    If the icon filename is a relative path (or a simple filename with no directory prefix at all), it's assumed to be relative to (or in) src/org/armedbear/j/images. You can also specify an absolute pathname for the icon, so you don't have to keep the icons for your custom toolbar in j's source tree.

    By request, the command shellCommand, not mapped by default but available via Alt X, has been added, on Linux and similar platforms only (i.e. not on Windows).

    shellCommand prompts for a command and then executes that command using /bin/sh. The output of the command (if any) is presented in a transient output buffer.

    So, for example, you can do Alt X, "shellCommand ls -l" to get a directory listing of the current directory, or Alt X, "p4 opened" to see what files you have checked out from Perforce.

    Note that you can append the shell command itself to the string you feed to Alt X, as in Alt X, "shellCommand ls -l". If you just do Alt X, "shellCommand", by itself, j will prompt you for the command to run.

    The shell command you specify is executed in the editor's current directory, which is normally the parent directory of the file that's open in the current buffer, or the user's home directory if the current file is remote or if there is no file associated with the current buffer.

    You can do real damage with an errant shellCommand, so caution is advised. It's much safer to perform delicate operations in a shell buffer (or even a real xterm), where the light is better and you can see what you're doing.

    The property reorderBuffers, which controls reordering of buffers for the sidebar buffer list, was a boolean in previous versions of j. By request, it is now an integer, to support additional functionality.

    If reorderBuffers is 0, no reordering is performed; buffers are left in the order in which they were originally opened. (In previous versions, this behavior was specified by a value of false.)

    If reorderBuffers is 1, buffers opened (or activated) by openFile (and similar commands) are placed after the current buffer in the list. (In previous versions, this behavior was specified by a value of true.)

    If reorderBuffers is 2, reordering is also performed when you use the sidebar buffer list to switch to a different buffer. (This behavior is new in this release.)

    Buffers are never reordered when you use nextBuffer or prevBuffer to switch between buffers.

    If the property sortBufferList is true, reorderBuffers is ignored.

    The idea of buffer reordering is to keep the buffers that you're actively using close to one another in the buffer list, so you have some hope of navigating usefully among them with nextBuffer and prevBuffer.

    Lisp mode now supports automatic indentation using the commands tab, mapped by default to the Tab key, and newlineAndIndent, mapped by default to Enter. It's not perfect, but it's better than nothing.

    The Lisp mode tagger now skips over #|...|# comments, as it should.

    The C and C++ taggers (and formatters) are no longer quite as likely to be confused by preprocessor continuation lines.

    iList, an indispensable command that is mapped by default to Ctrl F6 in C and C++ modes, now puts up an hourglass to reassure the user while it considers the situation.

    wrapParagraph, mapped by default to F12 in mail composition buffers (and elsewhere too), now understands quoted text in mail messages, i.e. lines that begin with "> " or "> > " or "> > > ", etc. This means you can now use F12 to reformat quoted sections (or excerpts therefrom) in mail messages.

    describeKey, mapped by default to Alt K, now describes ad hoc key mappings correctly.

    This release also contains an unusually large number of bug fixes, mostly for bugs that were quite unlikely to occur in any event. The worst one was a problem with undo that made it impossible to undo the replay of a recorded macro that used the up or down cursor keys. This bug is now fixed, along with a number of others that you were even less likely to hit.

    More details about recent changes in j are available on the J Development Mailing List, the archives of which are here.

  • Sep 23 2002 9:14 PM - Version 0.17.0

    This release introduces persistent registers for storing text, an alignStrings command, new navigational behavior related to findInFiles, and a number of other minor improvements.

    Starting with this release, j requires Java 1.3 or later. Java 1.4.1 is highly recommended if it's available for your platform.

    Serious editors like vi, emacs and jEdit all support the concept of registers, which are basically named receptacles for storing text.

    This release adds this functionality to j.

    Unlike the other editors mentioned, j's registers persist across sessions.

    There are five new commands: saveToRegister, insertRegister, editRegister, clearRegister and listRegisters.

    These commands do what their names suggest. They're not mapped to any keystrokes by default, but they're available via executeCommand (Alt X).

    The way all of this works is that you highlight a selection and then do (for example) Alt X, "saveToRegister a". The name of the register (in this example) is "a". "saveToRegister a" copies the selected region to register a.

    Register names must be lower-case letters (a-z). That's "be", not "be composed of", so you get 26 registers.

    Once you've put something in register a, you can paste it somewhere by doing Alt X, "insertRegister a".

    Alt X, "editRegister a" opens a buffer so you can edit the contents of register a.

    Alt X, "clearRegister a" deletes the contents of register a, leaving it empty again.

    Using registers tends to be awkward without having these commands mapped to keystrokes. I'll be happy to provide default mappings for these commands as soon as someone suggests a scheme which is reasonably mnemonic and not too badly in conflict with anything else.

    Since that may never happen, abbreviations are provided in this release for the more commonly used register commands: you can use sr for saveToRegister, ir for insertRegister, and lr for listRegisters.

    So, for example, you can save the currently selected region to register x by doing Alt X, "sr x", and later paste it somewhere else with Alt X, "ir x".

    If, like me, you can't remember from one day to the next what's in your registers, listRegisters (lr for short) is your friend.

    lr is a bit like listOccurrences or listMatchingTags. In the lr output buffer, Enter (or Ctrl Shift G) opens a buffer so you can edit the contents of the corresponding register. Ctrl Enter inserts the contents of the current register at the location of the caret in the other window, provided that a second window is in fact open in the same frame (which is likely to be the case). Delete (that is, the Delete key) deletes the contents of the current register (i.e. the register at the location of the caret in the lr output buffer).

    The command alignStrings is also new in this release. Like the register commands, it's not mapped to any keystroke by default, but it's available via executeCommand (Alt X).

    alignStrings prompts for a regular expression and aligns the first occurrence of the specified regular expression in each line of the selected region.

    For example, suppose you start with a region that looks like this:

    
            private static final int STATE_VARIABLE = STATE_LAST + 1;
            private static final int STATE_HERE_DOCUMENT = STATE_LAST + 2;
            private static final int STATE_POD = STATE_LAST + 3;
            private static final int STATE_REGEXP_DELIMITER = STATE_LAST + 4;
            private static final int STATE_REGEXP = STATE_LAST + 5;
            private static final int STATE_SUBST = STATE_LAST + 6;

    If you specify "=" as the regular expression, alignStrings will make the region prettier by aligning the "=" in each line, like this:

    
            private static final int STATE_VARIABLE         = STATE_LAST + 1;
            private static final int STATE_HERE_DOCUMENT    = STATE_LAST + 2;
            private static final int STATE_POD              = STATE_LAST + 3;
            private static final int STATE_REGEXP_DELIMITER = STATE_LAST + 4;
            private static final int STATE_REGEXP           = STATE_LAST + 5;
            private static final int STATE_SUBST            = STATE_LAST + 6;

    alignStrings ignores lines that don't contain the specified regular expression, so with a little care you can even use it to reformat regions that contain embedded comment lines (for example).

    For a while now, findInFiles has worked by sending its output to a transient output buffer that gets displayed in the other window of the current frame (splitting the current window if necessary).

    Starting with this release, some new behavior has been added to facilitate navigation in this situation.

    The new behavior only comes into play if:

    1. the last search in the current editor was findInFiles

    2. the findInFiles output buffer is currently displayed in the other window of the current frame

    If these conditions are met, j now tries to make the location of the caret in the findInFiles output buffer follow along with the commands findNext (mapped by default to Ctrl G and F3) and findPrev (mapped by default to Ctrl H and Shift F3) when these commands are carried out in the editable buffer in the other window.

    Currently the algorithm to do this is not very smart, so things will very likely get out of sync if you make significant changes to the editable buffer as you go along. This deficiency is basically harmless, since that was the old behavior at all times.

    In addition (and this is the real point), once you get to the end (or beginning) of the current buffer with findNext or findPrev, the next invocation of findNext or findPrev, instead of failing the search, will continue on with the next (or previous) occurrence in the findInFiles output list, which will be in a different file. (Note that this may not in fact be an actual occurrence of the string in question, by the time you get there, if the file in question has been modified since the findInFiles output list was generated.)

    This is extremely useful if you're looking for occurrences of a particular string in a big set of files in order to make changes that are more complicated than can be accomplished by a simple multifile search-and-replace operation.

    This new behavior happens automatically (if the aforementioned conditions are met), and the only way to turn it off (and force findNext and findPrev to fail at the end or beginning of the current buffer) is to use Escape to get rid of the findInFiles output buffer. This is not such a big deal, since you can always get the output buffer back with Ctrl L.

    Note that this trick only happens when both the editable buffer you're doing findNext or findPrev in and the findInFiles output buffer (in the other window) are in plain view, and only when findInFiles is the current search (i.e. when you haven't done any other search since doing findInFiles).

    You can now use the Meta key in j's keymaps. Thanks to Thomas Stromberg for submitting a patch to enable this functionality.

    Files are now saved in place on all non-Windows platforms. The main consequence of this change is that file permissions and ownership are now preserved correctly when you save a file on MacOS X (which was not the case with prior versions of j).

    J now recognizes MacOS X as a Unix platform, so your directory buffers should now appear by default in "ls -l" format.

    Some folks have reported odd display problems with MacOS X 10.2. If you encounter this sort of thing, a possible workaround is to disable hardware acceleration when starting j:

              java -Dcom.apple.hwaccel=false -jar j.jar

    The support for displaying embedded images in mail messages and web pages has been improved. Scrolling is much less exciting now.

    In previous versions, automatic indentation in PHP mode was badly broken unless you happened to have opened some other file in Java mode first. This bug has been fixed.

    In addition, a number of relatively minor bugs have also been fixed, many of them having to do with automatic indentation (or the highlighting of matching braces) under adverse circumstances.

    Finally, the toolbar icons have been updated for this release, using a new set from the GNOME 2 Icon Project.

    More details about recent changes in j are available on the J Development Mailing List, the archives of which are here.

  • Sep 4 2002 7:36 AM - Version 0.16.4

    Reading mail has a different feel in this release. By default, messages are now opened in a split window.

    In mailbox mode, Enter is now mapped to mailboxReadMessageOtherWindow, which (as its name suggests) displays the message in another window, splitting the current window if necessary. This second window is roughly analogous to what some mail clients call a preview pane.

    By default, the original window is split in half, which may not be exactly ideal. You can adjust things by dragging the window divider up or down, and j will remember the position of the window divider and restore it correctly the next time mailboxReadMessageOtherWindow splits the window, so your preview pane will continue to be whatever size you've set, even across sessions.

    This remembering of the divider position only applies to the preview pane and mailboxReadMessageOtherWindow. Other commands that split the window continue to split it in half, and manual adjustments to the divider position in other split-window situations are not remembered.

    You can use the command escape, mapped by default to the Escape key, to dismiss the preview pane and restore a full-height view of the mailbox.

    (The command mailboxReadMessage, which was mapped by default to Enter in mailbox mode prior to this release, is now mapped to Ctrl Enter, so if you prefer a full-height message buffer, Ctrl Enter is your friend.)

    The command sortByThread, introduced in version 0.16.2, was badly named. Threads are not a way of sorting mailboxes, exactly; they're a way of grouping messages. The sibling messages in a thread can (in theory) still be sorted in various other ways (by sender, by date sent, by size, etc.).

    So the command sortByThread has been replaced by the command toggleGroupByThread, which does what its name suggests. The View menu in mailbox mode has been updated accordingly.

    The command sortByDateSent has also been removed. Currently j doesn't support any sort order other than date sent, so there's really nothing for sortByDateSent to do.

    To sum up, sortByThread (in previous versions) has been replaced by checking the "Group Messages By Thread" checkbox; sortByDateSent (in previous versions) has been replaced by unchecking the "Group Messages By Thread" checkbox. toggleGroupByThread is the command behind the aforementioned checkbox; it's not mapped to any keystroke by default but you can invoke it via Alt X.

    By request, this release introduces automatic header beautification in message mode.

    This means that by default, message headers now appear with the header names right-justified, and in most cases the header values are wrapped at 74 columns. ("In most cases" means the wrapping happens deliberately with the address lists for "To" and "Cc", which are most likely to have problems with line length; the subject, date and "From" header are normally short enough to begin with.)

    Headers are beautified by default. If you like your headers raw, add this line to ~/.j/prefs:

            beautifyHeaders = false

    If you turn on raw mode (Shift R, messageToggleRaw) or full header mode ('h', messageToggleHeaders), you'll see the raw headers even if beautifyHeaders is true.

    By request, messageViewAttachment is now mapped by default to Enter, as well as 'v', in message mode. messageViewAttachment views the attachment on the line containing the caret.

    By request, this release adds support for signature files. On Unix, ~/.signature is picked up by default. On non-Unix platforms, or if you'd prefer a different file, you can add a line like this to ~/.j/prefs or C:\.j\prefs:

            signature = /home/peter/my_funny_signature

    In web mode, the command copyLink has been added, available via Alt X. copyLink copies the link (href) at the current location of the caret to j's kill ring and to the system clipboard, so you can paste it after "wget " in a shell buffer.

    In JavaScript mode, findTagAtDot now ignores the arity of the expression at dot. You really can't trust arity in JavaScript mode.

    In directory buffers, the sidebar tree no longer indulges in gratuitous repaints when you scroll around in the buffer.

    By request, in Java mode, j now tries to keep the selected tag in the sidebar tree somewhat centered vertically (that is, not at the very beginning or very end of the visible part of the list), so you can always see some of the other tags around it.

  • Aug 21 2002 7:12 AM - Version 0.16.3

    This release introduces a drafts folder and fixes a number of minor bugs.

    For a long time, if you exited j while you were in the midst of composing a mail message, the composition buffer containing the message you were working on would be restored as part of the saved session when j started up again. This happened automatically because there was an actual file backing the message, so the buffer was restored just like any other file-backed buffer. J knew the buffer should be a mail composition buffer because the file backing it was in a special directory (~/.j/mail/unsent).

    So postponed messages weren't a total disaster. But if you made the mistake of closing the composition buffer after you saved it, there was no obvious or documented way to re-open the saved message again later so you could finish it and send it on its way.

    Starting with the current release, you can simply enter the system alias "drafts" in the location bar, and you'll get a mailbox view of the drafts folder. (If you're looking at some other mailbox, you can also get to the drafts folder by clicking on "drafts" under "Local Folders" in the sidebar tree.)

    In the drafts folder, as in any other mailbox, mailboxReadMessage, mapped by default to Enter, opens the message on the line containing the caret. In the drafts folder this gets you a mail composition buffer which lets you continue working on the message in question and eventually send it off.

    The drafts folder supports mailboxDelete (mapped by default to 'd'), mailboxUndelete (mapped by default to 'u') and mailboxExpunge (mapped by default to '$'). When you eventually send a message that has at some point been saved as a draft, the draft of the message in question is automatically deleted from the drafts folder.

    Finally, the location of the drafts folder has changed. It's now ~/.j/mail/local/drafts, rather than ~/.j/mail/unsent. 0.16.3 runs a bit of code at startup to move your unsent messages to the new place and remove the obsolete ~/.j/mail/unsent directory. If you have unsent messages that are important to you, you might want to back up ~/.j/mail/unsent before running 0.16.3, just in case.

    This release also fixes a number of minor bugs unrelated to mail.

    In previous versions, with Java 1.4.1 on Linux, if you did Alt B to set focus to the buffer list (so you could use the keyboard to scroll around in the list, maybe close some buffers, etc.), when you subsequently hit Escape to return to the edit window, focus was lost.

    This bug is now fixed, and the code behind Escape, which in previous versions contained an elaborate hack that seemed necessary at the time, has been simplified considerably. I've tested the new code with the latest versions of IBM 1.3.1, Blackdown 1.3.1, Sun 1.4.0, Sun 1.4.1-beta and Blackdown 1.4.1 beta; all seems to be well.

    In addition, if you do Alt B and use the Delete key to close a buffer that's currently displayed in an edit window, the edit window now repaints immediately, as it should. (In previous versions it tended not to repaint at all.)

    In Java mode in 0.16.2, if there were multiple interface names following "implements", all but the last were incorrectly added to the tag list as fields. Fixed.

    The Java tagger in 0.16.2 reported the visibility of public, private, or protected methods incorrectly if the method in question immediately followed a field declaration with an initializer, e.g.

            private static Stack markers = new Stack();
    
            public void pushPosition() {}

    In this situation pushPosition() would be incorrectly reported to have package (rather than public) visibility. Fixed.

    In previous versions, cvsCommit (actually finish in a CVS checkin buffer) didn't refresh the display properly when the CVS checkin buffer went away if the window wasn't split at the time. Fixed.

    Keywords are now configurable in BeanShell mode, as in all other modes. (In previous recent versions keywords weren't highlighted at all in BeanShell mode.)

  • Aug 14 2002 5:22 PM - Version 0.16.2

    This release introduces three new commands in C and C++ modes: iList, checkPath and listIncludes.

    Since the beginning of time, j has supported the concept of an include path for C and C++ modes. The idea is, you add lines like the following to ~/.j/prefs:

            CMode.includePath   = ../include:\
                                  /usr/include:\
                                  /usr/lib/gcc-lib/i386-linux/2.95.4/include
    
            CppMode.includePath = /usr/include:\
                                  /usr/lib/gcc-lib/i386-linux/2.95.4/include:\
                                  /usr/include/g++-3

    Then, when you're working on a C file (for example), you can enter "stdarg.h" in the location bar, without any path prefix at all, and j will look in the C mode include path and find the file you're looking for, which is /usr/lib/gcc-lib/i386-linux/2.95.4/include/stdarg.h.

    (Note that you need to use the platform-specific path separator character, which is a colon for Unix and a semicolon for Windows, when specifying the include path.)

    If your include path is set up correctly, you can also put your caret anywhere at all on the line:

            #include <stdarg.h>

    and use gotoFile (Ctrl Shift G) to open stdarg.h in the aforementioned location, with no actual typing whatsoever.

    The new commands checkPath and listIncludes help you verify that you have your include path set up correctly.

    The command checkPath, not mapped by default but available via executeCommand (Alt X, "checkPath"), looks at all the lines in the current buffer that start with "#include" and reports which included files can't be found in your include path (or in the current directory, if the filename is enclosed in quotes rather than in angle brackets). checkPath also recursively checks all the included files that it can find, and reports which (if any) of the files included by those files can't be found.

    listIncludes (Alt X, "listIncludes") is similar to checkPath, but it lists all the included files, not just the ones that can't be found.

    iList, mapped by default to Ctrl F6 in C and C++ modes, operates on the identifier at the current location of the caret. It creates a List Occurrences output buffer showing all occurrences of the identifier in question in the current buffer AND in any included files, in the order in which they occur.

    So, to take an example from the Linux kernel source, suppose your C mode include path is set up as in the example above and you're looking at this line in sched.c:

            #define MIN_TIMESLICE               ( 10 * HZ / 1000)

    And you wonder what "HZ" is. If you put your caret on "HZ" and hit Ctrl F6, you'll get a List Occcurrences buffer that starts like this:

            Pattern: "HZ"
            Options: case sensitive, whole words only
            File: /usr/src/linux-2.4.19-pre10-ac2-A4/include/linux/sched.h
            4:#include <asm/param.h>	/* for HZ */
            File: /usr/src/linux-2.4.19-pre10-ac2-A4/include/asm-i386/param.h
            4:#ifndef HZ
            5:#define HZ 100

    From which you can see that HZ is 100, as defined on line 5 of param.h.

    There are two new commands in mailbox mode, sortByDateSent and sortByThread. These commmands are not mapped to any keystrokes by default, but they are available on the View menu or via Alt X.

    By default, mailboxes come up sorted in order of date sent, as they always have. sortByThread gets you a threaded view. (Bear in mind that sortByThread just changes the view; it doesn't actually modify the underlying data in any way.) If you're looking at a threaded view, sortByDateSent will get you back to a flat list in order of date sent.

    By default, j now saves a local copy of each IMAP message that you read. If you reread the message later, j will get it from the cache instead of pulling the same bits over the network again. This is particularly useful if you have a slow network connection.

    Each message is saved in a file named after its UID, in a directory specific to the mailbox in question, under ~/.j/mail/imap/cache.

    Deleted messages are automatically removed from the cache as a side effect of the mailboxExpunge command, which is mapped by default to '$' in mailbox mode. The current implementation has no concept of expiration or aging of undeleted messages and imposes no limit on utilization of disk space.

    IMAP message caching can be disabled by adding this line to ~/.j/prefs:

            imapUseLocalCache = false


  • Jul 30 2002 6:59 AM - Version 0.16.1

    By request, this release adds basic support for named sessions.

    J has always saved information about your editing session, so that by default, when you restart j, things come back more or less as you left them: the same buffers will be open (except for remote and transient buffers), and the current location in each buffer will be the same.

    The commands saveSession and loadSession, new in this release, add support for named sessions.

    saveSession saves information about the current editing session in a named session file. If no named session is active yet, you will be prompted for a name for the current session; once you've specified a name, saveSession will use that session file without further prompting.

    loadSession loads a named session that you have previously saved, which then becomes the active named session as far as saveSession is concerned. All currently open buffers are closed before the new session is loaded.

    The "Name:" textfield, in the dialog that comes up when you do loadSession or saveSession, supports both history and completion; if you hit Tab when the textfield is empty you'll cycle through all the named session files in your collection.

    If a named session is active, you can save the current session under a new name by using executeCommand to invoke saveSession with the new name as an argument (e.g. Alt X, "saveSession foo"). If you do this, subsequent saves will go to the new session file ("foo") by default.

    When a named session is active, the session name appears in the title bar of the top-level window, enclosed in brackets.

    By default, the information in a named session file is only updated when you explicitly invoke saveSession. This allows you to exercise better control over the contents of named session files. If you'd like named session information to be updated automatically, add this line to ~/.j/prefs or C:\.j\prefs:

            autosaveNamedSessions = true
    You can use "-session" on the command line to start j with a specific named session:
            j -session foo
    or
            java -jar j.jar -session foo
    When you start j without specifying a named session on the command line, the previous session is restored, but no named session is active until you do saveSession or loadSession.

    In the current implementation, only the buffer list is saved in the named session file. This means that command history (among other things) is global across named sessions. It would be nice to store command history in the named session files too, but I'd like to make sure the basic functionality is solid first. The folks who requested this feature were mainly interested in the buffer list.

    Documentation about named sessions has been added to the help system (F1, scroll down to "Sessions" and hit Enter).

    Of course, if you don't care about named sessions, you can ignore all of this and j will behave exactly as it always has.

    Starting with this release, findTag (mapped by default to Ctrl T in programming modes) and findTagAtDot (mapped by default to Alt . in programming modes) use a smart output buffer (similar to a List Occurrences buffer) instead of a dialog box to resolve ambiguities. You can use the cursor keys to scroll around in the List Tags buffer, and if you hit Enter on the line corresponding to the method you're interested in, you'll go directly to its source in the other window. Keyboard focus stays in the List Tags buffer, but the List Tags buffer will go away if you hit Escape.

    There are a couple of additional minor features in List Tags mode (as opposed to List Occurrences mode). First, the up and down cursor keys are mapped to tagUp and tagDown, respectively, so navigation using the up and down cursor keys always lands on interesting lines. Second, Ctrl Enter (as opposed to Just Plain Enter) is mapped by default to jumpToTagAndKillList, which does what its name suggests; to wit, you'll go directly to the source of the method in question and the List Tags buffer will go away, leaving the edit window unsplit. You can use Ctrl Enter if you're sure you've found the tag you want in the list; if you're not sure, you can use Enter, possibly more than once, to audition the various candidates, followed by Escape when you've found what you're looking for.

    With previous versions of j and Java 1.4.1-beta on Linux, focus would frequently (but not always) go astray after you dismissed a dialog box. This problem is fixed in this release, and j now seems to work fine with 1.4.1-beta.

  • Jul 15 2002 9:16 AM - Version 0.16.0

    First a word of warning: as things stand, j won't work correctly if it's built with jikes 1.16 (which was released last week). I haven't had a chance to look into the problem in detail, but jikes 1.15 (26 Sept 2001) has always worked fine for me, and I've been told that javac from Sun 1.4.0_01 and javac from Blackdown 1.3.1_02b work fine too. The binaries for this release were built with jikes 1.15 (as usual).

    This release introduces Ruby mode (contributed by Jens Luedicke), support for custom keyword lists, and new options for highlighting braces, brackets and parentheses.

    Ruby mode supports all of the features you've come to expect in a mode: syntax highlighting, automatic indentation with the Tab key, and a tag list in the sidebar. Feel free to complain if you encounter syntax that isn't handled correctly; please include a code sample that illustrates the problem.

    By request, this release adds support for custom keyword lists for the various modes.

    This feature is mainly useful for languages like Lisp and Scheme that have a variety of dialects, where you might want to use a custom keyword list that contains the keywords of the particular dialect you're using.

    To use a custom keyword list, first prepare the list itself. It should be an ordinary text file with one keyword per line. For an example of the format, take a look at src/org/armedbear/j/JavaMode.keywords (there is such a file for each mode, containing the default keyword list for that mode).

    After you have prepared your custom keyword list, all you have to do is add a line like this to ~/.j/prefs (or C:\.j\prefs), pointing to the file you want to use:

            LispMode.keywords = /home/peter/lispkeywords

    In response to Feature Request 577186, you can now set things up so that, when your caret is on (or just past) a brace, bracket, or parenthesis, j will highlight the matching brace, bracket, or parenthesis (if possible).

    To enable this feature, add this line to ~/.j/prefs:

            highlightMatchingBracket = true

    And you may need to add a line like this to your theme (or ~/.j/prefs):

            color.matchingBracketBackground = 255 204 102

    If you'd like both of the brackets, braces or parentheses to be highlighted (instead of just the one at the far end), add this line to ~/.j/prefs:

            highlightBrackets = true

    J now recognizes that files beginning with "<?php" (or just "<?") should be opened by default in PHP mode.

    In PHP mode, syntax highlighting and automatic indentation work much better now in the vicinity of multi-line quoted strings.

    J's menu mnemonics work correctly now with Java 1.4.1-beta.

    Finally, as usual, all bugs reported to j's official bug tracker have been fixed (or otherwise dealt with) for this release.

    Thanks for your support.

  • Jul 2 2002 9:04 AM - Version 0.15.3

    This release provides better support for reading and writing files using non-default character encodings, plus a few minor improvements and bugfixes.

    The default character encoding is controlled by the defaultEncoding preference:

            defaultEncoding = ISO-8859-1
    In previous versions of j, there was no ad-hoc way to open a file with a specific non-default encoding. Starting with this release, you can use the "-e" switch to specify the encoding when you're opening a file in the location bar, e.g.:
            /home/peter/greek.txt -e iso-8859-7

    The encoding must be supported by the version of Java that you're using. The encoding name is not case-sensitive. Commonly supported encodings include "IS08859_1" and "ISO-8859-1" (two names for the same thing), and "UTF8" and "UTF-8" (likewise).

    Java recognizes both canonical names and aliases for many encodings. To make things more interesting, there are significant variations in this area among the different versions of Java. More information from the perspective of Java 1.4 is available here.

    The "-e" mechanism, which is currently available in the location bar but not on the command line when starting j, is not likely to be the last word in UI design for this particular feature. But you never know...

    Once the text of a file is loaded into a buffer, it's in Unicode. By default, if you modify the buffer and save it, the encoding of the original file is used for the save.

    You can change the save encoding with the new command setEncoding, available on the File menu or via Alt X. So, for example, you could do Alt X, "setEncoding utf-8" if you wanted to save greek.txt in UTF-8 instead of ISO-8859-7.

    If you open a file using a non-default encoding, or if you later use setEncoding to specify a non-default encoding, j will make an effort to remember the encoding you used for the file and use that encoding again the next time you open the same file, unless you explicitly specify a different encoding with the -e switch on that occasion.

    In XML mode, j now chooses the encoding to use when loading a file based on the encoding declaration in the file itself. The encoding declaration is an optional part of the XML declaration, which itself is also optional, and which, if it exists at all, must be at the very beginning of the file. If there's no encoding declaration, UTF-8 is assumed, as required by the Section 4.3.3 of the official XML 1.0 W3C Recommendation. This is a change in j's behavior compared to prior versions, which not only paid no attention to the encoding declaration, but defaulted to the user's default encoding, which itself defaulted to ISO-8859-1 (and still does).

    The name of the encoding that's in effect for the current buffer is shown in the Properties dialog (Alt P), in the "File" box.

    One casualty of all this is the archaic command toggleSaveAsUnicode, which is obsolete and has been removed, since you can now do (for example) Alt X, "setEncoding UTF-16", which is clearer and more flexible.

    By request, there is now an option to sort the sidebar tree alphabetically in Java mode. Only the fields and methods are sorted; the "extends" and "implements" lines and the classes themselves are still presented in the order in which they appear in the buffer.

    The new option is available on the right-button context menu in the tree pane. It's global (i.e. whichever way you set it, it works the same way for all Java mode buffers), and it persists from one session to the next, until you specifically change it again. (In these respects it works the same as the "Arrange by type" option which is also available on the aforementioned right-button context menu.)

    By request, the behavior of incrementalFind has changed again. Now, in the incremental find textfield, backspace always removes the last character from the search pattern and then finds the first occurrence of the new, shorter pattern, starting from the starting point of the original search. In addition, you can use whatever key(s) you have mapped to findPrev to find the previous occurrence of the current pattern. findPrev is mapped by default to Shift F3 and Ctrl H.

    As before, you can use whatever key(s) you have mapped to findNext (or to incrementalFind itself) to find the next occurrence of the current pattern. findNext is mapped by default to F3 and Ctrl G.

    By request, pastePrimarySelection is now mapped globally to Mouse-2 by default on Unix if you're using Java 1.4 (which is required for primary selection support in any case). I've also removed all of the default mode-specific mappings for Mouse-2 in buffers that can accept a paste, so the global mapping won't be overridden (by default, at least) in any situation where it would be missed. The net effect of all this is that on Unix, if you're using Java 1.4, X-style copy/paste is now the default behavior.

    By request, xmlElectricSlash, mapped by default to '/' in XML mode, now automatically re-indents the line after completing the end tag, provided the property autoIndent is true for the buffer in question (which it is by default).

    By request, window information is now correctly saved and restored even if the main window is maximized, provided you are running Java 1.4 (there's no way to do this properly with earlier versions of Java).

    For a long time, j has provided a certain amount of support for showing the request and response headers associated with HTTP buffers. In previous versions, this involved a preference (httpShowHeaders) and a command (httpToggleHeaders). If you wanted to see the headers, they were prepended to the HTML source of the HTTP buffer in question. Because of that approach, the formatting was a bit sketchy, there was no way to see the headers associated with an image buffer (for example), and it wasn't easy to remember how to set things up.

    In this release all of this has changed. The httpShowHeaders preference and the httpToggleHeaders command have been replaced by the httpShowHeaders command, which is available in any HTTP buffer, including image buffers.

    The httpShowHeaders command shows the request and response headers in a separate transient output buffer. No setup is required, no muss, no fuss.

    In addition, if j followed redirection to get where it got to, as it does, if necessary, when the enableWeb preference is true, all of the request and response headers are shown, so you can see the full chain of redirections.

    httpShowHeaders is not mapped to a keystroke by default, but you can do Alt X and type it in.

    Starting with this release, logging is on by default. This shouldn't make any difference under normal circumstances, since only errors are logged, but it can be very helpful in tracking down problems. If you're reporting a bug, you might want to look at the log file (~/.j/log or C:\.j\log) to see if there's any useful information there. If so, you can attach the log file to the bug report.

    Logging is configurable; for full details, see the documentation (F1, "Logging").

    Finally, all bugs reported to j's official bug tracker have been fixed (or otherwise dealt with) in this release.

    Thanks for your support.

  • Jun 12 2002 8:43 AM - Version 0.15.2

    This release fixes a serious bug which led to an assertion failure and caused j to hang, under most circumstances, if you tried to open a file via HTTP (say "http://armedbear.org/index.html", just for one example).

    This bug has been around for a while (since 0.13.0 at least), and it has the distinction of being the first bug reported to j's new bug tracker on SourceForge. It is fixed now, and you should once again be able to open "http://armedbear.org/" or "http://slashdot.org/" or "http://www.cnn.com/" without immediately regretting it.

    In other news, the behavior of incrementalFind has changed in this release.

    In earlier releases, the incrementalFind textfield rejected any characters you might type that changed the search pattern so there was no match.

    So, for example, if the pattern was "fo", and there was a match for that in the buffer, and if you then typed 'x' (making "fox"), and there was no "fox" in the buffer, the textField would refuse to accept the 'x'.

    The problem with this approach was that if you typed fast and didn't pay close attention, the textfield would reject a few characters and then find one that it could accept, leading to a match on a string you never intended to look for.

    So, to make the contrived example above even more far-fetched, maybe you're looking for "foxfire"; the textfield rejected the 'x', so there's no possible match for "foxfire" in the buffer, but if you don't notice that and keep typing, maybe when you type 'r' you'll get a match on "for", which is confusing and not at all what you wanted.

    In the current release, this behavior has changed. J no longer rejects any characters you type. If there's no match, so be it; a message to that effect is displayed inconsipicuously in the status bar, the typed character appears in the textfield and life goes on. At some point you notice there's no match. The last-matched substring will still be selected in the buffer, the string in the textfield will be whatever you actually typed, and the inconspicuous message in the status bar will tell you the search failed. You can backspace back through the pattern that didn't work, and eventually that will backtrack through the buffer like it always has done.

    I think this behavior is an improvement, and it's a bit closer to what other editors do.

  • Jun 9 2002 7:05 PM - Version 0.15.1

    A new mode, a stupid mouse trick, a number of minor enhancements and some bugfixes.

    CSS mode is the new mode, for all your Cascading Style Sheets.

    By request, for those of you who like that sort of thing, this release introduces drag/drop of text within a buffer, using the mouse. And from one buffer to another, for that matter.

    In fact, on Windows, you can drag text from j and drop it into other consenting applications, or vice versa.

    Straight drag (no keys down) is a move; if the Ctrl key is down, it's a copy. You can press (or release) the Ctrl key while you're dragging; the mouse cursor will change to reflect the change of operation.

    All drag/drop operations are fully undoable and redoable.

    To drag text from one buffer to another, both buffers must be visible, so you'll need to do splitWindow (F10) or possibly newFrame (Ctrl Shift N) and jockey things around a bit first.

    I haven't implemented an autoscroller yet, so for now you can only drag text to a location that's currently visible within the destination window. Drag/drop is not yet supported for column selections.

    If you just can't abide stupid mouse tricks, you can turn off the drag/drop feature by adding this line to ~/.j/prefs:

            enableDragText = false

    By request, Tcl mode now supports different syntax highlighting for braces and brackets. Taking Kodiak as an example:

            TclMode.color.brace   = 153 0 51
            TclMode.style.brace   = 1
            TclMode.color.bracket = 204 102 0
            TclMode.style.bracket = 1

    By request, in XML mode the tree in the sidebar now displays all of the attributes, rather than just the first one, as well as the element name. Often there will be just one or two attributes, and they will show up in the tree without scrolling. Sometimes there will be too many attributes and the line will be too long, but you can scroll horizontally if you care, or just ignore the extra attributes; they don't eat much.

    By request, selectAll, mapped by default to Ctrl A, now calls pushPosition before selecting all the text in the buffer. The point of this is that after you've had your way with all of the text in the buffer, you can use popPosition, mapped by default to Shift F5, to return to where you were before you did selectAll.

    By request, the jump commands (jumpToLine, which is mapped by default to Ctrl J, jumpToColumn, and jumpToOffset) now support arithmetic expressions as well as simple numbers. So you can enter, for example, "143+37" instead of "180", which might be useful if you're trying to find an error at line 37 of procedure foo and procedure foo starts at line 143. You can also enter an offset from the current line number: if you're at line 50 and enter "+12" you'll get to line 62.

    By request, the Find dialog has a new checkbox, "Search from start of document". If you check this box, the search begins at (you guessed it!) the start of the document. Otherwise, the search begins at the current location of the caret (like it always has).

    By request, the date/time string inserted by the stamp command, which is mapped by default to Shift F2, can now be customized by adding a line like this to ~/.j/prefs:

            stampFormat = "EEE, dd MMM yyyy HH:mm:ss"
    You can do Alt X, "help stamp" and follow the links to get documentation on the format of the template string; there's enough flexibility there to kill a horse.

    In previous recent versions of j, on Windows only, and only with versions of Java prior to 1.4.0, the Confirm Replacement dialog performed (or skipped) two replacements instead of one if you hit 'Y' (or 'N'). This bug, introduced a while back with the changes that were made to support Java 1.4.0, is now fixed.

    In previous versions of j, if you used control shift left click to make a column selection, then switched away from the buffer containing the column selection and switched back again, the column selection was magically (and incorrectly) transformed into an ordinary selection. This bug is now fixed.

    J's MIME parser now handles multipart messages correctly even if one of the parts is empty, as is often the case with messages generated by the W32/Klez virus.

  • May 20 2002 8:22 AM - Version 0.15.0

    Additional CVS support, three new modes, and a number of minor improvements.

    J's CVS support is now fully documented; use F1 and look for "CVS Support". I've been using j's CVS support every day for months, so it's well tested in my environment (Linux), but your environment may vary...

    By request, modes have been added for Verilog, VHDL, and Tcl/Tk. In each case, syntax highlighting seems to work well, there's a rudimentary tag list in the sidebar, and conveniences like commentRegion (F11), uncommentRegion (Shift F11), and wrapComment (F12) are provided.

    Tcl mode fully supports automatic indentation (hitting Tab indents the current line correctly, the indentation should be correct on the next line after you hit Enter, and '{' and '}' are electric).

    Verilog mode makes some effort towards automatic indentation, but it's far from 100%.

    In VHDL mode, for the moment, at least, the Tab key is mapped to insertTab, which is a way of giving up; if the indentation is wrong, you're better off using insertTab to correct it manually. Enter is mapped to newlineAndIndent, but manual intervention will frequently be required.

    There is obviously room for improvement here. I don't use Verilog or VHDL (or, for that matter, Tcl/Tk) in real life myself, so please let me know when you find bugs or if you have suggestions to improve the behavior of these modes. Samples of Verilog, VHDL, or Tcl/Tk code that illustrate the issue you're describing are worth a thousand words.

    By request, a new confirmation dialog is now presented when you try to close a buffer that has unsaved changes. No big deal if you're new to j, but compared to the way things worked in previous releases, the positive/negative options have been reversed. Now, "Yes" means, "Yes, save my changes and then close the buffer", "No" means, "No, don't save my changes, but go ahead and close the buffer anyway", and "Cancel" means, "Don't do anything; I need to think about this some more." In previous releases, there was no "Cancel", "Yes" meant what "No" means now, and "No" meant what "Cancel" means now. The advantage of the new approach is that you can save the buffer in question directly from the confirmation dialog, skipping a couple of steps that were necessary with the old approach. But be careful, lest old habits or a quick trigger finger lead you astray.

    By default, j now uses the "Monospaced" font in its textfields. If you don't like this, you can change it by adding the following lines (or variants thereof) to ~/.j/prefs or C:\.j\prefs:

            textFieldFontName = Dialog
            textFieldFontSize = 12
    If you don't specify a value for textFieldFontSize, the value of dialogFontSize is used, and if you don't specify a value for dialogFontSize either, it's 11.

    Starting with the current release, the keys for j's preferences are case-insensitive, so the following lines work too:

            textfieldfontname = Dialog
            textfieldfontsize = 12

    For a long time, the expand command, mapped by default to Alt Space, has saved me a lot of typing. The idea is, you type the first few characters of a long word that appears somewhere in the current buffer, hit Alt Space, and the characters you typed are magically expanded into the word you want. If j gets it wrong on the first try, you can keep hitting Alt Space to cycle through all the possible expansions, or hit Escape at any point to get back to just the characters you actually typed. Another one of my favorite features.

    Starting with the current release, all of the textfields in j's dialogs support expansion with Alt Space too. (This also applies to the textfields in the location bar, except for incrementalFind, which is a bit of a special case in many respects.) The candidates for the expansion come from the text in the current buffer. Hitting Escape with an expansion in progress cancels the expansion; hitting Escape a second time closes the dialog.

    If you have experimental features turned on, the commands find and replace now support multiline regular expressions. So, for example, you can search for "Alt\s+Space", and find what you're looking for even if it spans two lines. You can also replace "Alt Space" with "Alt\nSpace", if you should so desire. Because of the way j handles things internally, "\n" should always be used as the line separator string, even on platforms where that is not normally the case; the correct platform-specific line separator will be used when the file is written out. (You can use the Properties dialog, mapped by default to Alt P, to change the line separator for a particular buffer.) Multiline pattern support is an experimental feature for now; it will graduate to the mainstream after a bit more testing and use. If you try it out, please report any anomalies.

    For the last several releases, Java mode has featured tooltips that try to find and report the declaration of the identifier under the mouse cursor. It turns out that this feature is a bit of a performance problem in certain environments, so Java mode tooltips are now disabled by default. To re-enable them, add this line to ~/.j/prefs:

          JavaMode.enableToolTips = true

    By request, those brave souls who use j as their mail client can now add the following line to ~/.j/prefs:

            confirmSend = true
    If you do this, you'll get a confirmation dialog when you send a mail message. The confirmation dialog lets you change the "From" and "Bcc" addresses of the outgoing message on the fly, and you can also specify which SMTP server to use. This is useful for folks with multiple identities and/or network connections.

    J now uses version 1.2b5 of the BeanShell package.

    Plus the usual menagerie of minor bugfixes, imperceptible enhancements, and long-overdue documentation updates.

  • Apr 21 2002 6:50 PM - Version 0.14.3

    This release offers a preview of j's new CVS support and fixes a long-standing (and long-unreported) bug that prevented the editing session from being saved and restored correctly under certain circumstances.

    Starting with this release, CVS revision information for checked-out files is now displayed in the status bar, to the right of the mode name, like this:

            CVS 1.34
    or
            CVS 1.34 M
    or
            CVS A
    "1.34" is the revision; it's followed by an 'M' if the file modification time of the local file is different from the checkout time, which is often an indication that the local file has been modified since it was checked out. If there's an 'A' following "CVS", but no revision number, it means the file has been added to CVS but not yet committed.

    In addition, there are a couple of new commands related to CVS: cvsDiff and cvsDiffDir. These commands only work on files that CVS knows about, of course, but if you're working on such a file, you can use cvsDiff to get a diff output buffer showing the changes between the checked-in version and your local copy. cvsDiffDir is similar, but it generates a diff output buffer for all the files in the current directory, not just the current buffer. Once you're in the diff output buffer, you can scroll around and use diffGotoFile, mapped by default to Enter or Ctrl Shift G or left button double click or middle button single click, to jump to the location in the source corresponding to the line you're on in the diff output buffer. One of my favorite features.

    cvsDiff and cvsDiffDir are not mapped to any keystrokes by default, but you can use executeCommand, mapped by default to Alt X, and then type in the name of the command ("cvsd", then hit Tab once or twice; completion is your friend).

    There's more CVS support waiting in the wings, but I'd like to see if cvsDiff and cvsDiffDir work as expected for a broader audience before proceeding. If you find these commands useful, please let me know, and please let me know if you think they might be useful but for some reason you can't get them to work right. I've used these commands extensively myself, and they work for me, but we always need to be careful of the inmates running the asylum.

    Almost from the beginning of time, j has saved session information on exit, including the size and position of the main window, the list of open buffers, your current location in each buffer, and which buffer you were working on when you quit (among other things), the idea being that the next time you start j, the previous situation will be restored so you can pick up where you left off. (By design, only buffers corresponding to local files are restored, and only if the local files in question still exist when the new session starts up; things like remote buffers and mailboxes are deliberately not restored, to avoid weirdness in case your connectivity has changed in the interim.)

    And for a long time all of this worked just fine.

    Then one day I got the idea that it would work even better if j made a backup of the session information each time it was saved, just in case. So I wrote the code to do that, and while I was at it, I changed things to write the session information to a temporary file first, then delete the existing session file and rename the temporary file to replace it, which is also perfectly reasonable.

    The new code first appeared in 0.11.0, back in October of last year, and it worked fine for me and for lots of other folks, and until last week nobody complained about it at all. Then I received a surprising enhancement request: "Could you make j remember the position and size of its main window from one session to the next?" Hmmm...

    After a certain amount of investigation, it turned out that the problem was that the temporary file for the session information was written to ~/.j/temp, which is j's private directory for temporary files. And that would have been fine, except that the session-saving code did nothing to make sure that this directory actually existed. Now, a fair amount of other code uses ~/.j/temp, and all of that code did check to make sure it existed (and created it if it didn't), but it turns out that most of that code deals with fairly esoteric things like remote buffers and mail, things that most j users don't get around to right away, if at all. So a lot of folks won't have a ~/.j/temp directory, and a lot of folks will lose their session information.

    Sorry about that.

    Anyway, this bug is now fixed, and there are undoubtedly a number of morals that could be drawn from this sad tale.

    Thanks for your support.

  • Apr 18 2002 7:39 AM - Version 0.14.2

    This release improves j's source path functionality, particularly in Java mode, and fixes a number of minor bugs.

    For a long time j has supported the concept of a source path, which lets you open files without having to specify their full paths. For example, you might add a line like this to ~/.j/prefs:

            sourcePath=/usr/src/linux/kernel
    Then you can just type
            sched.c
    to open /usr/src/linux/kernel/sched.c, regardless of what the current directory is. This works in the location bar and also on the command line when first starting j. There is also a separate include path, which j uses to find .h files in C and C++ modes.

    In the current release, this concept has been extended to support mode-specific and relative source paths.

    For example, suppose you have these lines in ~/.j/prefs:

            CMode.sourcePath  = /usr/src/linux-2.4.18-rc1-preempt-K3/kernel:\
                                /usr/src/linux-2.4.18-rc1-preempt-K3/mm
            CMode.includePath = ../include:/usr/include
    Now, if you just type
            sched.c
    you'll get /usr/src/linux-2.4.18-rc1-preempt-K3/kernel/sched.c. Once you're there, you can move your caret to line 15:
            #include <linux/mm.h>
    With your caret anywhere on this line, you can use gotoFile, mapped by default to Ctrl Shift G, to open the referenced header file, and you'll get the one in /usr/src/linux-2.4.18-rc1-preempt-K3/include, following the relative path ../include, which precedes /usr/include in the C mode include path. So you'll get the mm.h in the kernel source you're actually working on, rather than the one in /usr/include (just in case it matters).

    In the general case, J tries pretty hard to find the file you want. In the present implementation, it looks in the current directory first, then in the list of open buffers, then in the source path of the current buffer (which is normally the mode-specific source path of the mode of the current buffer), then in the mode-specific source path of the default mode of the file you're looking for (e.g. Java mode if you're trying to open AbstractMode.java), and finally in the global (i.e. non-mode-specific) source path.

    In Java mode, j now goes even further with the source command, which is new in this release. The source command tries to help you find the source of any Java class referenced in the current buffer.

    Since at least some of the Java classes referenced in any Java buffer are likely to be part of the Java runtime library, you should have the Java runtime library source installed somewhere (it's normally provided with the JDK in either src.zip or src.jar), and you should tell j where it is by adding a line like this to ~/.j/prefs:

            jdkSourcePath = /home/peter/sun/j2sdk1.4.0/src
    Once you have things set up correctly, you should be able to put your caret on the name of any Java class (say, "String", for example), and hit Ctrl F1 (which is the default mapping of source in Java mode), and get the source of the class in question (in this case, java.lang.String). J finds the source of the referenced class by examining the "import" statements at the top of the current buffer and by navigating within the current package relative to the root of its source tree. You can also do, for example, Alt X, "source String", if that's more convenient than finding an instance of "String" to do Ctrl F1 on.

    In addition, gotoFile, mapped by default to Ctrl Shift G in all modes, should work on the "import" statements themselves. You don't have to be right on the class name, either; anywhere on the line should work.

    By request, the commands nextTag and previousTag have been added. These commands do what their names suggest, providing yet another way of moving around in a buffer. They're not mapped to any keystrokes by default, but ~/.j/init.bsh is your friend.

    For Unix platforms, the code behind save (Ctrl S) has been changed to preserve both permissions and ownership of the file being saved.

    This release also fixes a number of minor bugs involving indentation and/or syntax highlighting in Java, Perl, and PHP modes.

  • Mar 14 2002 3:38 AM - Version 0.14.1

    This release fixes three major bugs in 0.14.0.

    Undo was broken for indentRegion in some situations, leading to an assertion failure that caused j to hang. Now fixed.

    Undo and redo were not write-locking the buffer while they did their work, which caused trouble in certain situations if the operation took a long time and the idle thread tried to format the same buffer while the undo or redo was still in progress. Now fixed.

    These bugs were introduced in 0.14.0 by a rewrite of the undo/redo code to provide a better infrastructure for the change mark feature.

    There was also an unrelated bug in the PHP formatter (from the beginning of time, I believe) that kept it from doing the right syntax highlighting for "//" comments. Now fixed.

    Finally, jikes 1.14 had some trouble with ImapMailbox.java. The problem was not really in the code, since both javac and jikes 1.15 compiled it without complaint, but I renamed a couple of variables and now jikes 1.14 is happy too.

    On the subject of jikes, the version that is currently in Debian unstable, "Version 1.15b(CVS)", compiles j without complaint, and the resulting binary does run, but certain classes encounter verification errors at runtime, at least with Java 1.4, and not everything will work right. Don't build j with this version of jikes! The official release of 1.15, available here, should work fine (and now, as mentioned, jikes 1.14 should work fine too).

  • Mar 13 2002 6:48 AM - Version 0.14.0

    This release introduces change marks, and, in Java mode, replaces the sidebar tag list with a class tree representing the current buffer.

    By default, change marks are now displayed to the left of all changed lines. Change marks come in two colors, one ("color.change") for changes you've just made, the other ("color.savedChange") for changes that were made in the current editing session, but before the buffer was last saved. When you save the buffer, the buffer's change marks will all change to the saved change color, since your changes are now saved. (Got it?)

    Change marks are themeable, and the maintained themes (Kodiak, Freefloater, AnokhaClassic and Dark) have been updated to support them.

    Two new commands, nextChange and previousChange, mapped by default to Ctrl Alt N and Ctrl Alt P, respectively, and available on the Go menu, will help you find areas where changes have been made, so you can admire the change marks.

    In most cases, change marks are smart enough to recognize when a sequence of changes to a line brings the line back to its original state (for example, if you type a character and then immediately hit Backspace). At the moment, however, this particular light stays under the bushel, so to speak, so the buffer may still show up as modified in the buffer list when in fact it contains no changed lines. This deficiency, as well as others, will be corrected in a future release (if all goes well).

    If you don't like change marks, you can turn them off by adding this line to ~/.j/prefs:

            showChangeMarks = false

    While working on the change mark code, I needed a way to check my work, so I added the command changes, not mapped by default but available via Execute Command (Alt X). The changes command runs diff to generate a listing of the unsaved changes in the current buffer and presents the listing in a formatted output buffer. You can move around in the output buffer and use diffGotoFile, mapped by default to Enter, to jump to the location of a particular change. Note that since changes uses diff, diff must be installed and in your path, which is more likely to be true on Unix than Windows, but if diff is available, changes works on Windows as well as on Unix.

    In Java mode, the sidebar tag list is now a tree. By default, the tree is arranged by type, with sections for fields, constructors, methods, and (if applicable) nested classes. If this is too much arrangement for you, you can click your right mouse button in the tree pane and uncheck the "Arrange by type" checkbox, in which case you'll still get a tree, but without the aforementioned sections.

    In previous versions, j was not really meticulous about honoring the restrictCaret preference. If restrictCaret is true, the idea is that the caret is never placed beyond the end of the actual text on a line (the actual text, of course, might be whitespace).

    The problem in previous versions was that when you used newlineAndIndent, mapped by default to Enter in programming modes, or tab on an empty line to get the proper indentation, j placed the caret where it needed to go, but did not, at that very moment, insert the necessary whitespace to the left of it. This had the advantage that if you then moved away without actually typing anything on that particular line, no stray whitespace was added to the buffer. But strictly speaking it was the wrong thing to do if restrictCaret was true, and as a practical matter the subsequent behavior of backspace was not always ideal.

    This behavior has been corrected in the current release. Now, both newlineAndIndent and tab insert the required whitespace right away if restrictCaret is true, as they should.

    To prevent the whitespace creep that this change might otherwise lead to, you can configure j to remove trailing whitespace, defined as spaces and tab characters at the end of a line of text, whenever a buffer is saved, by adding this line to ~/.j/prefs:

            removeTrailingWhitespace = true
    If removeTrailingWhitespace is true, the act of saving a buffer will in fact make changes to the buffer if any trailing whitespace is actually removed. When this happens, it will be reflected in the change marks, if you have change marks turned on, and the change itself (like other changes) may be undone (Ctrl Z) and subsequently redone (Ctrl Y) at your sole discretion.

  • Feb 20 2002 7:28 AM - Version 0.13.1

    Python mode now supports automatic (or at least semi-automatic) indentation.

    To accomplish this, tab is now mapped by default to Tab, and newlineAndIndent is now mapped by default to Enter. insertTab, which does what you might think the Tab key ought to do, is now mapped by default to Ctrl Tab. And finally, for reasons to be explained shortly, slideOut is now mapped to Shift Tab (as well as to Alt [, which has always been its default global mapping).

    Python indentation, I've learned, is not an exact science: the correct indentation of a given line cannot always be derived from an inspection of the preceding lines.

    Like the other editors I've looked at, j tends to overindent Python code. A typical example:

          def shuffle(size):
              "Generate a random permutation of 0...(size - 1)."
              shuffle = range(size)
              for i in range(1, size+1):
                  j = random.randrange(i)
                  holder = shuffle[i - 1]
                  shuffle[i - 1] = shuffle[j]
                  shuffle[j] = holder
              return shuffle
    J gets everything right in this example except the last line, which it wants to place directly under the previous line instead of one notch to the left as the author intended.

    Hence the default mapping in Python mode of Shift Tab to slideOut, a command which forcibly moves the current line (or selected region if there is one) one notch to the left.

    So the workflow is that you use Tab and/or Enter to apply j's idea of proper indentation to the current line, and then you use Shift Tab to move the line to the left manually if you need to make a correction. You probably won't need to move the line to the right very often, but if you do, slideIn, mapped by default to Alt ] in all modes, is your friend.

    In Python mode, triple-quoted strings (and lines continued with a '\' in the midst of a single-quoted string) are no longer quite as likely to confuse j's syntax highlighting.

    By request, the line numbers introduced in version 0.13.0 can now be displayed in a font (and/or size) different from the normal display font. You can control this by adding lines like these to ~/.j/prefs:

            gutterFontName = Monospaced
            gutterFontSize = 10
    By default, the gutter font name and size are the same as the display font name and size.

    In addition, the gutter (the area containing the line numbers) now has a vertical border to separate it visually from the actual text in the buffer. You can specify the color of this border by specifying suitable RGB values in ~/.j/prefs:

            color.gutterBorder = 153 153 153
    There's no way to turn the border off, exactly, but if you set color.gutterBorder to the same color as color.background, you won't hardly notice it.

    And as a reminder, to get any of this to happen you need to turn line numbering on:

            showLineNumbers = true

    J's preferences architecture has been overhauled slightly. The net outcome is that settings in ~/.j/prefs now override settings of the same properties in your theme. In previous versions of j, the theme was loaded last, overriding the settings in ~/.j/prefs. The new approach is arguably more convenient, since you can specify a stock theme and just make a couple of corrections in ~/.j/prefs, rather than having to make modifications to the theme itself.

    detabRegion and entabRegion are now undoable (and redoable).

    Cleaned up and documented the old command decodeRegion, which base-64 decodes the selected region (or the line containing the caret if no region is selected). If the resulting output is text, it is displayed in a new buffer; otherwise, you are prompted for a filename and the output is saved in the specified file. decodeRegion is not mapped to a keystroke by default, but it's available from the Execute Command dialog box (Alt X). decodeRegion was introduced a long time ago when j was just learning how to handle mail messages with binary attachments, but it's still useful on occasion on its own hook.

    Fixed a bug that prevented user-specified files preference settings from being recognized in any mode. As in, for example:

            PHPMode.files = ".+\\.php|.+\\.phtml|.+\\.php[34]"
    These settings should work correctly now.

    Version 0.13.0 introduced a NullPointerException in messageToggleRaw. Now fixed.

    Version 0.13.0 also introduced a NullPointerException when undoing an action whose undo information was saved with SimpleEdit.FILE. (Fortunately the only documented command in 0.13.0 that used this approach was sortLines.) Also now fixed.

    In the source, Debug.assert() has been renamed to Debug.assertTrue(), since "assert" is now a reserved word.

  • Feb 12 2002 10:26 AM - Version 0.13.0

    A couple of new features (by request) and a major bugfix.

    First the major bugfix. An attempt to optimize the formatting code in version 0.12.4 led to an ArrayOutOfBoundsException in HTML mode under certain circumstances (in particular if the file contained a <script> tag). It was pretty much game over if you hit this bug. Now fixed.

    The first new feature is Python mode, used by default for .py files. Syntax highlighting and a tag list in the sidebar are supported.

    The second new feature is the optional display of line numbers in the edit window. To turn on line numbering, add the following line to ~/.j/prefs or C:\.j\prefs:

            showLineNumbers = true
    showLineNumbers is false by default.

    Even if you've added the aforementioned line to your preferences file, line numbers are only displayed in ordinary editing buffers (and not, for example, in directory buffers or mailboxes). If you want, you can override this inhibition on a mode-specific basis:

            MailboxMode.showLineNumbers = true

    Starting with this release, showLineNumbers also controls whether line numbers are included when you print a buffer (using print, mapped by default to Ctrl P and available on the File menu). The old property that used to control this, printLineNumbers, has been removed.

    Added the property color.lineNumber, which you can use to customize the color of the line numbers displayed in the edit window. The supported themes (Freefloater, AnokhaClassic, Dark, and Kodiak) have been updated accordingly.

    In Directory mode, dirBack is now mapped by default to 'b' (lower case B), and dirForward is now mapped by default to 'f' (lower case F). As a consequence of this change, dirBrowseFile is no longer mapped to 'b'. dirBrowseFile is still mapped to Ctrl Shift B, however, which is consistent with the mapping of the corresponding command in other modes.

  • Feb 7 2002 8:29 AM - Version 0.12.4

    Minor improvements and bugfixes.

    Added xmlElectricSlash, mapped by default to '/' in XML mode, which autocompletes the end tag (if possible) when you type "</".

    Added xmlInsertMatchingEndTag, mapped by default to Ctrl E in XML mode, which inserts the whole end tag, so you don't have to type "</" first. (On my keyboard, Ctrl E is a keystroke or so shorter than "</".)

    (Generally, I think xmlInsertMatchingEndTag is more useful, since it does no harm if there's no start tag to match, but xmlElectricSlash is a good fallback if you've already started to type the end tag.)

    Added mailboxFlag and messageFlag, mapped by default to 'F' (upper case F) in mailboxes and message buffers, respectively. These commands toggle the "important" flag for the message in question (which, in a mailbox, is the message on the line containing the caret). If the "important" flag is set, the message gets a '!' in the leftmost column of the mailbox message index.

    Added the mailbox limit pattern "~F", matching messages that have been flagged by these new commands, for use with mailboxLimit and mailboxTagPattern.

    The new approach to FTP saves introduced in 0.12.0, while normally safer than saving the destination file in place, does not always preserve all the attributes (permissions, ownership, etc.) of the destination file. Now, if you want, you can have the old approach back by adding this line to ~/.j/prefs or C:\.j\prefs:

            saveInPlace = true
    If saveInPlace is true, FTP saves are written directly to the destination file. This approach is better at preserving the file's attributes, but it has the disadvantage that the file is likely to be lost or truncated if a network problem prevents successful completion of the save. saveInPlace is false by default and applies only to FTP saves.

    In version 0.12.3, findInFiles and replaceInFiles underwent a bit of reorganization, mostly cosmetic in nature, which included, among other things, a "Replace with:" status line near the top of the output buffer to report the replacement text for replaceInFiles. Unfortunately, the new status line was also displayed, incorrectly, for findInFiles, as follows:

            Replace with: "null"
    Which was a bit disconcerting if you took it at face value, although the bug was just in the status display and the unasked-for replacement was never actually attempted. This is now fixed.

    It should now be possible to invoke openFile successfully from the File menu or toolbar as well as with Ctrl O (its default mapping). There was never a problem with Ctrl 0, but using the menu or toolbar did not always (ever?) set focus to the location bar correctly.

  • Jan 29 2002 8:42 AM - Version 0.12.3

    This release introduces support for syntax highlighting of HTML content in PHP mode. It should work right out of the box if you're using a supported theme (Freefloater, AnokhaClassic, Dark, or Kodiak) or no theme at all (which is equivalent to Kodiak).

    For a long time, j has supported preferences that let you adjust the ascent, descent and leading of the edit window display font:

            adjustAscent = -3
            adjustDescent = -2
            adjustLeading = -1
    You might want to specify negative adjustments, within reason, to squeeze more lines of text into a fixed amount of vertical space. A certain amount of trial and error is usually needed to get this right; adjustments that would otherwise make the adjusted parameter negative are silently ignored.

    These preferences were introduced because blind acceptance of the font metrics reported by Java has not invariably led to a great-looking display, even apart from differences of individual taste in such matters.

    These adjustments are still supported in the current release, but now j tries a bit harder to arrive at reasonable pre-adjustment defaults. The result of this is that you may need to change your adjustment values if you've set them up for a previous version of j.

    In addition, there are a couple of other preferences that may prove useful in the same area:

            enableItalics = false
            emulateBold = true
    Setting enableItalics to false disables use of the italic font even if it is specified by the theme you're using, which saves you the trouble of modifying the theme itself. Setting emulateBold to true makes j emulate a bold font by doing a paint trick with the plain font. (You should only set emulateBold to true if you're using a font that lacks a built-in bold variant.)

    Added findFirstOccurrence, mapped by default to Ctrl Alt up arrow in all modes. As its name suggests, findFirstOccurrence finds the first occurrence in the current buffer of the word at the current location of the caret. In the case of a file-scope variable or C/C++ #define, the first occurrence is the one you want to look at when you're wondering what the thing in question is. undo, mapped by default to Ctrl Z, will take you back where you came from after you've had a look.

    electricEquals, which was mapped by default to '=' in HTML and XML modes, has been replaced by htmlElectricEquals in HTML mode and by xmlElectricEquals in XML mode. You probably won't notice the change unless you're using custom keymaps, in which case you should update them with the new command names.

    In XML mode, the change in 0.12.0 that appended the name and value of the first attribute to the name of the element in the sidebar tree broke copyXPath. This is now fixed.

  • Jan 22 2002 6:58 AM - Version 0.12.2

    This release fixes a couple of minor but annoying bugs introduced in 0.12.1.

    The help command (F1) was broken in 0.12.1. Help worked fine if you started off by asking about a specific command (e.g. Alt X, "help cyclePaste"), but F1 (or just Alt X, "help") led to a NullPointerException, which was no help at all. This bug is now fixed.

    A change in 0.12.1 broke indentation in Java mode (and its derivatives) after "else if", when there were no curly braces around the following code. Also now fixed.

    Plus a couple of XML mode indentation fixes, unrelated to 0.12.1 per se.

  • Jan 16 2002 11:48 AM - Version 0.12.1

    One new feature (vertical rule) and a number of bug fixes and minor improvements.

    Some folks like to have a vertical line displayed inconspicuously at some specific column in the edit buffer as a hint to help them maintain a right margin for their code, out of deference to colleagues who might happen to be display-width-challenged for whatever reason. J now supports this feature. To enable it, put a line like this in ~/.j/prefs:

            verticalRule=80
    The vertical rule will be displayed to the right of the column specified by the verticalRule property. If verticalRule is zero (which is the default), no vertical rule will be displayed. You can use color.verticalRule in your theme to specify a color for your vertical rule. When enabled, the vertical rule is displayed in editable buffers only (and not, for example, when you're reading a man page or working in a directory buffer).

    Command lookup for executeCommand (Alt X), whereIs, and help is now case-insensitive. So you can do, for example, Alt X "help ccgroup", in all lower case, instead of Alt X "help ccGroup", with a capital 'G', which used to be required.

    Syntax highlighting in Perl mode has been made a bit more accurate. Search patterns (e.g. "/foo/"), as well as substitution and translation constructs ("s/foo/bar/", "tr/A-Z/a-z/", etc.), now have their delimiting slashes, together with the "s" or "tr" (or "m" or "y"), highlighted like a function name. The text between the slashes is now highlighted like a quoted string.

    In Perl mode, j is no longer quite as likely to mistake a naked '#' in the midst of a substitution or search pattern for the beginning of a comment, screwing up the syntax highlighting and, in many cases, the indentation of the next line.

    In C mode, j is now less likely to be confused by a macro that looks like a function call, when there is no semicolon at the end of the line. As in:

            ZEND_GET_MODULE(foo)
    In previous versions, this sort of thing would screw up the indentation of the following line(s).

    The code reorganization in version 0.12.0 introduced a bug in the Properties dialog (Alt P) which caused the mode combo box to default to "Autoconf" in all cases, with the unfortunate consequence that if you hit Enter without making any changes in the dialog, the current buffer would end up in Autoconf mode, probably not what you had in mind. This bug is now fixed.

    In previous versions, compile and recompile called saveAll before launching the compiler, to make sure the source that got compiled contained the changes you just made. This caused slightly odd behavior in the case of untitled and remote buffers, which wouldn't normally be compiled in any case. Starting with this version, compile and recompile save only local, ostensibly compilable buffers before launching the compiler.

    Fixed a bug in the Java tagger that caused a NullPointerException if an inner class definition was immediately followed by a semicolon.

    Fixed a formatting problem in mail composition buffers initiated by messageReplyToGroup when there are too many addressees to fit on a single line.

    J now uses the latest versions of the gnu-regexp and BeanShell packages (1.1.4 and 1.2b3, respectively).

  • Jan 9 2002 5:52 AM - Version 0.12.0

    This release adds one brand new feature, plus a substantial cleanup of the FTP code to make saves more reliable, and a great deal of general refactoring and reorganization, for the good of the code.

    The brand new feature is PHP mode, which is used by default for files with extensions of .php, .php3 and .php4. Syntax highlighting for intermingled HTML content is not yet supported.

    In recent versions of j, FTP saves were written directly to the target file on the server. If all goes well, this approach preserves the permissions and ownership of the target file, but if something goes astray, the target file is likely to be truncated or lost.

    Starting with this release, FTP saves are written initially to a temporary file on the server. If that succeeds, the temporary file is then renamed to replace the real target file. Finally, the SITE CHMOD command is used to restore the permissions of the original file.

    This approach works well with the servers I've tested. The target file is much less likely to be damaged if a network problem interrupts the save, and file permissions are still preserved. Word on the street, however, is that not all FTP servers support the SITE CHMOD command, and even those that do can be configured to ignore it, so it may not be possible in every situation to restore the permissions of the original file. Complain to your network administrator.

    Generally speaking, FTP loads and saves are carried out asynchronously, in a background thread. In most cases, the background operation in progress for a particular buffer can be cancelled by pressing Escape while you're in the buffer in question. You can also switch away to a different buffer and continue your work while a long-winded operation runs its course.

    While working on the FTP save code, I was surprised and chagrined to discover that j's autosave recovery feature had no support for remote files. This embarrassing deficiency has now been corrected.

    If j (or the computer) crashes when there are unsaved changes to a remote file, when you restart j you will be asked if you want to recover the file in question. If you say yes, the file is saved locally under the directory ~/.j/recover, with a filename constructed from the remote host name, plus '/', plus the full path of the file on the remote host. (On Windows, of course, ~/.j is C:\.j, in most cases.)

    So, for example, if you were editing /home/peter/.emacs on annie (one of my favorite test files), it would be recovered as:

            ~/.j/recover/annie/home/peter/.emacs
    The full pathname of the recovered file is reported to the user in an informative dialog at the time of recovery.

    Files in the ~/.j/recover tree are never deleted by j, unless the user specifically deletes them in a directory or shell buffer. (rm -rf is your friend.)

    The ~/.j/recover tree is used only for remote files; local files are recovered in place, as before.

    In XML mode, the name and value of the first attribute, as well as the element name, are now shown in the sidebar tree. This makes for a much more informative display, at least in the case of build.xml.

    There are now preferences to control the name and size of the dialog font (which is used for menus, toolbars, and sidebar components as well as dialogs), with the following defaults (you can change them in ~/.j/prefs):

            dialogFontName=Dialog
            dialogFontSize=11

    In mailboxes, message buffers and mail composition buffers, there is now a rudimentary folder tree in the lower pane of the sidebar, showing the folders (mailboxes) that are active in the current session. Not much functionality there yet, but work continues... ;)

    Not to mention a number of minor bug fixes, and small improvements too numerous to enumerate.

    Thanks for your support!

  • Nov 27 2001 6:10 PM - Version 0.11.2

    This release introduces a couple of handy features specific to Java 1.4, together with some minor mail-related improvements, and fixes a number of bugs.

    The addition of features specific to Java 1.4 does not mean that Java 1.4 is required to run j; the j.jar in the 0.11.2 binary distribution works fine with Java 1.3. (For that matter, it works in an emergency with Java 1.2, but you should really be using 1.3, at a minimum.)

    Wheel mouse support has been added, if you're running Java 1.4. It should just work.

    Support for the primary X selection has been added, if you're running Java 1.4 on a Unix platform. When a selection is highlighted in j, you can now transfer it to an xterm (for example) with a middle-button click. Conversely, you can use pastePrimarySelection to paste highlighted text from an xterm into j.

    pastePrimarySelection is not mapped to any key by default. If you'd like to try it out, you might want to add these lines to ~/.j/init.bsh:

            // Map pastePrimarySelection to middle-button single click,
            // just like in an xterm.
            globalMapKey("Mouse-2", "pastePrimarySelection");
            mapKeyForMode("Mouse-2", "pastePrimarySelection", "Java");
    pastePrimarySelection is mouse-aware, but you can't really use executeCommand (Alt X) to invoke it, since the transfer of focus to the location bar when you type in the name of the command will actually change the primary selection and lead to unexpected results.

    If you build j from source, the addition of features that require Java 1.4 has muddied your waters a bit. As an experiment, the current release is built using Ant, rather than the old configure/make system; you'll notice that build.properties and build.xml have appeared in the root directory of the source tree (and elsewhere too, in the case of build.xml).

    With Ant, the general procedure is to change into the root directory of the unpacked source distribution, edit build.properties there to suit your situation, and then do:

            ant all
    possibly followed by:
            su
            ant install
    if you don't mind j installing itself in /usr/local/bin. (You probably don't want to do that on Windows.) Even if you elect to skip the install step, you should end up with a runnable j.jar (as in "java -jar j.jar"), and a reasonable wrapper script (either j or j.bat, depending on your platform), which, of course, you are free to hack on if you want.

    If you're not planning to use Java 1.4, you can leave jdk14 unset in build.properties; the one source file that requires 1.4 (MouseWheelListener.java) just won't get built in that case, which is fine.

    If you do want to use 1.4 and you don't care about earlier versions of Java, the simplest thing to do is to point both jdk and jdk14 at your Java 1.4 JDK. In this case, the resulting j.jar will not work with earlier versions of Java.

    You can also point jdk at your Java 1.3 JDK and jdk14 at your Java 1.4 JDK, and, in theory, the resulting j.jar will work with either 1.3 or 1.4; the distribution binaries are built this way. This works correctly with jikes on Linux, but not on Windows; on Windows, jikes seems to insist on rebuilding .class files with the 1.4-specific classpath, even though they're already newer than the corresponding .java files. There are certainly ways to work around this, but I didn't find one that I really liked. And I haven't tested any of this with javac; I'm too old to wait that long. Feel free to send patches or suggestions.

    The old configure/make build system still works, but if you don't specify a 1.4 JDK when running configure, you'll get an error when compiling MouseWheelListener.java. This error can safely be ignored; if it annoys you, you can delete MouseWheelListener.java.

    The bottom line is that building j is still a bit of an adventure. It should become less so over time, if all goes well.

    In other news, wrapComment is now mapped by default to F12 in Properties mode, as well as in Java and Perl modes. A comment in Properties mode is a line beginning with "# ". For all those multiline comments in your build.properties file... ;)

    When you're in a mailbox, you can now use the location bar to set or change a limit pattern (as an alternative to the normal mechanism involving mailboxLimit and mailboxUnlimit); just append the limit pattern to the location itself. Conversely, the limit pattern that's currently in force is now displayed in the location bar when you're in the mailbox.

    Added ccGroup, not mapped by default but available via Alt X in mail composition buffers when you're replying to a message. ccGroup adds all of the recipients of the original message to the "Cc:" header of your reply, just as if you had initiated the reply with messageReplyToGroup instead of messageReplyToSender. Much easier than starting over.

    In mail composition buffers, with the default key mappings, you can now use Tab and Shift Tab to navigate among the fields in the header area of the message.

    In previous versions, j was not handling multiline "Bcc:" headers correctly in outgoing mail messages (the additional lines were, in effect, appended to the immediately preceding header, which was probably not what you wanted, to say the least). This bug has been fixed.

    Fixed a bug introduced in 0.11.1 that prevented j from loading an HTML message if it contained a <meta> tag that specified a character set different from the one specified in the message's Content-Type header. In this situation, which is a bit off in the weeds in any case, the <meta> tag is now ignored.

    The latest version (1.15) of jikes has a known bug (#2256) that causes a VerifyError at runtime upon invocation of a private constructor of an inner class. Previous versions of j did in fact include several inner classes with private constructors and thus ran into this bug. This has now been fixed.

    With previous versions of j, if you invoked playbackMacro, mapped by default to F8, while recording a macro with recordMacro, mapped by default to F7, subsequent invocation of the recorded macro would result in a stack overflow. This bug has been fixed. playbackMacro is now ignored (with an appropriate warning) when you're recording a macro.

  • Nov 13 2001 5:58 PM - Version 0.11.1

    Bug fixes and performance improvements, with just a couple of minor enhancements.

    By request, you can now specify a true path, rather than just a single directory, for jdkDocPath:

            jdkDocPath=/home/peter/sun/jdk1.3.1/docs:/usr/share/doc/junit-doc/doc
    You can then use jdkHelp, mapped by default to Alt F1 in Java mode, to get API documentation for JUnit (in the current example) as well as for the JDK itself.

    For a long time j has supported several preferences related to font metrics, to allow you to customize the appearance (really the line spacing) of the text in the edit window. In previous versions of j, the only place you could set these preferences was in ~/.j/prefs, which was not particularly convenient if you used different versions of Java, since each version of Java seems to need its own specific settings in this area, which forced you to edit ~/.j/prefs whenever you used a different version.

    Now you can set these (and other) preferences conditionally in ~/.j/init.bsh.

    For example:

            String javaVersion = System.getProperty("java.version");
            if (javaVersion.startsWith("1.4"))
            {
                setGlobalProperty("adjustAscent", "-3");
                setGlobalProperty("adjustDescent", "-6");
            }
            else if (javaVersion.startsWith("1.3.0"))
            {
                setGlobalProperty("adjustAscent", "-2");
            }

    This example uses a new official API:

            void setGlobalProperty(String key, String value)

    You can use setGlobalProperty() to set any property, even if the value is not a string. The string you specify for the value ("1234", "true", etc.) will be converted internally to the appropriate type.

    For a long time j has automatically opened Unicode files and handled them correctly, but only if they contained no non-ISO-8859-1 characters. This ridiculous limitation, which was never intended in the first place, has been removed, and starting with this release j should handle Unicode files correctly no matter what characters they contain. You don't need to do anything special to open a Unicode file; j will recognize the byte order mark and do the right thing.

    findInFiles and replaceInFiles now silently refuse to process binary files. There was never any real support for binary files in the code behind these commands, so skipping them is not only safer but more honest as well. Speaking of Unicode, there's a known bug here: findInFiles and replaceInFiles misidentify Unicode files as binary and skip them too. This bug will be fixed in a future release (or, to put it more honestly, it's not fixed in this release).

    escape, mapped by default to Escape, now cancels the running findInFiles process, if there is one. In previous versions, escape closed the findInFiles output window, but the process itself continued to run. Now, escape kills the process, but leaves the output window open, which is more likely to be what you want to do. Once the process has been killed, a second escape will close the output window. If you really want to leave the process running but get rid of the output window, you can use unsplitWindow (Shift F10), or just click on the close button at the right end of the location bar.

    The recent change from using a dialog box to using an output buffer for findInFiles introduced a memory leak which had particularly bad consequences if the pattern being searched for occurred in many files. This has now been fixed, and it's once again possible to search the Linux source tree for occurrences of "switch" without running out of memory.

    If you specify

            sortBufferList=true
    in ~/.j/prefs, the buffer list is now sorted in case-insensitive alphabetical order. In previous versions, the sort was case-sensitive, for no good reason.

    The dirSortDirectoriesFirst preference is now true by default, so directories appear grouped together at the top of directory buffers, by default, rather than interspersed among the ordinary files.

    mailboxGetNewMessages now respects, rather than clears, the limit pattern that's in effect for the mailbox in question.

    In most cases, the sidebar is now refreshed by the idle thread, instead of by the normal event dispatching code. This should improve overall performance and responsiveness a bit.

    Plus fixes for a number of other bugs too subtle to describe here.

  • Oct 29 2001 9:43 AM - Version 0.11.0

    This release officially introduces and documents compilation buffers, which have been in tne code as an undocumented feature for a long time. Compilation buffers allow you to run compilers within j and provide commands to help you locate and correct compilation errors. The supported compilers include javac, jikes, gcc, and Microsoft C/C++. The full story is in the documentation ("Compilation Buffers"). Note that on Windows, compilation buffers require either Windows 2000 or Windows XP; Win9x won't do.

    With the best of intentions, and thinking it would be no more than a minor janitorial project, after 0.10.2 was released I took out the hard-coded handling of mouse events in Dispatcher.java. For the most part, mouse events are now dispatched through the normal key map mechanism. This is really the right way to do it, and it opens up the possibility of letting the user re-map mouse events, which is clearly a good thing.

    But there was also a consequence I hadn't foreseen: if you're using custom key maps, you won't have any mouse mappings at all until you edit your custom key maps and add the default mouse mappings back in.

    To mitigate this inconvenience, j now supports an alternate mechanism for adding or removing key mappings. The new mechanism has a couple of advantages. For one thing, you no longer have to create or maintain an entire custom key map if you just want to remap one or two keys. In addition, the new mechanism is based on the default key mappings, so when new commands are added to the default mappings in subsequent releases of j, you'll pick them up automatically.

    To implement this new mechanism, j now bundles a substantial subset of the BeanShell scripting engine. On startup, j executes the BeanShell script ~/.j/init.bsh (or, on Windows, C:\.j\init.bsh), if it exists. Commands are provided to add and remove key mappings, either globally or for a particular mode. Once again, the full story is in the documentation ("init.bsh").

    As mentioned, you can now map commands to mouse events. There are some restrictions, however. For one thing, mouse event combinations involving the Alt key are not supported by Java: the Alt key uses the same modifier bit as Mouse-2, and things just go downhill from there. But something like this should work (using the new init.bsh syntax):

            mapKeyForMode("Ctrl Mouse-3", "jdkHelp", "Java");
    In addition, most commands in j don't know about mouse events and won't move the caret to the location of the mouse click before performing the actual work of the command. There are some exceptions to this: selectWord, for example, is mouse-aware, and commands whose names begin with "mouse" (e.g. mouseFindTag) are mouse-aware. The documentation will gradually get updated, and it should be obvious from the source if you're in doubt. Please complain if you would like a particular command made mouse-aware so you can map it to a mouse event.

    Another new feature in this release is jdkHelp, mapped by default to Alt F1 in Java mode.

    jdkHelp displays, in a split window, the JDK documentation for the class whose name is at the current location of the caret or mouse click. So, for example, you can put the caret on "String", hit Alt F1 and get the documentation for java.lang.String. As an alternative, you can use executeCommand to specify the class name explicitly: "jdkHelp String", for example.

    jdkHelp examines the import statements at the top of your .java file to figure out the canonical name of the class in question, so if you're not in Java mode or if the class you're interested in is not imported in the current buffer, you'll need to specify the canonical name yourself: "jdkHelp javax.swing.JFrame".

    When the JDK help window is open, it can be dismissed (and the window unsplit if applicable) by pressing Escape (the default mapping for the command escape, which also does many other useful things, but only one of them at a time).

    To make jdkHelp work, you need to add a line like this to C:\.j\prefs to tell j where your JDK documentation is installed:

            jdkDocPath=C:\\jdk1.3\\docs
    jdkHelp is mouse-aware, but has no default mouse mapping. You can add one if you like by putting a line like this in ~/.j/init.bsh or C:\.j\init.bsh:
            mapKeyForMode("Ctrl Mouse-3", "jdkHelp", "Java");
    (That particular line maps jdkHelp to control right button single click in Java mode.)

    The issues with Java 1.4 beta 2 involving the Tab key and displayed mnemonics in dialog boxes have been fixed. I had mistakenly supposed that these problems were caused by bugs in 1.4; in reality, they were caused by improvements in 1.4.

    In previous versions, j was wrong about the time zone offset on the two days each year when the time changed from daylight time to standard time or vice versa. This bug is now fixed, a day late for most residents of the United States.

    Plus, as usual, a number of other bug fixes and adjustments too minor to mention.

  • Oct 10 2001 6:20 PM - Version 0.10.2

    J now seems to work reasonably well with Sun's Java 1.4 beta 2 on both Linux and Windows. On Linux, there is one remaining problem because of a known bug in the 1.4 beta: monospaced italic fonts aren't really monospaced. The workaround is to change line 52 in the JDK's font.properties file from:

            monospaced.italic.0=-b&h-lucidatypewriter-medium-i-normal-sans-*-%d-*-*-m-*-iso8859-1
    to:
            monospaced.italic.0=-b&h-lucidatypewriter-medium-r-normal-sans-*-%d-*-*-m-*-iso8859-1

    This change gets italics to work with j, but it may have bad effects on other applications, so proceed with caution. According to Sun, the bug will be fixed in beta 3.

    Partly because of this bug, and partly as a convenience for folks who would rather not use an italic font for syntax highlighting even if one is specified by the current theme, you can now disable the use of italic fonts entirely by adding the following line to ~/.j/prefs:

            enableItalics=false

    There are a couple of other minor problems with 1.4. The Tab key does not seem to work for keyboard navigation in dialog boxes. That might not be too bad if one could fall back on displayed mnemonics, but unfortunately there seems to be another bug that keeps the mnemonic letter from being underlined properly in a JLabel, so you don't really know what the mnemonic is. Fortunately j has very few dialogs where this really is an issue.

    In any case, I've been using j with 1.4 beta 2 on Linux for most of my development work recently without any serious problems.

    The command listBindings has been added. It's not mapped to any key by default, but it's available on the Help menu ("Key Bindings"). It displays a list of the key bindings that are in effect in the current buffer. And yes, the command names are left-button-clickable. (If they're not, set your docPath.)

    openFile can now be used to open POP and IMAP mailboxes as well as normal files. openMailbox is retained, for the moment, and is the only way to open a local mailbox in Mailbox mode (which is not, strictly speaking, a supported operation).

    You can also specify POP and IMAP mailboxes on the command line just like files when starting j, using aliases or not:

            $ j inbox
    or
            $ j {peter@annie}inbox

    Aliases are now supported for POP and IMAP mailboxes as well as normal files. The "alias foo here" syntax works with POP and IMAP mailboxes too.

    J itself now defines three system aliases which may not be changed: "prefs" is an alias for j's preferences file (as it has been, in effect, for a long time), "aliases" is an alias for the file that contains the aliases themselves, and "inbox" is an alias for the user's default inbox, if any, as specified in ~/.j/prefs.

    Work is in progress to bring about better consistency between mailboxes and directory buffers, which are, after all, similar things. To that end, dirSetFilter has been renamed dirLimit, dirUnlimit has been added, and dirMarkFile has been renamed dirTagFile. dirOpenFile is now mapped by default to Enter and Ctrl Shift G, dirBrowseFile is now mapped by default to 'b' and Ctrl Shift B, dirLimit is mapped by default to 'l', dirUnlimit is mapped by default to 'L', and dirTagFile is mapped by default to 't'.

    In addition, if you enter a blank string in the mailboxLimit input dialog, any limit pattern that was previously in force for the mailbox in question is removed, which is the way dirLimit (née dirSetFilter) has always worked.

    Like I said, this is work in progress: I haven't done anything about the 'd' or Delete key mappings yet.

    And, as usual, a lot of bugfixes, a few performance tweaks, and some minor adjustments to the user experience.

  • Oct 2 2001 7:51 PM - Version 0.10.1

    One new feature and a number of minor adjustments and bug fixes.

    First of all, the change to a new built-in theme in version 0.10.0 broke themes such as Freefloater that did not specify colors or styles for certain syntactic elements, relying instead on the built-in defaults. Those defaults changed in 0.10.0, and the results weren't pretty. The moral of this story is that you should specify color and style values in your theme for all syntactic elements. Freefloater, in particular, has now been fixed, and the documentation has been updated to indicate that there are no default values for colors and styles.

    The new feature in this release is aliases, which are supported by openFile and executeCommand.

    You can use executeCommand (mapped by default to Alt X) to define an alias:

            alias bookmarks=/home/peter/.mozilla/peter/g2ngy1hj.slt/bookmarks.html

    Then, you can just type "bookmarks" in the location bar's textfield instead of the full name of the file.

    If you want to define an alias for the current file (i.e. the file associated with the buffer that's currently active), you can use "here" as a shortcut:

            alias bookmarks here

    You can also define aliases to be used with executeCommand:

            alias pf=man perlfunc

    If you're not really a command-line type of person, you can bring up a dialog box to set or change the value of an alias by invoking alias with no arguments.

    Full details may be found in the documentation (Alt X, "help alias", follow the link).

    gotoFile (Ctrl Shift G) and browseFileAtDot (Ctrl Shift B) now require whitespace before terminating a filename beginning with "http://", to avoid truncating URLs with appended queries. Trailing punctuation is also stripped. This makes it much more likely that you can just put your caret on the filename and go, without having to select the exact string first.

    In Web mode, character entities are now recognized in attribute values.

    The vertical movement commands (up, down, pageUp, pageDown, etc.) now honor the restrictCaret preference introduced in 0.10.0.

    In previous versions, indentLine, indentRegion, and indentLineOrRegion have left lines unchanged as long as the non-whitespace text on the line starts in the correct column. You can now change this behavior by adding the following line to ~/.j/prefs:

            indentLineFixWhitespace=true
    If indentLineFixWhitespace is true, the indentation commands will also make sure that the whitespace at the start of the line consists of the optimal mix of tab and space characters, depending on the settings of the useTabs, tabWidth and indentSize properties for the current buffer. indentLineFixWhitespace is false by default, which keeps whitespace-only changes to a minimum.

    print is now mapped to Ctrl P.

    executeCommand (mapped by default to Alt X) now displays an error message instead of failing silently if you try to execute a misspelled or otherwise unknown command.

    The code that tries to adjust j's initial window placement on Linux has been greatly simplified. It seems to work at least as well as it ever did, but maybe that's just in my environment. Let me know if you encounter any anomalies.

    J should now be able to find its help files with less help from the user, so F1 is more likely to work right out of the box (so to speak). Worst case, you can still add a line to ~/.j/prefs (or C:\.j\prefs) to specify where the documentation directory is located:

            docPath=/home/peter/j-0.10.0/doc
    or
            docPath=C:\\armedbear\\j\\doc
  • Sep 23 2001 5:30 PM - Version 0.10.0

    if you've been using j right along, one of the first things you'll notice with this release is that your previous editing session is not restored. This should only happen once. The way in which sessions are saved and restored has changed, in preparation for future functionality (named sessions). Sessions saved with the new version of j should be restored correctly the next time j is started. I apologize for any inconvenience this may cause.

    Another noticeable change, in response to a number of complaints from the field, is that the built-in theme, which is what you get if you don't specify a theme in ~/.j/prefs, is now derived from Kodiak rather than from AnokhaClassic. If you actually prefer the old built-in theme, you can have it back again by specifying AnokhaClassic in ~/.j/prefs:

            theme=AnokhaClassic

    On the subject of appearance, the new built-in theme, like Kodiak (which is basically the same thing), uses bold and italic fonts. Not all fonts come in a bold version (Lucida Console on Windows comes to mind). If your favorite font has this problem, you can add the following line to ~/.j/prefs:

            emulateBold=true
    If you set emulateBold to true, j will emulate a bold font by doing a paint trick with the plain font. You should only set emulateBold to true if you're actually using a font that needs this special treatment.

    This version also introduces some behavioral changes. In the old days, openFile brought up a minimal dialog box. More recently, openFile has used the location bar for user input. Starting with this release, executeCommand, findTag and incrementalFind also get their input from the location bar. All of these commands still support completion (with Tab and Shift Tab) and history (with the up and down arrow keys, or Ctrl P and Ctrl N) just like they used to when they used a dialog box. All commands that use the location bar for input can be cancelled by pressing Escape.

    Starting with this release, j can display its own help files. This means help, mapped by default to F1, brings up j's documentation within j itself, without invoking an external browser. One less mouth to feed, and another excuse to use a bold font.

    As in previous versions, j makes an attempt to guess where your documentation is installed, but in most cases you will need to add a line to ~/.j/prefs (or C:\.j\prefs) to specify where the documentation is:

            docPath=/home/peter/j-0.10.0/doc
    or
            docPath=C:\\armedbear\\j\\doc
    (Note that on Windows double backslashes are necessary; your docPath may vary.)

    By request, column selection is now supported. You can select a column by putting the caret at one corner of the column in question and control shift left clicking with the mouse at the opposite corner. When a column is selected, killRegion, mapped by default to Ctrl X, copyRegion, mapped by default to Ctrl C, and delete, mapped by default to Delete, act on the selected column. copyRegion and killRegion save a copy of the column which can subsequently be retrieved (and inserted in the buffer) using pasteColumn. See "Columns" in the documentation for details.

    Column selection is one area where the user experience still needs tuning. There's no way to use the keyboard to select a column, for example, and there's no good reason why you should have to use pasteColumn instead of just paste. But it's a start, and tomorrow is another day...

    findInFiles now provides a "List occurrences" option, which does what its name suggests.

    The output of findInfiles, whether or not "List occurrences" is specified, is now sent to an output buffer, splitting the current window if necessary, rather than to a dialog box as in previous versions.

    The findInFiles output buffer works like the listOccurrences output buffer. You can move around in the output buffer and hit Enter (or Ctrl Shift G, findOccurrenceAtDot) to go to the source file location that corresponds to the line the caret is on in the output buffer. escape, mapped by default to Escape, closes the output buffer (and unsplits the window); listFiles, mapped by default to Ctrl L, gets it back again.

    Left button double click and middle button single click are now mapped to findOccurrenceAtDot in List Occurrences buffers (including findInFiles output buffers).

    By default, home and end no longer move the caret to the beginning or end of the buffer when invoked repeatedly in quick sequence, but if you like that sort of thing, you can still have it by adding these lines to ~/.j/prefs:

            extendHome=true
            extendEnd=true

    Added imageFit and imageRestore, mapped by default to 'f' and 'r', respectively, in image buffers. imageFit scales the image to fit the current display window, preserving the aspect ratio of the original; imageRestore restores the image to its original size.

    imageToggleFullScreen has been removed. It never really worked right.

    revertBuffer should work correctly now in image buffers.

    Added Scheme mode, for all your .scm files. Lisp mode should also work a bit better now. In shell buffers, closeParen is now mapped by default to ')', which is very useful if you're running a Lisp or Scheme session in your shell buffer.

    If you would like the caret to be restricted to the actual text on the line (including leading and trailing whitespace), add this line to ~/.j/prefs:

            restrictCaret=true
    If restrictCaret is true, right, at the end of the line, advances the caret to column 1 of the following line.

    Finally, if you would prefer the buffer list to be kept in case-sensitive alphabetical order, you can have your way by adding this line to ~/.j/prefs:

            sortBufferList=true
    Plus way more than the usual number of minor bugfixes, quite a few changes too minor to mention, and two or three new undocumented features for the bold and inquisitive.

  • Jul 19 2001 4:37 PM - Version 0.9.3

    Bug fixes and one minor feature.

    The minor feature is doShellCommandOnRegion, not mapped to any key by default but available from the Execute Command dialog. doShellCommandOnRegion prompts for a shell command (typically a filter, like "sort", for example, or "tr A-Z a-z") and runs the command you specify with the contents of the selected region as input. When the command finishes, the selected region is replaced with the output of the command. Using "sort" as the shell command, for example, is equivalent to j's built-in command sortLines.

    doShellCommandOnRegion is an experimental feature, not enabled by default. To use experimental features, add this line to ~/.j/prefs:
            enableExperimentalFeatures=true
    If you want to use doShellCommandOnRegion on Windows, you need to have the Cygwin tools installed, and sh.exe must be in your path.

    J works a bit better now with Sun's Java 1.4 beta, although on Linux, at least, there are still extra repaints in a number of situations. While I was adding special-case code for 1.4, I removed a bunch of special-case code for earlier Java versions (1.2.2 and before). Please let me know if I inadvertently broke something in your favorite environment.

    In any case, Java 1.3 is recommended now for both Linux and Windows. In recent days Blackdown has released 1.3.1 and IBM has released a new build (cx130-20010626) of 1.3.0 for Linux. The IBM release fixes the control key problem in their previous release. Onwards!

    Accented letters (like the 'ä' in "März") are now handled correctly by the parser in directory buffers.

    Perl mode indentation now handles backslash escapes correctly (or at least better than before), regardless of whether or not they're in quoted strings.

    (It might be worth mentioning parenthetically that Perl mode gets confused right away by quoted strings that span multiple lines. Fixing this is a big deal, so in the meantime you might want to avoid multiline quoted strings in your Perl code. Sorry for the inconvenience!)

    Fixed XML mode indentation to recognize start and end tags more precisely, avoiding stairstep over-indentation in certain situations.

    describeKey now works correctly when invoked with its default key mapping (Alt K), rather than returning prematurely with the unhelpful message, "null is not mapped".

    Location bar activity is now cancelled cleanly if you change your mind and click in the edit window or sidebar with the mouse.

    It should now be easier to cancel long operations in POP and IMAP mailboxes, operations like opening the mailbox in the first place or retrieving new messages. You can cancel these operations by pressing the Escape key or by clicking on the Stop button in the toolbar, and with this release it's more likely to work.

    Continuation lines in the address lists ("To:", "Cc:", "Bcc:") of outgoing mail messages are now handled correctly.

    Tracked down an initially hard-to-reproduce bug that caused truly weird behavior if you switched away from a mailbox that contained a marked region and then switched back to it again (the mailbox was repainted with the contents of an entirely different buffer). This bug is now fixed.

    J now uses the latest version (1.1.3a) of the gnu-regexp package.

  • Jul 4 2001 7:20 PM - Version 0.9.2

    Bug fixes only.

    In version 0.9.1, if you ran j without a toolbar, a NullPointerException would occur if you edited and saved your preferences file. Fixed.

    In previous versions, if you used the View menu to toggle the toolbar either on or off while you were in the process of editing your preferences file, the toolbar might get toggled back to its previous state when you saved the file, depending on a number of incidental circumstances. Fixed.

    J does a better job now of scrolling the display horizontally to bring the caret into view when it has moved past the right edge of the edit window. In previous versions, this did not always work correctly when the characters on the line in question varied in width, as might be the case if your theme uses a bold or italic font. (J still doesn't fully support proportional fonts, but we seem to be moving in that direction.)

    And a few other adjustments too minor to mention.

  • Jun 24 2001 11:59 AM - Version 0.9.1

    By request, this release introduces print, not mapped by default but available on the File menu. print does what its name suggests, i.e. it prints stuff on your printer. If you've selected a block of lines, only the selected lines are printed; otherwise, you get the whole buffer. A minimal confirmation dialog is presented in case you didn't really mean it.

    Removed all default key mappings that involve the numeric keypad. All of the commands involved have other default mappings, so it's only a small loss, and now you should be able to type all the numbers correctly with the numeric keypad when NumLock is on. The displaced commands are killRegion, copyRegion, paste and undo. If you're looking for their other mappings, whereIs is your friend (on the Help menu).

    Added mailboxTagPattern, which tags messages in a mailbox that match a specified pattern. mailboxTagPattern is mapped by default to Ctrl T in Mailbox mode. It supports the same set of patterns supported by mailboxLimit.

    Added date matching ("~d date1-date2") to the set of special patterns supported by mailboxLimit and mailboxTagPattern. Full documentation is provided in the entries for these commands in doc/commands.html (Alt X, "help mailboxLimit").

    Incoming messages that have been deleted without ever having been read are no longer counted as new or unread.

    When there are new undeleted messages in a mailbox, the mailbox's icon in the sidebar buffer list changes to reflect that fact, and the number of new undeleted messages is reported in parentheses after the mailbox name.

    When you delete a message with mailboxDelete, mapped by default to 'd' in Mailbox mode, the caret is automatically advanced to the next line. By default, the caret is also advanced when you use mailboxUndelete, mapped by default to 'u'. By request, this behavior is now configurable in the undelete case. If you add this line to ~/.j/prefs:
            undeleteAdvanceDot=false
    the caret will not be advanced to the next line when you undelete a message.

    By request, you can now add a line like this to ~/.j/prefs:
            eom=" [EOM]"
    If such a line is present, j will automatically append the specified string (in the current example, " [EOM") to the subject line of an outgoing mail message if the body of the message is empty and there are no attachments.

    By request, send in mail composition buffers is now mapped by default to Ctrl Enter.

    By request, added foldRegion, not mapped by default but available from the Execute Command dialog (Alt X). foldRegion does what its name suggests.

    Folding has graduated (it's June, after all) and is no longer an experimental feature.

    In XML mode, attribute names and attribute values now get separate syntax highlighting. The attribute name uses XmlMode.color.attribute, as before, but the attribute value uses XmlMode.color.string, which is probably not the same as XmlMode.color.attribute, depending on your theme.

    In addition, the '=' between the attribute name and the attribute value is now highlighted separately too. It uses XmlMode.color.equals, which defaults to XmlMode.color.delimiter (which is mainly used for the angle brackets around the tags) if it's not explcitly set.

    AnokhaClassic, Kodiak, and Freefloater, in the j themes directory, have been updated to support the new XML syntax highlighting features.

    Shell buffers now strip ls colorization escape sequences, for a more sensible display.

    This version of j works tolerably (but by no means well) with Sun's recently released beta of Java 1.4. There's much more work to do, both for me and for Sun. Previous versions of j don't even get out of the bag with the Java 1.4 beta.

    If you do try j with Java 1.4, there appears to be an odd interaction with the Sawfish window manager (I'm running version 0.38) on Linux. When I run j with 1.4, if I subsequently run it with, say, Sun 1.3.1, j has serious paint and window placement problems until I restart X (just restarting Sawfish is not enough). The same problem does NOT occur, by contrast, when I run Enlightenment as my window manager. It may just be my setup, however; both Sawfish and Enlightenment, not to mention j, are almost pathologically configurable.

    Plus many bug fixes, a few cosmetic changes of questionable merit, and the usual complement of unnoticed regressions.

    Thanks for your support!

  • May 6 2001 6:43 PM - Version 0.9.0

    This release introduces folding. For now, folding is an experimental feature, available only in Java, C, C++ and Perl modes.

    To use experimental features, you need to add this line to ~/.j/prefs:
            enableExperimentalFeatures=true
    Once the details are fully worked out, folding will graduate from experimental status and will be made available in other modes, too.

    Folding lets you temporarily hide areas of the buffer to create an outline view. The hidden areas are still present in the buffer, and they are still visible (so to speak) to operations such as find, replace, findTag, jumpToLine, etc. If such an operation takes you to a folded area, the fold is expanded automatically.

    The command fold, mapped by default to Ctrl [ (control left bracket), creates a fold at the current location of the caret (more or less). A '+' appears in the left margin of the edit window to indicate the fold. Clicking with any mouse button on the '+' will expand the fold, or you can move the caret to the line in question and use the command unfold, mapped by default to Ctrl ] (control right bracket).

    J tries to be smart about folding. Or, to put it another way, j's current implementation of folding is deliberately sloppy. For example, unfold always unfolds the next fold (where "next" means "further down in the buffer"), if there is one, even if it's not particularly near the current location of the caret.

    If you have a working middle mouse button, clicking it in the whitespace to the left of the text on any line will most likely either fold or unfold something, depending on the exact situation. Try it out. (I've never been able to get the middle mouse button to work in j under Windows, but maybe you can.)

    The saving grace to all this sloppiness is that both fold and unfold are fully undoable (and, for that matter, redoable), so if you try something and don't like the result, undo, mapped by default to Ctrl Z, is your friend (and redo, mapped by default to Ctrl Y, is your uncle).

    The command foldMethods, not mapped by default but available from the Execute Command dialog box (Alt X), folds all the methods (or functions) in the current buffer, giving you a kind of top-level outline view.

    The command unfoldAll, also not mapped by default but available from the Execute Command dialog box (Alt X), unfolds all the folds in the current buffer, restoring things to a reasonably normal state.

    These four commands (fold, unfold, foldMethods and unfoldAll), together with the aforementioned middle-button mouse trickery, should be considered just a first attempt to support folding in j. As you can probably tell, I'm not entirely sure how this feature should work. I've had several requests for it, however, so I'm hoping that those of you that like this sort of thing and have precise ideas about it will send me mail with specific suggestions. I believe the code that does the actual folding and unfolding is pretty solid, so it's really just a question of deciding what commands should be provided to expose the functionality and figuring out exactly how those commands should work.

    In other news, j now does a better job of handling mail with character encodings other than ISO-8859-1 or US-ASCII. The Russian spam that occasionally shows up on the Linux kernel list is displayed correctly now, for example, and bounceMessage seems to work correctly with it, too.

    The Save As and Save Copy dialogs now provide a default filename in the textfield of the dialog box. In addition, you can now specify a directory as the target, in which case the file is saved in that directory with its current name.

    J now uses the latest version (1.1.2) of the gnu-regexp package.

  • Apr 21 2001 9:25 PM - Version 0.8.3

    This is a bug fix release with a little bit of new functionality.

    First off, though, some information about a bug that's not fixed. With Java 1.2, on what seems to be a small number of machines, the display is not painted correctly (sometimes text gets overlaid by other text, sometimes the whitespace between words disappears). This problem has been reported on both Windows and Solaris. In the cases I've investigated, upgrading to Java 1.3 has made the problem go away. Internally, what seems to be happening is that with Java 1.2, getStringBounds() in java.awt.Font does not always return the correct width if the string in question is all whitespace. This breaks the code introduced in 0.8.0 to support proportional fonts. I'd rather not make the code any trickier than it is by trying to work around this problem, particularly since I can't reproduce the bad behavior on any of my machines. To sum up, if things don't look right with Java 1.2, try Java 1.3.

    The command whereIs has been added. It's not mapped by default, but it's available on the Help menu. whereIs tells you what key(s) a given command is mapped to, in case you forget.

    describeKey, mapped by default to Alt K, works better now with keystrokes that don't have modifiers, like 'd' in Mailbox mode, and with keystrokes that aren't mapped at all.

    In Java mode, extended classes and implemented interfaces are now listed in the sidebar tag list, at the top of the class in question. In addition, the tag list for an interface should be accurate now even if a method declaration contains a "throws" clause, and the correct icon is used for interfaces in the tag list.

    The Java mode formatter (which is also used for C and C++) now recognizes keywords correctly even if they are followed by an opening parenthesis with no intervening whitespace (as in "if(foo)").

    J now uses the correct content type ("image/png", for example) for image files attached to an outgoing mail message if the file's extension is .png, .jpeg, .jpg, or .gif.

    RFC2047 decoding of mail headers is much improved.

    Images attached to (or embedded in) incoming mail messages are now handled correctly even if two or more images have the same filename.

    POP3 mailboxes now get saved in the background under most circumstances, which makes it a bit quicker to close them (or close j).

    sendMailExpand, which was mapped by default to Alt Space and Alt / and provided completion of mail addresses in mail composition buffers, is now obsolete. Its functionality has been folded into expand, which is mapped by default to Alt Space and Alt / in all modes. If you have a mode-specific keymap for Send Mail mode, you should remove any mapping you have for sendMailExpand, and possibly add one for expand.

    The magic address book now promotes mail addresses to the head of the list when they are actually used in an outgoing message, so completion with expand in the header area of mail composition buffers will tend to come up with the address you really want a lot sooner.

    The Reply button on the toolbar in message mode is now hooked up correctly.

    In previous versions, if you tried to set an integer property (like fontSize) in ~/.j/prefs, j would get confused if there was trailing whitespace on the line. This is now fixed.

    In previous versions, unsplitWindow would cause j to hang if the sidebar was not visible. This is now fixed.

    In previous versions, saving any change to ~/.j/prefs caused the toolbar to reappear even if it was unchecked on the View menu. This is now fixed.

    The menu and toolbar are now reset correctly when you use the mouse to switch from one window to the other in a split-window situation.

    HTML mode no longer supports a tagger. The original intention was to provide a list of embedded JavaScript functions (if any), but the implementation, which just used the Java tagger, was seriously deficient, so the functionality has been removed until it can be implemented correctly.

    J now uses version 1.1.1 of the gnu-regexp package. In the meantime, version 1.1.2 has been released; we'll probably move to that next time.

    Specifying just "prefs" (without the quotes) when opening a file, either in the location bar or on the command line, should now correctly open j's preferences file (~/.j/prefs). If you want to open some other file called "prefs" in the current directory, specify "./prefs" (or use the full path). In previous versions this behavior was not entirely consistent.

  • Mar 12 2001 8:27 PM - Version 0.8.2

    This release introduces new icons for the sidebar tag list and fixes a few more bugs.

    Mikol has provided new icons for the sidebar tag list, replacing the old ones that were on loan from the XML mode tree. In Java mode, the new icons have visibility indicators to distinguish public, private and protected fields and methods. The absence of a visibility indicator indicates default (package) access.

    In Java mode, the sidebar tag list now handles interfaces and abstract and native functions correctly.

    Fixed some breakage in j's handling of keyboard focus that crept in when split window support was introduced. The most common symptom was that focus would occasionally get stuck in the sidebar buffer list; recovery was difficult once j got into this state. The problem did not seem to occur on Windows, but it was very annoying on Linux. In any case, I believe it's fixed now; please let me know if I'm wrong.

    The Delete button is now hooked up correctly in mailbox mode.

  • Mar 5 2001 6:18 PM - Version 0.8.1

    This release just fixes a few bugs.

    As initially coded, the location bar, introduced in 0.8.0, was pretty adamant about displaying the full name of the current directory to the right of the filename edit field. Under some circumstances (if the directory name was particularly long, or if the main window was not very wide) this prevented the user from moving the vertical divider to the right to make the sidebar wider. This bug has now been fixed. While I was at it, I also fixed the corresponding bug in the sidebar itself, which prevented the user from moving the vertical divider to the left to make the sidebar smaller beyond a certain point (which, not coincidentally, corresponded to the width of the sidebar's label). It should now be possible to make the sidebar as wide or as narrow as you like (within reason).

    Fixed the display code to avoid ArrayIndexOutOfBoundsExceptions when the current line is much wider than the edit window and the caret is very far off screen to the right (a relatively rare combination of events, but not unheard of).

    Fixed a loop-forever bug triggered by specific (and fairly unlikely) invalid input in the Java tagger, which constructs the sidebar tag list in Java mode and its derivatives (C, C++ and JavaScript modes).

    Fixed a small menagerie of indentation buglets in Java and Perl modes.

    Reorganized the code that controls when the wait cursor (or hourglass) is displayed, as opposed to the normal mouse cursor. In general things should work better now in this respect, but I may have missed a case or two, so if an hourglass is up for a very long time and you fear j is hung, try hitting an innocuous key or two to see if maybe I just forgot to take down the hourglass (and please let me know the circumstances if this should occur).

  • Feb 25 2001 6:01 PM - Version 0.8.0

    This release introduces split window support.

    For a long time j has supported the use of multiple top-level windows, using commands like newFrame (mapped by default to Ctrl Shift N) and openFileInOtherFrame (Ctrl Shift O). This release adds the command splitWindow, mapped by default to F10, which splits the current edit window without creating a new frame. You can undo the damage with unsplitWindow, mapped by default to Shift F10, and you can move from one window to the other with otherWindow, mapped by default to Alt O.

    listOccurrences, mapped by default to Alt L, and listOccurrencesOfPatternAtDot, mapped by default to Ctrl Alt L, now use a split window to display their results. If the window isn't split already, these commands split it unequally, with the smaller, bottom window containing the occurrences list. When you're done with the occurrences list, you can use the handy command escape, mapped by default to Escape, to close the occurrences list and unsplit the window in one stroke.

    Split windows introduce the need for some way to indicate what buffer is displayed in each of the windows. J's former approach of displaying information about the active buffer in the frame's title bar is no longer entirely adequate. So now j features a location bar at the top of the edit window, beneath the toolbar. If you split windows, each window has its own location bar. The location bar contains an edit control for the name of the file displayed in the window (it will be blank for buffers that don't display a file) and a static text control (to the right of the edit control) for the current directory.

    openFile, mapped by default to Ctrl O, now simply sets focus to the edit control of the current window's location bar, instead of bringing up a dialog box. Just type in a filename and press Enter. Completion (using the Tab key) and history (using the up and down arrows) are supported in the location bar's edit control just as they were in the Open File dialog. If you're mouse-oriented, you can just click into the edit control to begin with, skipping Ctrl O.

    Added the command findTagAtDotOtherWindow, which jumps to the definition of the function at the current location of the caret, using the other window (splitting the current window if necessary). It's mapped to Ctrl Alt . (that's control alt dot) in Java mode and its derivatives. Keyboard focus stays in the original window.

    Added the command openFileInOtherWindow, mapped by default to Ctrl Alt O, which does what its name suggests, splitting the current window if necessary.

    There are several new preferences related to the appearance of text in the edit window.

    You can turn on Java2D antialiasing by add this line to ~/.j/prefs:
            antialias = true
    In some cases, turning on antialiasing will actually make things look worse; you'll need to try it out for yourself to see if it helps in your particular situation.

    Adding antialiasing support broke the rather simpleminded way j has always calculated the location of the caret, so j now uses a much more general and robust approach to this problem. A side effect of this is that it's now possible to use bold and/or italic styles even if the average character width of the bold and/or italic font differs from the average character width of the plain font.

    In the past, j has taken at face value the dimensions reported by Java for the display font. Particularly on Windows, however, these dimensions do not always result in optimal line spacing. So now you can make ad hoc adjustments:
            adjustAscent  = -1
            adjustDescent = -1
            adjustLeading = -1
    You can specify any numeric value you like for these adjustments, but only small positive or negative adjustments are likely to be useful. In each case, the default is zero. The adjustment you specify is added to the default value for the corresponding dimension of the display font. Negative values tend to reduce the line spacing, giving you more lines in the same vertical space. Once again, you will need to experiment with these values to determine what adjustments (if any) are useful in your particular case.

    In Java mode (only) the fields as well as the methods of a class are now shown in the sidebar tag list. Cryptic icons have been added to help you tell at a glance which is which.

    By default, files whose names end with ".cxx" and ".hxx" are now opened in C++ mode. In addition, the sidebar tag list should be much more accurate for C++ files now (although it's still far from perfect).

    Added the command copyXPath, with no default mapping, for XML mode. This command, like copyPath in directory buffers, copies the path of the current element to the clipboard so you can paste it somewhere.

    Added the commands binaryMode and defaultMode, not mapped by default, which do what their names suggest.

    Added a new light-background theme, Kodiak.

    Plus the usual menagerie of minor bug fixes, barely perceptible improvements, and unnoticed regressions.

  • Feb 7 2001 6:57 AM - Version 0.7.1

    This release fixes a couple of minor bugs in 0.7.0.

    wrapComment should now work correctly with files containing actual tab characters. wrapComment is mapped by default to F12 in Java, C, C++ and Perl modes. wrapComment's Perl support is new in 0.7.1.

    Duplicate mappings to support IBM Java 1.3 for Linux have been added to the Java mode and Perl mode keymaps. Without them, IBM 1.3 for Linux does not recognize the F11 and F12 keys correctly, at least from j's point of view, so the mappings for wrapComment (F12) and toggleWrap (Ctrl F12) weren't working.

    Fixed a performance problem that affected both listOccurrences, which lists all the occurrences of the last search pattern in the current buffer, and listOccurrencesOfPatternAtDot, which does what its name suggests. listOccurrences is mapped by default to Alt L, and listOccurrencesOfPatternAtDot is mapped by default to Ctrl Alt L.

  • Feb 4 2001 6:10 PM - Version 0.7.0

    This release documents j's mail support, which has been hiding in the code for several months now. J supports POP, IMAP and SMTP, but not (officially) Unix mbox-style mailboxes, although you can in fact open them (read only) with openMailbox. So if you use POP or IMAP to get your mail and SMTP to send it, you can use j as your mail client. For details on how to set things up, see the documentation (mail.html in the doc directory).

    Mail support is quite new, compared to the rest of j, and it is still classified as an experimental feature, so expect bugs and let me know when you find them.

    J's word wrap functionality has been improved. The command wrapRegion has been added. It's not mapped to a keystroke by default, but it's available from the Execute Command dialog box (Alt X). It reformats the selected block of lines using the value of wrapCol that's in effect for the current buffer, which may be specified in the Properties dialog (Alt P). You can set global and/or mode-specific defaults for wrapCol in ~/.j/prefs:
            wrapCol = 72
            JavaMode.wrapCol = 80
    The command wrapComment has also been added, and mapped by default to F12 in Java mode (and its derivatives). You can use wrapComment to reformat a multi-line block of "//" style comments. It doesn't currently handle "/* ... */" style comments, or "//" style comments that follow code on the same line.

    Finally, there's toggleWrap. This command, mapped by default to Ctrl F12, lets you toggle automatic word wrap in the current buffer. When automatic wrap is on, j automatically wraps long lines as you type them, when your caret advances past the wrap column. Automatic wrap is on by default in mail composition buffers. Automatic wrap is not yet supported for comments in Java mode.

    For clarity, the behavior of findNextWord and findPrevWord has been changed, or more precisely, it has reverted to the behavior found in versions of j prior to 0.6.0. These commands now once again find the next or previous occurrence of the word at the current location of the caret. A word is a sequence of characters that are legal in an identifier in the current mode (think of an identifier in Java or C). If a pattern is selected on the current line, the first word of the pattern is used as the search string, rather than the entire pattern. (In 0.6.x the entire selected pattern was used, but ambiguity crept in when a pattern was selected as the result of a previous search, which might or might not have used the "Whole words only" option. Even I was getting confused, and I wrote the code.)

    By contrast, listOccurrencesOfPatternAtDot does use the selected pattern on the current line, if there is one; if there is no selection, it too uses the word at the current location of the caret. listOccurrencesOfPatternAtDot finds all the occurrences at once, so no ambiguity can creep in.

    For consistency, all the toolbars now start with New, Open, Save and Close buttons on the left. The Save button is disabled when it doesn't make sense (and sometimes even when it does).

  • Jan 16 2001 8:41 PM - Version 0.6.6

    Java 1.2 or later is now required. The configure script has been updated accordingly.

    J now supports drag and drop from the Windows Explorer. (Thanks to Todd Fast for the code to do this.)

    Added browseFileAtDot, mapped by default to Ctrl Shift B. browseFileAtDot invokes the default browser to view the file or URL at the location of the caret. You can specify the default browser by adding a line like this to ~/.j/prefs:
            browser = /usr/bin/mozilla
    Added copyPath, not mapped by default but available from the Execute Command dialog box (Alt X). copyPath only works in directory buffers. It copies to the clipboard the full pathname of the file on the line containing the caret.

    Added sortLines, not mapped by default. sortLines is a very rudimentary command to sort a selected block of lines in ascending lexicographic order, based on the Unicode value of the characters in the line. (Maybe one day j will have a fancy line-sorting command. This isn't it.)

    Added insertChar and insertByte, not mapped by default. insertChar prompts for a Unicode character, which may be entered as a decimal, hexadecimal, or octal number, and inserts it at the location of the caret. insertByte prompts for a byte, which also may be entered as a decimal, hexadecimal, or octal number, and inserts the Unicode character that corresponds to the specified byte in the default character encoding. To specify the default character encoding, add a line like this to ~/.j/prefs:
            defaultEncoding = ISO8859_2
    Directory buffers now show the total file size.

    Image buffers now have working scroll bars.

    And a number of improvements too minor to mention, bug fixes, and internal reorganizations.

  • Dec 5 2000 1:03 PM - Version 0.6.5

    Yesterday's 0.6.4 release introduced an unintended dependency on Java 1.3 when building j. This dependency has been removed, and you should once again be able to build j with Java 1.1.8 (or any later version).

    With 0.6.4, a NullPointerException would occur if you used revertBuffer to reload a remote buffer (FTP or HTTP) but cancelled the operation before it was finished. This is now fixed.

  • Dec 4 2000 6:40 PM - Version 0.6.4

    Added windowUp and windowDown, mapped by default to Ctrl Up and Ctrl Down, respectively. These commands move the window up or down one line, making the text in the window seem to move one line in the opposite direction, without changing the location of the caret.

    dirDoShellCommand, mapped by default to '!' in directory buffers, now uses the file on the line containing the caret if no files are marked. dirDoShellCommand is an experimental feature, so you need to have the following line in ~/.j/prefs if you'd like to try it out:
            enableExperimentalFeatures = true
    Since the beginning of time, j has used the ISO-8859-1 encoding when loading and saving files. Not everyone uses ISO-8859-1, however, so j now supports a new defaultEncoding preference. For example:
            defaultEncoding = ISO8859_2
    Note that the names of the supported encodings may vary slightly from what you might expect (it's a Java thing).

    Empty XML buffers no longer generate a parser error.

    gotoFile, mapped by default to Ctrl Shift G, now understands line numbers, as in
            Editor.java:188
    You need to select the entire filename, including the line number, for this to work.

    Shell buffers now handle pushd, popd, and "cd -" correctly (or at least better than before). (Shell buffers are another experimental feature, and they require jpty, which is not part of the binary distribution.)

    Added httpToggleHeaders, with no default mapping (it's available from the Execute Command dialog box, which is mapped by default to Alt X). This command toggles the display of request and response headers in HTTP buffers. Headers are not displayed by default, but you can change this by adding this line to ~/.j/prefs:
            httpShowHeaders = true
    J now supports HTTP proxies, or at least Squid. To specify an HTTP proxy, add a line like this to ~/.j/prefs:
            httpProxy=192.168.1.1:3128
    You can specify a "User-Agent" header for j's HTTP requests by adding a line like this to ~/.j/prefs:
            httpUserAgent = "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt)"
    (Who do you want to be today?)

    J now handles Microsoft's FTP site (ftp.microsoft.com) correctly. Embrace and extend... ;)

    The command line syntax for opening a file at a specific line number should now work correctly in all cases:
            j +243 Editor.java
    describeKey now correctly describes '!' in directory buffers (mapped by default to dirDoShellCommand).

    Wally Brock contributed a new theme, "Contrast".

  • Nov 15 2000 8:20 PM - Version 0.6.3

    Many common FTP and HTTP operations are now non-blocking. This includes loads and saves, but not yet reloads or dirGetFile (their day will come; the goal is ultimately to make all such operations non-blocking).

    This means that when you use j to open, say, http://armedbear.org/changelog.html, you will no longer see a modal progress dialog with a Cancel button. Instead, you'll see an empty buffer and an hourglass, with progress information displayed in the status bar. While the file is loading, you're free to switch away and work on a different buffer. You can use escape, mapped by default to the Escape key, or killBuffer, mapped by default to Ctrl W, to cancel a pending load operation and close the empty buffer. escape can also be used to cancel a pending save operation.

    In previous versions, j employed a rather convoluted scheme when saving an FTP buffer. The file was first saved to a temporary file on the server with an arbitrary file name, and then, when the save had completed successfully, the temporary file was renamed to replace the original file. This approach had the advantage that the original file was left intact if, for one reason or another, the save failed to complete.

    There were drawbacks to this approach, however. Although the original file was preserved when a save failed, on a bad day the target directory tended to fill up with orphan temporary files. In addition, there was no way to preserve the permissions of the original file.

    This behavior has now been changed. J now saves FTP files in place, in the most straightforward way possible, writing directly to the target file. This means that a failed or aborted save will truncate the target file. This is not a good thing, but this is the way FTP clients normally work. The big advantage to this approach is that file permissions are preserved.

    When saving a remote file, j tries to verify that the file has not been changed on disk since it was originally loaded for editing. Since we're now saving remote files in place, a partial save actually touches the remote file itself, rather than a temporary file on the remote machine, so if you retry a cancelled save, you will very likely be warned that the target file has changed on disk, and you will be prompted to confirm the save operation.

    J now does backups of FTP saves. All backups (of both local and remote files) are stored in j's backup directory, which, by default, is ~/backup on Linux and C:\backup on Windows. You can change this location by adding a line like this to ~/.j/prefs:
            backupDirectory=/home/peter/.j/backup
    In any case, after an FTP save, whether successful or not, the backup directory should contain a copy of the original file, either as originally loaded or as last successfully saved.

    Please let me know if you have any problems with the new FTP functionality. It's not quite there yet in every respect, but I hope we're moving in the right direction.

    The recent introduction of a horizontal scroll bar caused a serious performance problem when editing large files. J was scanning after each change to the buffer to see how long the longest line was, in order to set the proportions of the horizontal scroll bar correctly. This problem has now been fixed by moving the scanning activity to the idle thread. This means that it's now possible for the proportions of the horizontal scroll bar to be wrong immediately after a change to the buffer, but they should always be corrected after 500 milliseconds of user idleness. As a famous man once said, if you don't like the weather, wait a minute.

    It was pointed out recently that the sidebar directory tree doesn't work with Java 1.1.8. While investigating that problem, I discovered an unrelated dependency on Java 1.2 in the 0.6.2 source. Both of these problems are now fixed.

    Speaking of Java 1.2 dependencies, it has been suggested that maybe j should just require Java 1.2 or later. If you have any thoughts on this, please let me know. I'm particularly interested in reasons why 1.1.x compatibility should be preserved. The main reason I'm aware of is to give Kaffe a fighting chance.

  • Oct 29 2000 5:22 PM - Version 0.6.2

    Added closeOthers, which closes all buffers but the current one. Useful for cleaning up when the buffer list gets out of hand. Not mapped to any keystroke by default, but available on the File menu.

    Added xmlInsertEmptyElementTag, mapped by default to Ctrl Shift . (that's control shift period) in XML mode. It does what its name suggests.

    The sidebar tree in XML mode has new icons. (Thanks Mikol!)

    Files whose names end with ".cc" are now opened by default in C++ mode.

    In C and C++ modes, the tagger now ignores preprocessor lines, as it should, thus eliminating a bogus tag or two on occasion.

    In previous versions, if you did a replacement with the "Confirm changes" box checked, under certain circumstances a StringIndexOutOfBoundsException would occur when you pressed the "Yes" button, leading to subsequent erratic behavior. Fixed.

    Error handling is better now when you try to open a file in a directory that does not exist. In previous versions, j would allow you to create a new buffer for the specified file, but then any subsequent attempt to save the buffer would fail, leaving things in an awkward state. Now j refuses to let you create a new buffer for a specific nonexistent file unless the directory specified for the file actually exists.

    In XML mode, when you navigate by clicking on the tree, j now tries to scroll the window horizontally if necessary so that as much as possible of the target element is scrolled into view.

    insertParentheses, which for a long time has been mapped to Ctrl Shift ( (that's control shift left parenthesis) in Java mode and its derivatives, now has the same mapping in Perl mode too.

    Perl mode indentation now does a better job of handling continuation lines.

  • Oct 10 2000 7:27 PM - Version 0.6.1

    This release adds a horizontal scroll bar to the edit window and fixes a number of bugs, only a couple of which are worthy of specific mention here.

    The most serious bug was in wrapParagraph, mapped by default to F12. It caused j to hang under certain circumstances when wrapping an indented paragraph. This bug is now fixed.

    In previous releases, there was no code to create j's cache directory if it did not already exist when you tried to open a file contained within a zip archive. In that case, you'd end up with an empty buffer. Fortunately, there was code to create the cache directory in a number of other places, so if you happened to hit one of those places first, the cache directory would already exist and things would be fine (unless you were trying to reproduce the bug). This bug is now fixed.

  • Sep 19 2000 5:16 PM - Version 0.6.0

    This release adds a few new features and makes a number of changes to j's look and feel.

    One new feature is List Occurrences. The idea is that you should be able to see a list of all the occurrences of a particular search pattern in a particular buffer.

    There are several ways to make this happen. The most obvious way is to use the non-incremental Find dialog, which is mapped by default to Alt F3 (and maybe to Ctrl F, unless you use incrementalFind, but that's another story). You will notice that there's now a checkbox in this dialog labelled "List occurrences". If you check that box and perform a search, you will get a new, read-only buffer (the "List Occurrences buffer") containing all the lines in the original buffer that match the specified pattern and search parameters.

    In the List Occurrences buffer, you can scroll to any line and use the command findOccurrenceAtDot, mapped by default to both Enter and Ctrl Shift G, to go to the corresponding line in the source buffer.

    There are two other ways to get a List Occurrences buffer.

    If you've already done a search, you can use the command listOccurrences, mapped by default to Alt L, to get a List Occurrences buffer for the last search, looking for matches in the current buffer (which may or may not be the same buffer where you did the original search).

    You can also put your caret on any word in any buffer and use the command listOccurrencesOfPatternAtDot, mapped by default to Ctrl Alt L, to get a List Occurrences buffer listing the occurrences of that word in the buffer in question.

    If you select some text on a particular line before invoking listOccurrencesOfPatternAtDot, the selected text will be used as the search pattern instead of the word under the caret. (Multi-line selections don't count.)

    Since listOccurrencesOfPatternAtDot doesn't give you a chance to specify any search parameters, you might wonder what they are. The search is always case-sensitive. If there is no selection in effect, the pattern is the "word" under the caret, with a "word" meaning an identifier in the programming language of the buffer in question, and the search will be carried out as if the "whole words only" option was specified. This will normally produce the results you'd expect.

    If you've selected some text on a particular line before invoking listOccurrencesOfPatternAtDot, j looks at the selected text in its context on that line. The search will be carried out with the "whole words only" option if (and only if) the selected text is delimited by non-word characters at both ends.

    The pattern and search parameters are always listed at the top of the resulting List Occurrences buffer.

    For a long time, j has provided the commands findNextWord and findPrevWord, mapped by default to Alt Down and Alt Up, respectively. In previous releases, these commands have always used the word under the caret as the search pattern. In this release, these commands have been changed to use selected text as the pattern (if text is in fact selected on the current line), with the same search parameter rules as listOccurrencesOfPatternAtDot.

    As mentioned, this release makes a number of changes to j's look and feel. The most obvious of these changes is the use of icons in the sidebar buffer list. (Thanks to Mikol for contributing the icons!)

    The sidebar is now single-click rather than double-click. Buffers are no longer re-ordered when you use the sidebar buffer list to switch to a different buffer.

    The behavior of selectDown, mapped by default to Shift Down, and selectUp, mapped by default to Shift Up, has been changed. Now, invoking either of these commands with no selection in effect will select the current line in its entirety, rather than beginning a stream selection at the exact location of the caret. If you don't like the new behavior, you can have the old behavior back by adding this line to ~/.j/prefs:
            autoSelectLine = false
    If you select a block of text and copy it to the clipboard (using either copyRegion or copyAppend), the selection is now retained after the copy operation. This is the way most other editors work, and it saves you from having to re-select the block if you want to comment it out after you've copied it (just for one example).

    There is now a right-button context menu in the edit window.

    By request, the behavior of home, mapped by default to Home, and end, mapped by default to End, has changed.

    home now moves to the beginning of the text on the current line, if you are right of there to begin with. If you're already at the beginning of the text, or if you're in the whitespace at the left of the text, home moves to column 1 on the same line. If you hit Home twice in a row, you'll get to column 1 of the first line in the edit window. If you hit Home three times in a row, you'll get to the beginning of the buffer.

    Similarly, if you hit End twice in a row, you'll get to the end of the last line in the edit window. If you hit End three times in a row, you'll get to the end of the buffer. selectHome and selectEnd, mapped by default to Shift Home and Shift End, respectively, also have the new behavior.

    There's a 1-second timeout on these operations, meaning that if one second passes after you hit Home or End before you hit the same key again, the second occurrence of Home or End is not viewed, by j, as two (or three) in a row.

    Since the beginning of time (or so it seems), the Tab key in programming modes (notably Java, C/C++ and Perl) has been mapped to indentLineOrRegion, which does what its name suggests. By request, this behavior is now configurable.

    By default, the Tab key is now mapped to the command tab, rather than to indentLineOrRegion. If the property tabAlwaysIndent is true, which it is by default, then tab simply calls indentLineOrRegion, and things work the same way they always have.

    If tabAlwaysIndent is false (either globally or for the current mode), the behavior of tab depends on where the caret is. If the caret is at the very beginning of the text on the line, or in the whitespace to the left of the text, tab calls indentLine. Otherwise (i.e. if the caret is in the midst of the actual text), tab inserts either a single tab character or the equivalent number of spaces, depending on the setting of the useTabs property.

    While we're on the subject of indentation, the command electricCloseAngleBracket has been added. It is mapped by default to '>' in HTML and XML modes. It works like the other "electric" commands: it inserts a '>' and automatically re-indents the current line according to context. In addition, the commands htmlInsertTag, xmlInsertTag, htmlInsertMatchingEndTag and htmlBold now also re-indent the current line according to context after doing whatever it is they normally do. The new behavior is the default in both HTML and XML modes (as applicable).

    You can disable automatic re-indentation in either HTML mode or XML mode or both by adding lines to ~/.j/prefs that set the autoIndent property to false, like this:
            HtmlMode.autoIndent = false
            XmlMode.autoIndent  = false
    It would be reasonable to expect that the autoIndent property would have a similar effect in other modes (Java, C/C++, Perl) that support electric operations. In the current release, however, the autoIndent property is only honored in HTML and XML modes. This will probably change in the near future, but of course there are no guarantees.

    Jason Corbett contributed a new theme, "Bright", as well as some code that highlights scalar and list variables in Perl in their own colors. J's built-in default theme and "AnokhaClassic" in the themes directory (which is basically the same thing) have been updated to support these syntactic elements explicitly, but the other themes have not.

    The method addEntryFromPrefs in FormatTable.java has been changed so that writers of new Formatters can specify a fallback alias for a syntactic element so that older themes that might not be aware of new syntactic elements will nonetheless be able to do something reasonable.

    And speaking of new syntactic elements, there are five in this release. Here's what was added to AnokhaClassic:
            color.headerName              = 204 102 0
            color.headerValue             = 255 255 204
            color.matchingText            = 255 153 0
            PerlMode.color.scalar         = 255 255 204
            PerlMode.color.list           = 204 204 153
    headerName and headerValue are used in the header section at the top of List Occurrences buffers (not to mention Message buffers), matchingText is used for matching text in List Occurrences buffers, and scalar and list are used for the aforementioned Perl constructs.

    There are two new commands in Image buffers: imageZoomIn, mapped by default to '=', and imageZoomOut, mapped by default to '-'. These commands do what their names suggest.

    Finally, the behavior of wrapParagraph, mapped by default to F12, has changed slightly. Now, if the paragraph you're wrapping begins with an indented line, the indentation of the first line is applied to all the lines of the paragraph. In addition, both wrapParagraph and its counterpart unwrapParagraph replace occurrences of multiple contiguous space characters with single space characters.

  • Aug 29 2000 10:24 AM - Version 0.5.2

    First of all, a note about a problem that is not fixed in this release. It has been reported that on Linux, with a Swedish keyboard, using the Sun 1.3 beta JDK, it is not possible to enter characters such as '<', '>', and '+'. I've investigated this problem to the extent that I can, which is severely limited by the fact that I don't have access to a Swedish keyboard; in this particular case, xkeycaps hasn't been very helpful. It seems to me that the behavior is a bit different (not to say correct) with the IBM 1.3 JDK, but I can't prove that either.

    In any case, it would be very helpful to know whether other folks have encountered this problem (or this sort of problem in a different context), or whether anyone is successfully using j on Linux with a Swedish keyboard. Please let me know if you have any light (good or bad) to shed on this. (Of course if you want to fix the bug, that would be even better; the relevant code is most likely in Dispatcher.java.)

    This release contains the usual menagerie of subtle adjustments and minor bug fixes, plus one new feature (if you can call it that) that will only be of real interest to Windows users, and not even all of them.

    On Linux, j creates the .j directory, which holds its configuration information and temporary files, in the home directory of the current user. This is in accordance (more or less) with time-honored practice on that platform.

    On Windows, j has always created this directory as a subdirectory of C:\, which, by contrast, has always seemed a bit odd, even to me.

    The reason for this peculiar choice is that in the old days, if you asked Java where the user's home directory was on a Windows machine, the answer you got was subject to some variation, depending on what flavor of Java you were running (flavor being defined as a combination of vendor and version) and the version of Windows on the machine. Since it was not unusual, in those days, to use a number of different flavors of Java even on the same machine, hoping to find one that worked better than the others, it was desirable to enforce some consistency in the location of the .j directory, so j would always know where it was. On all the machines I used, C:\.j was available, and even better, it was short to type.

    Recently, however, it was brought to my attention that not every Windows machine has a C drive, a fact which highlights a major shortcoming in this simple scheme. So j now takes a slightly more enlightened approach to this problem.

    Now, instead of seizing on C:\.j like a blind pig, j cycles through the drives from C to Z, and puts the .j directory in the root directory of the first writable drive it finds. Like I said, slightly more enlightened, but only very slightly.

    If that's not good enough for you, you can now also specify the location of your home directory explicitly by invoking j with the --home command line option, like this:
            j --home=D:\work
    
    In this example, the user's home directory will be D:\work, and the .j directory will be D:\work\.j. The --home option also determines the default location of j's backup directory, which, with previous releases of j, would have been C:\backup; in the current example, it would be D:\work\backup.

    You can, of course, specify a different location for the backup directory by adding a line like this to your preferences file:
            backupDirectory = E:\\pluribus\\unum
    
    Note that the preferences file requires double backslashes in Windows filenames.

    Specifying your home directory explicitly will also affect the behavior of dirHomeDir and the Home button on the default toolbar, as you might expect.

    It's possible to get in a little trouble if you use the --home option unwisely. For one thing, it may be inconvenient in the long run if j's idea of your home directory is at variance with the belief held by every other program on your computer (in some sense, that's the problem we're trying to solve here), so it's clearly best if the directory you specify really is your home directory. (If you're using Cygwin, the waters may already be muddy, but that's not a problem j can solve.)

    In addition, please bear in mind that if you're going to use the --home option at all, you'll need to do it every time you run j; otherwise, you'll end up with configuration information in two different places. The best approach is probably to edit j.bat (or the shortcut, or whatever you normally use to start j) so it does the right thing.

    I'm aware that this new approach, like the original scheme of arbitrarily assuming in all cases that the user's home directory is C:\, is not exactly ideal, but at least it's more flexible, and it does provide a workaround for folks without a C drive. Over time, things will evolve further. They always do.

    On a different subject entirely, you can now specify a port number for FTP URLs, like this:
            ftp://annie:2121/home/bonzo/.j/prefs
    
    Or, combined with a username and password, like this:
            ftp://bonzo:bleep@annie:2121/home/bonzo/.j/prefs
    
    In HTML and XML modes, the Insert Tag dialog, mapped by default to Ctrl Shift , (that's Ctrl Shift comma), now has a history list, which you can traverse with Ctrl P and Ctrl N (or the up and down cursor keys), like all the history lists in j.

  • Aug 22 2000 6:20 PM - Version 0.5.1

    Under Windows, with German and Danish keyboards (and possibly others as well), j was not correctly handling the Alt Gr modifier, which meant that it was impossible to type certain characters (brackets and braces, for example). This bug has been fixed, as far as I can tell. I don't actually have any of the keyboards in question, so please let me know if there's still a problem.

    Bryan Chan contributed code to handle tab characters correctly in Man mode.

    Bryan also contributed a patch to make jpty.c compile under Solaris as well as Linux.

    Bryan also provided code for ssh, an experimental feature, available from the Execute Command dialog, which is mapped by default to Alt X. This feature requires jpty, which is not part of the binary distribution, so it's only available if you build j from source. You also need to add a line to ~/.j/prefs to enable experimental features:
            enableExperimentalFeatures = true
    
    If you just type "ssh" in the Execute Command dialog, you will be prompted for the name of the remote host to connect to; you can also type something like "ssh annie" and do it all in one shot.

    The name (or location) of the ssh program to run is configurable in ~/.j/prefs:
            ssh=/usr/local/bin/ssh
    
    The default is just "ssh". You can also specify a regular expression in ~/.j/prefs to match the shell's prompt string on the remote machine, so j will be able to recognize it correctly. For example:
            sshPromptRegExp = "^: "
    
    The default is "^[^#$%>]*[#$%>] *", which should work in most cases.

    I finally got around to installing the latest net release (1.1.0) of Cygwin on my Windows machine and discovered that j's configure script was broken in that environment. This problem is now fixed. While I was at it I adjusted a few things to make filename completion and directory tracking work a bit better in shell buffers under Windows.

  • Aug 15 2000 6:10 PM - Version 0.5.0

    Added a directory tree in the sidebar for directory buffers. Clicking on a directory in the tree with the left mouse button changes into that directory and displays its listing in the current directory buffer, leaving keyboard focus in the tree. Clicking with the middle mouse button (on Linux, at least) does the same thing, but also returns keyboard focus to the buffer. If the tree has focus, pressing Escape returns focus to the buffer.

    The directory tree can be disabled by adding the following line to ~/.j/prefs:
            DirectoryMode.enableTree = false
    
    Directory mode now has its own toolbar. Each directory buffer maintains a history list of directories visited in that buffer; the Back and Forward buttons may be used to move through that list. The Up button changes into the parent of the current directory. The Rescan button re-scans the entire directory tree and refreshes the listing in the current directory buffer. (Rescan is also available from a vestigial right-button context menu in the directory tree itself.) The Home button jumps to the home directory of the current user.

    The commands dirBack, dirForward, dirRescan and dirHomeDir have been added, corresponding to the aforementioned buttons. These commands have no default key mappings.

    The default toolbar now provides Directory and Home buttons, which do what their names suggest.

    URLs of the form "ftp://user:password@host/..." or "ftp://user@host/..." are now (once again) handled correctly.

    The Properties dialog no longer suffers from a NullPointerException when invoked on an FTP buffer.

    To improve performance, j now caches directory listings for FTP operations. In the current implementation, cached listings expire after 30 minutes, or when the user invokes dirRescan in the context of the host in question. Only directory listings are cached, not individual files.

    The sidebar buffer list and tag list now provide tool tips.

    J now builds and runs with Java 1.1 again. A Java 1.2 dependency slipped into 0.4.4; it has been removed. But the day will come...

  • Jul 29 2000 11:04 AM - Version 0.4.4

    The tag list in the sidebar, in modes that support it, is now updated automatically as you make changes to the buffer (it makes no difference whether or not the changes have been saved). You can configure this by adding a line like this to ~/.j/prefs:
            refreshTagList = 500
    
    The numeric parameter is the number of milliseconds the user must be idle before j will update the tag list. The minimum effective value is 500 milliseconds; the default is 1000 milliseconds. Setting this parameter to zero disables automatic tag list updates.

    Equivalent functionality is available for the tree in the sidebar in XML mode. In this case, however, automatic updates are not enabled by default. To enable them, add a line like this to ~/.j/prefs:
            refreshTree = 500
    
    Once again, the minimum effective value is 500 milliseconds. Setting this parameter to zero (which is the default) disables automatic updates of the tree.

    Maybe you don't want a tree in the sidebar at all. For example, you might be working on a document that references a DTD on the Internet, but you don't have an active Internet connection. In that case, you can disable the tree by adding this line to ~/.j/prefs:
            enableTree = false
    
    If the sidebar tree is enabled in XML mode, you no longer need to wait for j to parse the document and build the tree when the file is first loaded; this is now done in a background thread. This change will let you get to work a bit quicker, but it may take a few seconds for the tree to appear in the sidebar when a file is first loaded.

    The sidebar tree functionality in XML mode now specifically supports XP, as well as Xerces and j's built-in version of Ælfred. (In theory, any SAX-compliant XML parser should work, but in practice, you never know until you try.)

    On Linux, J now tries harder to make its window come up in the same place you left it the last time you shut down the editor, even without cooperation (or, in some cases, in the face of active hostility) from Java and/or your window manager. It was necessary to do something about this, since at least with some window managers, both Sun's and IBM's versions of Java 1.3 tend to change the window placement just a bit each time you start j, with the result that after a while the window tends to drift off the screen. J's approach to this problem is adaptive; it may take j a couple of tries to get it right, but then things should work correctly as long as you continue to use the same combination of Java VM and window manager. If you change VM or window manager, j will re-adapt. If you don't want j to perform this adjustment at all, you can disable it by adding this line to ~/.j/prefs:
            adjustWindowPlacement = false
    
    Adjustment is not performed at all on Windows, where window placement is one thing that is not a problem.

    Directory buffers now start off with the caret in a more useful place. The Home key in directory buffers is now mapped by default to dirHome, which moves the caret to the start of the filename on the current line, if it's to the right of there to begin with.

    Directory buffers using j's internal directory format (which is the default format on Windows) now ignore case when sorting by name, as is only proper for a case-insensitve file system.

    In Java mode, j's syntax highlighting now takes note of the fact that multiline quoted strings are not legal in Java.

    Added a minor workaround for a weird classloader anomaly that was preventing j from loading its file history information correctly with IBM's version of Java 1.3 on Windows.

    Find In Files now works correctly on Windows 2000 with Java 1.1.8, but that should not be taken to mean that running Java 1.1.8 on Windows 2000 is in any way a good idea.

  • Jul 16 2000 5:21 PM - Version 0.4.3

    The j distribution now includes SAX2 (and SAX2-ext) and a version of the Ælfred XML parser, so it is no longer necessary to download any additional packages in order to get a tree in the sidebar in XML mode. You still might want to get Xerces if XML is important to you; the error messages are better and the locator is more exact.

    To use Xerces, add xerces.jar to j's runtime CLASSPATH and add this line to ~/.j/prefs:
            org.xml.sax.parser=org.apache.xerces.parsers.SAXParser
    
    (You should, in fact, be able to use any SAX-compatible Java-based XML parser by making the appropriate modifications to j's runtime CLASSPATH and ~/.j/prefs.)

    One reason j now ships with an XML parser is that j's properties architecture is changing. For some time, when you changed the properties of a buffer (using the Properties dialog, mapped by default to Alt P), j did its best to remember your changes for future sessions. It kept track of this information in the file ~/.j/files, which had a fixed, tab-delimited format.

    In the current release, ~/.j/files is replaced by ~/.j/files.xml, which stores the same information in an extensible, XML-based format. J will read the information from your old ~/.j/files (if you have one), store it in ~/.j/files.xml in the new format, and then delete ~/.j/files. If all goes well, you won't notice a thing. The new format will let j store additional properties on a per-file basis, beyond the short fixed list supported by the current Properties dialog. At the moment there's no documented way to make this actually happen, but at least now the required infrastructure is in place.

    For a long time it's been possible to open zip files in j, getting an archive buffer, which is similar to a directory buffer. It's also been possible for a long time to open, say, Java source files from within an archive buffer, so you can examine them without having to unzip the corresponding zip file.

    In the current release this functionality has been extended so that j now correctly handles all file types within archive buffers, including zip files and image files. So now, for example, you can open j-0.4.3-binary.zip, and then from the resulting archive buffer you can open j.jar and get another archive buffer, and from that archive buffer you can open tb_close.gif, and the image will be displayed correctly (provided, of course, that j is set up correctly for image buffer support, which is an entirely separate issue).

    Added describeKey, mapped by default to Alt K and available on the Help menu. describeKey presents a dialog box into which you can type a key (or key combination); j will then report what command is mapped to that key (or key combination) in the current buffer.

    Added jumpToColumn, which is like jumpToLine, but for columns (as its name suggests). It has no default key mapping, but it's available on the Goto menu. Primarily useful for debugging XML parser locator issues.

    Added insertString, with no default mapping. It is intended for use in a key map, although it can also be tested from the Execute Command dialog box. This command is unusual in that it requires an argument, which must be a string. Here's an example of the syntax you would use in a key map:
            Alt F1                          insertString( "This is a test" )
    
    This line maps the key combination Alt F1 to insert the string "This is a test" at the location of the caret in the current buffer.

    Another use of this command is to work around keyboard configuration problems. For example:
            Ctrl Shift 8                    insertString( "[" )
    
    You can use insertKeyText to get the string ("Ctrl Shift 8", for example) that corresponds to the key combination you'd like to map.

    uncommentRegion, mapped by default to Shift F11, now automatically fixes the indentation of the uncommented region, if possible.

    In HTML mode, wrapParagraph, mapped by default to F12, now refuses to break lines inside <a> tags.

    Clicking on the vertical scroll bar in either pane of the sidebar now correctly sets focus to the pane in question.

    By request, contact information has been added to the About box.

  • Jun 26 2000 6:50 PM - Version 0.4.2

    This release adds XML parser support.

    In XML mode, if you have a SAX-compatible Java-based XML parser, such as Xerces-J 1.1.2 from the makers of Apache, you can have a tree in the bottom pane of the sidebar that represents the document you're editing.

    To make this happen, add xerces.jar (which contains the parser itself as well as the required SAX packages) to j's runtime CLASSPATH:
            java -cp /usr/share/java/xerces.jar -jar j.jar
    
    If you build j from source, you can use the configure script's --with-extensions option:
            ./configure --with-extensions=/usr/share/java/xerces.jar
    
    The j shell script that is automatically generated and installed will then contain the correct CLASSPATH.

    Xerces-J is my personal favorite, but any SAX-compatible Java-based XML parser should work.

    (XML mode will still work fine if you don't have a parser, but you won't get a tree in the sidebar.)

    If you do have a tree in the sidebar, the selection in the tree will follow along as you navigate in the edit buffer, but the tree is not automatically expanded to show nested nodes. You can use xmlFindCurrentNode, mapped by default to Ctrl =, to force the tree to expand all the way down to the node corresponding to the location of the caret in the edit buffer.

    To force the tree to be refreshed, use xmlParseBuffer, mapped by default to Ctrl P. The parser uses the image of the buffer in memory, rather than the file on disk, so there's no need to save any changes you've made to the buffer before refreshing the tree.

    If the parser encounters an error, the tree is not updated. Instead, a message box displays the parser's error message, and the caret is moved to the location of the error in the edit buffer. You can use showMessage, mapped by default to Alt M, to have another look at the error message later.

  • Jun 16 2000 11:07 AM - Version 0.4.1

    This release contains bug fixes only; there is no new functionality. The main goal of this release is to support the new betas of Java 1.3 for Linux from Sun and IBM. In particular, the known problem mentioned below has been resolved. Most of the other bug fixes involved relatively minor sidebar-related issues.

  • Jun 11 2000 7:29 PM - Known Problem with Java 1.3 (Linux only)

    Shortly after releasing 0.4.0, I learned that what I said below about j working well with the new versions of Java 1.3 for Linux is not entirely correct.

    There is one annoying problem. If you do, for example, Alt F, to bring up the File menu, and then hit Escape without actually choosing anything from the menu, a bad thing happens. With the IBM Linux JDK 1.3.0, the bad thing is that you lose use of the cursor keys to navigate in the edit buffer. The easiest workaround if that happens is to click in the sidebar and then hit Escape. With the Sun 1.3 beta, the bad thing is that a spurious character is inserted in the buffer. The workaround in this case is to delete the character in question.

    This problem should only arise if you're using Java 1.3 on Linux. It doesn't happen with Java 1.3 on Windows, it doesn't happen with Blackdown 1.2.2 RC4 on Linux, and in any case it only happens if you cancel out of a menu. I hope to have it fixed in the next release of j.

  • Jun 11 2000 4:59 PM - Version 0.4.0

    Fixed some key mappings to work correctly with the 06/09/2000 update of the IBM Linux JDK 1.3.0. J seems to work well with this second release of IBM's 1.3, on both single- and multi-processor machines.

    J also works well with the Sun 1.3 Linux beta, but not if you're running an SMP kernel. This deficiency is mentioned in Sun's README; I tried it anyway, and they're right, it doesn't work. I hope they get that fixed. But the Sun beta seems to work well on a single-processor machine.

    Added XML mode, which is now used by default for .xml and .xsl files. XML mode takes a slightly different approach to syntax highlighting, and as a result, you may need to add support for it to your theme. All of the themes in the themes directory of the j distribution work reasonably well. Anokha, AnokhaClassic, Default, and Freefloater contain specific support for XML mode. This excerpt from Anokha should be enough to get you started:
            XmlMode.color.text            = 255 255 255
            XmlMode.color.attribute       = 153 204 153
            XmlMode.color.delimiter       = 255 255 0
            XmlMode.color.namespace       = 255 204 0
            XmlMode.color.tag             = 255 153 0
            XmlMode.color.comment         = 102 153 153
    
    The non-incremental Find dialog and the Find In Files dialog now have an "Ignore case" checkbox, instead of the "Force case-sensitive search" checkbox used in previous versions. If the search pattern contains only lower-case letters, the "Ignore case" checkbox is checked by default; otherwise it's unchecked by default. You're free to check or uncheck it after you've finished typing in the pattern if the default doesn't suit your needs.

    For a long time j has supported the concept of a source path, which lets you open files (either on the command line or using the Open File dialog) without having to specify their full paths. To use this feature, add a line like this to ~/.j/prefs:
            sourcePath=/home/peter/j/src/org/armedbear/j:/home/peter/sun/jdk1.2.2/src
    
    Then you can just specify, say, Editor.java, and j will find /home/peter/j/src/org/armedbear/j/Editor.java.

    J now supports completions from the source path in the Open File dialog, using the Tab key.

    In addition, completion support in shell buffers is now considerably improved.

    expand, mapped by default to Alt Space and Alt /, no longer requires a minimum of three characters before it will attempt an expansion.

    Password prompt handling has been improved in telnet buffers. J now ignores case when trying to recognize a password prompt, and a trailing space is no longer required. In addition, shell buffers now provide intelligent support for password prompts too.

    In Shell mode, shellInterrupt, which in recent versions has been mapped by default to Ctrl C, is now mapped by default to Ctrl Alt C, so that Ctrl C can be used for copyRegion, as in other modes.

    electricStar is no longer an experimental feature. It's now mapped by default to '*' in Java mode (and its derivatives). It inserts '*' at the current location of the caret and, if the current line is otherwise blank, re-indents the line according to context.

    Parenthesis matching (findMatchingChar, mapped by default to Ctrl M) should work better now in (and near) quoted strings in Java mode.

    backspace is now mapped to Shift Backspace as well as Backspace.

    Added a workaround for bug number 4213197 (in Sun's bug database) in Java 1.2/1.3 on Windows. Strings copied to the clipboard from j can now be retrieved correctly by other applications.

    Fixed some sidebar painting and validation problems.

  • May 21 2000 10:13 PM - Version 0.3.0

    J now has a toolbar. You can control its appearance by setting one or more of the following properties in ~/.j/prefs:
            ToolBar.showText=true
            ToolBar.showIcons=true
            ToolBar.isRollover=true
    
    These properties are all true by default.

    J now has a sidebar, too. The sidebar contains two panes. The upper pane contains the list of open buffers. The lower pane contains the list of tags for the current buffer, if the current buffer is taggable. (Java, JavaScript, C, C++, Perl and Lisp mode buffers are taggable.) If the current buffer isn't taggable, the lower pane is intentionally left blank.

    In the sidebar, you can doubleclick (or middle-button singleclick) on a buffer or tag to go to that buffer or tag. You can also set focus to one of the lists, navigate up or down with the cursor keys, and hit Enter to go to the tag or buffer in question. If you use Alt Enter instead of Enter, the sidebar will close automatically. There's also a vestigial context menu on the right mouse button in the buffer list. The Delete key works in the buffer list to close buffers.

    There's now a View menu so you can turn the sidebar and toolbar on and off. J will do its best to remember how you've left things the next time it starts up. In honor of the View menu, about is no longer mapped by default to Alt V.

    By default, j reorders its buffer list as you open new buffers, so prevBuffer is more likely to take you to the buffer you were working in before you opened the current one. This is the way j has behaved for a very long time, but if you find this behavior disconcerting, you can disable it by adding this line to ~/.j/prefs:
            reorderBuffers=false
    
    expand, mapped by default to Alt /, is now mapped by default to Alt Space, too. expand takes the sequence of characters you've just typed, looks through the entire buffer for words that have the sequence in question as a prefix, and replaces the sequence of characters with the first match it finds (looking backwards in the buffer). If you don't like that particular replacement, you can hit Alt Space again (and again and again) to cycle through all the possible replacements. If you don't like any of the replacements, you can invoke undo at any point and get back where you started. The prefix you type must be at least three characters long.

    If you build j from source, the configure script now accepts the option --with-extensions, like this:
            ./configure --with-extensions=/home/peter/Jimi/JimiProClasses.zip
    
    Currently the only use for this is to specify the location of JimiProClasses.zip, so the JIMI extensions will be available in Image mode.

    The configure script now looks for options in a file called configure-options in the current directory, so you can store commonly used options in a file of that name. Here's my own configure-options file, as an example:
            --with-jdk=/home/peter/blackdown/jdk1.2.2
            --enable-jpty
            --with-extensions=/home/peter/Jimi/JimiProClasses.zip
    
    In Shell mode, shellInterrupt is now mapped by default to Ctrl C, which is basically what shellInterrupt does. If you want copy, you can use the Edit menu or the Execute Command dialog box (mapped by default to Alt X).

    Fixed a very subtle and hard-to-reproduce undo/redo bug that occurred when multiple frames were open. As a result, the undo/redo code is considerably more robust (even thought it really wasn't too bad before, except for this one problem), and compilation buffers now support undo for cursor movement (which is all they need, since compilation buffers are read only).

  • Apr 25 2000 6:12 AM - Version 0.2.4

    Added Image mode, for viewing GIF and JPEG files. (If you're running Java 1.3 RC3 for Windows, or if JIMI is in j's CLASSPATH, PNG files are supported too.)

    Image mode is an experimental feature, not enabled by default. To try it out, add the following line to ~/.j/prefs:
            enableExperimentalFeatures=true
    
    In Image mode, you can use imageCycleBackground, mapped by default to C, to cycle through several plausible background colors. You can also use imageToggleFullScreen, mapped by default to F, to switch to a full screen display (or subsequently restore the window to its normal size).

    On Linux, full screen display can be a bit quirky, depending on your window manager and how you have things set up.

    All bets are off if you attempt operations that only make sense for text buffers in (or on) image buffers. (Eventually such things will be trapped cleanly, but for now it's an experimental feature, remember?)

    Added Properties mode, for configuration files, Java properties files, Windows .INI files, and j prefs (among other things). Syntax highlighting for smb.conf!

    The documentation, while still far from complete, has been updated to cover image buffers (in slightly more detail than presented here). It's better than a kick in the head.

    You can access the documentation from the Help menu or by pressing F1. You may need to set the browser and/or docPath properties in ~/.j/prefs for this to work correctly. For example:
            browser=/usr/local/bin/mozilla
            docPath=/home/peter/j/doc
    
    In telnet buffers, it should now be possible to change directories or hit the Tab key without provoking a null pointer exception.

  • Apr 18 2000 8:02 AM - Version 0.2.3

    Added telnet, as an experimental feature, available from the Execute Command dialog, which is mapped by default to Alt X. Requires jpty. On Windows, you need to have a command-line telnet client installed, and you need to specify where it is in c:\.j\prefs:
            telnet=c:\\usr\\local\\bin\\telnet.exe
    
    The telnet client that comes with Windows won't work. On Linux, the normal telnet client should be fine.

    Added shellInterrupt, which sends a control C to the process running in a shell or telnet buffer, in case it gets stuck.

    You can now restart shell, telnet and debugger sessions in place, using the command that started them, without having to close the buffer in question first.

    Jpty is now required for shell buffers. This means if you want shell buffer support, you need to build j from source, since jpty is not included in the binary distribution. (Shell buffers are still an experimental feature.)

    Incorporated a nice patch submitted by Carl Berger that lets j use bold fonts for syntax highlighting under all circumstances. (Before, the bold font had to have the same character width as the corresponding plain font.)

    J now tries to be a bit smarter about setting the default for the "Restrict changes to selected text" checkbox in the Replace dialog. Most notably the box is no longer checked by default in the case where the selected text is identical to the pattern to be replaced (which is true, for example, if you just completed a successful search for that particular pattern).

    Fixed a bug that caused j to hang under certain circumstances when you used the mouse to highlight a block of text.

    On Windows, if you specified, for example, "editor.java" in the Open File dialog, and the name of that particular file on disk was actually "Editor.java", the name would be changed to "editor.java" when you subsequently saved the file, which was probably not what you wanted to do. Fixed.

    Fixed a focus manager bug that made the tab key vanish mysteriously (or even show up in the wrong window) after a jdb session.

    You can now use the X button in the dialog's title bar (if present) to close the Replace dialog with the same behavior you'd get by clicking on the Cancel button, instead of getting a NullPointerException as in previous versions.

    Shift Tab now works correctly to navigate backwards through possible completions in the Find Tag dialog.

  • Apr 5 2000 6:56 AM - Version 0.2.2

    There is a new default look and feel. Dialogs and menus now use a slightly smaller font. Where text used to be bold and blue, it's now plain and black. Buttons now tend to have a more uniform size. Buttons and text fields use raised and lowered bevel borders, respectively, instead of the Metal defaults. We now use our own message dialogs instead of JOptionPanes.

    If you don't consider the new look and feel to be an improvement, you can have the old look and feel back (except for the JOptionPanes) by adding the following line to ~/.j/prefs:
            lookAndFeel=Metal
    
    On the subject of look and feel, Mikol has contributed two new themes, Freefloater and Jaan. They're in the themes folder. You can try them out by adding a line like this to ~/.j/prefs:
            theme=Freefloater
    
    Depending on how you've installed j, you may need to specify the full path:
            theme=/home/peter/j/themes/Jaan
    
    If you've had problems building j from source, you may be pleased to learn that unzip is no longer required.

    If you've had problems building j from source with the Cygwin tools on Windows, remember that you need to invoke make with the --unix option:
            make --unix
    
    As an alternative, you can set the MAKE_MODE environment variable before running make:
            export MAKE_MODE=unix
    
    By default, Java mode now accepts the extension ".jad", as well as ".java", for your convenience in examining decompiled code.

    manFollowLink, mapped by default to Enter (and to Ctrl Shift G) in man mode, now parses section numbers correctly in the output of man -k.

    Finally, as usual, there are a few improvements related to undocumented and experimental features, which are not enabled by default. To try out these features, build j from source with the --enable-jpty option, make sure the jpty executable is in your PATH, and add the following line to ~/.j/prefs:
            enableExperimentalFeatures=true
    
    Remember, if these features worked just right, they wouldn't be undocumented and experimental. You've been warned.

    That said, the commands jdb and gdb have been added, which invoke the corresponding debugger in an editor buffer, allowing you to step through code and follow along in the source. These commands are available from the Execute Command dialog box, which is mapped by default to Alt X.

    In the case of jdb, you can specify exactly which jdb to run by adding a line like this to ~/.j/prefs:
            jdb=/home/peter/sun/jdk1.2.2/bin/jdb
    
    This does not necessarily have to be the jdb from the version of Java you're using to run j; jdb gets invoked in a separate process. On Linux, the Sun/Inprise 1.2.2 version of jdb seems to work well. On Windows, your best bet is probably Sun 1.3 RC2, but 1.3 RC1, 1.2.2 and 1.1.8 seem to work too. Your mileage almost certainly will vary. Bear in mind, if you can't get jdb to run reliably from the command line in a normal xterm or DOS box, there's no hope at all of using the jdb command in j.

    There are also a couple of improvements in jpty.

    Jpty now supports a -cd command line option, to specify the working directory for the program it invokes, something that's not possible in pure Java. This functionality is supported on Windows as well as Linux. It's now possible to build jpty for Windows by specifying --enable-jpty when invoking configure. Shell and debugger buffers now use jpty's -cd functionality to set the working directory.

    The Linux version of jpty was calling chown and chmod on the slave pty when it was first opened. This didn't work unless jpty was being run as root (which it normally wasn't), and if it did work, it had the bad effect of changing the ownership and permissions on /dev/ttyp0 (usually) in a way that rendered it subsequently inaccessible to normal users. So we don't do any of that any more.

  • Mar 14 2000 5:18 AM - Version 0.2.1

    man is no longer mapped by default to Ctrl M. I had forgotten that Ctrl M was used for findMatchingChar, a useful mapping that I really didn't mean to disturb. man is accessible enough from the Execute Command dialog box, particularly since you can specify the topic at the same time ("man 2 kill", for example).

    In Anokha (the new default theme), DirectoryMode.color.marked is no longer the same color as DirectoryMode.color.directory.

    The configure script now sets things up to use fastjar (instead of jar) if it's in your PATH.

    Using the Alt Y mnemonic ("Yes") in the Confirm Replacement dialog now replaces only the current occurrence of the search pattern, as it should. Previously it got a bit carried away and replaced the next occurrence as well. Enthusiasm is not always an unmitigated virtue.

    The "Restrict changes to selected text" checkbox in the Replace dialog now always defaults to checked. This is most likely what you want, particularly if the selected text spans multiple lines, and it's only a minor inconvenience otherwise (just uncheck the box). It doesn't make much sense to persist the state of this checkbox from the previous replace operation (which was the former behavior).

    Filenames beginning with "." (as in "./Makefile") are now handled correctly in the Open File dialog and on the command line, even if the file in question doesn't exist. Previously, j ended up searching the source path (and possibly the include path) if the file didn't exist, which was clearly wrong, since an absolute path was specified (the current directory).

    Fixed a rare NullPointerException involving the scroll bar and pageUp near the top of the buffer. The behavior of the scroll bar is still not exactly right, but it shouldn't cause any real problems now.

    Finally, there are a number of functional and architectural improvements related to shell and compilation buffers, which are undocumented and experimental features, not enabled by default, and not for the faint of heart.

    In particular, the configure script now accepts the option --enable-jpty. If this option is specified, a small native helper program (jpty) will be built and installed (in /usr/local/bin, by default), and shell buffers should work a bit better. See the source (Shell.java and src/jpty/jpty.c) for details. This has only been tested on Linux (although it might work on other flavors of Unix), and it definitely does NOT work under Windows. The jpty executable is not included in the binary distributions.

    In addition, the function shellDestroyProcess has been added, available from the Execute Command dialog box. shellDestroyProcess does a kill -9 on all the children of the shell that's running in the current shell buffer. Once again, Linux only!

  • Mar 5 2000 12:18 PM - Version 0.2.0

    The function man has been added (Unix only), mapped by default to Ctrl M. man prompts for a topic and displays the corresponding man page in a buffer.

    To support man, Man mode has been added. In Man mode, you can use manFollowLink, mapped by default to Enter (and to Ctrl Shift G, by analogy with gotoFile, and to the middle mouse button, for good measure), to follow links (loosely speaking) in the displayed man page. If the link looks like a filename, j will try to open the corresponding file; otherwise, j will invoke man on the link in a new buffer.

    gotoFile, mapped by default to Ctrl Shift G, has been improved. In general, gotoFile opens the file at the current location of the caret. In HTML mode, and for "#include" lines in C and C++ modes, gotoFile tries to be a bit smarter about things, and the caret doesn't always have to be smack dab on the filename. gotoFile also understands the format of "ls -l" output in shell buffers. (Shell buffers, remember, are an undocumented and experimental feature, not enabled by default, and not for the faint of heart.)

    Autoconf mode has been added. Syntax highlighting for configure.in!

    And speaking of configure.in, J's configure script now accepts the option --with-jit, as in:
            ./configure --with-jdk=/home/peter/blackdown/jdk1.2.2 --with-jit=javacomp
    
    Anokha is now the default theme. The old, boring default theme is still available, and still (for the moment) called Default. You can specify a theme other than Anokha, if you prefer, in ~/.j/prefs:
            theme=Orbital
    
    You may need to specify the full pathname of the theme file, or you can set the themePath property in ~/.j/prefs to match your setup:
            themePath=/home/peter/j/themes:/usr/local/share/j/themes
    
    The function whatChar has been added, available from the Execute Command dialog (Alt X). whatChar displays, in the status bar, the decimal, hex and (for completeness) character equivalents of the character at the current location of the caret.

    The function jmips has been added to provide a crude measurement of the relative performance of the underlying Java runtime system (including the hardware). For best results, run it at least twice and ignore the first result (at least).

    J now ignores the suffix .gz when trying to figure out what mode to use when opening a file. For example, man.el.gz is now opened by default in Lisp mode.

    Horizontal scrolling is smoother and more accurate, and in find and replace (and friends), the found pattern is scrolled into view and highlighted correctly.

  • Feb 13 2000 11:21 AM - Version 0.1.0

    Finally.

    electricBrace is obsolete. It's been replaced by electricOpenBrace and electricCloseBrace, which do what their names suggest and are mapped by default to '{' and '}' in Java mode (and its derivatives) and Perl mode. Unlike their predecessor, the new functions should work properly in F7/F8 keyboard macros. You may need to fix your custom key maps, if you've got custom key maps.

    You can now mark files and delete them in FTP directory buffers, just like in local directory buffers.

    The Recent Files dialog now tries to remember your settings if you resize the columns.

    The Buffer List dialog is no longer too wide. In addition, modified buffers are now listed in red for added emphasis, and the directory name above the list box is shortened in a reasonable way if it won't fit in the space allotted for it.

    If you build j and do 'make install', you don't need to supply the full path of your theme file, if you're using one of the installed themes. So the line in ~/.j/prefs can be, for example:
            theme=Anokha
    
    instead of
            theme=/usr/local/share/j/themes/Anokha
    
    One advantage of this (at least I think it's an advantage), is that j will look in the source directory from which you built and installed j before looking in /usr/local/share/j/themes, which means that if you edit your theme in the source tree the new version will be picked up automatically.

  • Feb 7 2000 7:59 AM - Version 0.0.11

    It should now be a bit easier to build on Windows. As before, you need the Cygwin tools, and you need to be running bash as your shell. The configure script is now even smart enough to understand Cygwin mounts. So you should be able to build like this:
            ./configure --with-jdk=/jdk1.3
            make
            make install
    
    (The location of your JDK may be different, of course.)

    By default, even on Windows j is installed under /usr/local. You can change this by using the --prefix option with the configure script:
            ./configure --with-jdk=/jdk1.3 --prefix=/j
    
    This (for example) would install j.jar in /j/share/j, and j.bat (and the j shell script) in /j/bin.

    J's help system has changed a bit. There is no longer a built-in browser (it came free with Swing and was worth every penny). Instead, j will attempt to find and use a real browser on your system. If this fails, or if you don't like j's choice of browser, you can specify the browser to use with the browser property in ~/.j/prefs:
            browser=C:\\Program Files\\Internet Explorer\\IEXPLORE.EXE
    
    On Unix, j will re-use a running instance of Netscape, if possible. This may mean that the help will come up in a browser window on a different virtual desktop.

    The browserOpts property is obsolete.

    If you build j and do 'make install', j should now be able to find its help files. Otherwise, you may need to set the docPath property in ~/.j/prefs to point to the directory containing the documentation:
            docPath=/home/peter/j/doc
    
    Added a very strange hack to make the Tab key work with Sun JDK 1.3 RC1 for Windows. There's definitely a bug in there somewhere, but I don't think it's in j.

    revertBuffer now works in FTP buffers.

    Very simple indentation is now supported in Makefile mode.

    electricColon has been added, mapped by default to ':' in Java, JavaScript and C modes (but not in C++ mode, to avoid problems with "::"). Like the other electric functions, electricColon re-indents the current line and, if the property autoNewline is true, adds a newline after the inserted character (colon in this case).

    Syntax highlighting in shell script mode is now much smarter about here documents and echoes.

  • Jan 31 2000 6:08 PM - Version 0.0.10

    The build process and distribution scheme has changed a bit. For Linux, you can now do the normal thing:
            ./configure
            make
            make install
    
    Well, almost. You need to tell the configure script where your JDK is:
            ./configure --with-jdk=/home/peter/blackdown/jdk1.2.2
    
    For 1.1.x JDKs, there's also a --with-swing option that you can use to specify where swingall.jar is located. If swingall.jar is in your CLASSPATH, the configure script will find it automatically.

    If you follow the aforementioned steps to build and install j, you should be able to invoke j by simply typing:
            j
    
    For Windows, the same steps should work, but you'll need the Cygwin tools, you'll need to be running bash as your shell, and you should use the Cygwin drive notation to specify the full path of your JDK:
            ./configure --with-jdk=//c/jdk1.3
    
    For Windows, the build process will create a file called j.bat in the j-0.0.10 directory, which should work to invoke j whether or not you run make install. If you do run make install, bear in mind that by default j will be installed in /usr/local/bin, which is a bit odd for Windows.

    HTML mode has changed.

    The function htmlInsertTag has been added. htmlInsertTag prompts for a tag name and then inserts the appropriate start and end tags. If a selection is marked when you invoke htmlInsertTag, the start and end tags will enclose the selected text. If no selection is marked, the start and end tags will enclose the word at the current location of the caret, if any.

    Not all HTML tags require (or permit) end tags. J is aware of this, and in general will insert an end tag unless it is forbidden to do so. If you'd like to customize this behavior, you can create a tag customization file with entries like this:
            p=0
    
    This line (for example) tells j not to insert an end tag for the "<P>" tag. You also need to tell j where this file is:
            HtmlMode.tags=/home/peter/tags
    
    The properties htmlUpperCaseTags and htmlAutoUpcaseTags are now obsolete.

    The new boolean properties HtmlMode.upperCaseTagNames and HtmlMode.upperCaseAttributeNames control the preferred case of tag and attribute names, respectively. By default, upperCaseTagNames is true and upperCaseAttributeNames is false, meaning tag names default to upper case and attribute names default to lower case.

    If the boolean property HtmlMode.fixCase is true, tag and attribute names will be converted to the preferred case automatically as you type them in (or, in the case of htmlInsertTag, when the tag is inserted in the buffer). HtmlMode.fixCase is false by default.

    The function electricEquals has been added, mapped by default to '=' in HTML mode. If the property HtmlMode.attributesRequireQuotes is true (which it is by default), electricEquals will automatically insert a pair of double quotes following the '=' after an attribute name and position the caret between the inserted quotes, so you can enclose attribute values in quotation marks without having to type the quotation marks themselves.

    gotoFile, mapped by default to Ctrl Shift G, has been enhanced to work better in HTML mode and with HTTP buffers. You can now place the caret anywhere within a tag that contains either an "href=" or "src=" attribute, and Ctrl Shift G will open the referenced file, allowing j to function as a poor man's source browser.

    Finally, j no longer attempts to realign pasted text in HTML mode. It never worked right.

    In other news, there have been a number of improvements in Perl mode. Indentation works well enough now that indentRegion is supported, as well as the automatic realignment of pasted text. J now knows about all of Perl's built-in functions and highlights them correctly.

    Fixed a bug in the RecentFilesDialog that was causing a NullPointerException if you tried to re-open a file that had, in the meantime, been truncated so that your saved position was beyond the end of the file.

    It's now possible to invoke dir, mapped by default to Ctrl D, from a shell buffer.

  • Jan 16 2000 7:58 PM - Version 0.0.9

    This release includes a number of architectural improvements which I hope will be unnoticeable to the user, as well as a couple of new features and a number of bug fixes.

    Perl support has been improved. Syntax highlighting is more accurate and more robust, and rudimentary tag support has been added. You can now use Ctrl Shift L to list the subroutines in the current buffer, but tag files are not yet supported for Perl.

    On Windows, you can now use forward as well as backslashes in filenames in dialogs such as the Open File dialog and to specify files on the command line when invoking j. Even if you use both kinds of slashes in the same filename, j will try to do the right thing. In addition, j now recognizes the Cygwin drive notation (//c/, //d/, etc.).

    Reorganized things to avoid strange behavior when the j's current directory is not local. This should fix a number of problems when you're working with FTP or HTTP buffers.

    The 0.0.8 release broke the syntax highlighting of HTML with embedded JavaScript. Fixed.

    When building j, you can now optionally invoke ./configure with the --with-java option, for example:
            ./configure --with-java=/home/peter/blackdown/jdk1.2.2/bin/java
    
    If you don't specify this option, java needs to be in your path. (The configure stuff isn't fully hooked up yet, so there's really nothing to be gained at this point by specifying one java rather than another, but you'll need to use the --with-java option if java is not in your path.)

  • Jan 10 2000 8:47 PM - Version 0.0.8

    The way colors and styles (plain, bold or italic) are specified in themes has changed. There is a new set of properties to specify color, a new set of properties to specify style, and a new self-explanatory naming convention. The key to the design is that each property can be specified globally and (optionally) overridden on a mode-specific basis. For example:
            # Global default colors.
            color.text=black
            color.comment=0 128 0
    
            # Global default styles.
            # Font.PLAIN is 0, Font.BOLD is 1, Font.ITALIC is 2.
            style.text=0
            style.comment=2
    
            # Silly overrides for Lisp mode.
            LispMode.color.comment=255 0 255
            LispMode.style.comment=2
    
    The new architecture allows each syntactic element's color and style to be specified independently for each applicable mode, inheriting global defaults if there is no mode-specific setting. This is clearly an improvement over the previous scheme, which was a bit ad hoc to say the least.

    The following colors have (for obvious reasons) no corresponding style properties, but the colors are still settable both globally and by mode:
            color.caret
            color.background
            color.currentLineBackground
            color.selectionBackground
    
    These changes break existing themes. I've fixed the themes in the normal distribution, and I've provided a script you can use to fix any custom themes you might have (you'll need the Cygwin tools if you're using Windows).

    The source distribution now comes with a reasonably normal autoconf configure script. You'll need to run ./configure before you can successfully run make. There's still no make install, but that should be coming soon. Once again, on Windows you'll need the Cygwin tools.

    Removed toggleAutoNewline. You can control this behavior with the autoNewline property in ~/.j/prefs.

    You can force directories to appear grouped together at the top of directory buffers by adding the following line to ~/.j/prefs:
            dirSortDirectoriesFirst=true
    
    This is actually the default behavior if you're using j's internal directory format, which is what you get by default under Windows. (This option was available before, but it fell by the wayside during the recent renaming pogrom.)

    Added Makefile mode.

  • Jan 4 2000 5:09 AM - Version 0.0.7

    The big new feature is replaceInFiles, mapped by default to Ctrl Shift R and available on the Search menu.

    You can now suppress the Find In Files progress dialog by adding this line to ~/.j/prefs:
            FindInFiles.displayProgressDialog=false
    
    Even without the progress dialog you can still cancel the search by hitting Escape.

    All the functions and properties (color names in particular) that used to start with "dired" have been renamed and now start with just "dir" instead. This means you have a little work to do if you're using custom keymaps or themes (replaceInFiles is your friend). I've fixed the themes that are part of the normal distribution.

    In addition, the property Dired.useNativeFormat has been renamed to dirUseNativeFormat (with no prefix).

    If you want to use any of j's experimental features (currently shell and compilation buffers and jdb support), you'll need to add this line to ~/.j/prefs:
            enableExperimentalFeatures=true
    
    Shell and compilation buffers are now permitted under Windows 9x, but you'll need to use bash as your shell. Add a line like this to ~/.j/prefs:
            shellFileName=bash -i
    
    Even so, compilation buffers don't work correctly under Windows 9x if you're using Java 1.1.x. They do work with the 1.3 beta from Sun. (I haven't tested 1.2.x.)

    The jdb support in shell buffers (yet another undocumented feature) is much improved.

    Command history for shell buffers is now saved from one session to the next.

    If experimental features are enabled, the default keymap now includes shell (F9), nextError (F4), and showMessage (Alt M). In addition, in Java mode recompile is mapped to Ctrl F9 and default mappings have been added for the jdb support functions. See the source for details.

    Binary files now load at least an order of magnitude faster and consume much less memory.

  • Dec 5 1999 9:11 PM - Version 0.0.6

    Command line options now begin with "--", rather than "-", as in "--debug".

    Added the --no-restore, --no-session and --force-new-instance command line options. The --no-restore option instructs j to start up without restoring the previous editor session; when j exits, the new session will be saved as usual. The --no-session option is similar, but goes a step further: the new session will not be saved on exit. The --force-new-instance option, as its name suggests, starts up a new instance of j even if j is already running.

    These new command line options facilitate the use of j in certain common (but hitherto unsupported) editing situations. For example, if bash is your shell, you can set the EDITOR environment variable like this:
            export EDITOR="j --no-session --force-new-instance"
    
    Then, when you check in a file using cvs or Perforce (for instance), a separate instance of j will be used as the editor for your log message, without disturbing the instance of j that may already be running. (If you like to live on the edge, you can even do this from within a j shell buffer. Remember, shell buffers are an undocumented feature.)

    Added the --help command line option, which is useful if you have trouble remembering what the command line options are.

    Keymaps are now reloaded dynamically if you use j to edit them. All the keymaps are reloaded if you use j to make a change to ~/.j/prefs. The upshot of this is that you no longer have to restart j for keymap-related changes to take effect. (This also applies to the useIncrementalFind preference setting.)

    On Unix, j now does its best to preserve the permissions for the files you edit. It should now be possible to edit shell scripts, for example, without losing execute permission when the file is saved.

    FTP passwords are now permitted to be blank (as long as that's OK with the server).

    slideIn and slideOut, mapped by default to Alt ] and Alt [. respectively, now act on the current line if there is no selected region.

  • Nov 29 1999 8:56 PM - Version 0.0.5

    Support for editing remote files using FTP is official now. You can open a remote file or directory by simply specifying a filename beginning with "ftp://" in the Open File dialog box, as in
            ftp://annie/home/peter/foo.txt
    
    or even
            ftp://24.0.190.152/home/peter/foo.txt
    
    You will be prompted for a login and password on the remote machine. If you leave the login blank, "anonymous" is assumed. For convenience, you can specify a password for anonymous logins in ~/.j/prefs:
            ftpAnonymousPassword=mickey@mouse.com
    
    FTP is also supported in the Save As dialog box, so you can create a new buffer and then save it on a remote machine.

    If you're looking at a remote file, dir (mapped by default to Ctrl D) will bring up a directory buffer on the remote directory containing the file in question.

    Remote file operations (loads and saves) display a progress dialog with a Cancel button in case the going gets tough. A save that's cancelled midway through will not disturb the original file on the remote machine, but it will probably leave behind a uniquely named temporary file.

    By default, the progress dialog is not displayed right away, so if you have a fast connection you may not see it at all, but if you need to abort a remote file operation, the Cancel button will appear in due time. Exactly what constitutes "due time" is determined by a setting in ~/.j/prefs:
            patience=5
    
    patience represents the number of seconds before the progress dialog appears; a setting of zero will make it appear right away. (The default is 5 seconds.)

    The FTP support seems fairly solid (it's been an undocumented feature for quite a while), but it still needs a bit of work. In particular, autosave and backup are not yet supported and revertBuffer is not yet implemented for remote files.

    diredMoveFile and diredCopyFile now handle the destination file name much more intelligently. In particular, "~", "." and ".." are handled correctly.

    Added diredColorDirectory to support display of directories in a different color to distinguish them from normal files in directory buffers. The themes in the themes directory have been updated accordingly.

    The Properties dialog is available for more types of buffers now, and the fields it displays are tailored to the buffer in question.

    J is a bit smarter now about figuring out what kind of file it's dealing with. Zip files are recognized even if they don't have the ".zip" extension, for example, and files with the ".zip" extension that aren't really zip files are handled correctly too. Text files containing high ASCII characters are no longer forced into binary mode.

    commentRegion now comments comment lines too, so uncommentRegion will do the right thing.

  • Oct 31 1999 8:11 PM - Version 0.0.4

    Added binary mode. If you open a binary file, j will detect that it's a binary file (if all goes well) and automatically open it in binary mode. If you'd like to look at a text file in binary mode, you can do so by changing the mode of the buffer in the Properties dialog. For now, binary mode is read only.

    Added recentFiles, mapped by default to Alt R and also available on the File menu. You can click on the column headings in the Recent Files dialog to change the sort order.

    The indentBeforeBrace property (which is settable on a per-buffer basis in the Properties dialog and on a per-mode basis in ~/.j/prefs) should now work correctly in Java mode and its derivatives. By design, we don't ever indent before the opening brace of a function or class, even if indentBeforeBrace is true, and we always indent after it, even if indentAfterBrace is false.

    Added showMessage, which formats and displays the compiler message corresponding to the current error in the compilation buffer. (Compilation buffers are an undocumented feature.)

    When you use compile or recompile, if there's an existing compilation buffer and it's already visible in a secondary frame, that frame is no longer brought to the foreground automatically. This means that you'll stay in the frame you're already working in, and you can use nextError and showMessage from there to fix any compilation errors. Normally it's not very useful to set focus to the frame containing the compilation buffer, which was the former behavior. It still gets the focus the first time, but that should only be once per session.

    Zip files are now closed correctly when we're done with them.

    In Java mode, findTagAtDot no longer mistakes "if" and "while" for plausible tags.

    selectPageUp and selectPageDown now behave correctly at the beginning and end of the buffer.

  • Sep 29 1999 9:15 AM - Version 0.0.3

    In Java mode and its derivatives, findTagAtDot is a bit smarter about figuring out what tag you actually want to find. If the identifier under the caret doesn't appear to be the name of a function, j will try to find a more appropriate candidate. If there's only one function call on the current line, you should be able to do Alt . anywhere on the line and get the right tag. In addition, in Java mode (but not its derivatives) findTagAtDot now attempts to resolve ambiguities among overloaded functions based on the number (but not type) of arguments in the call.

    Completions are now supported in the Find Tag dialog. Use Tab (or Shift Tab) in the text field to cycle through completions of the string you've entered.

    In Java mode, a tag is now added for the class itself ("class Foo").

    Tag paths are now supported. You specify them in ~/.j/prefs:
            tagPath=/dosc/e/src
            JavaMode.tagPath=/usr/lib/jdk1.1/src/java/lang:/usr/lib/jdk1.1/src/java/util
    
    If the tag you're looking for can't be found in the current buffer or the current directory, j will also look in the directories on the mode-specific tag path, or in the directories on the global tag path if there is no mode-specific tag path for the current mode. The current directory is always searched first, so there's no need to put "." in your tag path.

    J now uses a custom file save dialog, similar in appearance and behavior to the Open File dialog, for saveAs, saveCopy, writeGlobalKeyMap and writeLocalKeyMap. It comes up a lot quicker.

    Defaults.openFileCompletionsIgnoreCase is now Defaults.fileCompletionsIgnoreCase. This flag controls filename completions for both open and save on Linux; it is ignored on Windows, which has a case-insensitive file system.

    Added native format for directory buffers and a couple of related preferences:
            Dired.sortDirectoriesFirst=true/false
            Dired.useNativeFormat=true/false
    
    useNativeFormat defaults to false for Windows, but you might want to set it to true if you have the Cygwin tools installed and in your path. useNativeFormat is true by default for Linux. sortDirectoriesFirst defaults to the false for native format, true otherwise.

    Speed search per se is no longer supported in directory buffers. Use incrementalFind instead. Since alphabetic keys no longer invoke speed search, diredSetFilter is now mapped by default to F (with no modifiers) in directory buffers.

    Syntax highlighting and indentation are a bit better in Perl mode. The default Perl mode keymap now includes electricBrace, closeParen and insertBraces. commentRegion and uncommentRegion now work in Perl mode. The realign pastes feature is still turned off in Perl mode (indentation is not that far along yet), and Perl mode still does not support tags.

    In HTML mode, htmlStartTag and htmlEndTag are now mapped by default to Ctrl Shift , and Ctrl Shift . In addition, these functions now refuse, as they should, to insert text in a read only buffer.

    J now works with no known problems with the new IBM 1.1.8 VM for Linux. Startup is a bit slower than with Blackdown 1.1.7v3, but otherwise it's faster and very stable. Recommended!

    A number of hacks to support the IBM 1.1.6 VM for Linux have been removed. They never worked very well anyway. Upgrade to 1.1.8!

    J also works well with the Sun Java 1.3 beta for Windows. 1.3 seems to fix the Java/Swing bug that caused spurious keystrokes to show up in dialog box text fields when you used Alt key mnemonics to check or uncheck checkboxes.

    Added the function recompile, which is exactly like compile except that it simply repeats the last compile command, which is what you want to do most of the time. (Compilation buffers are an undocumented feature.)

    In HistoryTextFields, Ctrl P and Ctrl N can be now used to navigate the history list, just like the up and down arrows.

    Where possible, the context is now displayed in the status bar if there's no other information that needs to be displayed there. You can disable this by setting StatusBar.displayContext to 0 in ~/.j/prefs, or you can get a more verbose context display by setting it to 2; the default is 1, which just displays the name of the current function. As they say, offer void where prohibited, not available in all modes.

    Quoted strings are now more brown than red in the default color scheme.

    The about box (mapped by default to Alt V) now displays a bit more information, including a date/time stamp for the build.

  • Sep 15 1999 8:04 AM - Version 0.0.2

    Added Lisp, Perl, and shell script modes. All the new modes do syntax highlighting, but only Perl mode makes any attempt to support indentation according to context (and it's not very far along). In Lisp and shell script modes, newlineAndIndent (mapped by default to Enter) simply matches the indentation of the previous line. Lisp mode supports tags (findTag, findTagAtDot, listTags), and findMatchingChar works correctly on parentheses in Lisp mode (but not inside quoted strings). There's still a lot of work to be done before these modes are fully functional, but they should already be better than plain text mode for editing these kinds of files.

    If you use the new modes you're likely to find cases where the syntax highlighting is wrong; if you tell me about them I'll try to fix the problems (send the code in question if possible).

    Fixed a NullPointerException involving pastes at the end of the buffer.

    Fixed a NullPointerException in diredSetFilter.

    In HistoryTextFields, the up and down arrow keys, used to navigate the history list, are now mapped to getPrevious and getNext, respectively, as they should be; previously the mappings were reversed.

    electricSemi is now disabled inside /* */ comments.

    Fixed the new align paste feature to work better with JavaScript embedded in HTML.

    The Find Tag dialog no longer has a "Use other frame" checkbox. I'm thinking about other ways to provide this functionality in all the places where it makes sense (the Open File dialog springs to mind as another such place).

  • Sep 7 1999 8:33 AM - Version 0.0.1

    This is the first release with a version number. The version number is reported by about, mapped by default to Alt V.

    The distribution scheme has been changed. Both source and binary distributions are now available in tar.gz, tar.bz2 and zip formats. (The contents of the various packages for a given distribution should be identical; the only difference is the compression.) When you unzip or untar any of these packages, you'll end up with a subdirectory called (in the current case) j-0.0.1. In this subdirectory is a shell script called j. If you're running Linux, and if your CLASSPATH is already set to include swingall.jar and classes.zip from your Java distribution, you should be able to run j simply by running this shell script. (It might also be handy to put a symlink to it in /usr/bin or /usr/local/bin. This is clearly a job for "make install", but for now you'll need to do it manually.)

    The binary distribution now includes both documentation and themes. The aforementioned shell script sets a property on the command line to let j know where it's running from, so in the default case, if you don't move things around, F1 should work right out of the box. So you shouldn't need to set docPath in ~/.j/prefs if you're using the new shell script. (If you do set docPath in ~/.j/prefs, that setting will take precedence.)

    When you paste a block of lines (more precisely, any string ending in either a carriage return or a linefeed) into a buffer that supports indentation according to context, the inserted lines will have their indentation adjusted to match their new context. In addition, paste now correctly marks the buffer pasted into as modified.

    Added killFrame, which closes the current frame. Mapped by default to Ctrl Shift W.

    killLine is now more efficient about killing blank lines.

    incrementalFind has been cleaned up substantially. It now supports history, mapped to Ctrl P and Ctrl N. Ctrl W can be used to copy the next word (or the rest of the current word) from the buffer into the search pattern. You can then use any key combination that is globally mapped to incrementalFind or findNext to search for the next occurrence of the pattern.

    If you basically like the default global key map but would prefer to have incrementalFind, rather than find, mapped to Ctrl F, you can achieve this without defining a custom key map by setting useIncrementalFind to true in ~/.j/prefs.

    You can get to the normal (non-incremental) find dialog from the incremental find dialog by simply pressing Enter before you start typing a search pattern.

    Mouse button 2 (that's the middle one) is now mapped (whether you like it or not) to findTagAtDot in buffers that support tags (Java, JavaScript, C/C++, HTML). This sort of thing clearly needs to be configurable, but currently isn't.

    Fixed a bug that, in certain circumstances, was preventing tag files from getting generated in a timely manner when you opened files from a directory buffer.

  • Sep 2 1999 8:30 AM

    By request, you can now specify the location of your backup directory by putting a line like this in ~/.j/prefs:
            backupDirectory=/home/peter/.j/backup
    
    At the moment there's no specific error recovery if anything goes astray with this, so make sure the directory you specify can actually be created (j will create it for you if it doesn't exist, but you need to have the required write permissions and the name can't be total nonsense). If the directory can't be created, backups will fail, saves will fail, and you'll need to recover ~/.j/prefs from backup or use a different editor to fix it. Clearly, there's still a bit of cleanup required in this area.

    Added commentRegion and uncommentRegion, which do what their names suggest. (No, Charlie, guess again: commentRegion does NOT add informative comments to a block of code!) Mapped by default to F11 and Shift F11, respectively, these functions operate line-by-line and only work in Java, JavaScript, C and C++ modes (although the key mappings are global).

    Fixed a bug in findNext that was preventing it from working correctly in some cases if the pattern to be found was a single character.

    Ctrl O (or whatever you've got openFile mapped to) now works correctly as a shortcut to the Open button in the Buffer List dialog.

  • Aug 30 1999 9:08 AM

    Fixed a bug in findMatchingTagsInCurrentDirectory, called by findTag and findTagAtDot, which showed up if the tag to be found was the short name of a C++ class member function (i.e. without the class name and double colons). Tag functionality should work much better for C++ now.

    Made a cleanup pass through all the dialog boxes, fixing a number of minor bugs and trying to achieve a smoother and more consistent look and feel. Please let me know if I've broken anything.

    Added a combo box to the Properties dialog for setting the line separator. Removed the function setLineSeparator, which is obsolete now that we've got that combo box.

    Incremental find now highlights the found pattern.

    The Find In Files progress dialog (which is also used by listFiles) now displays the options that are in force for the current search.

    The Buffer List dialog now honors the user's global key mappings in the obvious way as shortcuts to its Save, Save All, Close, Close All and Open buttons. For example, if you have killBuffer mapped to Ctrl F4, you can use Ctrl F4 in the Buffer List dialog's list box to close the selected buffer. The new code even supports multiple synonymous mappings, so if you've got one of the relevant functions mapped to several different key combinations, you can use any of them to invoke the desired functionality.

    about is now mapped by default to Alt V.

    selectAll wasn't exactly living up to its name. Fixed.

    nextError, used in compilation buffers to go to the location of the next compilation error, was not scrolling that location into view correctly if the file in question was already open in a buffer. Fixed.

    By request, the status bar can now display the line separator for the current buffer (LF, CR, or CR+LF) and the total number of lines in the buffer in addition to the default information (mode, line number and column number). To activate the new options, add one or both of the following lines to ~/.j/prefs:
            StatusBar.displayLineSeparator=true
            StatusBar.displayLineCount=true
    
  • Aug 12 1999 10:16 AM

    Fixed a recently introduced bug in Editor.activate that caused the location of the caret to be wrong when a buffer was first loaded.

    Improved support for shell buffers under NT. (Shell buffers are an undocumented feature.)

  • Aug 11 1999 7:49 AM

    In directory buffers, diredMarkFile is now mapped by default to NumPad * as well as '*' (Shift 8).

  • Aug 10 1999 9:00 AM

    On NT, from time to time a save operation would fail for no apparent reason and then succeed if you simply tried again a few seconds later. J now tries harder to recover without user intervention if this particular problem arises.

    Under certain circumstances j was getting confused about whether a buffer was modified or not after undoing through a save. Fixed.

    Java 1.2, on both Windows and Linux, has trouble reading certain zip files that Java 1.1 handles just fine. This appears to be a bug in Java 1.2, but j wasn't recovering very gracefully from the resulting failure when you tried to open a zip file that couldn't be loaded. Fixed.

    Added error handling to recover gracefully in another obscure case, involving an attempt to open a directory buffer under Linux on an SMB mount that's gone south.

  • Aug 9 1999 8:40 AM

    The Back, Forward, and Contents buttons in j's built-in help browser are now hooked up and working correctly. The browser itself, which comes free with Swing and is worth every penny, is extremely slow and throws exceptions from time to time for no apparent reason, but it does work if you're very patient. See the help on the help command if you'd prefer to use a real browser.

    While testing the built-in help browser, I noticed that several of the help files contained illegal (or at best borderline) HTML. Fixed.

    Fixed a recently introduced bug in left and selectLeft when the current line is horizontally scrolled.

    Added error handling in the code that loads custom key maps. Now you'll get an informative error message if the file you're trying to load doesn't exist or if it contains a line that can't be parsed.

    Key maps may now contain blank lines and comments. A comment is any line whose first non-whitespace character is '#'.

  • Aug 4 1999 9:11 AM

    diredDeleteFiles, mapped by default to Delete in directory buffers, now lets you remove directories as well as delete ordinary files. The directory in question must be empty before it can be removed.

    You can now mark directories as well as ordinary files with diredMarkFile, mapped by default to '*' in directory buffers, so you can remove several directories at once.

    insertTab now works correctly in all cases when you're beyond the end of the actual text on the line.

    eob and nextError now cancel (rather than extend) the current selection, as they should.

  • Aug 2 1999 7:56 AM

    Added setLineSeparator. Set the line separator for the current buffer to the either "\n" or "\r\n", one of which must be supplied (without the quotes) as a string argument to this command. This is the first example of a command that requires an argument. Arguments should be supplied after the command name in the Execute Command dialog box, just like command line arguments to a program. For example:
            setLineSeparator \n
    
    The functionality of the setLineSeparator command should one day be moved into the Properties dialog.

    If a block is marked and the "Restrict changes to selected text" checkbox is not checked, replace now begins its work at the beginning of the marked block.

    findTagAtDot is now a bit smarter about identifying the tag it should find.

    If a block is marked, insertTab now deletes the marked block, like all other insertion commands, before inserting the tab character or equivalent number of spaces.

  • Jul 30 1999 9:03 AM

    Fixed a couple of bugs in insertParentheses.

  • Jul 29 1999 7:41 AM

    For Java files, the List Tags dialog now omits the class name from the tags displayed in the list box if it matches the filename of the current buffer.

    There's been a bit of architectural cleanup in the area of command dispatching. You shouldn't notice any change yet, but the foundation is now in place to support passing arguments to certain commands.

  • Jul 27 1999 8:38 AM

    findTag and findTagAtDot have always saved the original position of the caret on the marker stack, so that goback, mapped by default to Shift F5, could be used to get back where you started from. goback has now been renamed popPosition (the renamed function is still mapped by default to Shift F5), and the functionality of saving the original position of the caret on the marker stack has now been exposed as a new function, pushPosition. Since popPosition is mapped to Shift F5, it makes sense to map pushPosition to F5. That is now the default mapping. findTagAtDot, which used to be mapped to F5, has been moved to Alt . (that's Alt dot), which is the Emacs mapping for the equivalent function. The pushPosition functionality is still performed automatically by findTag and findTagAtDot.

    To get all the tag functions off F5, listTags, which was mapped to Ctrl F5, is now mapped to Ctrl Shift L. I wanted to map it to Ctrl Shift T, but it turns out that Ctrl Shift T is one of a number of key combinations that just don't work with the Blackdown VM(s) under Linux.

    Removed the useSystemClipboard flag. There doesn't seem to be any reason not to use the system clipboard, so things now behave as if useSystemClipboard is always true.

    undo is now mapped to by default to Alt Backspace, as well as Ctrl Z and NumPad *.

    There is now no default mapping for incrementalFind. It would be nice to use Ctrl I, but on some VMs Ctrl I hangs Java and on others the keystroke isn't even detected.

    findInFiles and listFiles now use markFoundPattern to select the found text.

    The accelerator text on the menus is now owner-draw so it can be consistent with the format of the key maps.

    There's lots of new documentation (mostly on the Command Reference page). Help is now a menu item on the help menu.

  • Jul 23 1999 8:00 AM

    find, findNext, findPrev, findNextWord and findPrevWord now select the text they find. This is particularly useful when you're doing a regular expression search, since it may not be obvious where the match ends.

    replace now works correctly when changes are restricted to a selected block of text. The most noticeable problem was that regular expressions that used repeating operators did not respect the boundary of the selected region if the region ended in the middle of a line. This is now fixed.

  • Jul 21 1999 7:50 AM

    Added insertParentheses, mapped by default to Ctrl Shift ( in Java, JavaScript, C and C++ modes. If a region is selected, insert parentheses around the selected region. Otherwise, insert an opening parenthesis followed by a closing parenthesis, leaving the caret positioned between them. If parensRequireSpaces is true, single space characters are added after the opening parenthesis and before the closing parenthesis.

    Added movePastCloseAndReindent, mapped by default to Ctrl Shift ) in Java, JavaScript, C and C++ modes. Move the caret past the next unmatched closing parenthesis to the right of its current location, insert a line separator, and indent according to context. Intended to be used with insertParentheses.

    For consistency, insertBraces is now mapped by default to Ctrl Shift [, rather than Ctrl [.

    I should note that getting the default key mappings to work for these functions was not easy. These particular keys do not generate the same keycodes on all platforms and VMs, and amazingly, with Blackdown 1.1.7v3 on Linux, they do not even generate the same keycodes consistently on the same platform. So there's a bit of hackery in JavaMode.setJavaModeDefaults to handle the various cases.

  • Jul 20 1999 7:57 AM

    The selection code has been reworked, after I noticed that it didn't behave very consistently with selections that extend into the empty area past the end of the actual text on a line. I'm not sure the new behavior is exactly right, but it seems to be a bit better than the old behavior. Please let me know if you notice any anomalies.

    While I was in the selection code, I noticed that it was trivial to display syntax highlighting within the selected region, so that is now the default behavior. This should only cause a problem if your color scheme uses a colorSelectionBackground that makes syntax-highlighted text hard to read. The themes I checked seem to work OK, but I haven't looked at everything. If you have a problem with this behavior and would like a flag to turn it off, please let me know.

    We now prompt for the location of the help files if there's no setting for docPath in ~/.j/prefs.

    diredRefresh is now mapped by default to Ctrl R instead of F5.

  • Jul 16 1999 7:46 AM

    Speed search in directory buffers has changed a bit. Now, when you start typing ordinary characters in a directory buffer, j moves the caret to the first actual directory entry that begins with the string you've typed, ignoring the file size, date/time stamp, etc. So now, for example, when you type 'j', you won't get a match on the file foo.cpp just because its date/time stamp contains "Jun".

    Fixed yesterday's change in left and selectLeft to work correctly with blank lines when the caret is not in the leftmost column.

  • Jul 15 1999 8:27 AM

    The default key mappings for toCenter and toTop (Ctrl - and Ctrl Shift -, respectively), now work with Blackdown 1.2 pre-release v2.

    By request, left and selectLeft now move to the end of the text on the previous line if the caret is already at the beginning of the current line.

    I need to correct a statement made in the July 13 release notes. On Windows, contrary to my earlier statement, there is a problem with menus if you use the Microsoft VM. J may appear to lose keyboard focus after you access the menu; when this happens, typing won't work. It's not really (or at least not trivially) a keyboard focus issue, but as a workaround, you can click away from j and then click back to restore keyboard functionality. J does not seem susceptible to this problem with the IBM 1.1.7 VM or any of the SUN 1.2.x VMs on the Windows platform.

  • Jul 14 1999 8:58 AM

    I forgot to mention in yesterday's release notes that j now uses the source and include paths to look for files specified on the command line, as well as those specified in the Open File Dialog.

    Selected text is now displayed with whatever style (plain, bold or italic) the same text would have if it weren't selected.

  • Jul 13 1999 7:26 AM

    Top-level menu mnemonics (Alt F, Alt E, etc.) now work to drop down the menus.

    In general, support for menus is pretty broken in the current state of Java and Swing. Duplicate mnemonics are not handled sensibly, there's a tendency to insert stray keystrokes in the buffer when mnemonics are used, and, with 1.1.x VMs, merely typing Ctrl I after you've pulled down a menu and dismissed it is likely to hang the VM. (With 1.2.x VMs, Ctrl I is swallowed without a trace, which is benign by comparison but still a bug.) With the IBM Linux VM, using the mouse to pull down a menu and dismiss it makes it impossible, subsequently, to type normal text in the buffer. With Kaffe, any use of a menu at all locks up the VM.

    Given these problems, it might be a good idea to not even display the top-level menu on platforms where menus are known to have critical problems. I haven't gone to this extent, but I'm still considering it.

    The good news is that on Linux, menus seem to work fine now on Blackdown 1.1.7, which, in its green threads form, seems to be the best VM to use. On Windows, all three major VMs (Sun, IBM and Microsoft) should be OK; IBM is my favorite by a small margin, but they all work well. The one thing to watch out for, with all 1.1.x VMs, is the aforementioned hang when you type Ctrl I after accessing any menu. Don't do that!!

  • Jul 9 1999 7:27 AM

    Extensive but mostly transparent changes to the architecture of modes and preferences. The only visible change is that the mode-specific variables defaultTabWidth, defaultIndentSize and defaultWrapCol have been renamed tabWidth, indentSize and wrapCol, to match the global defaults with the same names. In addition, you can now set indentBeforeBrace and indentAfterBrace both globally and on a mode-specific basis in your preferences file. In general, this means you can do things like this in your preferences file:
            # Set global default tab width...
            tabWidth=8
            # ...but use different values for C++ and Java.
            CppMode.tabWidth=2
            JavaMode.tabWidth=4
    
    You can now control how j chooses what mode to open a file in by specifying regular expressions correspoding to each mode in your preferences file. See the Modes page of the documentation for details.

    There's now a C mode, distinct from C++ mode. By default, .h files are opened in C++ mode, but you can change this behavior by specifying appropriate regular expressions in your preferences file.

    The functions plainTextMode, javaMode, cppMode, javaScriptMode and htmlMode have been removed. It's easier to use the Properties dialog to change the mode of a buffer.

  • Jul 1 1999 7:32 AM

    toCenter and toTop are now mapped by default to Ctrl - and Ctrl Shift -, respectively.

    Fixed a number of relatively benign buglets in various text insertion functions(insertKeyText, htmlInsertMatchingEndTag, etc.). These functions were not always entirely meticulous about updating the modified status of the buffer, the position of the caret, and/or the undo information.

    Mikol has contributed five new themes. They're in the "themes" folder of the source distribution.

  • Jun 29 1999 7:06 AM

    Added htmlStartTag and htmlEndTag, mapped by default to Ctrl , and Ctrl . (think of Ctrl < and Ctrl >) in HTML mode. These functions insert an empty start or end tag and place the caret after the opening angle bracket or "</", ready for you to type in the text of the tag.

    Renamed htmlInsertEndTag to htmlInsertMatchingEndTag, for greater clarity and to avoid confusion with htmlEndTag. It's still mapped to Ctrl E in HTML mode.

    In HTML mode, if the variable Defaults.htmlAutoUpcaseTags is true, tags and attributes will automatically be converted to upper case as you type them in.

    Cleaned up the regular expression backreference code in replace so it works as documented. In yesterday's release, occurrences of $0, $1,..., $9 in the replacement string were treated as backreferences, an artifact of the underlying gnu.regexp code. Now only \1, \2, ..., \9 are treated as backreferences, as documented. You can still use "\&" in the replacement string to refer to the entire string that matched the pattern.

  • Jun 28 1999 7:53 AM

    When using regular expressions, replace now supports variable substitution in the replacement string, so the replacement string can refer to all or part of what is matched by the pattern. "\&" in the replacement string will be replaced with the entire string that matched the pattern. "\n", where n is a digit from 1 to 9, will be replaced by whatever matched the nth parenthesized grouping in the pattern.

    For example, if you specify this pattern:
            foo\( (.*), (.*) \)
    
    and this replacement:
            foo( \2, \1 )
    
    the effect would be to reverse the order of the arguments in every call to the function foo. Note that you need to escape the literal parentheses in the pattern, but not in the replacement.

    By default, find is now mapped to Ctrl F (as well as to Alt F3). incrementalFind is mapped to Ctrl I.

    There's now a Regular Expressions page in the documentation (F1).

  • Jun 25 1999 7:59 AM

    saveGlobalKeyMap and saveLocalKeyMap are now writeGlobalKeyMap and writeLocalKeyMap, respectively.

    You can now specify an arbitrary global key map in ~/.j/prefs, like this:
            globalKeyMap=/home/peter/globalkeys
    
    J will load the global key map from the specified file, rather than using its internal defaults. The specified file must be in the format used by writeGlobalKeyMap. The same functionality is also supported for mode-specific key maps:
            JavaMode.KeyMap=/home/peter/javakeys
    
    There's a new command called insertKeyText, available from the Execute Command dialog box (which is mapped by default to Alt X). When you invoke this function, it looks like nothing is happening, but in reality j is waiting for you to type something; the next key combination you type will be inserted as text at the location of the caret, in the canonical format used by writeGlobalKeyMap. Useful for editing key maps.

    You can now, in theory, set any public static variable in j in your preferences, with a line like this:
            JavaMode.defaultIndentSize=8
    
    If you omit the class name, it defaults to "Defaults". If you use j to edit ~/.j/prefs, your preferences are now reloaded automatically when you save changes to the file. Furthermore, the public static variables in the Defaults class are reset to their default values before your preferences are reloaded. This means that simply removing (or commenting out with "#") the line in ~/.j/prefs that sets a variable is enought to restore it to its default value as long as the variable in question is a member of the Defaults class. You'll need to reset variables in other classes explicitly or restart j after you remove the lines that set them.

    As a convenience, since you might find yourself editing your preferences more frequently under this new scheme, if you just enter "prefs" in the Open File dialog, j will open your preferences file. If you really want to edit some other file named "prefs", enter its full path.

    J now supports themes. You can put a line like this in ~/.j/prefs:
            theme=/home/peter/j/themes/Dark
    
    The specified theme file is loaded as an additional preferences file after ~/.j/prefs is loaded. The idea is to gather all the settings that relate to j's look and feel in one place. The source distribution now includes a "themes" folder, which contains, at present, two themes: "Default", which is simply a packaging of j's internal defaults as a theme, to provide a starting point, and "Dark", which is a dark background theme contributed by Bruce H.

    If you use j to edit your current theme, when you save your changes, all the public static variables in the Defaults class are reset to their default values, as mentioned above, and then both your preferences and your theme are reloaded automatically. (In fact, your theme is also reloaded automatically if you just change ~/.j/prefs.) In addition, j's display is re-initialized and redrawn, so you should be able to see the effects of changes to your theme right away.

    The architecture is a little bit in flux right now in the areas of preferences, defaults, key maps, and themes, but you can see where we're going. The basic idea is that you should be able to do normal customizations of j (colors, key mappings, basic settings) without going to the trouble of writing, compiling, and maintaining an extension class. If you already have an extension class, it will still work, but it's a good idea to move as much of its functionality as possible into ~/.j/prefs or into a theme or key map, where things should be much more maintainable. In addition, if you have code in your extension class that changes public static variables in the Defaults class, bear in mind that those variables will be reset to their default values whenever you save changes to ~/.j/prefs or to your current theme.

    I'm under no illusion that the current set of public static variables in the Defaults class is anywhere near complete. Please let me know what changes or additions you would find useful (or indispensable), and I will try to make them happen. (It's also clear that additional factoring is needed in this area; in particular, some of the mode-specific settings in Defaults will probably move to the modes themselves.)

    J now supports keyboard macros. The function recordMacro, mapped by default to F7, starts the recording of keystrokes, which continues until you press F7 (or whatever you've remapped recordMacro to) again. You can then use the function playbackMacro, mapped by default to F8, to play back the recorded keystrokes. The implementation of this is very simple, and you can't do anything fancy. In particular, you can't record through a dialog box. Mouse events are not recorded.

    In Java, JavaScript, and C++ modes, comments are now displayed by default in an italic font. You can control this by setting the variable Defaults.styleComment (0 is plain, 1 is bold, 2 is italic) in ~/.j/prefs or in your theme.

    Finally, the documentation (mapped by default to F1) has been updated to reflect many of these changes. In particular, check out the pages on Key Mappings and Preferences. You'll need to set the docPath in ~/.j/prefs to point to the directory containing the documentation for F1 to work.

  • Jun 17 1999 6:52 AM

    The source distribution now provides a bit of documentation. help, mapped by default to F1, invokes j's built-in HTML browser to view what few help files there are. For this to work, you'll need to set the variable docPath in ~/.j/prefs or C:\.j\prefs to point to the directory containing the documentation, like this:
            docPath=/home/peter/j/doc
    
    J's built-in HTML browser is a thin wrapper around the Swing HTML rendering engine, and it doesn't work very well (in fact it may not even make the cut when the team heads north), so it's recommended that you configure j to use a real browser to view the help files, which you can do by setting the variables browser and (optionally) browserOpts in ~/.j/prefs, like this:
            browser=gnome-moz-remote
            browserOpts=--disable-sound
    
    (If you're running Unix and use Netscape Navigator as your browser, you might want to try gnome-moz-remote, which is a small program distributed with Gnome. If Navigator is already running, gnome-moz-remote opens the given page in the currently running Navigator; otherwise it opens the page in a new Navigator window.)

    If you invoke help from the Execute Command dialog box, you can specify the command you want help on at the same time ("help help", for example). (Please bear in mind that the documentation is nowhere near done, and there are lots of things that haven't been documented yet.)

    Added saveGlobalKeyMap and saveLocalKeyMap, which you can invoke from the Execute Command dialog box (mapped by default to Alt X). These functions prompt you for a filename and write out the key map in question to the file you specify, in human-readable form. Currently these functions only serve to generate supplementary documentation, but the idea is that in the future, j will be able to load key maps from text files in the same format, so you will one day be able to customize your key assignments without having to write an extension class.

    Added diredBrowseFile, mapped by default to Ctrl B in directory mode. This command uses your default browser to view the file at the location of the caret in a directory buffer. For this command to work, you need to specify a browser in ~/.j/prefs, as described above.

    If you use j to edit ~/.j/prefs, your preferences are now reloaded automatically when you save changes to the file, so, for example, you can change default browsers without restarting j.

    The functions jumpToLine and diredSetFilter now use a custom input dialog instead of JOptionPane.showInputDialog.

    diredSetFilter now does nothing at all unless you actually make some change to the filter (it used to reload the directory, no matter what).

    On Windows, dir (which is mapped by default to Ctrl D, and opens a directory buffer on the current directory) now works correctly in the root directory of a given drive.

    htmlInsertEndTag now places the inserted end tag correctly at the location of the caret on a blank line, instead of forcing the inserted tag to the very beginning of the line.

    Tab characters are now handled correctly in shell buffers.

  • Jun 4 1999 7:21 AM

    One of the recent changes in the behavior of filename completions in the Open File dialog has been reversed. Now, on platforms where the file system is case-insensitive (Windows) or if the variable Defaults.openFileCompletionsIgnoreCase is true (which it is by default), completions really do ignore case. We no longer require, additionally, that the prefix being completed be all lower case to begin with, which didn't work well if you tried to use a series of completions to construct a long mixed-case pathname.

    In directory buffers, if you navigate to the parent directory, the caret is now placed on the name of the directory you came from.

    Added htmlBold, mapped by default to Ctrl B in HTML mode. This function inserts an HTML bold tag "<b>" at the location of the caret. The case of the inserted tag is controlled by the variable Defaults.htmlUpperCaseTags, which is false by default.

    find is now mapped by default to Alt F3; incrementalFind remains mapped by default to Ctrl F.

    Fixed slideIn and slideOut to work correctly with actual tab characters.

    If go into a shell buffer and change, for example, the read-only status of a file that's loaded in another buffer, when you switch back to that file's buffer we now detect that change correctly. Shell buffers, remember, are an undocumented feature, despite what you're reading here.

    The makefiles, while still totally inadequate, work a bit better now. Remember that on Windows, using the Cygwin tools, you need to type "make --unix".

  • May 20 1999 8:03 AM

    Archive.openFileAtDot now refuses to open directories, fixing a NullPointerException bug that formerly occurred in that situation.

    Shell buffers now make an attempt to set their initial directory correctly.

    Buffer titles are now cached (at least for normal buffers), and Editor.setTitle now calls Frame.setTitle only when the title has actually changed.

  • May 19 1999 7:44 AM

    There's been a major reorganization of the directory structure of the source distribution. J is now a package. You'll want to unzip the new source into an empty directory. The top-level Makefile should work to build everything (on Windows with the Cygwin tools you'll need to type "make --unix"). You still invoke j the same way ("java Editor"), but you'll need to put j's top level source directory (for me, that's ~/j/src) or j.jar (try "make jar") in your CLASSPATH, which is a change. Better documentation of all this will be available soon. This is the first release with the new packaging scheme, and things may not work as you expect, so proceed cautiously until you get everything built and running.

    Filename completion in the Open File dialog now works a bit differently. The names of files in the buffer list are now considered along with files in the current directory when looking for completion candidates. Only the short name (rather than the full path) of the candidate is displayed, if it's reasonable to do so (which is not the case if the string to be completed looks like a full path to begin with). To be consistent with other pattern matching functions in j, case is never ignored if the string to be completed is in mixed case or all upper case. Otherwise, case is ignored under Windows, where filenames are not case sensitive, or if the variable Defaults.openFileCompletionsIgnoreCase is true, which it is by default.

    There are now different taggers for C and C++. The C tagger recognizes functions with old style parameter lists, like this:
            int foo( bar )
                int bar;
            {
            }
    
    The C tagger also recognizes functions defined with the DEFUN macro used in the GNU Emacs source, like this:
            DEFUN ("get-process", Fget_process, Sget_process, 1, 1, 0,
              "Return the process named NAME, or nil if there is none.")
              (name)
                 register Lisp_Object name;
            {
            }
    
    The List Tags dialog now sets the selection in the list box based on where you are in the buffer. The OK and Cancel buttons have been removed (in accordance with j's style guidelines). Doubleclicking in the list box now has the expected effect, as long as you can put up with Swing's rather sluggish doubleclick response. To compensate a bit for the aforemention sluggish response, clicking once with button 2 (the middle button) is equivalent to a doubleclick (and much more responsive).

    Fixed a couple of relatively obscure indentation bugs.

  • May 13 1999 8:11 AM

    Fixed a NullPointerException affecting buffers that display files contained in zip archives.

    Buffers that display files contained in zip archives now have slightly more accurate titles.

    Fixed another NPE in the incremental find dialog for buffers that don't support undo/redo.

    The recent optimization of the file loading code in SystemBuffer.java introduced a bug that prevented the last (or possibly only) line of a file from being loaded if it didn't end with a line separator. Fixed.

    Shell buffers under Linux now do a much better job of detecting directory navigation. In particular, pushd and popd are now supported, as well as cd. The popd detection code does not work correctly with directories whose names contain an embedded space, however. In any case, if things do get out of whack, pwd should correct j's idea of what the current directory is, as indicated in the title bar. Shell buffers, remember, are an undocumented feature, despite what you're reading here, and to the extent that they work at all, they're much more likely to do so under Linux than under Windows.

  • May 12 1999 8:27 AM

    Fixed speed search in directory buffers so that the final key event is passed through, when appropriate, to the underlying editor window, as in normal incremental find.

    In the interest of clarity, removed Defaults.useBlockCaret and all code referencing it. This was an option which was never implemented correctly.

    Minor cleanup and optimization (probably unnoticeable) of the display code.

  • May 11 1999 7:08 AM

    Optimized the file loading code in SystemBuffer.java. Files should now load about twice as fast.

    Fixed NPE in incremental find in directory buffers, introduced yesterday when undo/redo support was removed.

    When you switch back to j from another app, the reactivate code now rebuilds the menus in case the buffer's read only status has changed.

  • May 10 1999 7:57 AM

    Major cleanup and restructuring of the undo/redo code. The sequence change, save, undo, save, redo now works correctly, in the sense that j believes the buffer to be modified at the end of the sequence, which was not formerly the case.

    Added diredMarkFile, mapped by default to '*' in dired mode. You can now mark multiple files and then delete them in a single operation. diredDeleteFile, mapped by default to Del in dired mode, has been renamed to diredDeleteFiles to reflect this new functionality. If no files are marked, diredDeleteFiles acts on the file where the caret is, like diredDeleteFile used to do.

    Syntax highlighting in directory buffers has been extended to support marked files. The variables Defaults.diredColorMarked and Defaults.styleMarked have been added to support customization.

    Undo and redo are no longer supported at all in directory and compilation buffers. Support previously was minimal at best and often confusing, and since you can't really edit these buffers, this should be a very small loss of functionality.

  • May 7 1999 6:34 AM

    You can now specify a line number when invoking j from the command line, like this:
            java Editor +100 Display.java
    
    This command line will open the file Display.java and put the caret at the beginning of line 100. This feature should also work correctly when the command line in question ends up getting passed to an already-running instance of j.

    In compilation buffers, thisError and nextError are now smart enough to fish the column number, as well as the line number, out of the jikes +D error format.

    Closing a buffer from the buffer list dialog (Alt B) didn't work correctly if the buffer in question was displayed in a second frame. Fixed.

  • May 5 1999 8:33 AM

    selectWord is now mapped by default to Alt W.

    In the Incremental Find dialog, Alt W (or whatever you've got selectWord mapped to, if you've changed its mapping) now extends the search pattern to the next word boundary.

    In the IncrementalFind dialog, you could always use Ctrl F (or whatever incrementalFind is mapped to) to move to the next occurrence of the current search pattern. You can still do that, but your findNext mapping(s) will work as well.

    Under the IBM VM on Windows, closeParen now does a better job of moving the caret briefly (and visibly) to the matching open parenthesis.

  • May 3 1999 7:57 AM

    Added compile (no default mapping) available under Linux only. compile prompts you for a command ("make", for example) and then executes that command, redirecting the output to a compilation buffer, which is displayed in a separate frame (unless you happen to invoke compile from a compilation buffer to begin with, in which case the existing compilation buffer is reused).

    If compilation errors occurred, you can use nextError (no default mapping) to visit each one in turn. J understands the error format used by gcc/g++, javac, and jikes with the +D option. You can also click on an error message in the compilation buffer with button 2 (the middle button) to go directly to that particular error.

    Added nextFrame, mapped by default to Alt N. Cycles through the open frames. The behavior of nextFrame is very dependent on your window manager. Ice works fine, but WindowMaker is reluctant to set focus to the new frame, even though it's correctly brought to the foreground.

    revertBuffer now does the right thing with HTTP buffers and zip files.

    Added a very minimal About box.

  • Apr 30 1999 8:36 AM

    The C++ tagger now recognizes const member functions for what they are.

  • Apr 28 1999 3:49 AM

    Renamed exec, mapped by default to Alt X, to executeCommand.

    The Execute Command dialog box now supports both history (using the up and down arrow keys) and completion (Tab).

    Reorganized the incrementalFind code a bit in an attempt to improve stability. There was a tendency (under Linux, using Blackdown Java 1.1.7 and tya) for the JVM to crash when the dialog was dismissed. I'm still not sure whose fault that was; the various Windows VMs have always worked fine.

    Under Linux, if you use the mouse to move the Incremental Find dialog, the text field now reclaims the input focus when you release the mouse button. (This was never a problem under Windows.)

    Added code to minimize the tendency of the IncrementalFind dialog, under Linux, to wander away from where you put it. (This too was never a problem under Windows.)

  • Apr 26 1999 7:44 AM

    JavaScript mode now has its own indentation code. Fixed a few indentation buglets.

    Tried to track down the cause of intermittent JVM crashes under Linux in the Incremental Find dialog (usually when the dialog is dismissed). The code now uses SwingUtilites.invokeLater to make sure display updates happen in the AWT event dispatcher thread.

    Made undo work a bit more precisely with the Incremental Find dialog.

  • Apr 23 1999 7:43 AM

    In the Open File dialog, completion of strings starting with ".." is now handled correctly.

    In the List Files dialog, you can now double click on an entry in the list box to open a file.

  • Apr 22 1999 6:58 AM

    There's now transparent support for viewing the contents of gzipped files (identified by the extension .gz) without having to gunzip them first. Handy for examining files in the /usr/doc tree. For the moment, it's a read only thing.

    Fixed mouse drag selection to work correctly with the IBM VM under Windows.

    The recent changes in the dispatcher code introduced a bug that caused the first keystroke to be dropped when speed search was invoked in a directory buffer. Fixed.

    The file INSTALL has been added to the distribution. It provides basic instructions for building, installing and running j.

  • Apr 21 1999 10:52 AM

    Fixed electricBrace to work correctly with the new dispatcher code for the IBM VM under Windows.

  • Apr 21 1999 7:28 AM

    Sorted out the KeyListener code in IncrementalFindDialog.java to make incremental find work correctly with the IBM VM under Windows.

    Changed the dispatcher code just a tad to make key mappings to printable characters like ';' and '{' work correctly with the IBM VM under Windows.

    Fixed the infamous and elusive underscore display bug, which affected both the IBM VM and Microsoft's jview and prevented bold underscores from being displayed, which was a big problem with function names containing underscores in the the default color scheme. It turns out that the default monospaced font for those VMs is a pixel taller when it's bold than when it's plain, although the character width is exactly the same.

  • Apr 20 1999 6:49 AM

    The recent changes in the dispatcher code left things pretty broken under Windows (stray characters would be added to the buffer when you used commands mapped to Ctrl or Alt keystroke combinations), even though everything worked fine under Linux. I think this problem is fixed now. I even booted into Windows to test, and everything appears to be back to normal, at least with Sun's 1.2 VM.

    Added the variable Defaults.lineupArglist. If this variable is true (which it is by default), function calls that span multiple lines will be indented like this:
            veryLongFunctionName(arg1,
                                 arg2);
    
    If you set Defaults.lineupArglist to false in your extension class, the indentation will look like this:
            veryLongFunctionName(arg1,
                arg2);
    


  • Apr 19 1999 8:28 AM

    Fixed the problem with menu mnemonics.

  • Apr 17 1999 9:54 AM

    Yesterday's changes in the dispatcher code introduced a bug that, under certain circumstances, caused a spurious character to be inserted in the buffer when you used a mapped keystroke to invoke a command (for example, Ctrl S to invoke save). This bug has been fixed.

    If the mnemonic of a menu item on one of the menus is the same as the mnemonic of a top-level menu, using the mnemonic to invoke the menu item will indeed work, but immediately thereafter the top-level menu with the same mnemonic will drop down. This clearly isn't the right behavior, but I haven't found a way to code around it, and in the case of the File menu (Save in particular), there doesn't seem to be any way to work around this problem by setting up unique mnemonics. So this bug is still unfixed, but it doesn't seem to cause any real damage.

  • Apr 16 1999 8:24 AM

    findPrev is now mapped by default to Ctrl H as well as Shift F3, for symmetry with findNext, which is mapped to Ctrl G as well as F3.

    selectLeft, selectRight, selectUp and selectDown now group their undos like left, right, up and down.

    The dispatcher code has been reorganized to work with IBM's recently released free Java VM for Windows (that's free as in free beer). I haven't actually tested that setup yet with the new dispatcher code, but the new code works fine with Blackdown Java under Linux, and it works with Kaffe under Linux about as well as the old code did, so I don't think I've broken anything.

  • Apr 15 1999 7:55 AM

    The Open File dialog now handles strings beginning with "." correctly. In particular, entering "." by itself gives you a directory buffer on the current directory, as you might expect, instead of a directory buffer on the directory you were in when you started j, which was the former behavior.

    When you switch back to j from another application, we now correctly exclude untitled buffers (created with newBuffer) when checking to see if another application has modified any of the loaded buffers.

  • Apr 14 1999 8:09 AM

    Added Defaults.useMenuMnemonics. Set this to false in your extension class to remove the mnemonics from the top-level menus, so that you can map Alt F, Alt E, etc., to functions of your own choosing.

    Enabled the "Indent before/after opening brace" checkboxes in the Properties dialog, and fixed the indentation code for Java, JavaScript, C and C++ to honor these settings. We still need user-settable (and possibly mode-specific) defaults for these.

  • Apr 13 1999 7:35 AM

    Under Windows, the Open File dialog now ignores case when looking for the requested file in the existing buffers.

    In the Open File dialog, directories are no longer excluded from filename completion under any circumstances. Previously, both directories and ordinary files were excluded if they matched the criteria defined in the function isExcluded (for example, if their extension was ".obj"). The intention was to reduce the overall noise during filename completion by skipping files you probably wouldn't want to edit. Now the exclusion is applied to ordinary files only. This functionality should be user-configurable in any case, but that's a project for another day.

  • Apr 12 1999 8:01 AM

    The menus now have mnemonics, so you should be able to use them without help from your mouse.

    To avoid conflicts with the new menu mnemonics, diredSetFilter and diredCycleSortBy have been moved from Alt F and Alt S to Ctrl F and Ctrl S, respectively.

    Archive mode now has its own key map. There's nothing much in it, but it never made sense for archive mode to share the directory mode key map, and after diredSetFilter moved to Ctrl F, trying to use Ctrl F to bring up the Find (or Incremental Find) dialog in archive mode caused bad things to happen. All fixed now.

    Added closeAll, available from the File menu and the Buffer List dialog.

    Removed the Select and Cancel buttons from the Buffer List dialog (they had misleading names and didn't really add any functionality), added a Close All button, and gave all the buttons working mnemonics.

    killBuffer now does nothing if the only buffer left is a directory buffer (it used to kill the buffer and then reload it).

    Made findTag work in directory buffers.

    shellPreviousInput and shellNextInput now update the display correctly.

    If you enter a filename with no path in the Open File dialog, j now looks for a matching file in the current directory first. If (and only if) there's no such file in the current directory, j will then try to find a match in the existing buffers. Previously, these things were happening in the other order, which is less natural (you're more likely to know what directory you're in than what all the other buffers are).

  • Apr 6 1999 8:19 AM

    There is now preliminary support for defining methods in your extension class that can be mapped to a keystroke. Mappable methods must be static, must be public, must return void, and must take no arguments. For a useless but possibly instructive example, see the method test in pg.java, mapped there to F8. A problem with this capability at the moment is the fact that very few things in j are declared to have public access. This won't be a problem if your extension class lives in the same directory as j's .class files, but if you want to put it somewhere else, you'll run into problems if you try to use methods or members in j's classes that have default access (as most of them do). When this happens, let me know what you're trying to do and I'll try to arrange proper support for it. As time goes on, j will evolve to have a truly useful public API to support arbitrary mappable extensions.

    The C++ tagger now supports class names correctly.

    The display is now updated correctly when you dismiss the Properties dialog.

    The history list in the Find Tag dialog now does a better job of storing the actual found tag when you enter only part of the full tag name.

    Added the UnsynchronizedStringBuffer class, which, as its name suggests, is a partial implementation of a StringBuffer class without synchronized methods, so it's a bit quicker when synchronization is not actually needed. This class is used in SystemBuffer.load, so j is a bit quicker at loading files now.

  • Apr 2 1999 6:58 AM

    By request, added newBuffer, an implementation of the traditional File/New approach to creating a new file, mapped by default to Ctrl N and available on the File menu. The way this works internally, j creates a buffer corresponding to a hypothetical file called "Untitled-n" (where n is a small integer) in the current directory, with a special flag so that the first time you try to save the file you will be prompted for a real file name. This allows a lot of things (undo, autosave, etc.) to work transparently, but under certain circumstances (notably recovery after a crash), you may actually get a file named "Untitled-n" in the current directory. Probably better than a kick in the head, unless you already have a file with that exact name. This scheme may need a little refinement, so use it gently at first and let me know if you encounter any anomalies you think should be corrected.

    In C/C++ files, tab characters contained in disabled text (that is, in #if 0/#endif blocks) were not being expanded and displayed correctly. Fixed.

    SystemBuffer.load now handles zero-length files correctly.

    wrapParagraph now breaks after a semicolon if the going gets tough.

  • Apr 1 1999 6:54 AM

    expand is now mapped by default to Alt / instead of Alt E. (I was under the mistaken impression that the Alt / keystroke was undetectible under NT.)

    Optimized Core.detab, which is called by formatLine for every line that gets painted.

  • Mar 31 1999 8:44 AM

    Optimized the display code a bit.

    Fixed a couple of bugs affecting the indentation of switch statements.

  • Mar 30 1999 7:42 AM

    I've begun to add real support for the use of tab characters. These changes should not be noticeable at all if you don't use actual tab characters in your files. If you do use actual tab characters, you'll notice that the left and right arrow keys now move left or right by one character rather than one column, so if the character you're moving over happens to be a tab, the cursor may move more than you expect. In addition, if you delete a character that looks like a space but really is a tab, you may be surprised by the amount of whitespace that gets deleted. Inserting characters on a line that contains tab characters to the right of the insertion point may also elicit behavior that could seem a little strange at first. Things can get even weirder if your indent size is not the same as your tab width. Previously j tried to compensate for all these things a bit, but the behavior was never entirely consistent and certain things (selection in particular) were just broken, so I've removed all of the special case code.

    Maybe this is a good time to mention the functions visibleTabs, mapped by default to Ctrl Alt T, a toggle which lets you see where the actual tab characters actually are, and detabRegion, which is available from the Execute Command dialog box (mapped by default to Alt X). These functions have been around for a while, but you may not have felt a need for them before.

    Fixed a bug in Core.entab (and hence also in entabRegion) that was causing it to truncate the strings it entabbed if they already contained any tab characters.

    The files Editor.java and Display.java are now entabbed, with a tab width of 8 and an indent size of 4 (a perverse combination also favored by the JDK source), until I'm sure there are no more quirks in the tab handling code. cycleTabWidth (Alt T) is your friend...

  • Mar 29 1999 7:33 AM

    shell is no longer mapped by default to any keystroke. At this point it appears that the even best possible pure Java shell buffer implementation will still be too fragile to offer to a wide audience. I was going to say that shell buffers will be left in as an undocumented feature, but then someone would point out that (strictly speaking) j has nothing but undocumented features, so let me just say that shell buffers will be omitted from whatever documentation may eventually be provided. That said, you can still map shell to F9 (or anything else) in your extension class (see pg.java for an example); once you get a shell buffer, it will work like it always did, or maybe just a tad better.

    You'll now get a reasonable error message rather than an unstable system if j is unable to start the shell you've specified for your shell buffers.

    Output is no longer written to the wrong buffer if you switch away from a shell buffer with output pending.

    Shell buffers now report their current directory correctly (at least to the best of their limited ability), so it's possible (on a good day) to navigate to a different directory in a shell buffer and open files there without having to specify the full path.

  • Mar 25 1999 8:59 AM

    Added shellPreviousCommand and shellNextCommand, mapped by default to Ctrl P and Ctrl N, respectively, to provide support for command line history in shell mode.

    Added shellEscape, mapped by default to Esc in shell mode, which clears any input text that may be on the command line, leaving you with a bare prompt. This helps you get a fresh start if you fish through the history and don't find what you want.

    Added code to make it less likely that you'll casually backspace over your prompt in shell mode.

  • Mar 24 1999 7:58 AM

    There's now a bit of support for filename completion in shell buffers. If you type part of a filename and hit Tab, j will complete the entered string up until the point where further completion is ambiguous. If you hit Tab again at this point, you'll get a list of possible completions. The idea is that you can type in another character or two and hit Tab yet again to keep going. There are undoubtedly some bugs in this right now. For one thing, j tries to watch over your shoulder as you work in the shell buffer in order to keep track of what directory you're in. Right now, in j's limited view of things, the only command that changes the current directory is cd, which of course isn't true, and in addition j expects cd to be the first and only command on the line. So if you always change directories using cd and never put an additional command on a line containing a cd, j just might be able to keep up with you. You can tell where j thinks you are by looking at the title bar of the window. If you see that j has become confused, you could try doing a cd to the directory you're really in (which should have no effect on the actual shell) and hope that j notices. I'll try to make j a bit smarter about all this as time goes on. Filename completion has only been tested on Linux, so there may also be some bugs under Windows that I'm not aware of.

    Fixed a bug in startServer that was causing an exception when j was run for the very first time on a new machine. startServer now makes sure that the ~/.j directory actually exists before trying to create a file there.

  • Mar 23 1999 8:24 AM

    Added the variables shellFileName and shellPromptRegExp to Defaults to facilitate customization of shell buffers in your extension class. shellFileName can be set to the name of your favorite shell, plus any required command line parameters, if you don't like j's defaults. (See pg.java for an example of how to do this for different platforms.) shellPromptRegExp should be set to a regular expression that will match your shell's prompt string, so j will be able to recognize it correctly. The default is "^[^#$%>]*[#$%>] *", but j reserves the right to revise the default after seeing the first actual prompt.

    Shell buffers now support tcsh as well as bash under Linux. (In fact, the tcsh support actually seems to work a bit better than the bash support.)

    Implemented shell buffer syntax highlighting and added colorPrompt, colorInput, and stylePrompt to Defaults to support the customization thereof.

  • Mar 22 1999 8:14 AM

    Added shell, mapped by default to F9, to let you run a shell in a buffer. I've tested this using bash under Linux with both Java 1.1.7 and Java 1.2, and some things work better than others. Normal file operations and cvs work fine, and you can even invoke j from a shell buffer, but programs like su and ftp that need to prompt for a password don't work. There is probably some limit to how far we can get with pure Java here, but I'm certainly not claiming to have reached it. History and completion are not supported yet, but you can scroll back up in the buffer and hit enter to repeat a previous command. Shell buffers are not supported under Windows 95 or Windows 98; under Java 1.2, exec never returns, and I don't know how to work around that. I think NT should be OK, but I haven't tested it. This feature needs to be customizable, but for the moment, if you don't like bash, just change the code that sets the command line at the top of Shell.java.

  • Mar 19 1999 5:23 AM

    Cleaned up the menu code. We now call unregisterKeyboardAction for each old menu item when switching menus so that the keyboard accelerators always invoke the right commands. We also try to display the most recently added key mapping as the accelerator in the menu item, so a mapping you add in your extension class will show up on the menu rather than the default mapping, where applicable.

    Added a mechanism to make it less likely that keystrokes will be dropped when speed search is first invoked in dired mode.

  • Mar 17 1999 8:15 AM

    Shift button 1 click (that's the left button) now sets or extends the selection.

    In directory and archive buffers, button 2 click (that's the middle button) opens the file clicked upon.

  • Mar 16 1999 8:02 AM

    Backed out the Kaffe hack in Dispatcher.java. It was breaking key mappings like Ctrl Del and Ctrl Backspace. We need a better hack.

    findTag tries even harder now. If all else fails, it will look for a prefix match in the current buffer. Fixed a bug that was preventing findTag from correctly matching tags without a class prefix under certain circumstances.

    In C and C++ files, sections of code beginning with "#if 0" are now grayed out, up to the corresponding #else/#endif. If you don't like gray, change the value of Defaults.colorDisabled in your extension class.

  • Mar 15 1999 8:42 AM

    Added a couple of hacks to make j work (to some extent) with the latest development snapshot of Kaffe. There are still some problems, but basic editing is now possible.

    Fixed the scroll bar code so that scrolling up one line at a time under 1.2 is as fast as scrolling down. (In fact, it's even a tad faster.) Clicking above or below the knob (thumb) now scrolls by a full page, as it should.

    Added top and bottom, mapped by default to Ctrl PgUp and Ctrl PgDn, respectively. These functions move the caret to the top or bottom line of the window, keeping it in the same column.

  • Mar 14 1999 11:51 AM

    cyclePaste no longer complains if the previous command was not a paste, but rather just invokes paste itself.

    If Editor.useSystemClipboard is true, strings promoted by cyclePaste are also copied to the system clipboard.

    Added killAppend and copyAppend, mapped by default to Ctrl Shift X and Ctrl Shift C, and available on the Edit menu as "Cut Append" and "Copy Append", respectively. These functions are like killRegion and copyRegion, but they append the killed or copied region to the current contents of the system clipboard or last kill ring entry, rather than adding the region as a new entry unto itself.

    Incorporated gnu.regexp 1.0.7, which was released yesterday.

  • Mar 12 1999 9:08 AM

    Fixed a bug that was causing a directory buffer to be multiply loaded if you re-sorted it, switched to a different buffer, and subsequently switched back.

    Window placement is no longer saved if, in j's opinion, the frame in question is maximized.

    Made the Editor class, and the flag Editor.debug, public. Editor.debug is false, by default, but you can change that in your extension class if you'd like to see j's debug output. See pg.java for an example.

    The display fonts are now created in the constructor of the first Display object, rather than with static initializers, and the Display class and the variable Display.fontSize are now public. This lets you change the font size programmatically in your extension class, which you may find useful if you're experimenting with the Java 1.2 pre-release for Linux. See pg.java for an example. Specifying fontSize in ~/.j/prefs will override the value you set in your extension class.

  • Mar 10 1999 8:51 AM

    Fixed a recently introduced bug that caused j to crash if you specified a non-existent file on the command line and then declined j's offer to create it.

    Optimized things a bit to speed up horizontal cursor movement on extremely long lines.

    The display code now uses no more than a single pixel of leading between lines, no matter what getFontMetrics says.

    Changed the default mapping of expand from Alt /, which doesn't seem to be recognized under Windows, to Alt E, which probably made more sense in the first place.

    Tag files are now deleted when they get to be more than five days old. This prevents the ~/.j/tagfiles directory from becoming cluttered with old tag files that aren't relevant to your current work, or that might have been built by earlier, less competent tagger code. If a deleted tag file is needed again later, j will rebuild it automatically.

  • Mar 8 1999 7:54 AM

    Added redo, mapped by default to Ctrl Y and available on the Edit menu. redo redoes undo; undo undoes redo.

    Added expand, mapped by default to Alt /. expand takes a sequence of characters you've just typed (more precisely, the sequence of characters that are legal in a Java identifier, beginning immediately to the left of the caret), looks through the entire buffer for words (i.e. legal Java identifiers) that have the sequence in question as a prefix, and replaces the sequence of characters with the first match it finds (looking backwards in the buffer). If you don't like that particular replacement, you can hit Alt / again (and again and again) to cycle through all the possible replacements. If you don't like any of the replacements, you can invoke undo at any point and get back where you started. The prefix you type must be at least three characters long.

    Added insertBraces, mapped by default to Ctrl [ (which you might prefer to think of as Ctrl {) in Java, JavaScript and C++ modes. insertBraces inserts an opening brace, followed by an empty line, followed by a closing brace, indents everything properly and puts the caret on the empty line between the braces, ready for you to type some code.

    Added htmlInsertEndTag, mapped by default to Ctrl E in HTML mode. htmlInsertEndTag looks backwards in the buffer for a start tag and inserts the corresponding end tag at the position of the caret. It doesn't try to handle nested tags.

    Search functions in j generally follow the convention that a search string entered in all lower case characters is, by default, case-insensitive. replace remains, even to this day, an exception to this policy, but findTag has now been brought into line. In addition, if you enter a tag that can't be found, j will try a bit harder not to come up completely empty by matching tags that contain the entered string as a prefix.

    unwrapParagraph has been added, mapped by default to Shift F12. As its name suggests, this function is the opposite of wrapParagraph. It takes the current paragraph and removes the line breaks, making it into one long line.

    Ctrl , and Ctrl . (it made more sense to think of Ctrl < and Ctrl >) are no longer mapped by default to prevBuffer and nextBuffer, respectively.

  • Mar 5 1999 9:34 AM

    A bit of cleanup in the Buffer List Dialog. Unicode, read only and modified buffers are now marked as such, and a summary line has been added below the list box.

    Remembered properties now include mode (particularly useful for STL header files that lack an extension).

    findTagAtDot now updates the Find Tag dialog's history list, so you can find the same tag again later without having to type the whole thing in.

    The Java and C++ taggers now correctly ignore quoted strings.

  • Mar 4 1999 7:58 AM

    If you use cycleTabWidth, cycleIndentSize or the Properties dialog (Alt P) to change or inspect the properties of a buffer, j will make a good-faith effort to remember the properties you've specified (tab width, indent size, etc.) the next time you open the same file. This applies to all the properties displayed in the Properties dialog (even though the indent before/after brace properties are not yet settable). For the moment, this feature is limited to the 100 most recent files, a hard-coded limit which may not be ideal (and should probably be user-configurable).

    The Open File Dialog's history list (which you can get to by using the down arrow in the "File:" edit field) is now updated when files are opened from directory buffers or specified on the command line.

  • Mar 3 1999 6:29 AM

    Added tabWidth and indentSize to Defaults.java. By default, tabWidth is 8 and indentSize is 4. These, together with wrapCol (which was there before, with a default value of 80) are global defaults. You can specify different values in your extension class, either globally, or for the corresponding variables on a mode-specific basis. For example:
            Defaults.indentSize = 8; // Set global default to 8.
            JavaMode.indentSize = 2; // But in Java mode (only!) it's 2.
    
    Added detabRegion and entabRegion, available from the Execute Command dialog box (Alt X). These functions do what their names suggest, based on the tab width that's in effect for the current buffer. You can use the Properties dialog (Alt P) to see what that is. These commands do NOT support undo, so be careful with them!

    In the Properties dialog, the "Expand tabs with spaces" checkbox has been replaced with the "Use tabs" checkbox, which means the same thing, only just the opposite. Unlike its predecessor, the "Use tabs" checkbox is not disabled, so you can now get j to insert actual tab characters in the buffer. For the moment, you can only set this flag on a per-buffer basis, so it's not very useful, except for debugging j's tab handling code. When the tab handling code is fully tested, you will be able to set both global and mode-specific defaults for this flag in your extension class.

    Added visibleTabs, mapped by default to Ctrl Alt T. This command toggles the global flag tabsAreVisible. If this flag is set, actual tab characters in the buffer are displayed with the caret character '^', chosen arbitrarily because it doesn't otherwise occur in any of j's source files. You probably won't need to use the visible tabs feature unless you're trying to debug j's tab handling code.

  • Mar 1 1999 5:32 PM

    TagFileManager.cleanup was causing a null pointer exception when the tag file directory did not exist. Fixed.

    C++ now has its own tagger (in CppTagger.java), which handles constructor initialization lists and const member functions correctly.

  • Feb 28 1999 8:05 PM

    Tag files now live in the directory ~/.j/tagfiles (which is C:\.j\tagfiles if you're running Windows) and are created and refreshed automatically. Under normal circumstances, you should no longer have to take any explicit action in order to make a tag file, so makeTagFile has been removed from the Search menu. You can still invoke it from the Execute Command dialog box if necessary.

    Hitting the Tab key when it's not mapped should insert the right number of spaces to get to the next tab stop. It has been doing that correctly, but because of a bug in the dispatcher code, indentLineOrRegion was getting called too, which led to unanticipated effects. Fixed.

  • Feb 25 1999 11:01 AM

    Fixed the Find In Files progress dialog code to make updates smoother under Windows.

  • Feb 25 1999 8:23 AM

    Recent changes somehow introduced a bug in findInFiles which was preventing the expansion of multiple search paths from working as intended (the intended behavior is described below). I believe this is fixed now, but I haven't tested it under Windows.

    slideIn and slideOut now use the buffer's indentSize, as they should, rather than its tabWidth.

    wrapParagraph tries a bit harder to find an acceptable line break in HTML mode. The caret position is now correctly preserved in all cases.

    findTag tries a bit harder to find its tag even if the tag's signature has changed in the source since the global tag file was last updated.

  • Feb 23 1999 8:22 AM

    saveAs now clears the buffer's isModified and isModifiedSinceLastAutosave flags and sets the buffer's lastModified time stamp correctly.

    saveAs and saveCopy now deal safely with situations where the target file is in an active (or inactive) buffer.

    electricSemi is no longer electric if the semicolon is quoted.

    wrapParagraph now tries to break the line before a start tag if no whitespace break is available. Useful for reformatting canonical XML.

    Fixed a couple of relatively obscure (and hard to descibe) indentation bugs.

  • Feb 22 1999 6:15 AM

    Regular expression support has been extended to replace (the search pattern only, not the replacement string) and findInFiles. The file regexp.txt, adapted from the gnu.regexp documentation and included in j.zip, summarizes the supported regular expression syntax.

    openFile and findInFiles are now better at handling file specifications that begin with one or more instances of "../" (or "..\" under Windows).

  • Feb 21 1999 11:43 AM

    The Find dialog (invoked by find), findNext and findPrev now support regular expressions, thanks to the GNU regular expression package. (More information about the GNU regular expression package for Java is available here.) When you unzip the latest source, you'll get a gnu/regexp directory in the directory containing j's .java files. No change should be needed in your CLASSPATH or your build procedure (jikes *.java in the top-level directory should still build everything that's needed).

  • Feb 19 1999 7:58 AM

    Added properties, which brings up the Properties dialog, mapped to Alt P by default and available on the File menu. The Properties dialog allows you to inspect and change various properties of the current buffer. It's only available for "normal" buffers at the moment, and parts of it are not hooked up yet, but even so you may find it useful.

    wrapCol may now be set on a per-buffer basis, using the new Properties dialog.

    Archive buffers are now correctly flagged as read only.

  • Feb 18 1999 10:10 AM

    Added the functions javaMode, javaScriptMode, cppMode, htmlMode and plainTextMode, which can be invoked from the Execute Command box (Alt X) to change the mode of the current buffer. These functions have the side effect of setting the buffer's indentSize to the default value for the mode in question. You can't use these functions to change the mode of directory or archive buffers.

    Managed to reproduce and fix a very elusive bug involving indentation on blank lines. It caused an AssertionException (or a StringIndexOutOfBoundsException, before I started looking for it), but only under rather obscure circumstances.

  • Feb 17 1999 8:40 AM

    An attempt to access HtmlMode.defaultIndentSize in an extension class whose .class file was not in the same directory as j's .class files was failing because I forgot to declare the HtmlMode class public. Fixed.

    You can now keep your extension class wherever you want to and specify the full path to it in ~/.j/prefs. If you specify a string ending with ".class", j interprets that string as a file name rather than a class name. If an absolute path is not specified, j looks for the file, as before, in the ~/.j directory. Bear in mind that on Windows, you'll need to use double backslashes, like this:
            extension=c:\\foo\\bar.class
    
    It's still fine to keep your extension's .class file in the same directory with j's .class files, but you'll need to refer to it in ~/.j/prefs with the class name (which is the way things have worked up to now) or the absolute pathname of the .class file. (This change shouldn't break anything that worked before. In other words, you don't have to change anything unless you want to keep your extension class in a new place.)

    A couple of key mapping changes, as we continue our search for absolute perfection in that important area. saveAllExit has moved to Ctrl Shift Q. That frees up Alt X for exec, which has the coincidental advantage of being an Emacs-compatible mapping. F10 never worked on Windows anyway.

    saveAs now does what you'd expect when you're working with an HTTP buffer.

  • Feb 16 1999 8:38 AM

    The mode architecture has been strengthened. So far we have plain text, HTML, Java, JavaScript, C++, archive and directory modes. Each mode does its own indentation now. Or, I should say, the architecture is in place for this. The actual implementation is pretty much the same as it was; I hope to correct this in the next few days. What you'll notice right away is that HTML, when it's really HTML and not embedded JavaScript, is no longer forcibly indented as if it were JavaScript. The new HTML indentation function just copies the indentation from the previous line; I'm open to suggestions about how to improve this. If the line in question really is embedded JavaScript, the HTML indentation function hands it off to the JavaScript indentation function, which for now is still the Java indentation function. I did add a very ugly hack to JavaMode.getCorrectIndentation that seems to do a better job of indenting loose JavaScript (JavaScript without semicolons). This code needs to be cleaned up and migrated to JavaScriptMode.getCorrectIndentation where it belongs.

    The mode is set based on the filename extension by the function setMode in Buffer.java. This needs to be made more flexible, of course, but for now if you need to add another filename extension you can hack that function. The buffer defaults to plain text if all else fails. The mode name is now displayed in the status bar.

    Speaking of indentation, we now distinguish between tabWidth and indentSize. Both of these parameters are set on a per-buffer basis. tabWidth controls how many spaces are equivalent to a single tab character, when displaying actual tab characters on the screen. If there are no actual tab characters in the buffer in question, this parameter never comes into play. indentSize controls how many spaces get inserted to indent a line to the next indentation position (some folks call indentation positions "tab stops", which adds to the confusion).

    The important thing to remember is that tabWidth has nothing to do with indentation. If you want your buffer to be indented by 2 characters per indentation position, instead of the default 4, set the buffer's indentSize, not its tabWidth, to 2. Now, changing a buffer's indentSize, by itself, will have no immediate effect on the appearance of the buffer; it won't retroactively change any of the indentation that's already in place. Changing a buffer's tabWidth may have an immediate effect on the appearance of the buffer, if the buffer contains actual tab characters, but it will have no effect on indentation subsequently applied to the buffer. I hope this is clear.

    All of this represents a change in j's behavior. Up to now, j used the buffer's tabWidth to control indentation as well as the display of tab characters. That behavior was always wrong, or at least a bit deficient. tabWidth and indentSize really are two distinct things, and j was lumping them together. The new behavior is correct.

    At the moment, there's no convenient way to get j to insert actual tab characters in the buffer. This is a bug that will be fixed soon.

    So, you ask, how do I change the indentSize of a buffer? You use the new function cycleIndentSize, available on the Edit menu and mapped by default to Alt I. It works like cycleTabWidth. Watch the status line to see what the buffer's indentSize has been set to.

    It's also possible to specify a default indent size on a per-mode basis. Each mode has a public static variable called defaultIndentSize, which you can set in your extension class, like this (for example):
            JavaScriptMode.defaultIndentSize = 2;
    
    The function wrapParagraph has been added, mapped by default to F12 (but only out of respect for tradition; we really need a better mapping). This function, as its name suggests, wraps all the lines in the current paragraph at the wrap column (which by default is column 80; it's controlled by the variable Defaults.wrapCol, so you can change it in your extension class if you prefer a different value). A paragraph is basically defined as a block of contiguous lines with blank lines before and after it. To make the definition a bit more flexible, we recognize a line starting with <p>, <br> or <pre> as the first line of a paragraph, even if the line before it is not blank. Similarly, we recognize a line ending with <p>, </p>, <br> or </pre> as the last line of a paragraph, even if the line after it is not blank. The caret is not moved, so you can invoke this function to re-format the paragraph and immediately continue typing right where you left off.

    findInFiles now has a progress dialog (with a Stop button), which also serves as the List Files dialog. The actual search now runs in its own thread. You can move the progress dialog out of the way and do whatever you want in j while you're waiting for the search to finish. You can also open files from the list box of the progress dialog while the search is in progress.

    When ignoring case, replace tries, paradoxically, to preserve case, if possible, when it makes a replacement. Specifically, if you're replacing "javaFormatter" with "cppFormatter", for example, an all-caps "JAVAFORMATTER" will become "CPPFORMATTER", and a capitalized "JavaFormatter" (or "Javaformatter" or "JAVAformatter") will become "CppFormatter". These are the only two situations in which the replacement string is altered to preserve case. Upper-case letters in the replacement string are NEVER converted to lower case. Confusing as this may seem, chances are good that this is the behavior you actually want.

    replace now returns empty-handed if a zero-length search pattern is specified. A zero-length replacement pattern is OK, however; that's just equivalent to deleting the relevant occurrences of the search pattern.

    closeParen, which flashes the caret over the opening parenthesis that matches the closing parenthesis you've just typed, now limits its search for a matching parenthesis to the preceding 50 lines. This makes it noticeably quicker near the end of a big buffer when the aforementioned matching parenthesis does not actually exist.

    As a side effect of improvements in the matching code to make it better at ignoring comments and quotes, closeParen no longer works inside a single-line ("//") comment. I'm not sure whether to call this a bug or a feature.

    Undo now correctly sets the buffer's isModified flag when undoing past a save. (You did know it's possible to undo past a save, didn't you?)

    When you set a filter on a directory buffer (using diredSetFilter, Alt F in dired mode), the filter is now appended to the directory name in the title bar.

    You can now sort directory buffers by size, as well as by name and by date, using diredCycleSortBy (Alt S in dired mode)

    If a selection is highlighted, newlineAndIndent now deletes it before doing the rest of its thing.

    The syntax highlighting of multiline /* */ comments is now correct for JavaScript embedded in HTML.

    There is now a single idle thread, implemented in IdleThread.java, rather than one idle thread per frame. We never really needed more than one. As a result the Dispatcher class (which used to handle the idle threads as well as the dispatching) is a bit cleaner now.

    The Incremental Find dialog has always done its best to remember where you last put it, in order to have a fighting chance of not getting in your way. Under Linux, icewm has a bug (or so it appears) which requires a slight adjustment in the parameters passed to setBounds to get the box to come up in the right place. All well and good, but over time, the required adjustment has not remained constant as new versions of icewm have appeared. No adjustment at all is required under Windows or with WindowMaker under Linux (I haven't tested any other window managers). Since it really does seem like an icewm bug, I've removed the adjustment from the Incremental Find dialog code. So if you're running icewm, your Incremental Find dialog box may wander a bit.

    Under Linux, it was possible, particularly with a misconfigured keyboard, to end up with control characters in dialog box text fields. You couldn't see 'em, but they were there, and in the case of findInFiles, for example, you'd never find the string you thought you were looking for. So now HistoryTextFields filter control characters out of the strings they accept. (A control character is defined as any character for which Character.isISOControl returns true. In plain English, those are the characters between \u0000 and \u001f and between \u007f and \u009f, inclusive.)

  • Feb 11 1999 9:31 AM

    When invoked, j now looks for a currently running instance of itself, and if it finds one, it passes along its command line and exits. Whatever files were specified on the command line will be opened in the existing instance of j. The existing instance of j will be brought to the foreground and given input focus (virtual desktops may muddy the waters a bit here, but under no circumstances should you get a second instance of j).

    A certain amount of cleanup and factoring in the code involved with opening files was required by this change. As a result, openFileInOtherFrame now works with URLs, and you can open URLs from the command line.

    You should no longer get a null pointer exception when closing an HTTP buffer from the Buffer List dialog.

  • Feb 10 1999 9:25 AM

    Added saveAs, mapped by default to Ctrl Shift S and available on the File menu.

    Added toggleSaveAsUnicode, available from the Execute Command dialog box (on the File menu). toggleSaveAsUnicode allows you to specify whether the current buffer should be saved in Unicode or ASCII. You can load a normal ASCII file, for example, and then invoke toggleSaveAsUnicode; subsequent saves (including saveAs and saveCopy) will be in Unicode. Or vice versa. This is useful for converting files from ASCII to Unicode. Or vice versa. As its name suggests, toggleSaveAsUnicode is a toggle. "(Unicode)" will appear in the title bar if the buffer is in Unicode mode.

    It's now possible to open a zero-byte file or a non-existent URL without really bad things happening.

  • Feb 9 1999 9:06 AM

    A bit more work on the mode architecture. C++ mode no longer shares Java mode's keymap.

    Added the function electricPound, mapped by default to '#' in C++ mode. If you use electricPound to insert a '#' on a line containing only whitespace, the '#' will be forced into the first column of the line.

    Added the function cppFindMatch, mapped by default to Ctrl M in C++ mode. This function matches #if/#else/#elif/#endif as well as braces, brackets and parentheses.

    Added the variable Defaults.autoNewline. If this variable is true, electricSemi and electricBrace will automatically insert a newline and move the caret to the proper indentation point on the new line. The auto-newline feature is off by default. You can turn it on (or off) with the function toggleAutoNewline, which is available from the Execute Command dialog box (on the File menu). If you really like auto-newline, you can set Defaults.autoNewline to true in your extension class.

    The filename completion code in the Open File dialog now properly handles strings starting with a '\' under Windows.

    Added a timer to reactivate so it will only do its work once per reactivation, even if windowActivated and focusGained both get called (which is sometimes the case under Linux).

    Unicode files are no longer read-only; you can edit and save them like any other files. They are written out in Unicode, in little-endian byte order with the appropriate byte order mark.

  • Feb 8 1999 12:24 PM

    Fixed an array index out of bounds bug in the new Buffer List dialog code.

    reactivate, which checks for external modifications to j's buffers (and to their read-only status) when you switch back to j from another app, is now invoked from focusGained and from windowActivated. It seems like focusGained gets called under Linux and windowActivated gets called under Windows (but not vice versa).

  • Feb 8 1999 8:35 AM

    The key mapping code has been cleaned up a bit, with the result that it is no longer necessary to call unmapKey before re-mapping the same keystroke in your extension class.

    There's an experimental change to the Buffer List dialog (mapped by default to Alt B). Now, only the short name of the buffer's file is displayed in the list box. The directory containing the selected file is shown in the "Directory" static text field above the list box, which is updated dynamically as you scroll through the list. This change is intended to make the dialog more usable when you're working on files in deeply nested directory structures; the filename will no longer get pushed out past the right edge of the list box. Please let me know if you don't like the new behavior.

    The function diredRenameFile, added yesterday, has been replaced by diredMoveFile (mapped by default to Alt M), which does basically the same thing, except that it's also possible to specify a directory as the destination of the move. As was the case with diredRenameFile, when a file is moved with diredMoveFile, if there is a buffer associated with that file, the buffer is renamed accordingly.

    I forgot to mention in yesterday's release notes that diredRefresh is now mapped by default to F5 in dired mode.

  • Feb 7 1999 10:44 AM

    A bit more architectural support has been added for modes (Java mode, HTML mode, dired mode, etc.). In particular, menus can now be mode-specific. Dired mode is the first mode to take advantage of this; note that the menus are different when you're looking at a directory buffer. In addition, for non-directory buffers, menu choices that modify the buffer are now grayed out if the buffer is read-only.

    The function diredRenameFile has been added, mapped to Alt R in dired mode. When a file is renamed, if there is a buffer associated with that file, the buffer is renamed accordingly.

  • Feb 5 1999 8:21 AM

    Bookmark support has been added. You get ten bookmarks. You can set them using Alt 1 through Alt 0 (reading left to right along the top row of your keyboard, same thing as Alt 0 through Alt 9) and go back to them once they're set using Ctrl 1 through Ctrl 0 (Ctrl 0 through Ctrl 9). These keystrokes map to the functions dropBookmark and gotoBookmark, respectively. At the moment it won't work to map these functions to any other keystrokes (although it's OK to unmap the keystrokes completely or use them for other things). Bookmarks still work correctly even if you've closed the buffer they refer to. If you delete a region of text that contains one or more bookmarks, they will be moved just outside of the deleted region. Bookmarks are not, at present, meticulously adjusted after every edit, so they might not stay exactly where you put them, but in general they should always stay on the right line. Bookmarks are not saved between sessions.

    Directory buffers now display information about symbolic links on operating systems that support them.

  • Feb 2 1999 9:32 AM

    diredCopyFile now automatically refreshes the directory listing.

    diredRefresh now tries to keep the caret on the same line.

    indentLineOrRegion now handles the following code correctly:
            while (dwTotalBytes < dwContentLength &&
                   GetTickCount( ) - dwStart < dwTimeout)
            {
                bRet = InternetReadFile(hRequest,
                                        pData,
                                        BUFSIZE,
                                        &dwBytesRead);
            }
    
  • Feb 1 1999 7:13 PM

    If a selection was marked and the "Restrict changes to selected text" checkbox was checked in the Replace dialog, the "Replace All" option in the Confirm Replacement dialog did not properly limit the scope of the replacements to the selected text. Fixed.

  • Feb 1 1999 1:43 PM

    Fixed a bug in Find In Files that caused an "Unsupported wild card pattern" error for every pattern entered (Windows only).

    Added diredCopyFile, mapped to Alt C in dired mode.

  • Jan 31 1999 10:16 PM

    Everything in the Find In Files dialog except regular expression support is now fully implemented. You can enter multiple wild card patterns in the Files text field, separated by semicolons (it's ok to leave spaces on either side of the semicolons if you want). If you specify a directory, that directory applies to all subsequent wild card patterns that don't include a directory specification, until the next one that does. For example, the string
            c:\foo\*.cpp; *.h; d:\bar\*.java; *.txt
    
    expands to:
            c:\foo\*.cpp
            c:\foo\*.h
            d:\bar\*.java
            d:\bar\*.txt
    
    If you don't specify a directory at all, the editor's current directory is assumed. The editor's current directory is the directory of the buffer you're looking at, or your home directory (which is C:\ for Windows users) if the buffer you're looking at doesn't have a directory.

    Directory buffers now support speed search. You can just start typing the name of the file you're looking for, and an Incremental Find dialog will magically appear; you don't have to use Ctrl F to get started. To support this new functionality, the dired functions that were previously mapped to plain alphabetic characters have been moved to the corresponding Alt keys:
            diredSetFilter    Alt F
            diredCycleSortBy  Alt S
            diredRefresh      Alt G
    
    makeTagFile (which is the same thing as "Rebuild Tag File" on the Search menu) now looks at files with the following extensions:
            *.java
            *.cpp
            *.h
            *.js
            *.htm
            *.html
    
    HTML files have only been added to the list in order to support tagging the JavaScript embedded within them. Currently the tagging function is Java-specific, and it's only a fortunate coincidence that it works at all with other languages.

    The filename completion functionality hooked to the tab key in the Open File dialog is now case-insensitive by default. You can change this behavior by setting the variable Defaults.openFileCompletionsIgnoreCase to false in your extension class.

  • Jan 31 1999 9:37 AM

    Most of the functionality of the Replace dialog (actually, everything except regular expression support) is now fully implemented. replace is now mapped by default to Ctrl R instead of Ctrl H.

    The dispatcher code now ignores events for threads other than the normal AWT event queue thread. The effect of this is that dialog boxes should no longer hang intermittently when they're first invoked.

    In Java, JavaScript and HTML modes, the tab key is now mapped by default to a new function, indentLineOrRegion, which applies j's idea of correct indentation to the marked region (if there is one) or the current line (if not).

    incrementalFind is now mapped by default to Ctrl F (again). Ctrl I didn't work out; the keystroke just doesn't get through for some reason under Windows with Java 1.2. Hitting Enter with nothing in the Pattern edit box of the incremental find dialog now brings up the other (I hesitate to say "normal") find dialog.

    The functions slideIn and slideOut, which move the selected block of lines either in or out by the equivalent of one tab stop, are now mapped by default to Alt ] and Alt [, respectively.

    The variables styleDefault, styleKeyword, styleFunction and styleDirectory have been added to Defaults.java, so you can now turn off bold fonts or make everything bold if you want to in your extension class.

  • Jan 29 1999 8:41 AM

    cyclePaste now works better when using the system clipboard. If the "Use System Clipboard" option is on, the initial paste must always comes from the system clipboard, so you lose the advantage of cyclePaste's promotion feature. If the pasted string is not in the kill ring, it's added, so cyclePaste will have access to it in the future. So after a initial paste from the system clipboard, cyclePaste should work as expected.

    All the color variables are now public and have been moved into Defaults.java, so it should now be possible to customize your colors in your extension class. Directory buffers are now displayed using Defaults.colorText instead of Color.black, so you can make them more readable by choosing an appropriate colorText when using a black background. As part of the cleanup in this area, Defaults.colorSelection has been renamed to Defaults.colorSelectionText, and Defaults.colorCurrentLine has been renamed to Defaults.colorCurrentLineBackground.

  • Jan 28 1999 8:05 AM

    We distinguish between kills and deletions. A kill copies its content to the kill ring; a deletion does not. Generally, functions whose names begin with "delete" carry out deletions; functions whose names begin with "kill" carry out kills. The functions mapped by default to the backspace and delete keys carry out deletions, not kills.

    The functions killWord and killPrevWord have been renamed to killWordRight and killWordLeft, respectively.

    The functions deleteWordRight and deleteWordLeft have been added. In accordance with the naming convention outlined above, these new functions do not copy their content to the kill ring. These functions are mapped by default to Ctrl Delete and Ctrl Backspace, respectively. This means that these keystrokes, by default, no longer copy the text they delete to the kill ring. If you prefer the old behavior, you might want to remap these keys to killWordLeft and killWordRight in your extension class (see pg.java for an example of how to do this).

    The behavior of the existing function delete, mapped by default to the Delete key, has been changed so that it does not copy its content to the kill ring (which it only ever did if a selection was marked).

    The behavior of cyclePaste has changed slightly. If you use cyclePaste to paste something other than the last string copied to the kill ring, the string actually pasted will be moved to the head of the class (so to speak). This means that in general, more useful strings will end up in more easily accessible positions in the kill ring.

    killWordLeft, formerly killPrevWord, now kills the selection, if there is a selection.

    HistoryTextFields now select the text in the edit field when they receive focus.

    The Open File Dialog now uses a HistoryTextField. You can use the up and down arrow keys to navigate through the history list when you want to re-open a recently opened file.

    The "Use System Clipboard" setting on the Edit menu is now persisted from one session to the next.

    The source distribution now includes the file pg.java, which is my own personal extension class, as an example of a working extension class. This class won't actually get loaded on your system unless you have the line "extension=pg" in your ~/.j/prefs.

  • Jan 27 1999 9:31 AM

    Renamed yank to paste for consistency with the Edit menu.

    Added cyclePaste, mapped to Ctrl Shift V. All deletions of more than a single character are copied to the kill ring. paste inserts the last string deleted; cyclePaste, if and only if invoked IMMEDIATELY after paste, replaces the pasted string with the next string in the kill ring. The kill ring by default holds the last 30 strings deleted.

    Renamed find to incrementalFind and moved it from Ctrl F to Ctrl I.

    Added an entirely new non-incremental find, mapped to Ctrl F, which supports searching for delimited strings ("Whole words only"). A string is delimited (for the purposes of find) if the character immediately before it and the character immediately after it are not legal in a Java identifier; this criterion should work for C and C++ too if you generally stick to ASCII. (This is the way findNextWord and findPrevWord have always worked.) Eventually this definition should be made mode-specific.

    findNextWord and findPrevWord, mapped to Alt Down and Alt Up respectively, now set things up so that findNext and findPrev, mapped to F3 (or Ctrl G) and Shift F3 respectively, can be used to continue the search, in case your caret strays from the string in question or in case you want to switch buffers and search for the same string.

    The Find In Files dialog now uses HistoryTextFields instead of combo boxes. As usual, the up and down arrows may be used to navigate through the history.

    All the color defaults are now public and in Defaults.java, so it's possible to customize them in an extension class.

  • Jan 26 1999 8:35 AM

    The Find Tag dialog has been remodeled to use a HistoryTextEdit. You can use the up and down arrow keys to navigate through the history list when you're in the edit field. In addition, there's now a check box that lets you open (or re-use) another frame for the found tag.

    htmlFindMatch now matches the same characters findMatchingChar does, in addition to its HTML-specific functionality.

    Removed the mapping added yesterday of findPrev to Ctrl Shift G (I had forgotten that Ctrl Shift G was already used for gotoFile). findPrev is just mapped to Shift F3 now.

    Added functions lowerCaseRegion and upperCaseRegion, available from the Edit menu.

    You can now select a word by doubleclicking on it.

  • Jan 25 1999 8:07 AM

    htmlFindMatch has been added, mapped to Ctrl M in HTML mode. Finds end tag corresponding to start tag at dot or vice versa, ignoring comments and handling nested tags correctly.

    The old functions findNext and findPrev, which looked for a match for the delimited token at dot, have been renamed to findNextWord and findPrevWord respectively, and findAgain has been renamed to findNext. All of this in order to introduce a new findPrev, mapped to Ctrl Shift G and Shift F3, which repeats the current search (if any) in a backwards direction.

  • Jan 24 1999 10:42 AM

    The vertical scroll bar is now hooked up for active operations. It probably doesn't work exactly the way you'd expect (on Linux, at least, clicking above or below the knob scrolls the window by 10 lines instead of a full page), but it's better than nothing, and the details will be ironed out in due course.

    While hooking up the scroll bar, I found a trick that significantly improves the scrolling performance of lightweight components. The key is to call copyBits in the context of the nearest heavyweight ancestor of the lightweight component you'd like to scroll. So scrolling is now line-by-line, the way it should be, instead of half a screenful at a time.

    Once a tag file is loaded, it is now cached until a different tag file is needed, or until makeTagFile is invoked.

    Finally, an architectural change: the Buffer object no longer has any concept of dot or mark. The View object now has full responsibility for preserving the state of buffers that are not currently displayed in the frame.

  • Jan 22 1999 9:47 AM

    There's now a mechanism to support arbitrary user extensions. You can add a line like this to ~/.j/prefs (which is C:\.j\prefs for Windows users):
    extension=SampleExtension
    where "SampleExtension" is the name of a class you've written, compiled, and placed in ~/.j or C:\.j. There should be a method in that class called public void run(), and the class itself must be declared public. If all these conditions are met, your class will be loaded when the editor starts up and the run method will be invoked. A sample extension class is provided (SampleExtension.java), which shows how to map a key, unmap a key, and turn off current line highlighting.

    One problem you are likely to run into with this is that any editor method or member variable referenced in your extension class must be explicitly declared public in the editor source; otherwise you'll get an IllegalAccessException. The short-term solution to this is to edit the editor source and make the thing public; the long-term solution is to tell me about it so that I make sure it stays public in the future.

    The easiest way to write your extension class is to develop and debug it in the same directory where you've got the editor's .java and .class files; the loader will pick it up from there, so you don't have to copy it into ~/.j every time you compile it. When you're done you should move it into ~/.j and delete any extraneous copies.

    If you do a paste when there's a selection marked, the selection is now replaced with the pasted text, like any other insertion when there's a selection marked..

    Fixed the key mapping strategy to work around a bug in Linux/JDK 1.1.7 which was preventing keystrokes without modifiers from being mapped correctly.

    In directory buffers, directories are now sorted to the top of the list.

    Removed the code to gray out certain filenames in directory buffers. If this is done at all, it needs to be user-configurable.

    Added selectPageUp, selectPageDown, selectBob and selectEob, with the normal key mappings (Shift PgUp, Shift PgDn, Shift Ctrl Home, Shift Ctrl End).

  • Jan 21 1999 10:07 AM

    In Dired mode, diredRefresh is now mapped to g, as in Emacs. (The mapping to F5 is broken by the way menus are currently implemented, and refresh needs to be mapped to something.)

    Editor.windowActivate now checks each buffer to see whether or not it's read only on disk and sets the buffer isReadOnly flag accordingly.

  • Jan 21 1999 12:50 AM

    Fixed the infamous buffer doubling bug. The code that automatically (and silently) reloads an unmodified buffer when the corresponding file is changed on disk by another program was clearing the isLoaded flag before it actually re-read the buffer, but not setting it again when it was done. If the buffer in question was subsequently re-activated, activate checked the flag, thought it wasn't loaded, and loaded it again.

    The process of fixing that bug exposed two more. SystemBuffer.empty wasn't removing stored views that referenced the old contents of the emptied buffer. Removing the stored views to correct that problem forced restoreView to get dot and mark from the Buffer object instead, and as it turned out, these parameters also referenced the old contents of the emptied buffer. So now on a reload dot is moved to the beginning of the buffer and mark is set to null, which isn't exactly right, but it's safe. This whole subject should be revisited; it's not good to have dot and mark stored in three different places (editor, view, and buffer) under various circumstances.

  • Jan 20 1999 9:27 AM

    Region.toString now uses '\n' as the line separator even on Windows. This is necessary for system clipboard support to work correctly.

    Added diredDeleteFile, mapped to the delete key in Dired mode.

    Added selectAll, mapped to Ctrl A.

    Copied the VK_KP_xxx virtual key codes from the JDK 1.2 version of KeyEvent.java into KeyMap.java and set up redundant mappings so the cursor keys on the numeric keypad will work on Solaris.

  • Jan 19 1999 10:01 AM

    If the first two bytes of a file are 0xff and 0xfe (in either order), the file is treated as containing Unicode text (0xfeff is the Unicode byte order mark). For now the buffer is read only. This seems to work in the trivial case where all the characters are ASCII anyway.

    Rewrote insertString to handle the possibility that the line terminators in the string being inserted might not be the native line terminator of the platform. Needed for system clipboard support.

    Paste (yank) is a bit smarter now about recognizing blocks of lines when using the system clipboard.

  • Jan 19 1999 4:27 AM

    You can now enter a string starting with "http://" in the Open File dialog to view the source of the specified URL. This may have destabilized things a tad (but only if you use the new functionality).

    Completion of strings starting with "~" or ".." now works better in the Open File dialog.

    A bit of support for the system clipboard is in. Right now it's an either/or thing: either you use the system clipboard or you use the kill buffer (the kill buffer is the default). There's a checkbox on the Edit menu to toggle back and forth. If you leave it in the off position things should work exactly as before. In any case all cut/copied strings go to the kill buffer too. A bit of conceptual cleanup is needed here...

    The function stamp has been added, mapped (for traditional reasons) to Shift F2. It inserts a date/time string at the current position of the caret.