unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Setting lines to print per page....
@ 2003-01-17 21:12 simondo
  2003-01-18 14:25 ` Kai Großjohann
  0 siblings, 1 reply; 10+ messages in thread
From: simondo @ 2003-01-17 21:12 UTC (permalink / raw)


Hi all,

I'm using emacs as an interface for querying MySQL databases, and want to
print out the result sets.  But no matter what I set the characters/inch
in the X Printing Panel, the same number of lines are printed per page. 
The characters are smaller, there's just more space at the end of the
page.  This isn't using the ps pretty printing option of emacs btw.  I've
waded through a sea of documentation and goggled, but I'm new to emacs so
it's all very unfamiliar and gets confusing fast.  I think it's printing
through lpr and then cups if that's any help.

Cheers,
Simon

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Setting lines to print per page....
  2003-01-17 21:12 Setting lines to print per page simondo
@ 2003-01-18 14:25 ` Kai Großjohann
  2003-01-18 22:49   ` gebser
       [not found]   ` <mailman.539.1042930154.21513.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 10+ messages in thread
From: Kai Großjohann @ 2003-01-18 14:25 UTC (permalink / raw)


"simondo" <simondo@paradise.com.mz> writes:

> I'm using emacs as an interface for querying MySQL databases, and want to
> print out the result sets.  But no matter what I set the characters/inch
> in the X Printing Panel, the same number of lines are printed per page. 
> The characters are smaller, there's just more space at the end of the
> page.  This isn't using the ps pretty printing option of emacs btw.  I've
> waded through a sea of documentation and goggled, but I'm new to emacs so
> it's all very unfamiliar and gets confusing fast.  I think it's printing
> through lpr and then cups if that's any help.

I think that print-buffer might print via lpr-page-header-program.  I
think that lpr-buffer doesn't do that.

So does it help to say M-x lpr-buffer RET?
-- 
Ambibibentists unite!

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Setting lines to print per page....
  2003-01-18 14:25 ` Kai Großjohann
@ 2003-01-18 22:49   ` gebser
       [not found]   ` <mailman.539.1042930154.21513.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 10+ messages in thread
From: gebser @ 2003-01-18 22:49 UTC (permalink / raw)
  Cc: help-gnu-emacs


Put this in your .emacs:

(custom-set-variables
 '(lpr-page-header-program "pr --page-width=84 --indent=5"))

Depending on the size of the characters you configured and what size
margins you want, you may need to adjust the numbers.  

Do "man pr" for more options to include above within the quotes (").


hth,
ken

Kai Großjohann at 15:25 (UTC+0100) on Sat, 18 Jan 2003 said:

= "simondo" <simondo@paradise.com.mz> writes:
= 
= > I'm using emacs as an interface for querying MySQL databases, and want to
= > print out the result sets.  But no matter what I set the characters/inch
= > in the X Printing Panel, the same number of lines are printed per page. 
= > The characters are smaller, there's just more space at the end of the
= > page.  This isn't using the ps pretty printing option of emacs btw.  I've
= > waded through a sea of documentation and goggled, but I'm new to emacs so
= > it's all very unfamiliar and gets confusing fast.  I think it's printing
= > through lpr and then cups if that's any help.
= 
= I think that print-buffer might print via lpr-page-header-program.  I
= think that lpr-buffer doesn't do that.
= 
= So does it help to say M-x lpr-buffer RET?
= 

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Setting lines to print per page....
       [not found]   ` <mailman.539.1042930154.21513.help-gnu-emacs@gnu.org>
@ 2003-01-19 14:18     ` Kai Großjohann
  2003-01-21 17:18       ` Kevin Rodgers
  2003-01-23 10:13     ` simondo
  1 sibling, 1 reply; 10+ messages in thread
From: Kai Großjohann @ 2003-01-19 14:18 UTC (permalink / raw)


gebser@ameritech.net writes:

> (custom-set-variables
>  '(lpr-page-header-program "pr --page-width=84 --indent=5"))

Does this really work?  Under Unix, it will try to call a program
that has a longish name including spaces and equals signs...  At
least that's what I think.
-- 
Ambibibentists unite!

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Setting lines to print per page....
  2003-01-19 14:18     ` Kai Großjohann
@ 2003-01-21 17:18       ` Kevin Rodgers
  2003-01-22 16:11         ` gebser
  0 siblings, 1 reply; 10+ messages in thread
From: Kevin Rodgers @ 2003-01-21 17:18 UTC (permalink / raw)


Kai Großjohann wrote:

> gebser@ameritech.net writes:
> 
> 
>>(custom-set-variables
>> '(lpr-page-header-program "pr --page-width=84 --indent=5"))
>>
> 
> Does this really work?  Under Unix, it will try to call a program
> that has a longish name including spaces and equals signs...  At
> least that's what I think.

Yeah, that should probably be

(setq lpr-page-header-switches '("-page-width=84" "--indent=5"))

-- 
<a href="mailto:&lt;kevin.rodgers&#64;ihs.com&gt;">Kevin Rodgers</a>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Setting lines to print per page....
  2003-01-21 17:18       ` Kevin Rodgers
@ 2003-01-22 16:11         ` gebser
  2003-01-22 17:27           ` Kai Großjohann
  0 siblings, 1 reply; 10+ messages in thread
From: gebser @ 2003-01-22 16:11 UTC (permalink / raw)
  Cc: help-gnu-emacs


Well, it was working pretty good until this morning when I tried using 
"Help > Customize > Top Level... > Wp > Lpr" to change things.  Either 
I'm dense or those menus need a little sprucing up.

If, from the commandline, I do:

lp -o cpi=12 -o prettyprint -o page-left=72 -o page-top=72 -o \
page-right=72 -o page-bottom=72 filename

(note the use of "lp" rather than "lpr"-- a CUPS thing), I get an 
absolutely beautifully printed document.  It would make Mom proud.  But 
I haven't been able to figure out how to put this into the verdammt 
Customize menu puzzle.

Hopefully some gleaming elisp maven here can provide the code for .emacs 
which would properly set the couple variables to produce what my 
commandline does.  Please?


tia,
ken

Kevin Rodgers at 10:18 (UTC-0700) on Tue, 21 Jan 2003 said:

= Kai Großjohann wrote:
= 
= > gebser@ameritech.net writes:
= > 
= > 
= >>(custom-set-variables
= >> '(lpr-page-header-program "pr --page-width=84 --indent=5"))
= >>
= > 
= > Does this really work?  Under Unix, it will try to call a program
= > that has a longish name including spaces and equals signs...  At
= > least that's what I think.
= 
= Yeah, that should probably be
= 
= (setq lpr-page-header-switches '("-page-width=84" "--indent=5"))
= 
= 

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Setting lines to print per page....
  2003-01-22 16:11         ` gebser
@ 2003-01-22 17:27           ` Kai Großjohann
  2003-01-27 15:35             ` gebser
  0 siblings, 1 reply; 10+ messages in thread
From: Kai Großjohann @ 2003-01-22 17:27 UTC (permalink / raw)


gebser@ameritech.net writes:

> If, from the commandline, I do:
>
> lp -o cpi=12 -o prettyprint -o page-left=72 -o page-top=72 -o \
> page-right=72 -o page-bottom=72 filename
>
> (note the use of "lp" rather than "lpr"-- a CUPS thing), I get an 
> absolutely beautifully printed document.  It would make Mom proud.  But 
> I haven't been able to figure out how to put this into the verdammt 
> Customize menu puzzle.

lpr-switches is a list.  Add an item.  Put "-o" in it.  Add another
item.  Put "cpi=12" in it.  And so on.

Also set lpr-command to lp.

Does it work?
-- 
Ambibibentists unite!

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Setting lines to print per page....
       [not found]   ` <mailman.539.1042930154.21513.help-gnu-emacs@gnu.org>
  2003-01-19 14:18     ` Kai Großjohann
@ 2003-01-23 10:13     ` simondo
  1 sibling, 0 replies; 10+ messages in thread
From: simondo @ 2003-01-23 10:13 UTC (permalink / raw)


On Sat, 18 Jan 2003 17:49:14 -0500, gebse wrote:

> 
> Put this in your .emacs:
> 
> (custom-set-variables
>  '(lpr-page-header-program "pr --page-width=84 --indent=5"))
> 
> Depending on the size of the characters you configured and what size
> margins you want, you may need to adjust the numbers.  
> 
> Do "man pr" for more options to include above within the quotes (").
> 
> 
> hth,
> ken

Thanks Ken, that gave me what I needed to work it out from there.  I just
drilled down the customise menus until I found the item dealing with
command line options for pr and added them in there.  However, it soon
became apparent that I really needed to be printing in landscape rather
than portrait.  So I ended up fiddling with the psprint options and got it
working that way.  Funnily enough I think that the print via the pr method
actually looks better.  Just can't work out how to print in landscape that
way.

Thanks again for your (and Kai's) help!
simondo

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Setting lines to print per page....
  2003-01-22 17:27           ` Kai Großjohann
@ 2003-01-27 15:35             ` gebser
  2003-01-27 17:46               ` Kai Großjohann
  0 siblings, 1 reply; 10+ messages in thread
From: gebser @ 2003-01-27 15:35 UTC (permalink / raw)
  Cc: help-gnu-emacs


Kai,

Hey, thanks.  It works perfectly.

The menu would be less ambiguous if "lpr-command" were called
"print-command" and "lpr-switches" were called
"printer-command-switches".  Yes, I realize that's not going to happen.  

Is it a good guess that all the menu item names in Customize are the
same (after making lower case and replacing spaces with dashes) as the
elisp variable names which they set?


Thanks++,
ken

Kai Großjohann at 18:27 (UTC+0100) on Wed, 22 Jan 2003 said:

= gebser@ameritech.net writes:
= 
= > If, from the commandline, I do:
= >
= > lp -o cpi=12 -o prettyprint -o page-left=72 -o page-top=72 -o \
= > page-right=72 -o page-bottom=72 filename
= >
= > (note the use of "lp" rather than "lpr"-- a CUPS thing), I get an 
= > absolutely beautifully printed document.  It would make Mom proud.  But 
= > I haven't been able to figure out how to put this into the verdammt 
= > Customize menu puzzle.
= 
= lpr-switches is a list.  Add an item.  Put "-o" in it.  Add another
= item.  Put "cpi=12" in it.  And so on.
= 
= Also set lpr-command to lp.
= 
= Does it work?
= 

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Setting lines to print per page....
  2003-01-27 15:35             ` gebser
@ 2003-01-27 17:46               ` Kai Großjohann
  0 siblings, 0 replies; 10+ messages in thread
From: Kai Großjohann @ 2003-01-27 17:46 UTC (permalink / raw)


gebser@ameritech.net writes:

> Is it a good guess that all the menu item names in Customize are the
> same (after making lower case and replacing spaces with dashes) as the
> elisp variable names which they set?

It's a very good guess.  I think it's possible to change the way
these options are shown, but that's only done for a few options, if any.
-- 
Ambibibentists unite!

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2003-01-27 17:46 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-17 21:12 Setting lines to print per page simondo
2003-01-18 14:25 ` Kai Großjohann
2003-01-18 22:49   ` gebser
     [not found]   ` <mailman.539.1042930154.21513.help-gnu-emacs@gnu.org>
2003-01-19 14:18     ` Kai Großjohann
2003-01-21 17:18       ` Kevin Rodgers
2003-01-22 16:11         ` gebser
2003-01-22 17:27           ` Kai Großjohann
2003-01-27 15:35             ` gebser
2003-01-27 17:46               ` Kai Großjohann
2003-01-23 10:13     ` simondo

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).