Gnus development mailing list
 help / color / mirror / Atom feed
* printing multiple articles to a PostScript file
@ 1999-01-26 16:15 Steinar Bang
  1999-01-26 17:01 ` Kai.Grossjohann
  1999-01-27 12:43 ` REQUEST: " Steinar Bang
  0 siblings, 2 replies; 18+ messages in thread
From: Steinar Bang @ 1999-01-26 16:15 UTC (permalink / raw)


I would like to be able to process mark a set of articles in a group,
and then do 
	C-u 1 A P filename.ps RET
to spool these articles to a PostScript file, for later processing by
psutils.

The way things are set up today (Pterodactyl Gnus v0.65), only the
first article ends up in the PostScript file.


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

* Re: printing multiple articles to a PostScript file
  1999-01-26 16:15 printing multiple articles to a PostScript file Steinar Bang
@ 1999-01-26 17:01 ` Kai.Grossjohann
  1999-01-27  9:17   ` Steinar Bang
  1999-01-27 12:43 ` REQUEST: " Steinar Bang
  1 sibling, 1 reply; 18+ messages in thread
From: Kai.Grossjohann @ 1999-01-26 17:01 UTC (permalink / raw)


Steinar Bang <sb@metis.no> writes:

  > I would like to be able to process mark a set of articles in a group,
  > and then do 
  > 	C-u 1 A P filename.ps RET
  > to spool these articles to a PostScript file, for later processing by
  > psutils.
  > 
  > The way things are set up today (Pterodactyl Gnus v0.65), only the
  > first article ends up in the PostScript file.

A number of commands work like this:

  - If numeric prefix arg is given, operate on that many articles.
  - Else if articles are process-marked, operate on those.
  - Else, operate on current article.

I think it is not good to break that rule for `A P'.

kai
-- 
Abort this operation?   [Abort]  [Cancel]


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

* Re: printing multiple articles to a PostScript file
  1999-01-26 17:01 ` Kai.Grossjohann
@ 1999-01-27  9:17   ` Steinar Bang
  1999-01-27 10:14     ` Kai.Grossjohann
  0 siblings, 1 reply; 18+ messages in thread
From: Steinar Bang @ 1999-01-27  9:17 UTC (permalink / raw)


>>>>> Kai.Grossjohann@CS.Uni-Dortmund.DE:

> Steinar Bang <sb@metis.no> writes:
>> I would like to be able to process mark a set of articles in a group,
>> and then do 
>> C-u 1 A P filename.ps RET
>> to spool these articles to a PostScript file, for later processing by
>> psutils.
>> 
>> The way things are set up today (Pterodactyl Gnus v0.65), only the
>> first article ends up in the PostScript file.

> A number of commands work like this:

>   - If numeric prefix arg is given, operate on that many articles.
>   - Else if articles are process-marked, operate on those.
>   - Else, operate on current article.

> I think it is not good to break that rule for `A P'.

'A P' is bound to gnus-summary-print-article

	`gnus-summary-print-article' is an interactive compiled Lisp
	function 
	  -- loaded from "gnus-sum.elc"
	(gnus-summary-print-article &optional FILENAME N)

	Generate and print a PostScript image of the N next (mail)
	articles.

	If N is negative, print the N previous articles.  If N is nil
	and articles have been marked with the process mark, print
	these instead.

	If the optional second argument FILENAME is nil, send the
	image to the printer.  If FILENAME is a string, save the
	PostScript image in a file with that name.  If FILENAME is a
	number, prompt the user for the name of the file to save in.

Ie. 
	C-u 1 A P filename.ps RET
_already_ breaks the rule.


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

* Re: printing multiple articles to a PostScript file
  1999-01-27  9:17   ` Steinar Bang
@ 1999-01-27 10:14     ` Kai.Grossjohann
  1999-01-27 12:37       ` Steinar Bang
  0 siblings, 1 reply; 18+ messages in thread
From: Kai.Grossjohann @ 1999-01-27 10:14 UTC (permalink / raw)


Steinar Bang <sb@metis.no> writes:

  > >>>>> Kai.Grossjohann@CS.Uni-Dortmund.DE:
  > 
  > >   - If numeric prefix arg is given, operate on that many articles.
  > >   - Else if articles are process-marked, operate on those.
  > >   - Else, operate on current article.
  > 
  > > I think it is not good to break that rule for `A P'.
  > 
  > [...]
  >
  > Ie. 
  > 	C-u 1 A P filename.ps RET
  > _already_ breaks the rule.

In what way?  It is given a numeric prefix argument, meaning print
that many articles, where "that many" == 1.  I think I'm not
understanding what you're trying to say at all.

kai
-- 
Abort this operation?   [Abort]  [Cancel]


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

* Re: printing multiple articles to a PostScript file
  1999-01-27 10:14     ` Kai.Grossjohann
@ 1999-01-27 12:37       ` Steinar Bang
  1999-01-27 13:18         ` Lars Magne Ingebrigtsen
  1999-01-27 13:21         ` Robert Bihlmeyer
  0 siblings, 2 replies; 18+ messages in thread
From: Steinar Bang @ 1999-01-27 12:37 UTC (permalink / raw)


>>>>> Kai.Grossjohann@CS.Uni-Dortmund.DE:

> Steinar Bang <sb@metis.no> writes:
>> >>>>> Kai.Grossjohann@CS.Uni-Dortmund.DE:
>> 
>> >   - If numeric prefix arg is given, operate on that many articles.
>> >   - Else if articles are process-marked, operate on those.
>> >   - Else, operate on current article.
>> 
>> > I think it is not good to break that rule for `A P'.
>> 
>> [...]
>> 
>> Ie. 
>>	C-u 1 A P filename.ps RET
>> _already_ breaks the rule.

> In what way?  It is given a numeric prefix argument, meaning print
> that many articles, where "that many" == 1.  I think I'm not
> understanding what you're trying to say at all.

I've never tried using another number than "1" here, but using "1"
makes 'A P' prompt for the name of a PostScript file to save the
article in.

So I've taken this to mean that a prefix argument is sendt 
along to gnus-summary-print-article as the first (optional) argument
of this function.  This argument has the following documentation:

	If the optional second argument FILENAME is nil, send the
	image to the printer.  If FILENAME is a string, save the
	PostScript image in a file with that name.  If FILENAME is a
	number, prompt the user for the name of the file to save in.

Even though it says "second" here, FILENAME is the first argument in
the parameter list earlier in the function's documentation:
	  -- loaded from "gnus-sum.elc"
	(gnus-summary-print-article &optional FILENAME N)
...or have I completely misunderstood what emacs lisp means by "first" 
and "second"...?


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

* REQUEST: printing multiple articles to a PostScript file
  1999-01-26 16:15 printing multiple articles to a PostScript file Steinar Bang
  1999-01-26 17:01 ` Kai.Grossjohann
@ 1999-01-27 12:43 ` Steinar Bang
  1999-01-27 13:22   ` Lars Magne Ingebrigtsen
  1 sibling, 1 reply; 18+ messages in thread
From: Steinar Bang @ 1999-01-27 12:43 UTC (permalink / raw)


>>>>> Steinar Bang <sb@metis.no>:

Prefix argument aside: 

I would like to process mark a set of articles in a summary buffer,
and print them as postscript to a file, instead of to the default
printer of the system.

I would also like to be able to pipe the postscript into a UNIX
command, eg.
	| psnup -4 | lpr -Php-ps

This would be my common operation from 'A P', so it's enough for me to 
be able to do this by customizing variables.


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

* Re: printing multiple articles to a PostScript file
  1999-01-27 12:37       ` Steinar Bang
@ 1999-01-27 13:18         ` Lars Magne Ingebrigtsen
  1999-01-27 15:04           ` Steinar Bang
  1999-01-27 13:21         ` Robert Bihlmeyer
  1 sibling, 1 reply; 18+ messages in thread
From: Lars Magne Ingebrigtsen @ 1999-01-27 13:18 UTC (permalink / raw)


Steinar Bang <sb@metis.no> writes:

> So I've taken this to mean that a prefix argument is sendt 
> along to gnus-summary-print-article as the first (optional) argument
> of this function.  This argument has the following documentation:
> 
> 	If the optional second argument FILENAME is nil, send the
> 	image to the printer.  If FILENAME is a string, save the
> 	PostScript image in a file with that name.  If FILENAME is a
> 	number, prompt the user for the name of the file to save in.
> 
> Even though it says "second" here, FILENAME is the first argument in
> the parameter list earlier in the function's documentation:

No, the documentation is correct.  The prefix is the second
parameter.  

> 	  -- loaded from "gnus-sum.elc"
> 	(gnus-summary-print-article &optional FILENAME N)

FILENAME is supplied by the `ps-print-preprint' function, and that
function also triggers on the prefix.  Which is probably what confuses 
you here.  :-)

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen


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

* Re: printing multiple articles to a PostScript file
  1999-01-27 12:37       ` Steinar Bang
  1999-01-27 13:18         ` Lars Magne Ingebrigtsen
@ 1999-01-27 13:21         ` Robert Bihlmeyer
  1 sibling, 0 replies; 18+ messages in thread
From: Robert Bihlmeyer @ 1999-01-27 13:21 UTC (permalink / raw)


Hi,

>>>>> On 27 Jan 1999 13:37:39 +0100
>>>>> Steinar Bang <sb@metis.no> said:

 Steinar> I've never tried using another number than "1" here, but
 Steinar> using "1" makes 'A P' prompt for the name of a PostScript
 Steinar> file to save the article in.

Actually, the 1 is used for the first parameter (causing the function
to prompt for it) *and* the second parameter (that has the usual
process-mark/prefix semantics). This seems like a bug.

	Robbe

-- 
Robert Bihlmeyer	reads: Deutsch, English, MIME, Latin-1, NO SPAM!
<robbe@orcus.priv.at>	<http://stud2.tuwien.ac.at/~e9426626/sig.html>


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

* Re: REQUEST: printing multiple articles to a PostScript file
  1999-01-27 12:43 ` REQUEST: " Steinar Bang
@ 1999-01-27 13:22   ` Lars Magne Ingebrigtsen
  1999-01-27 15:02     ` Steinar Bang
  1999-01-28 10:09     ` Kai.Grossjohann
  0 siblings, 2 replies; 18+ messages in thread
From: Lars Magne Ingebrigtsen @ 1999-01-27 13:22 UTC (permalink / raw)


Steinar Bang <sb@metis.no> writes:

> I would like to process mark a set of articles in a summary buffer,
> and print them as postscript to a file, instead of to the default
> printer of the system.

Well, there would have to be a new command to do that.  

> I would also like to be able to pipe the postscript into a UNIX
> command, eg.
> 	| psnup -4 | lpr -Php-ps

Well, can't you just `# # # | psnup -4 | lpr -Php-ps RET' or
something?  

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen


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

* Re: REQUEST: printing multiple articles to a PostScript file
  1999-01-27 13:22   ` Lars Magne Ingebrigtsen
@ 1999-01-27 15:02     ` Steinar Bang
  1999-01-27 15:30       ` Lars Magne Ingebrigtsen
  1999-01-28 10:09     ` Kai.Grossjohann
  1 sibling, 1 reply; 18+ messages in thread
From: Steinar Bang @ 1999-01-27 15:02 UTC (permalink / raw)


>>>>> Lars Magne Ingebrigtsen <larsi@gnus.org>:

> Steinar Bang <sb@metis.no> writes:
>> I would like to process mark a set of articles in a summary buffer,
>> and print them as postscript to a file, instead of to the default
>> printer of the system.

> Well, there would have to be a new command to do that.  

OK.  I'll take a look into the pgnus source when I have time.

>> I would also like to be able to pipe the postscript into a UNIX
>> command, eg.
>>	| psnup -4 | lpr -Php-ps

> Well, can't you just `# # # | psnup -4 | lpr -Php-ps RET' or
> something?  

Er...?  Send the raw text to a PostScript filter and then on to the
printer? 

I'm sure you can do that.  

I'm also pretty sure it won't be very meaningful to do so.


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

* Re: printing multiple articles to a PostScript file
  1999-01-27 13:18         ` Lars Magne Ingebrigtsen
@ 1999-01-27 15:04           ` Steinar Bang
  1999-01-27 15:30             ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 18+ messages in thread
From: Steinar Bang @ 1999-01-27 15:04 UTC (permalink / raw)


>>>>> Lars Magne Ingebrigtsen <larsi@gnus.org>:

> Steinar Bang <sb@metis.no> writes:

>> If the optional second argument FILENAME is nil, send the

> No, the documentation is correct.  The prefix is the second
> parameter.  

Is the function signature quoted below (from the same documentation)
also correct?

>> -- loaded from "gnus-sum.elc"
>> (gnus-summary-print-article &optional FILENAME N)

> FILENAME is supplied by the `ps-print-preprint' function, and that
> function also triggers on the prefix.  Which is probably what confuses 
> you here.  :-)

If it helps any, this explanation has me even more confused than I was 
earlier. :-)


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

* Re: printing multiple articles to a PostScript file
  1999-01-27 15:04           ` Steinar Bang
@ 1999-01-27 15:30             ` Lars Magne Ingebrigtsen
  1999-01-27 16:25               ` Steinar Bang
  0 siblings, 1 reply; 18+ messages in thread
From: Lars Magne Ingebrigtsen @ 1999-01-27 15:30 UTC (permalink / raw)


Steinar Bang <sb@metis.no> writes:

> > No, the documentation is correct.  The prefix is the second
> > parameter.  
> 
> Is the function signature quoted below (from the same documentation)
> also correct?

Yes.

> > FILENAME is supplied by the `ps-print-preprint' function, and that
> > function also triggers on the prefix.  Which is probably what confuses 
> > you here.  :-)
> 
> If it helps any, this explanation has me even more confused than I was 
> earlier. :-)

Use the source, Bang:

(defun gnus-summary-print-article (&optional filename n)
  (interactive (list (ps-print-preprint current-prefix-arg)
		     current-prefix-arg))

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen


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

* Re: REQUEST: printing multiple articles to a PostScript file
  1999-01-27 15:02     ` Steinar Bang
@ 1999-01-27 15:30       ` Lars Magne Ingebrigtsen
  1999-01-27 16:22         ` Steinar Bang
  0 siblings, 1 reply; 18+ messages in thread
From: Lars Magne Ingebrigtsen @ 1999-01-27 15:30 UTC (permalink / raw)


Steinar Bang <sb@metis.no> writes:

> > Well, can't you just `# # # | psnup -4 | lpr -Php-ps RET' or
> > something?  
> 
> Er...?  Send the raw text to a PostScript filter and then on to the
> printer? 

Well, or something before psnup.  Like nenscript.  Or whatever.

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen


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

* Re: REQUEST: printing multiple articles to a PostScript file
  1999-01-27 15:30       ` Lars Magne Ingebrigtsen
@ 1999-01-27 16:22         ` Steinar Bang
  0 siblings, 0 replies; 18+ messages in thread
From: Steinar Bang @ 1999-01-27 16:22 UTC (permalink / raw)


>>>>> Lars Magne Ingebrigtsen <larsi@gnus.org>:

> Steinar Bang <sb@metis.no> writes:
>> > Well, can't you just `# # # | psnup -4 | lpr -Php-ps RET' or
>> > something?  
>> 
>> Er...?  Send the raw text to a PostScript filter and then on to the
>> printer? 

> Well, or something before psnup.  Like nenscript.  Or whatever.

Sounds like writing a new multi-article command, based on the current
command is a better deal.


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

* Re: printing multiple articles to a PostScript file
  1999-01-27 15:30             ` Lars Magne Ingebrigtsen
@ 1999-01-27 16:25               ` Steinar Bang
  1999-01-27 16:38                 ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 18+ messages in thread
From: Steinar Bang @ 1999-01-27 16:25 UTC (permalink / raw)


>>>>> Lars Magne Ingebrigtsen <larsi@gnus.org>:

> Steinar Bang <sb@metis.no> writes:

>> > FILENAME is supplied by the `ps-print-preprint' function, and that
>> > function also triggers on the prefix.  Which is probably what confuses 
>> > you here.  :-)

>> If it helps any, this explanation has me even more confused than I was 
>> earlier. :-)

> Use the source, Bang:

> (defun gnus-summary-print-article (&optional filename n)
>   (interactive (list (ps-print-preprint current-prefix-arg)
> 		     current-prefix-arg))

Doesn't help any.  I still don't understand why the first listed
argument in the argument list of a function, becomes the second
argument in the documentation.

Does emacs lisp count its arguments backwards?


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

* Re: printing multiple articles to a PostScript file
  1999-01-27 16:25               ` Steinar Bang
@ 1999-01-27 16:38                 ` Lars Magne Ingebrigtsen
  0 siblings, 0 replies; 18+ messages in thread
From: Lars Magne Ingebrigtsen @ 1999-01-27 16:38 UTC (permalink / raw)


Steinar Bang <sb@metis.no> writes:

> Doesn't help any.  I still don't understand why the first listed
> argument in the argument list of a function, becomes the second
> argument in the documentation.

Oh, er, sorry.  You're right.  I've now fixed the doc string.

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen


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

* Re: REQUEST: printing multiple articles to a PostScript file
  1999-01-27 13:22   ` Lars Magne Ingebrigtsen
  1999-01-27 15:02     ` Steinar Bang
@ 1999-01-28 10:09     ` Kai.Grossjohann
  1999-01-28 10:31       ` Steinar Bang
  1 sibling, 1 reply; 18+ messages in thread
From: Kai.Grossjohann @ 1999-01-28 10:09 UTC (permalink / raw)


Lars Magne Ingebrigtsen <larsi@gnus.org> writes:

  > Steinar Bang <sb@metis.no> writes:
  > 
  > > I would also like to be able to pipe the postscript into a UNIX
  > > command, eg.
  > > 	| psnup -4 | lpr -Php-ps
  > 
  > Well, can't you just `# # # | psnup -4 | lpr -Php-ps RET' or
  > something?  

No, `A P' generates Postscript code, which the above doesn't do.  Hm.
A ps-spool-buffer-with-faces is missing.

Now that I understand what Steinar wants, I also think this is a good
idea.  There should be a way to

  - Choose whether to send the postscript to a printer or to a file.
  - Choose whether each article ends up in one PS file (printer job)
    or whether all articles are concated into one PS file (printer job).

This is what you wanted, Steinar, isn't it?

kai
-- 
Abort this operation?   [Abort]  [Cancel]


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

* Re: REQUEST: printing multiple articles to a PostScript file
  1999-01-28 10:09     ` Kai.Grossjohann
@ 1999-01-28 10:31       ` Steinar Bang
  0 siblings, 0 replies; 18+ messages in thread
From: Steinar Bang @ 1999-01-28 10:31 UTC (permalink / raw)


>>>>> Kai.Grossjohann@CS.Uni-Dortmund.DE:

> No, `A P' generates Postscript code, which the above doesn't do.  Hm.
> A ps-spool-buffer-with-faces is missing.

OK.

> Now that I understand what Steinar wants, I also think this is a good
> idea.  There should be a way to

>   - Choose whether to send the postscript to a printer or to a file.
>   - Choose whether each article ends up in one PS file (printer job)
>     or whether all articles are concated into one PS file (printer job).

> This is what you wanted, Steinar, isn't it?

Yup.

And maybe the additional possibility of sending the concatenated
articles in PostScript through a filter consisting of psnup and lpr. 

It would be enough for me to be able to set the latter as the default
result of 'A P' in emacs lisp, because this is what I do anyways.

Actually... what I do today when I want a compact printout (good for
carrying on the subway train, good for carrying in the tank bag of my
motorcycle), is to 
 - spool the articles one by one to files
 - run a perl script that concatenates the files and fix the DSC
   %%Page and %%Pages comment
 - pipe the result through "| psnup -4 | lpr"

...which seems sort of a roundabout way of doing it, when spelled out
this way... oh well...:-)


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

end of thread, other threads:[~1999-01-28 10:31 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-01-26 16:15 printing multiple articles to a PostScript file Steinar Bang
1999-01-26 17:01 ` Kai.Grossjohann
1999-01-27  9:17   ` Steinar Bang
1999-01-27 10:14     ` Kai.Grossjohann
1999-01-27 12:37       ` Steinar Bang
1999-01-27 13:18         ` Lars Magne Ingebrigtsen
1999-01-27 15:04           ` Steinar Bang
1999-01-27 15:30             ` Lars Magne Ingebrigtsen
1999-01-27 16:25               ` Steinar Bang
1999-01-27 16:38                 ` Lars Magne Ingebrigtsen
1999-01-27 13:21         ` Robert Bihlmeyer
1999-01-27 12:43 ` REQUEST: " Steinar Bang
1999-01-27 13:22   ` Lars Magne Ingebrigtsen
1999-01-27 15:02     ` Steinar Bang
1999-01-27 15:30       ` Lars Magne Ingebrigtsen
1999-01-27 16:22         ` Steinar Bang
1999-01-28 10:09     ` Kai.Grossjohann
1999-01-28 10:31       ` Steinar Bang

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 NNTP newsgroup(s).