I found a problem with printing interface. Here is how to reproduce:
- Turn on printing interface with the following:
(require 'printing)
(pr-update-menus)
- Visit lisp/printing.el. Do not set a region in it after opening.
- Open printing interface: Click on File -> Print -> Printing
Interface.
- Click on the [Preview] button. An error is signaled: Args out of
range: X, X, where X is an integer, and the two integers are the
same.
I tried to debug, and found this:
- M-x debug-on-entry RET auto-compose-region RET
- Click on the [Preview] button again.
- Keep typing d to skip uninterested function callings, stop at the
calling to selected-window.
- Type d or c, I got #.
I guess this explains why there is an error, because I observed that
the integer X in the error message is always greater than (point-max)
of *Printing Interface*. While I did not see the value of
(selected-window) in the case when the size of the buffer or a region
in the buffer is less than the size of *Printing Interface*, I'm not
sure.
I can generate a ps file with e.g. (pr-text2ps 'buffer 1 "~/tmp/abc")
in the buffer printing.el, though.