A list of things I must remember to do at the moment:
Merge my scintilla changes with the trunk again so that I can update the build used in PN2. Changes are:
* Some pascal lexer changes.
* Change to provide on-paste line-endings conversion.
Project "sanity".
Merge some docking framework bug fixes.
Finish find in files code.
Project settings work (lots of work here).
Continue PN docbook documentation effort.
Finish my MSc thesis.
Move my blog to WordPress or something with better comment-spam prevention techniques. The blacklist is just not enough, and I don't really want to upgrade to MT 3. I think at the same time I'll also move my blog onto untidy.net, my personal web-space. Then I'll feel better about using it to write about general "stuff" as well as PN.
Busy Simon!
From the "what's new and good in PN2 0.5.5" department:
In PN2 0.5.5 you can now get the project and project group paths when building up tool parameters. You can't find these constants in the interface yet, as they use a new scheme that has only just been introduced. The next version will make this more obvious but for now, here are the constants:
$(ProjectPath)
$(ProjectGroupPath)
Remember all paths include a trailing path separator. If no project or project group is open and valid then these constants evaluate to nothing.
In the future I will be moving more towards this more expressive type of constant and away from the old type, %x constants prove difficult to remember.
First the good news: the latest version of PN2 has been released to sourceforge and the pnotepad.org website. It has lots of good new features, and loads of bug fixes for annoying problems with previous releases.
Then the bad: there is a bug in the global tools code which means that closing the options dialog with global tools configured crashes PN 2. You don't lose any settings, but may lose data. There will be another release of PN 2 in a couple of days to fix this problem.
From the "what's new in PN 2 0.5.5" department, is the "middle-click on a tab to close it" feature. This is now my favorite feature (for at least the next ten minutes). Go on, try it, you'll soon be addicted. The only problem is that now any application that doesn't support this feature will irritate you. a lot.
Firefox does support it - wahey!
Visual Studio.NET, Sharp MT and RSS Bandit do not, boo....
So, try it; love it; petition others to implement it and make the world a better place.
This is the first in a series of what's new in PN 2.5.5 style articles. maybe.
I want to give Programmers Notepad 2 a much fresher, more modern look - this means better toolbar glyphs, a better look for the about box and ideally a new icon. Unfortunately, the downside to this plan is that I am not graphically talented at all! If you have graphics skills and are interested in contributing to the Programmers Notepad project (or know someone who might be) then please get in touch! Send an e-mail to ss at pnotepad dot org!
A small bug was causing problems with the build released yesterday, so with no further ado: a fixed version. This version also includes additional bug reporting capabilities and debug information to help find any other problems in this pre-release build. Thanks to those who reported the bug so quickly and helpfully.
Members of the discussion mailing list will know that I occasionally release updated builds of PN2 to allow users to play with new features and try the software out on the way to a milestone. I've been doing this again recently on the road to Ella (the next milestone) and I thought non-list-members might like to give this build a try. For a list of changes, view this full blog entry.
I'd particularly appreciate people trying out the drag-and-drop stuff in the projects window. There's a lot of new, complicated code there so give me your feedback! The most exciting feature, for me, is "jump to..." on the Edit menu. This provides language independent jumping in code, which is the fastest code navigation method that I've ever used. I've wanted this feature in my text editor since when I used GExperts for Delphi, and now PN has it. The feature is supported by exuberant ctags so supports all languages that ctags does, but there is a plugin architecture so that other languages can be added. I'll be documenting this interface in the future.
Also, what do you think of the GUI changes (options dialog mostly) made by Bjoern Graf? If you like, or don't like - then let him know via the discussion list! I'm sure he'd appreciate some feedback other than mine.
What are the things you miss most in the current builds, speak up and you might be in time for the next release!
Download the new build here:
http://www.pnotepad.org/files/pn20528.zip
Please do report bugs that you find in this release, although preferably to the discussion list rather than in the bug tracker as it's not a proper release.
Thanks,
Simon.
What's new?
Bug Fixes:
Programmers Notepad gets a link on Mike Gunderloy's Daily Grind 347. Admittedly that's because I suggested it the day before, but all links are good links - right?!
Programmers Notepad 2 is developed using the Windows Template Library which is a library of code that makes working with Windows easier (amongst other things). WTL supports message maps which MFC users will also be aware of - basically a block of macros that direct incoming window messages to multiple handler functions. Working with message maps in WTL can be a bit of a bind as there is less good IDE support and I don't use the message-specific crackers in PN2. Therefore, I use a couple of macros to fill out notification, command and message handler prototypes for me:
Get: WTLMacros.vb which uses CleverStuff.vb to manage Undo state.
I hope someone else finds these macros useful. To try one out, simply type something like:
OnInitDialog
and then run the MessageHandler macro (if the code is not all in one file, run the MessageHandlerDefinition macro in the header, and the MessageHandler macro in the source file).
Played with both Python and SWIG at the weekend - surprisingly easy to get working. I had a small c++ project which defined a class "Project". I then manipulated an instance of this class defined in C++ using an embedded python interpreter. Fun. Can't imagine what this could be used for - can you?
Finally had a chance to clear down the bug list a bit since the 0.5 release. I currently leave bugs open until a release has been made that fixes the problem. This prevents duplicate submissions which cause more work. By the time a release comes out, however, the product looks quite buggy. It would be great if sourceforge let me filter out fixed bugs in my view. Ah well.
I've updated the PN2 roadmap document. The roadmap now covers three versions after the one currently being developed. As per usual, nothing's set in stone.
The 0.5 release is getting really close now with only a few small featurettes to be finished, and a bit more testing to be done. I'm working my way through the bug list fixing those that are sensible for this time-scale.
All these things are being discussed on the mailing list, and you can get your hands on interim builds there too.
So, sorry for the lack of updates recently. I've been very busy at work, busy working on PN 2 and also busy going to the Microsoft PDC - generally busy. Anyone on the mailing list will know that it's nearing time for the next release and I'm moving quickly (with the help of both contributing coders and the testers) towards the next milestone.
You can look forward to the first issue of project and workspace support, lots of bug fixes, text clips and some other nice features. Want to get in on the action early? Subscribe to the pn-discuss mailing list. I'll be releasing a new build today or tomorrow.
The new web site contains a Mailing Lists page where you can subscribe to the following lists:
Subscribe away!
I've revamped the web site for Programmers Notepad completely, mainly to include information about PN2, but also to move to a much cleaner implementation. The old website was mostly built with classic HTML - font tags and all. The new web site is all designed using style sheets. It's not "beautiful", but it's an improvement. The best thing is that now it's done with stylesheets the design can be changed much more easily - anyone got any ideas?!
I also replaced all e-mail links with a javascript workaround - not pretty but it will help to reduce my spam load a bit. Most that I get is from addresses on that website. I had started doing this before but it's almost complete now.
The web site is 90% complete. The FAQ is missing and will be re-added, and the list of new articles on the front page is not there yet - I need to wire that back up with CityDesk.
Let me know what you think!
I've begun work on the projects implementation and also a text-clips window in the past week or so. Text-clips are very simple and are now 50% complete. Projects are about 2% complete! I know roughly what I'm trying to achieve:
Multiple files per folder (duh!).
Multiple nested folders in each project.
Multiple projects per "solution" or project group.
Then there is project build (or tools) configuration which will hopefully go something along the lines of: Projects in PN2.
It'll take a while to get this right, so bear with me. I'll try and post some screenshots of all these developments when I get a moment. There have been some more find changes by Bjoern Graf too.
For some reason, backslash expressions were disabled for replace (even though there was a checkbox). I've enabled them and you can now do useful things like:
replace: \r\n with:
and that will remove all line breaks in a file (if you have CRLF line breaks of course). Not sure why this was ever disabled - must have been an oversight.
I've added another toolbar which contains a combo-box for find to PN2. This box currently only allows you to search the current document, but will also allow you to "find in files" and search google (eventually). The combo supports auto-completion too. I've also committed changes to allow PN2 to parse "broken" paths like these:
file:///C%3A/source/monkey.cs
and:
c:\source\\monkey.cs
This means that the output window is a lot more useful with tools that give broken paths in their messages.
There is now a mailing list hosted by sourceforge for CVS commit notifications (for those that like that kind of thing). Every time some changes are committed to CVS you too can receive an e-mail telling you about them, just subscribe here:
I've just checked in changes adding a drop-down box on a toolbar allowing scheme selection. This was a requested feature, and it's about 80% implemented - it currently doesn't reflect the active scheme. Somewhat irritatingly, sourceforge's pserver CVS servers are currently running 24 hours behind the developer SSH access, so those who are keeping in sync with the code will have to wait a bit. This is catching me out on other projects that I use at the moment - most annoying. Bjoern Graf has also submitted some more changes to the find and replace code which I'll be putting in tonight hopefully.
I've just checked in a bunch of changes to the search and replace dialogs and some of the related functionality (with big thanks to Bjoern Graf who sent me lots of code). This fixes the problem with "Replace Once", puts the current word under the cursor into the find/replace dialogs when shown, positions those dialogs away from the cursor, and enables the proper combo-box functionality in the dialogs - and that's just some of the changes! The next version will also have Incremental search (although that code's not checked in yet).
Thus begins the development of the Mingus roadmap milestone.
Looks like I'm going to have to put more code into the output parser, xsltproc makes a lovely error like this:
file:///C%3A/Source/pnwtl/doc/help.xml:5: warning: failed to lo...
and of course I wasn't expecting URLs! Ah well, one for the next version.
I'm going to release another 0.4 series build to sourceforge today. Notable changes:
Then I'm on holiday for two weeks in Thailand.
In an attempt at a sort of "un-named and shamed" effort, here is the latest bug report for PN (which version is anyone's guess). Needless to say I can't reproduce the error:
When open a file and press backspace (first of all)
PNotepad crashes.
Can anyone reproduce this? I can't contact the author for any more information because they were anonymous. The bug has been set to pending in sourceforge and unless I hear otherwise it will be marked as closed. Sometimes it seems a shame that sourceforge allows anonymous reports - but then some useful ones do come in that way.
Update: I now have enough information to reproduce the bug (from the comments). Thanks.
PN2 does not have built-in support for parsing mono errors, but user-specified error parsing is perfectly capable of doing it. I have the mono compiler set up as a tool like this:
Command: mcs.exe
Folder: %d
Parameters: %d\%f
x Save all before running this tool
x Capture output
Use the main output window
o Look for a custom pattern:
Pattern: %f\(%l\)
This matches a filename immediately followed by a line number surrounded by brackets. My use of this highlighted an interesting situation. Mono 0.25 seems to output double slashes in the error messages:
C:\Projects\monotest\\clhelloworld.cs(13) error CS8025: : Parsing error
This causes PN2 to think it's opening a different file to the one already open. I guess I might have to include path fixing logic to ensure that paths are syntactically sound.
Version 0.4.1, a refresher for 0.4 has been released to sourceforge. Download it here.
I really do appreciate the fact that people are taking the time to file bug reports, but a number of those on sourceforge as I write this are useless to me.
For example, [ 753702 ] Console capture in Win2000 contains this report:
Running PM2.0.3a, on a Win2000 OS, I cannot get console capture to work. Is this a known problem, or is there some workaround ? - Submitted By: Nobody/Anonymous (nobody)
Good Points: Mentions the version number being used, and the operating system.
Bad Points:
As far as I am concerned, output capturing does work on windows 2000. The first problem is that there is not enough information about the problem - no way that I can try to reproduce it.
The more annoying problem is that there is no way for me to contact the person who submitted the bug apart from to leave a comment on it and leave the bug open in the hope that they'll come along and check on its status - most won't at my guess. I am not willing to leave dead bugs around like this for ages. In the future, if I think something works and the bug reporter has not provided enough information or contact details then I will simply mark the bug as "Works For Me" and close it.
Please, please, please get yourself a sourceforge account if you're going to report bugs. It means that we can communicate and work to solve the problem that you want to report. The process does not take long, and sourceforge do not sell on e-mail addresses - nor will they spam you with any mail you don't want. As long as you are logged in when you report a bug, you will also be notified when it is fixed or its status changes (like when I add a comment asking for more information)!
Please don't take this as an attack on the person who reported the bug, I do appreciate all bug reports but I just wish people would log into sourceforge to report them - it really does have benefits for both the reporter and the development team.
I see a number of bugs reported already for 0.4. That's kind of expected and it was a shame to do a release so early but the open source mantra of "Release Early, Release Often" was firmly in mind. Once I'm back from holiday I'll work on fixing the reported bugs. None of the bugs reported so far seem to be too terrible so I hope that some of the new features are usable and appreciated.
I'll post again once I'm back from sunny Greece.
An extremely quick weblog post this one, 0.4 is released - hopefully there aren't too many bugs. I'll look forward to the reports when I get back from holiday!
http://www.sf.net/projects/pnotepad/
Version 0.4 "miles" is nearly ready for release - it has taken longer than I thought. This isn't due to lots of extra coding (not just, anyway) but simply due to the fact that I've moved house and that has left me temporarily without internet connection at home. When you've lived with always-on high speed internet for almost three years, it's kind of odd to not be able to "just check that on the Internet". I really am looking forward to when my ADSL goes live in the new place.
I will probably release 0.4 tomorrow before I go on holiday for a week - hopefully it doesn't contain too many bugs. It should be considered a testing release. Once the bug reports are in I'll see if a 0.4.1 is necessary or if I can concentrate on 0.5.
PN2 0.4 (miles) is almost ready for release - I would expect to release in the next week. I intend to ask the usual group of beta testers to give it a try first and see what they think.
Here's a quick list of what's in (from the top of my head):
The roadmap has been changed slightly: Export for other filetypes has been moved back to Mingus (0.5) as has better control over the printing mechanism. After that, all features in the Miles roadmap entry have now been implemented - only testing remains.
I know this isn't the world's most interesting subject, but here we go anyway.
I've added built in support for Perl and lcc-win32 parsing. Output from lcc-win32 is actually matched as borland output by Scintilla's built-in error lexer. However, the string is sufficiently different from that used by borland that the same regex doesn't match:
Error E2034 clippert.cpp 207: message... (borland)
Error resources.rc 14 18: message (column line:) (borland)
Error blocker.c: 537 unrecognized statement
In both borland types the line number is followed by a colon. This is not the case for the lcc-win32 error. PN2 now tries to match borland and if that fails it trys the other format.
Perl output is matched by looking for the phrase "at [file] line [line]". This is actually one of the most simple matches.
Samples for the above were again supplied by Patrick and he also supplied an example for the Watcom C compiler. Scintilla doesn't support this format as a built-in error type so for the next release at least Watcom C users will need to use a custom output matcher. The following seems to do the trick:
(?P<f>.+)\((?P<l>[0-9]+)\): .
For those wondering the errors look like this:
..\file-io.c(206): Error! E1151: Parameter count does not
It occurs to me that soon someone is going to ask whether PN supports use of Perl Compatible Regular Expressions from the search and replace dialogs. The answer, currently, is no. Programmers Notepad currently uses the regular expressions that are built in to scintilla which are nowhere near as powerful as those provided by PCRE. I haven't even looked yet at the complexities involved in integrating it properly with scintilla - it almost certainly means changes to the PCRE code to support using getter methods for characters. The only other way is to copy the entire document into a temporary buffer for search and replace and that would be bad for large documents.
Thanks very much to Patrick of OnlyTheBestFreeware fame for providing sample output for both Borland C++ 5.5.1 and Ox 3.20. I've decided (for the moment) to add built-in support for Borland C++ and have checked that custom parsing supports Ox.
So, Borland C++ messages are now handled by default using this regular expression:
(Error|Warning) ((E|W)[0-9]{4} )?(?U)(?P<f>.+) ((?P<c>[0-9]+) )?(?P<l>[0-9]+): [^\s]
This assumes that error or warning codes always start with E or W and are followed by four digits. If you know different, then obviously let me know. This one regular expression matches both the error and warning formats from GCC, and also the error output from the borland resource compiler. I'm beginning to really like regular expressions - I've never had much cause to use them in anger before.
Does anyone who is more experienced at regular expressions have any suggestions for improvements here?
For those not familiar with regular expressions, I'll provide a quick explanation of the large expression above. I'm not going to explain actual regular expression syntax - that is too much information for here. I'll assume that from my description of the functional blocks of the expression you can figure the rest out. First let me show you some trimmed example messages:
Borland C++ Error: Error E2034 main.cpp 207: message...
Borland C++ Warning: Warning W8070 main.cpp 208: message...
Borland Resource Compiler Error: Error resources.rc 14 18: message...
So, the first thing we notice is that all messages begin with either "Error" or "Warning". We can match either of these by using: (Error|Warning)
Next, in the C++ messages there is an error or warning code, which takes the form of E or W followed by four digits. So we build a simple bit of regular expression that matches that:
(E|W)[0-9]{4}
The resource compiler message doesn't have one of these codes, so we need to make it an optional match. Notice also that if it is present, there is an extra space to be matched before the next item in the string. We add the space, and make the entire phrase optional:
((E|W)[0-9]{4} )?
After this comes a special PCRE processing instruction. (?U) tells PCRE that expressions from here on in should be un-greedy. Without this flag, the resource compiler column number becomes part of the filename because the filename match is greedy. This means that it matches as much as it can. By turning on un-greedy mode, it lets the next expression match the column number before we get to the line number. This took me a while to work out and is, at least I think so, pretty damn smart - if a bit difficult to get your head around. The reason that this is partway through the expression is that putting it at the start causes the E or W code to become part of the filename for some reason. I'm too tired to get my head around why!
Next comes the filename, which we want to attach a "name" to so that we can pluck it out of the regular expression easily later. In PCRE, the library that PN is using for this, names are attached to phrases in the same way that it can be done with python: begin a group with the standard bracket, and then include ?P<name>. We don't bother limiting the filename to any particular characters, it can include most things, so we just match "one or more characters": .+.
(?P<f>.+)
I won't describe all of the rest because it's pretty similar - there's an optional match for the column number included in the resource compiler output and then a match for the line number. Both line number and column number are named with "l" and "c" respectively.
Ox messages, which take the general form:
filename (line): message
can be handled simply with:
%f \(%l\): .
I'm basing my decisions for default inclusion on whether the scintilla output lexer currently supports an output format or not. Borland errors (and in fact ones almost the same as the Ox ones) are currently supported by scintilla - which means that I can use Scintilla as an indication of which format to parse.
In cases where scintilla does not support the format with its own built-in error lexer, in order for the error to be recognised as a hotspot the regular expression based lexer needs to be used so these will currently not be "built-in" to PN. I will provide a page on the website with common output formats so that people don't need to work them out themselves.
Whew! There's a devlog entry and a half for you! My thanks again to Patrick for so quickly responding with output examples.
There are many different tool output formats - PN will support a number of these in its built-in parser. However, I currently only have example output for GCC.
Please send me output (in comments here is fine) of tools that you want to see supported. I will decide which are to be included as built-in and will (hopefully) provide custom output strings for the rest. This is a good test to see if I can support everything I need to.
I created a batch file like this:
@echo off
echo c:\source\pnwtl\mainfrm.cpp:33: bananas.
echo.
echo monkey: c:\source\pnwtl\mainfrm.cpp (12)
I then went into tools->Options->Tools and added a tool to the batch file scheme. This tool basically says:
Run: %d%f
Directory: %d
I enabled capture output and selected "Use the built-in error parser".
I ran the tool, the first line:
c:\source\pnwtl\mainfrm.cpp:33: bananas
became a hotspot and clicking it jumped to line 33 in c:\source\pnwtl\mainfrm.cpp.
I then went back into options, double-clicked on the tool and selected "Look for a custom pattern". In the pattern box, I entered this:
(monkey|chimp): %f \(%l\)
I ran the tool again, and this time the line:
monkey: c:\source\pnwtl\mainfrm.cpp (12)
became a hotspot letting me jump to line 12 in mainfrm.cpp. The following line would also work:
chimp: c:\source\pnwtl\mainfrm.cpp (12)
Error parsing works on a line-by-line basis - therefore patterns can only match a single line. I don't think this is a problem - do you? Comment if you like.
Important line to note from todays check-in:
Implemented PCRE based custom error parsing in the output viewer window.
There is no functional UI for this yet (it's in place, but doesn't do much) but it's nearly done. It's good stuff, you specify the error format using regular expressions with optional helper sequences: %l for line number, %c for column and %f for filename. Both line number and column are optional. So, to define GCC style errors (which you don't need to because they're built in) you could use:
%f:%l: .*
Equally, you can just fully specify the RE:
(?P<f>.+):(?P<l>[0-9]+): .*
Both expand to the same expression internally. I may further restrict the path matching RE (.+ is a bit vague!) to a character set something like [a-zA-Z0-9_+/\\:\.-] (or whatever, this is untested) later on to make matches a little stricter. I should also probably anchor searches to the start of the line by default (?).
Getting much closer to a 0.4 release now.
Now in CVS is the docking windows stuff previously discussed - this is used to implement the global output window. Tools can now specify either an individual file output window or the global output window as the target for their output.
PN2 now also stores the state of its toolbar (because of course you'd want to move those two tiny bars around!) and general other window state. This is mostly all thanks to the excellent code that comes with the docking framework. The framework as included has some fixes compared to that available on CodeProject, see my comments there.
I've also just checked in support for Copy as RTF and Export to RTF. More exporters will follow as and when I can be bothered to write them / convert them from SciTE.
The reason I decided to play with the global output window (which isn't in CVS yet btw) was that earlier on I implemented simple GCC output handling (which is in CVS). When you click on any gcc message of the form:
filename:line: message
PN2 will jump to "line" in "filename". The code currently is not that intelligent. It will only work in one of these two cases:
I am unsure whether this is enough (and how to find the right file if it isn't), I need some sample output from GCC to test with - I guess I'll have to download and install it.
Once this is all working hunky-dory I'll try and add support for some other output types.
Working with this and clicking on an error, only to have it jump to another maximised window hiding the error message is what made it clear how important the global output window was going to be is what made me play with the docking code.
This week I've also added a "maximise on open/new" option to the options dialog so that you can work with maximised windows by default.
I just hacked in a docking global output window for PN2 to see how difficult it was going to be. I used Sergey Klimov's docking windows framework for WTL. In under 30 minutes, I have made a docking window that contains the standard output handling window used in PN2:

That is cool. Very cool. My thanks go out to Sergey and also to Daniel Bowen who have both provided fantastic frameworks that are used in PN2.
I've just released an updated build of 0.3-coltrane to sourceforge, below is a rough copy of the announcement e-mail that went out:
There are two major version-lines of Programmers Notepad:
Version 1 : stable version.
Version 2 : pn-devel - a new version in development.
This announcement relates to version 2 (pn-devel). If you are only interested in stable versions of Programmers Notepad then you should ignore this announcement. This software should be considered "alpha" quality - expect bugs, and if you find them then report them!
Programmers Notepad 2 0.3a has been released to sourceforge, it can be downloaded here:
http://prdownloads.sourceforge.net/pnotepad/pn203a.zip?download
Why: This is an interim bug-fix release which brings compatibility with Windows NT 4. There is one other fix in the release relating to the functionality that checks if a file has been modified outside of PN.
The next scheduled release of PN2 is due in May (next month).
Until PN2 has a keyboard shorcut editor, I've placed an article on pnotepad.org which documents some of the available shortcuts:
http://www.pnotepad.org/articles/pn2keyboard.html
There's going to be a new release of Scintilla in a few days apparently - this one should include the hotspot changes I made. I've just finalised (hopefully) the work on external lexers functionality to make it platform independant but this won't make it into the next release.
My scintilla code is here.
I have tested that the external lexer code works on windows, does anyone know how to make a .so that exports symbols compatible with gmodule for the gtk edition so that I can test it?
The new external lexer code is used in PN (from the next release) to load and drive the user schemes lexer. I'll hopefully upload a sample user scheme in the next few days implementing VHDL highlighting.
The hotspots will be used in the output window.
Although I promised myself I wouldn't do it, I've done some bugfixes in the PN1 code tonight. I only fixed bugs that I considered important or damaging - there are no new features. The fixes include:
PN moves itself off the screen on load with funny screen sizes.
PN renames a project file instead of the project.
PN crashes when trying to load a text .DFM file.
Projects created in clips directory.
I will probably release a build to sourceforge sometime in the next week or so - maybe I'll even have time to build a new installer and do a proper release.
I've just checked in a few changes that allow the selection of a scheme to use when pressing Ctrl-N to get a new file. The only problem is that doing so stops you from being able to create a plain text file from the New menu. I'll fix that.
The scheme is chosen in the same place that SmartStart is configured: Tools | Options | New Files.
I checked in changes last night to the scheme configuration system that allow grouped styles (like those for PHP in the hypertext scheme, for example) to be customised in one go.
Where configured, a simple change to the background colour of the group item, for example, will apply that change to all sub-items - as long as the colour has not been customised already on those items.
Quite a lot of code was changed for this to happen, so hopefully I haven't broken anything. This goes some of the way towards fixing/implementing this , although more work may be necessary.
I've just implemented SmartStart - a simple function which automatically selects a PN2 scheme based on what you type when you first open a blank non-styled document.
e.g:
It's a good feature and credit for the idea goes to David Symons. Of course SmartStart is user customisable, but there is no gui for it yet. Settings are stored in an XML file in the Application Data directory. The GUI will be in place for 0.4 - which by the way will be nicknamed miles.
This week I have been mostly working on:
User-defined syntax highlighting
This allows any user to define a simple language syntax without writing a scintilla lexer. The code basically implements a highly generic scintilla lexer in an external lexer dll. When this dll is loaded it looks for user syntax files and loads the settings from each into an instance of this generic lexer (note: this may be optimised in the future to only load on request for speed reasons).
The syntax for the languaged is defined using really simple XML, and therefore the same file can contain the elements required to make it a Scheme definition for PN2. One file defines both the syntax and the user-controllable elements such as colouring options and keywords.
Scintilla hotspot support
This allows certain styles in Scintilla to be marked as "hot spots". These spots are reactive - when the user moves the mouse over them the cursor changes to indicate that there is an associated action possible. When the user clicks (or double-clicks) a special "hot spot clicked" notification is sent to the container.
This will be used in Programmers Notepad 2 to allow clickable URLs and also in matching tools output such as compiler messages.
Header-switch for C++
When using the cpp scheme, my local copy of PN2 now allows you to switch from a header to an implementation file or vice versa using a key combination.
I haven't entirely decided yet if I've implemented it the correct way, different file types will require different special functionality and I don't want the code to get really messy.
The release monkey overlooked a slight problem, so coltrane has been re-uploaded to sourceforge with a minor bugfix:
A last-minute bug fix has been applied to coltrane that fixes a bug occurring when using tools and not capturing their output. The new version number is 2.0.3.30. If you downloaded coltrane before 4pm GMT on 10/03/2003 (not many of you) then you should re-download.
My apologies for any inconvenience caused.
... from sourceforge news.
The release monkey has been hard at work and is proud to bring you: Programmers Notepad 2, version 0.3 (nickname: coltrane).
Please enjoy.
The next release of Programmers Notepad 2 will be version 2.0.3 (nick-named coltrane). This version has taken quite a lot of development and is a features version. This means that the focus for the release is on adding new features, and not on producing a shiptight release. That's not to say that standards have slipped, but the code in there is exciting and new - and may have bugs.
The main new feature is the addition of Tools support (as seen in version 1). This basically allows you to run external programs from PN and also (if you want) to capture their output. You can't yet click on line and column references to jump to the relevant place, but this will come eventually (not in coltrane).
Coltrane is now in the pre-release testing phase, and little new code is likely to be added. The release will be vaguely exciting because the entire update version numbers / build / make installer process will be handled by a NAnt build script for the first time. This should be quite something to watch, and should save me lots of effort!
I should also mention that coltrane does include lots of bug fixes and a few feature requests have been implemented. I will post a full list of changes when I release it.
A very happy new year to anyone who actually reads this, and I hope you all had a great holiday break. I took time off development over christmas, having released a new build of pn2 to sourceforge just before (which I didn't announce anywhere, slapped wrists).
The new build includes style customisation (yes, an options dialog!), printing and some other basic services missing from the last release. I've now started work on v0.3 which will include keyword customisation (already complete, testing needed), and tools support. Once basic tools support has been implemented, I will launch v0.3 as this feature will need quite some testing.
After 0.3, we move on to some less-core functionality like the docking windows (or helper windows). I also have some interest in branching the project at this point into two projects. First, the fully-featured MDI application that we know and love as PN2. The second project would be a mini-pn style application which would be a lightweight base-services only notepad-style program. I will only do this if I can keep a large amount of the code shared between the two to ease maintenance.
Please remember, all comments and bug reports on pn2 are always welcome. Please feel free to enter such things into the sourceforge tracker.
One of the most important features to develop (believe it or not) in PN2 is the options dialog. Many people open an application and go straight to the options - the "what can I play with?" test.
For the past week (or so) I've been working almost exclusively on this feature, and here's a taster screenshot:

In PN1 the scheme configuration was very separate from the main application options. This has all changed with PN2 with a much prettier and properly integrated options system. All developed in house, the new system provides enormous amounts of configurability - so much that my brain hurts when working on the code for it!
To read more about how the scheme configuration works, you can see the article here.
At some point I'll release some more code for the wrapper project implementing other goodies such as find and replace which I believe almost all Scintilla users will want. I'll also be releasing a WTL window wrapper for Scintilla. At some point, I may even release an MFC one too.
I've placed a couple of articles over on the main pnotepad.org web site, I'll be putting "request for comments" style articles and just plain "because I felt like writing it" style articles. There are two there now, one about PN development and one about the Windows Template Library. You can view them here. These articles were all written and published using the excellent CityDesk from Fog Creek software.
Also, some updates to my Scintilla Wrapper:
Simon.