* Error with printing interface
@ 2008-04-02 10:08 Herbert Euler
2008-04-02 10:14 ` Herbert Euler
2008-05-07 1:46 ` Vinicius Jose Latorre
0 siblings, 2 replies; 3+ messages in thread
From: Herbert Euler @ 2008-04-02 10:08 UTC (permalink / raw)
To: emacs-devel
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.
Regards,
Guanpeng Xu
_________________________________________________________________
Connect to the next generation of MSN Messenger
http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-us&source=wlmailtagline
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: Error with printing interface
2008-04-02 10:08 Error with printing interface Herbert Euler
@ 2008-04-02 10:14 ` Herbert Euler
2008-05-07 1:46 ` Vinicius Jose Latorre
1 sibling, 0 replies; 3+ messages in thread
From: Herbert Euler @ 2008-04-02 10:14 UTC (permalink / raw)
To: emacs-devel
> - Type d or c, I got #.
I meant # < window 16 on *Printing Interface*> here.
Regards,
Guanpeng Xu
_________________________________________________________________
Connect to the next generation of MSN Messenger
http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-us&source=wlmailtagline
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Error with printing interface
2008-04-02 10:08 Error with printing interface Herbert Euler
2008-04-02 10:14 ` Herbert Euler
@ 2008-05-07 1:46 ` Vinicius Jose Latorre
1 sibling, 0 replies; 3+ messages in thread
From: Vinicius Jose Latorre @ 2008-05-07 1:46 UTC (permalink / raw)
To: Herbert Euler; +Cc: Kenichi Handa, emacs-devel
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?
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-05-07 1:46 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-02 10:08 Error with printing interface Herbert Euler
2008-04-02 10:14 ` Herbert Euler
2008-05-07 1:46 ` Vinicius Jose Latorre
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).