Minimum Profit 5.x Release Notes
================================

5.0.2
-----

 * New option to mark end of line characters, with its associated
   configuration directive (mp.config.mark_eol).
 * The end of line string (mp.config.eol) is now system-dependent (so,
   on win32, it's set by default to \r\n).
 * Copy and paste on GTK has been fixed (this was bug #1205).
 * Fixed some redrawing issues (bug #1236 and others).
 * Ctrl-keys no longer fail on GTK (bug #1252).
 * New document 'Minimum Profit Action Reference'.
 * New action 'build', for building Makefile-based projects. See the
   action reference for details.

5.0.1
-----

 * Improved line edition in the Curses interface (full edition plus file
   expansion using the 'tab' key in open / save file prompts).
 * Auto-indenting is temporarily disabled while pasting (bug #1250).
 * New document 'Minimum Profit Function Reference' (contributed by Lee Page).

5.0.0
-----

 * The search hit is highlighted.
 * When invoked from the menu, the 'record_macro' action dropped
   the last key (bug #1245).
 * A Curses configuration detection has been fixed that made
   some things behave strangely, as the drop-down menu not
   responding under some terminal configurations (bug #1247).
 * The Curses menu no longer crashes if it doesn't fit on
   the screen (bug #1195).
 * The -f (execute script) command line argument really works
   (bug #1240).
 * New manual page (bug #1219) and README files (bug #1218).
 * Updated documents, 'MPSL Overview' and 'Minimum Profit Cookbook'.
 * New documents, 'Minimum Profit Data Model' and 'Creating interactive
   dialog boxes'.

5.0.0-rc3
---------

 * New session support. All open documents and its current position
   can be stored / retrieved with the new 'save_session' and
   'load_session' actions. Two new configuration flags has
   been added: mp.config.auto_sessions, to automatically load / save
   sessions, and mp.config.local_sessions, to save sessions in the
   currently active directory instead of in the home directory.
 * Multiple key sequences for invoking actions (ala Emacs) are
   now possible. To create them, just assign a hash to a keycode
   instead of an action. For example, to assign the key sequence
   Ctrl-x Ctrl-f to 'open' and Ctrl-x Ctrl-s to 'save', you can use

	mp.keycodes['ctrl-x'] = {
		'ctrl-f'	=> 'open',
		'ctrl-s'	=> 'save'
	};

 * In the curses version, confirmations now have default values
   (shown in brackets), activated with the ENTER key.
 * New action 'close_all', that closes all documents.

5.0.0-rc2
---------

 * New 'complete' action, that asks for completion on the current
   word using any of the words found in the same document.
 * New 'redo' action, to revert undo operations.
 * The global configuration file `/etc/mp.mpsl' is also executed.
 * In the 'replace' action, the substitution string can contain
   the special character &, that will be replaced by the matched
   string (as in the `sed' command line tool).

5.0.0-rc1
---------

 * New support for translating key sequences into MP keycodes, mainly
   for redefining ANSI sequences not supported by current terminfo /
   termcap. For example, if your terminal sends the ANSI sequence [6;5~
   whenever you press Ctrl+page down, you can add to your config file
   the following line:

	mp.add_keyseq("[6;5~", 'ctrl-page-down');

 * A new 'system_command' action, to pipe from and to system commands
   (Closed bug #1120).
 * A new 'word_count' action, to count the number of lines and words
   in a document (or in the selected block).
 * Incorrect word wrapping has been fixed (Closed bug #1137).
 * Search and replace expand backslashed characters like \n and \t
   (Closed bug #1214).
 * New timer functionality has been added; a user function can be called
   each time a specified period of milliseconds have elapsed. If, for
   example, you want to print a string on standard output each two
   seconds, you can run

	mp.timer(2000, sub { print("Hi, world!\n"); });

5.0.0-pre1
----------

 * Password-protected files fully work.
 * Moving to next / previous instance of character (bound to ctrl-page-down
   and ctrl-page-up) works (Closed bug #1131).
 * Files open MUCH faster.
 * Selection can be done by pressing shift + any movement key (Closed bug #1182).
 * Dialog boxes work under Windows 98 (Closed bugs #1196, #1197).
 * Block selection can be done by dragging the mouse (Closed bugs #1200, #1201).
 * New 'grep' functionality (Closed bug #1116).
 * New action 'sync' (save all modified documents, closed bug #1206).
 * New action 'document_list' (show a box with all open documents, allowing
   the selection of the active one; closed bug #1211).
 * Translations ported from mp 3.x (closed bug #1169).
 * Most syntax highlight definitions ported from mp 3.x (closed bug #1168).

4.99.12
-------

 * The menu in the Curses interface has been (finally) implemented.
 * Interfaces have changed internally; a new driver function, mp.drv.form()
   serves as a dialog box generic generator, resulting in more useful queries
   for data (for example, all data required for a 'replace' operation is
   queried in only one dialog box). The Curses implementation, though
   functional, is still just a wrapper to the old interface functions
   and fields are queried one-by-one (which is annoying). This is an example
   of a call to mp.drv.form(); the r variable will contain an array of 5
   elements (one per widget) containing the values, or NULL if user cancelled:

	local r = mp.drv.form( [
	
		/* a 'text' widget */
		{ 'label'	=> "Replace this:",
		  'type'	=> 'text',
		  'history'	=> 'search',
		  'value'	=> 'THIS' },
	
		/* another one */
		{ 'label'	=> "With:",
		  'type'	=> 'text',
		  'history'	=> 'replace',
		  'value'	=> 'THAT' },
	
		/* a 'password' widget */
		{ 'label'	=> 'Password:',
		  'type'	=> 'password' },
	
		/* a 'checkbox' widget */
		{ 'label'	=> "Case sensitive:",
		  'type'	=> 'checkbox',
		  'value'	=> mp.config.case_sensitive_search },
	
		/* a 'list' widget */
		{ 'label'	=> 'All C files:',
		  'type'	=> 'list',
		  'list'	=> glob('*.c'),
		  'value'	=> 10 }
	] );

 * Password protecting files works (but they cannot be opened yet, so this
   is far from useful, unless you use mp 3.x to open them).
 * Case sensitivity in searches can be controlled with the new
   config flag mp.config.case_sensitive_search.
 * Replace (and global replace by use of the new config flag
   'mp.config.global_replace') works.

4.99.11
-------

 * Syntax highlight definition have changed (again, hopefully for the last
   time). Definitions are now an array of attribute name / regexes in which
   the order is significative.
 * Template insertion works.
 * Tag selection (open the file where a symbol is defined) works.
 * Symbol completion (using tags) works.
 * Closed bugs #1159, #1158, #1153, #1161.

4.99.10
-------

 * A big advance in the Curses interface: Alerts, confirmations, and open
   file, save file, search and generic prompts are working. Still lacking
   the selection lists (as the rest of interfaces) and the menu.
 * Improved menus: if an invalid action is added to a menu, it's shown
   followed by a ?; if a key is bound to that action, it's shown between
   square brackets.
 * For systems lacking iconv support (MS Windows), a crappy, ad-hoc utf-8
   converter has been added. This means that hitting 'escape' and typing

	encoding('utf-8');

   makes reading and writing utf-8 encoded files possible on every system.
 * New action 'join_paragraph', to join current paragraph all in one line.
 * New action 'word_wrap_paragraph', that re-word-wraps current paragraph.
   Word wrapping must be set ('mp.config.word_wrap = number;') for this to
   work.

4.99.9
------

 * The GTK and win32 drivers now include a native open/save file dialog.
 * Interactive help (help for the word under the cursor, triggered by
   pressing 'f1') works.
 * The menu in GTK and win32 works.
 * New icon!
 * Some bugs that caused random crashes has been fixed.
 * New action 'exec-doc', that executes the active open document as
   MPSL code.

4.99.8
------

 * New configuration option mp.config.tabs_as_spaces, to store tabs
   as spaces.
 * Each syntax highlight definition can contain an optional function
   called detect() that receives the document as argument and can be used
   to tailor special detection rules.
 * A big part of the internal storage of colors and attributes have
   been rewritten to make it more dynamic.
 * Tag target for the word over the cursor is shown in the status line.
 * Move word left works.
 * Opening an already open file makes it the active one instead of
   re-opening it.
 * The 'execute code' action has been remapped from ctrl-f1 to escape.
 * Spellchecking via ispell works (though it's SLOW!). Activate it by
   hitting escape and typing:

	mp.ispell(1);

 * By default, files are now unlinked before (re)written. File permissions
   and ownership are restored if available. This behaviour can be disabled
   by setting mp.config.unlink to 0.
 * The GTK driver drawing code has been optimized, so it's much more
   responsive now.

4.99.7
------

 * The 'modified' flag of documents is maintained, so now closing files
   with pending modifications ask for confirmation. Also, the %m status
   line directive works (marking modified files with an asterisk).
 * Flex and bison are no longer needed to build.
 * The 'close window' button in GUIs (win32 and GTK) now generate the
   special keycode 'close-window'.
 * The 'exit' action now closes all open documents, asking for saving
   confirmation on those modified.
 * Temporary versions of the 'open' ans 'save' actions (using
   mp.drv.readline() instead of an ad-hoc open file dialog) have
   been implemented.
 * The GUI interfaces now can have their font preferences configured
   by using mp.config.font_face and mp.config.font_size.
 * The actions 'zoom-in' and 'zoom-out' (font size rescaling, bound to
   F11/F12 and ctrl-kp-minus/ctrl-kp-plus) have been implemented.
 * New mouse-related actions: move-to-mouse-position, move-mouse-wheel-up
   and move-mouse-wheel-down.

4.99.6
------

This is an EXPERIMENTAL version for evaluation purposes only. There are
many things that aren't implemented, others fail miserably and many more
do it incorrectly. Basically, what is known to work is:

 * Basic text editing fully works. I've been using it for six months or so
   to maintain itself, and there has not been a crash in three months,
   more or less.
 * Scripting works fine (90% of Minimum Profit 5.x itself is implemented
   in MPSL, its internal scripting language).
 * Undo works fine. It's bound to ctrl-z.
 * Works cleanly in an UTF-8 environment.

I do development on the GTK version, so it's where it works best. The
curses version lacks many of the interface (alerts, confirmations,
asking for text, etc.), so it's barely usable. The win32 version seem
to work, but it needs to be manually installed and probably need some
tweaking.

What it doesn't work:

 * The dialogs to open or save a file by its name aren't implemented.
   There are workarounds for this: files can be opened from the command
   line and save works correctly if the edited file has a name. Also,
   files can be opened by hitting ctrl-f1 (execute script code) and
   typing:

	mp.open("file-to-be-opened");

 * There is no menu.
 * No ispell support.
 * No password protected files.
 * No grep.
 * No external commands (so no support for help, tags, etc.).
 * Some movement commands as moving a word left, moving to matching
   brackets, etc. are still not implemented.
 * Only a few syntax highlight definitions are implemented.
 * Many other things I cannot remember.

Documentation is still scarce: the more interesting bits are inside the
mpsl/doc directory. This is where the scripting language is documented,
with some basic overviews and implementation notes (there is even an
embryo of a PostScript quick reference guide).

Customizing can be done by writing MPSL commands in the ~/.mp.mpsl file,
which is read on startup.

I have not tried to optimize the internal engine, so it's probably some
magnitudes slower than the 3.x version.

