ml-write - Write message on message line
n ml-write "message"
ml-write writes the argument "message" to the message line. If a positive numeric argument n is specified then the message is displayed with a n milliseconds uninterruptible delay allowing the user time to see the message.
The arguments to ml-write are defined as follows:-
If the argument value is not -1 or -2 calls to ml-write are ignored in standard MicroEmacs piped mode (command-line option -p). They are printed to standard error when debug piped mode is used (command-line option -P, see me(1)), making the debugging and maintenance of macro based piped processing easier.
In previous releases the command ml-clear was used to clear the message line, this command was replaced by 0 ml-write in December 2004.
The following call displays a message on the message-line with a 2 second pause:
2000 ml-write "Hello World!"
The following start-up(3) macro may be used to add a header and footer line to a file piped to standard in, writing the output to standard out.
define-macro start-up find-buffer "*stdin*" ml-write &spr "DEBUG: Read %d lines from stdin" $window-eline ml-write &spr "DEBUG: About to write header" -1 ml-write "<<<HEADER>>>" ml-write &spr "DEBUG: About to write body" 0 save-buffer ml-write &spr "DEBUG: About to write footer" -1 ml-write "<<<FOOTER>>>" -2 ml-write &spr "%d lines written to stdout" &add $window-eline 2 quick-exit !emacro
To run this example save this macro in a new macro file (such as mlwrite_test.emf) and in a shell run:
cat input_file | me -n -p @mlwrite_test - > output_file
Note the DEBUG lines will be printed if -P option is used. Also see example given for command-wait(2).
Copyright (c) 1998-2006 JASSPA
Last Modified: 2006/03/16
Generated On: 2006/10/07