1 Minimum Profit Release Notes
2 ============================
7 - Some operations are now done in separate threads, like
8 - Hexadecimal viewer loading
10 - `indent_block': Indents the current line or the selected block.
11 - `unindent_block': Reverse of `indent_block'.
13 - ~/.mp_templates can be a directory. If it is, the `global' file
14 there is always read (and those templates put at the top) and it
15 will also read a file named like the current syntax highlight
16 definition (so different templates appear if your editing C, Perl,
18 - New configuration options:
19 - `mp.config.smart_bol': if set to nonzero, the `move_bol' action
20 now moves to the first non-blank character in the line instead of
21 to column 0 (unless the cursor is already on the first non-blank).
23 - The following actions accept additional arguments when called
24 as functions (and do not ask for them, if present):
32 - `filter_selection': to filter the selection (or the
33 full document if no selection is done) through a system command.
34 - `exec_action': that shows a list of actions to execute
35 on the current document.
36 - `cut_lines_with_string': that cuts to the clipboard all lines
37 in a document or block that matches a regular expression.
38 - `insert_real_tab': bound to `shift-tab', to insert a tab
39 character (\t) regardless of whatever is set in the
40 `tabs_as_spaces' configuration variable.
41 - `insert_next_item': to insert a new enumeration item in
44 - Fixed insert / overwrite mode.
45 - If a selection is invisible (incomplete or with the start and end
46 in the same character), a new keystroke does not jump to it.
47 - New configuration options:
48 - `mp.config.hw_cursor': to activate the hardware cursor in
49 text environments (disabled by default).
50 - Text user interface improvements:
51 - File opening list is fully navegable (directories up and down),
52 - Selection lists accept letter keys to jump to elements,
53 - If a text mode menu panel do not fit vertically on the screen,
54 menu items are scrolled as needed.
55 - New command line options:
56 - `-txt': force text mode (instead of GUI).
57 - General improvements:
58 - If a block is selected, actions `word_wrap_paragraph',
59 `join_paragraph' and `eval_doc' act only on it.
60 - The internal engine has been partly rewritten, so it requires
61 less memory and it's a bit faster.
66 * If a block is selected, any keystroke substitutes it.
67 * Support for Alt + keys (ASCII and movement) has been added,
68 and mostly left unbound to be used by the user for his own
70 * A new tab mode, which uses the previous line as a template
72 * Fixed action `open_under_cursor'.
73 * The `mp.paste()' function returns the clipboard content
74 as a string if called without arguments.
75 * New Grutatxt syntax highlighter.
77 * Fix a bug when calculating the drawing position in the
78 selected block, that were leading to crashes.
83 * A new Qt4 driver (adapted from the KDE4 driver).
84 * A new hexadecimal viewer.
85 * New action `open_dropped_files', to open files dropped from
86 the underlying system GUI.
87 * Improved file encoding autodetection by looking at the
89 * New configuration option `keep_eol', to keep the original
90 end of line sequence each document had.
91 * Fixed some clipboard issues, as replacing the selected block
92 when pasting and some crashes.
93 * win32 executable has been renamed to `mp-5.exe'.
94 * The status line format string can also include the %e token
95 to show the encoding used by the document.
96 * Fixed win32 input processing in non-latin environments.
97 * Setting an empty encoding (to fall back to system defaults)
103 * The `grep' action can now be recursive.
104 * New syntax color for special documentation blocks.
105 * Fix searching into empty selected blocks (this was bug #1269).
106 * New action `section_list', that shows a list of _sections_
107 in the current document to jump to. Sections are usually
108 function definitions and special marks in programming
110 * New action `seek_misspelled', to search the next
111 misspelled word. It has been assigned to keycode `f5'.
112 * New action `ignore_last_misspell', to add the last misspelled
113 word found by `seek_misspelled' to a whitelist so it won't
115 * New action `seek_repeated_word', to search for words starting
116 or ending with the same number of letters up to a maximum
117 distance. It's controlled by the new configuration directives
118 `mp.config.rw_num_chars' and `mp.config.rw_max_dist'.
119 It has been assigned to keycode `f6' (this keycode was
120 previously assigned to `join_paragraph', which has no
122 * The action `open_templates_file' has been fixed.
123 * Several GTK interface updates by fellow developer Sebastian Vöcking.
124 * New command line option `-d', to change the working directory.
125 * Several fixes to the win32 driver; word wrapping, combobox
126 drop-down sizes, underlined text.
127 * Avoid hanging if the external ispell program is broken.
128 * The `dump()' function now dumps its argument as MPSL code.
133 * Internationalization works in all platforms (including KDE4,
134 were it was faulty, and win32, where it was non-existent since
136 * The status line format string can also include the %w token
137 to show the number of words in the current document or selection
139 * Search and replace is now limited to the selected block, if any.
144 Fixes to the KDE4 driver:
146 * Underlined text works.
147 * Text fields in forms now have history.
148 * If no xserver can be contacted, fall back to the curses interface.
154 * Rectangular block copy/paste support.
155 * New syntax highlight for the Euphoria language.
160 * New action `open_under_cursor', that picks the word in the
161 current document under the cursor, accepts it as a document
162 name and tries to open it. If it's in the format string:number,
163 is accepted as a file name and a line number. It's bound by
164 default to `ctrl-enter' (`alt-enter' under Curses).
165 * The `grep' action bevahaviour has changed; instead of in a form,
166 matches are shown in a read-only document that is only closed
167 explicitly. Each change can be moved to by using the new
168 `open_under_cursor' (`ctrl-enter' or `alt-enter') action shown above.
169 * In a similar way, the `build' action also shows its output in a
170 read-only document instead of a form that is not automatically closed,
171 making the browsing and editing of compilation errors more useful.
172 * Forms in the Curses driver have changed their look. All fields in a
173 form are shown simultaneously on screen. This is one step to close
175 * A set of character encoding converters have been natively implemented,
176 improving those platforms where the 'iconv' library is not available
177 (i.e. Windows and old Unix systems). The available encodings can be
180 dump(EMBEDDED_ENCODINGS);
185 * New option to mark end of line characters, with its associated
186 configuration directive (mp.config.mark_eol).
187 * The end of line string (mp.config.eol) is now system-dependent (so,
188 on win32, it's set by default to \r\n).
189 * Copy and paste on GTK has been fixed (this was bug #1205).
190 * Fixed some redrawing issues (bug #1236 and others).
191 * Ctrl-keys no longer fail on GTK (bug #1252).
192 * New document _Minimum Profit Action Reference_.
193 * New action `build', for building Makefile-based projects. See the
194 action reference for details.
199 * Improved line edition in the Curses interface (full edition plus file
200 expansion using the `tab' key in open / save file prompts).
201 * Auto-indenting is temporarily disabled while pasting (bug #1250).
202 * New document _Minimum Profit Function Reference_ (contributed by Lee Page).
207 * The search hit is highlighted.
208 * When invoked from the menu, the `record_macro' action dropped
209 the last key (bug #1245).
210 * A Curses configuration detection has been fixed that made
211 some things behave strangely, as the drop-down menu not
212 responding under some terminal configurations (bug #1247).
213 * The Curses menu no longer crashes if it doesn't fit on
214 the screen (bug #1195).
215 * The -f (execute script) command line argument really works
217 * New manual page (bug #1219) and README files (bug #1218).
218 * Updated documents, _MPSL Overview_ and _Minimum Profit Cookbook_.
219 * New documents, _Minimum Profit Data Model_ and
220 _Creating interactive dialog boxes_.
225 * New session support. All open documents and its current position
226 can be stored / retrieved with the new `save_session' and
227 `load_session' actions. Two new configuration flags has
228 been added: `mp.config.auto_sessions', to automatically load / save
229 sessions, and `mp.config.local_sessions', to save sessions in the
230 currently active directory instead of in the home directory.
231 * Multiple key sequences for invoking actions (ala Emacs) are
232 now possible. To create them, just assign a hash to a keycode
233 instead of an action. For example, to assign the key sequence
234 Ctrl-x Ctrl-f to `open' and Ctrl-x Ctrl-s to `save', you can use
236 mp.keycodes['ctrl-x'] = {
241 * In the curses version, confirmations now have default values
242 (shown in brackets), activated with the ENTER key.
243 * New action `close_all', that closes all documents.
248 * New `complete' action, that asks for completion on the current
249 word using any of the words found in the same document.
250 * New `redo' action, to revert undo operations.
251 * The global configuration file `/etc/mp.mpsl' is also executed.
252 * In the `replace' action, the substitution string can contain
253 the special character &, that will be replaced by the matched
254 string (as in the `sed' command line tool).
259 * New support for translating key sequences into MP keycodes, mainly
260 for redefining ANSI sequences not supported by current terminfo /
261 termcap. For example, if your terminal sends the ANSI sequence [6;5~
262 whenever you press Ctrl+page down, you can add to your config file
265 mp.add_keyseq("[6;5~", 'ctrl-page-down');
267 * A new `system_command' action, to pipe from and to system commands
269 * A new `word_count' action, to count the number of lines and words
270 in a document (or in the selected block).
271 * Incorrect word wrapping has been fixed (Closed bug #1137).
272 * Search and replace expand backslashed characters like \n and \t
274 * New timer functionality has been added; a user function can be called
275 each time a specified period of milliseconds have elapsed. If, for
276 example, you want to print a string on standard output each two
279 mp.timer(2000, sub { print("Hi, world!\n"); });
284 * Password-protected files fully work.
285 * Moving to next / previous instance of character (bound to ctrl-page-down
286 and ctrl-page-up) works (Closed bug #1131).
287 * Files open MUCH faster.
288 * Selection can be done by pressing shift + any movement key (Closed bug #1182).
289 * Dialog boxes work under Windows 98 (Closed bugs #1196, #1197).
290 * Block selection can be done by dragging the mouse (Closed bugs #1200, #1201).
291 * New `grep' functionality (Closed bug #1116).
292 * New action `sync' (save all modified documents, closed bug #1206).
293 * New action `document_list' (show a box with all open documents, allowing
294 the selection of the active one; closed bug #1211).
295 * Translations ported from mp 3.x (closed bug #1169).
296 * Most syntax highlight definitions ported from mp 3.x (closed bug #1168).
301 * The menu in the Curses interface has been (finally) implemented.
302 * Interfaces have changed internally; a new driver function, mp.drv.form()
303 serves as a dialog box generic generator, resulting in more useful queries
304 for data (for example, all data required for a `replace' operation is
305 queried in only one dialog box). The Curses implementation, though
306 functional, is still just a wrapper to the old interface functions
307 and fields are queried one-by-one (which is annoying). This is an example
308 of a call to mp.drv.form(); the r variable will contain an array of 5
309 elements (one per widget) containing the values, or NULL if user cancelled:
311 local r = mp.drv.form( [
313 /* a 'text' widget */
314 { 'label' => "Replace this:",
316 'history' => 'search',
320 { 'label' => "With:",
322 'history' => 'replace',
325 /* a 'password' widget */
326 { 'label' => 'Password:',
327 'type' => 'password' },
329 /* a 'checkbox' widget */
330 { 'label' => "Case sensitive:",
331 'type' => 'checkbox',
332 'value' => mp.config.case_sensitive_search },
334 /* a 'list' widget */
335 { 'label' => 'All C files:',
337 'list' => glob('*.c'),
341 * Password protecting files works (but they cannot be opened yet, so this
342 is far from useful, unless you use mp 3.x to open them).
343 * Case sensitivity in searches can be controlled with the new
344 config flag mp.config.case_sensitive_search.
345 * Replace (and global replace by use of the new config flag
346 `mp.config.global_replace') works.
351 * Syntax highlight definition have changed (again, hopefully for the last
352 time). Definitions are now an array of attribute name / regexes in which
353 the order is significative.
354 * Template insertion works.
355 * Tag selection (open the file where a symbol is defined) works.
356 * Symbol completion (using tags) works.
357 * Closed bugs #1159, #1158, #1153, #1161.
362 * A big advance in the Curses interface; alerts, confirmations, and open
363 file, save file, search and generic prompts are working. Still lacking
364 the selection lists (as the rest of interfaces) and the menu.
365 * Improved menus; if an invalid action is added to a menu, it's shown
366 followed by a ?; if a key is bound to that action, it's shown between
368 * For systems lacking iconv support (MS Windows), a crappy, ad-hoc utf-8
369 converter has been added. This means that hitting `escape' and typing
370 `encoding('utf-8');' makes reading and writing utf-8 encoded files
371 possible on every system.
372 * New action `join_paragraph', to join current paragraph all in one line.
373 * New action `word_wrap_paragraph', that re-word-wraps current paragraph.
374 Word wrapping must be set ('mp.config.word_wrap = number;') for this to
380 * The GTK and win32 drivers now include a native open/save file dialog.
381 * Interactive help (help for the word under the cursor, triggered by
382 pressing `f1') works.
383 * The menu in GTK and win32 works.
385 * Some bugs that caused random crashes has been fixed.
386 * New action `exec-doc', that executes the active open document as
392 * New configuration option `mp.config.tabs_as_spaces', to store tabs
394 * Each syntax highlight definition can contain an optional function
395 called detect() that receives the document as argument and can be used
396 to tailor special detection rules.
397 * A big part of the internal storage of colors and attributes have
398 been rewritten to make it more dynamic.
399 * Tag target for the word over the cursor is shown in the status line.
400 * Move word left works.
401 * Opening an already open file makes it the active one instead of
403 * The `execute code' action has been remapped from `ctrl-f1' to escape.
404 * Spellchecking via ispell works (though it's SLOW!). Activate it by
405 hitting escape and typing:
409 * By default, files are now unlinked before (re)written. File permissions
410 and ownership are restored if available. This behaviour can be disabled
411 by setting `mp.config.unlink' to zero.
412 * The GTK driver drawing code has been optimized, so it's much more
418 * The `modified' flag of documents is maintained, so now closing files
419 with pending modifications ask for confirmation. Also, the %m status
420 line directive works (marking modified files with an asterisk).
421 * Flex and bison are no longer needed to build.
422 * The `close window' button in GUIs (win32 and GTK) now generate the
423 special keycode `close-window'.
424 * The `exit' action now closes all open documents, asking for saving
425 confirmation on those modified.
426 * Temporary versions of the `open' ans `save' actions (using
427 mp.drv.readline() instead of an ad-hoc open file dialog) have
429 * The GUI interfaces now can have their font preferences configured
430 by using mp.config.font_face and mp.config.font_size.
431 * The actions `zoom-in' and `zoom-out' (font size rescaling, bound to
432 `f11/f12' and `ctrl-kp-minus/ctrl-kp-plus') have been implemented.
433 * New mouse-related actions; `move-to-mouse-position', `move-mouse-wheel-up'
434 and `move-mouse-wheel-down'.
439 This is an EXPERIMENTAL version for evaluation purposes only. There are
440 many things that aren't implemented, others fail miserably and many more
441 do it incorrectly. Basically, what is known to work is:
443 * Basic text editing fully works. I've been using it for six months or so
444 to maintain itself, and there has not been a crash in three months,
446 * Scripting works fine (90% of Minimum Profit 5.x itself is implemented
447 in MPSL, its internal scripting language).
448 * Undo works fine. It's bound to ctrl-z.
449 * Works cleanly in an UTF-8 environment.
451 I do development on the GTK version, so it's where it works best. The
452 curses version lacks many of the interface (alerts, confirmations,
453 asking for text, etc.), so it's barely usable. The win32 version seem
454 to work, but it needs to be manually installed and probably need some
457 What it doesn't work:
459 * The dialogs to open or save a file by its name aren't implemented.
460 There are workarounds for this: files can be opened from the command
461 line and save works correctly if the edited file has a name. Also,
462 files can be opened by hitting `ctrl-f1' (execute script code) and
465 mp.open("file-to-be-opened");
469 * No password protected files.
471 * No external commands (so no support for help, tags, etc.).
472 * Some movement commands as moving a word left, moving to matching
473 brackets, etc. are still not implemented.
474 * Only a few syntax highlight definitions are implemented.
475 * Many other things I cannot remember.
477 Documentation is still scarce: the more interesting bits are inside the
478 mpsl/doc directory. This is where the scripting language is documented,
479 with some basic overviews and implementation notes (there is even an
480 embryo of a PostScript quick reference guide).
482 Customizing can be done by writing MPSL commands in the ~/.mp.mpsl file,
483 which is read on startup.
485 I have not tried to optimize the internal engine, so it's probably some
486 magnitudes slower than the 3.x version.