emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Error with printing interface


From: Vinicius Jose Latorre
Subject: Re: Error with printing interface
Date: Tue, 06 May 2008 22:46:26 -0300
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.13) Gecko/20080313 SeaMonkey/1.1.9

Hi Guanpeng Xu,


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.

Well, it seems that this problem is related with auto-compose-region function.

auto-compose-region calls font-at which needs a window (selected-window) as a parameter, but the current selected window is displaying *Printing Interface* buffer instead of printing.el buffer.

I don't know if it is possible to get a font-object from a buffer without being displayed.

Kenichi, what is your opinion?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]