MCM News



MCM is now available. This release brings two useful new features, both new $() functions: $numformat() and $linn(). For other changes, see the included changelog.

$numformat() converts numbers into a format useful as sorting keys. For example, "$numformat(3,6)" becomes "006", and $numformat(5,123) becomes "00123". Reverse sorting can be achieved with negative numbers. E.g. "$numformat(3,-5) becomes "995", and $numformat(4,-50) becomes "9950". $numformat() is useful for those config files which include numbers as an id and expect the files to be sorted on that id (or you wish to sort them). I previously just entered both "004" and "4", but $numformat() removes this tedious duplication.

$linn() is similarly slightly useful on its own: $linn() turns into the current line number. So if $linn() is written on line 9, it'll turn into "9". Thus $linn() is useful for auto-generating IDs .. and becomes very useful when combined with $numformat(). In recent years I have been using MCM for all sorts of unexpected things, like generating text documents, changelogs and writing this website. I have also recently started using MCM for creating menus, most of which I want sorted alphabetically, but sometimes I just want sorted in the order in the MCM file. $numformat() and $linn() together reduce the need for me to create magic numbers in these situations. Illustrated examples to follow.. (though as always, simple examples can be found in the included mcmtestfiles.tgz).



MCM is now available. It includes a new feature that I have been missing for a very long time: mcmtags now can generate qualified tags and the included mcm.vim makes use of them when jumping to tags, so no longer does jumping to "Package.add" within vim take you to one of the many other ".add" defines. Writing the vimscript was unexpectedly straightforward.



An updated version of MCM ( is now available from the usual place. It fixes two minor bugs that have been getting in the way, the most significant of which was that the built-in constants @SPACE, @TAB, @COMMA and @NEWLINE were available only within defines, not within the (less used) let statements at the package level.



One way of using MCM to make scripted changes to the system is with Hooks.



Do you keep your crontab files under version control? It's easy with MCM.



As you may have noticed from my very first Hello World! article, I like both source code and terminal output to have colour. Accordingly I have just added an article on colouring MCM's output with GRC.

Hello World!


Hello! This site is now published for all to view. The initial articles give a window into what MCM can do, and of course MCM itself is available for download. For those wanting a more precise understanding of MCM, there's both MCM's testsuite (distributed with MCM) and a work-in-progress document detailing MCM's syntax.

(The news items above are also available for your newsreader).