texi2any
/makeinfo
Within Emacs ¶The texi2any
program provides better error messages
than either of the Emacs formatting commands. We recommend it.
The texi2any
program is independent of Emacs.
You can run texi2any
(or makeinfo
) in GNU Emacs
Texinfo mode by using either the makeinfo-region
or the
makeinfo-buffer
commands. In Texinfo mode, the commands
are bound to C-c C-m C-r and C-c C-m C-b by default.
When you invoke makeinfo-region
the output goes to a temporary
buffer. When you invoke makeinfo-buffer
output goes to the
file set with @setfilename
(see @setfilename
: Set the Output File Name).
The Emacs makeinfo-region
and makeinfo-buffer
commands
run the texi2any
program in a temporary shell buffer. If
texi2any
finds any errors, Emacs displays the error messages in
the temporary buffer.
You can parse the error messages by typing C-x `
(next-error
). This causes Emacs to go to and position the
cursor on the line in the Texinfo source that texi2any
thinks
caused the error. See Running make
or
Compilers Generally in The GNU Emacs Manual, for more
information about using the next-error
command.
In addition, you can kill the shell in which the texi2any
command is running or make the shell buffer display its most recent
output.
Kill the current running texi2any
(or makeinfo
) job
(from makeinfo-region
or makeinfo-buffer
).
Redisplay the texi2any
shell buffer to display its most recent
output.
(Note that the parallel commands for killing and recentering a TeX job are C-c C-t C-k and C-c C-t C-l. See Formatting and Printing in Texinfo Mode.)
You can specify options for texi2any
by setting the
makeinfo-options
variable with either the M-x
customize or the M-x set-variable command, or by setting the
variable in your .emacs initialization file.
For example, you could write the following in your .emacs file:
(setq makeinfo-options "--paragraph-indent=0 --no-split --fill-column=70 --verbose")
For more information, see
Easy Customization Interface in The GNU Emacs Manual,
Examining and Setting Variables in The GNU Emacs Manual,
Init File in The GNU Emacs Manual, and
texi2any
Options.