Re: linux enscript? [message #32524] |
Thu, 17 October 2002 03:57 |
Ken Mankoff
Messages: 158 Registered: February 2000
|
Senior Member |
|
|
> Given that the "print the current pro file" from the IDLDE on Linux
> is, shall we say, limitted in utility, I was wondering if anyone has
> come up with an IDL definition for the GNU command enscript.
> There's one for IDL that comes with enscript but, of course, it's
> for the other IDL (CORBA Interface Definition Language).
Have you tried a2ps? Its not enscript but seems to do everything
enscript can...
% a2ps --pre=idl --pro=color foo.pro
Also, I have a half-done IDL definition for enscript based upon
modification of the enscript FORTRAN definition. Let me know if you
would like a copy...
-k.
|
|
|
Re: linux enscript? [message #32533 is a reply to message #32524] |
Wed, 16 October 2002 12:14  |
Bruce Bowler
Messages: 128 Registered: September 1998
|
Senior Member |
|
|
On Wed, 16 Oct 2002 12:53:38 -0400, Michael A. Miller put fingers to
keyboard and said:
>>>> >> "Bruce" == Bruce Bowler <bbowler@bigelow.org> writes:
>
>> How do I make the zebra stripes darker?
>
> The default color is gray95. To make it an 80% gray, instead of 95%,
> try (setq ps-zebra-color "grey80") in your .emacs. If you use the
> customization system (which differs a bit, depending on what emacs you
> are using - I'm using 21.2.1), you can set that interactively. If you
> run customize-apropos-group (also available in emacs 21.2 by mousing
> around to the Options->Customize Emacs->Groups Matching Regexp... menu),
> you'll find the zebra customization group.
>
> I cannot reproduce your 3-line-zebra-strips-disappearing problem. Do you
> know about prefix arguments [1]? If you run ps-print- buffer-with-faces
> with a prefix argument, you'll be able to save the result to a file. To
> do that, use "C-u M-x ps-print-buffer-with-faces" instead of plain old
> "M-x ps-print-buffer-with-faces". That might help speed up your
> debugging and kill fewer trees.
Upgrading to 21.2.1 seems to have solved (almost) all of my printing
problems. I *think* idlde is slowly being removed from my brain...
Thanks!
Bruce
--
+-------------------+--------------------------------------- ------------+
Bruce Bowler | Experience is a good school, but the fees are high.
1.207.633.9600 | - Heine
bbowler@bigelow.org |
+-------------------+--------------------------------------- ------------+
|
|
|
Re: linux enscript? [message #32537 is a reply to message #32533] |
Wed, 16 October 2002 09:53  |
mmiller3
Messages: 81 Registered: January 2002
|
Member |
|
|
>>>> > "Bruce" == Bruce Bowler <bbowler@bigelow.org> writes:
> How do I make the zebra stripes darker?
The default color is gray95. To make it an 80% gray, instead of
95%, try (setq ps-zebra-color "grey80") in your .emacs. If you
use the customization system (which differs a bit, depending on
what emacs you are using - I'm using 21.2.1), you can set that
interactively. If you run customize-apropos-group (also
available in emacs 21.2 by mousing around to the
Options->Customize Emacs->Groups Matching Regexp... menu), you'll
find the zebra customization group.
I cannot reproduce your 3-line-zebra-strips-disappearing problem.
Do you know about prefix arguments [1]? If you run ps-print-
buffer-with-faces with a prefix argument, you'll be able to save
the result to a file. To do that, use "C-u M-x
ps-print-buffer-with-faces" instead of plain old "M-x
ps-print-buffer-with-faces". That might help speed up your
debugging and kill fewer trees.
Mike
[1] remember, emacs stands for Escape-Meta-Alt-Control-Shift (or
Eats Memory And Constantly Swaps, but since we're talking idl
here, that may not be fair ;-)
--
Michael A. Miller mmiller3@iupui.edu
Imaging Sciences, Department of Radiology, IU School of Medicine
|
|
|
Re: linux enscript? [message #32541 is a reply to message #32537] |
Wed, 16 October 2002 06:13  |
Bruce Bowler
Messages: 128 Registered: September 1998
|
Senior Member |
|
|
On Tue, 15 Oct 2002 15:55:06 -0400, JD Smith put fingers to keyboard and
said:
> On Tue, 15 Oct 2002 11:38:57 -0700, Bruce Bowler wrote:
>
>> On Tue, 15 Oct 2002 12:49:39 -0400, savoie put fingers to keyboard and
>> said:
>>
>>
>>> Andrew Noymer <noymer@socrates.Berkeley.EDU> writes:
>>>
>>>> Bruce Bowler <bbowler@bigelow.org> writes:
>>>>
>>>> > Given that the "print the current pro file" from the IDLDE on Linux
>>>> > is,
>>>>
>>>> M-x ps-spool-buffer-with-faces
>>>
>>>
>>> That's almost what I said, but I didn't want to imply that the only
>>> integrated development tool for IDL on *nix is emacs.
>>>
>>> But I use 'M-x ps-print-buffer-with-faces' And it's only pretty if you
>>> use idlwave mode: <a href="http://www.idlwave.org">www.idlwave.org</a>
>>
>> (danger will robinson - what follows is probably really an emacs
>> question - in case you can't tell, I'm used to using emacs as an
>> editor, not a development environment)
>>
>> OK, I've downloaded idlwave and it seems OK so far. I opened one of
>> my pro files and it nicely color coded everything and when I printed it
>> it color coded stuff properly. Now, how do I get it to number the
>> lines and print "2-up" when I hit the print button?
>
> Try:
>
> (setq ps-landscape-mode t
> ps-spool-duplex t
> ps-line-number t
> ps-zebra-stripes t
> ps-zebra-stripe-height 1)
Now we're getting somewhere... What follows is -definitely- emacs related
and I'll be happy to take it "off-list" if someone's willing to help. I'm
an emacs newbie (other than as a simple text editor user) and the last
time I did any lisp programming was probably 25 years ago.
How do I make the zebra stripes darker?
Why, when I set zebra-stripe-height to 1 do they appear, but when I set
them to 3 they vanish (or maybe not, my eyes are old enough that they may
actually be there - see question 1 above).
How do I tell it to NOT write the 'end' after the last line number (not
the end in my pro file but the end in the line number column)?
What do I type to execute the ps-setup function that shows what the
current setup is? I tried M-x ps-setup but it simply says [no match]
I've read the ps-print.el file and I think I can make some of the code
changes (I think I know what I need to do to make the zebra stripes
darker) but do I need to then somehow compile the new .el file?
Thanks!
Bruce
--
+-------------------+--------------------------------------- ------------+
Bruce Bowler | The one-eyed man is king in the land of the blind -
1.207.633.9600 | Anonymous
bbowler@bigelow.org |
+-------------------+--------------------------------------- ------------+
|
|
|
Re: linux enscript? [message #32549 is a reply to message #32541] |
Tue, 15 October 2002 12:59  |
savoie_toolateitsalre
Messages: 1 Registered: October 2002
|
Junior Member |
|
|
Bruce Bowler <bbowler@bigelow.org> writes:
> On Tue, 15 Oct 2002 12:49:39 -0400, savoie put fingers to keyboard and
> said:
>
>
>> Andrew Noymer <noymer@socrates.Berkeley.EDU> writes:
>>
>>> Bruce Bowler <bbowler@bigelow.org> writes:
>>>
>>>> Given that the "print the current pro file" from the IDLDE on Linux
>>>> is,
>>>
>>> M-x ps-spool-buffer-with-faces
>>
>>
>> That's almost what I said, but I didn't want to imply that the only
>> integrated development tool for IDL on *nix is emacs.
>>
>> But I use 'M-x ps-print-buffer-with-faces' And it's only pretty if you
>> use idlwave mode: <a href="http://www.idlwave.org">www.idlwave.org</a>
>
> (danger will robinson - what follows is probably really an emacs
> question - in case you can't tell, I'm used to using emacs as an editor, not a
> development environment)
>
> OK, I've downloaded idlwave and it seems OK so far. I opened one of my pro
> files and it nicely color coded everything and when I printed it it color
> coded stuff properly. Now, how do I get it to number the lines and print
> "2-up" when I hit the print button?
I'm not as familiar with this but, you could try these variables.....
The variable `ps-landscape-mode' specifies the orientation of
printing on the page. The default is `nil', which stands for
"portrait" mode. Any non-`nil' value specifies "landscape" mode.
The variable `ps-number-of-columns' specifies the number of columns;
it takes effect in both landscape and portrait mode. The default is 1.
Would that work for you?
Matt
|
|
|
Re: linux enscript? [message #32550 is a reply to message #32549] |
Tue, 15 October 2002 12:55  |
JD Smith
Messages: 850 Registered: December 1999
|
Senior Member |
|
|
On Tue, 15 Oct 2002 11:38:57 -0700, Bruce Bowler wrote:
> On Tue, 15 Oct 2002 12:49:39 -0400, savoie put fingers to keyboard and
> said:
>
>
>> Andrew Noymer <noymer@socrates.Berkeley.EDU> writes:
>>
>>> Bruce Bowler <bbowler@bigelow.org> writes:
>>>
>>>> Given that the "print the current pro file" from the IDLDE on Linux
>>>> is,
>>>
>>> M-x ps-spool-buffer-with-faces
>>
>>
>> That's almost what I said, but I didn't want to imply that the only
>> integrated development tool for IDL on *nix is emacs.
>>
>> But I use 'M-x ps-print-buffer-with-faces' And it's only pretty if you
>> use idlwave mode: <a href="http://www.idlwave.org">www.idlwave.org</a>
>
> (danger will robinson - what follows is probably really an emacs
> question - in case you can't tell, I'm used to using emacs as an editor,
> not a development environment)
>
> OK, I've downloaded idlwave and it seems OK so far. I opened one of my
> pro files and it nicely color coded everything and when I printed it it
> color coded stuff properly. Now, how do I get it to number the lines
> and print "2-up" when I hit the print button?
Try:
(setq ps-landscape-mode t
ps-spool-duplex t
ps-line-number t
ps-zebra-stripes t
ps-zebra-stripe-height 1)
in your .emacs. You can read about these variables in the Emacs
"Postscript Variables" info node, or the beginning of the ps-print.el lisp
file. You can even put background images behind your text, change the
headers, etc.
One caveat: the little printer button is bound to `print-buffer' which
comes from a separate piece of printing code (one of the joys and
frustrations of Emacs is the variety of packages available which do very
similar things). Either just "M-x ps-print-buffer-with-faces", or, for
bonus points, figure out how to change what the print-button calls.
JD
|
|
|
Re: linux enscript? [message #32551 is a reply to message #32550] |
Tue, 15 October 2002 12:58  |
mmiller3
Messages: 81 Registered: January 2002
|
Member |
|
|
>>>> > "Bruce" == Bruce Bowler <bbowler@bigelow.org> writes:
> OK, I've downloaded idlwave and it seems OK so far. I
> opened one of my pro files and it nicely color coded
> everything and when I printed it it color coded stuff
> properly. Now, how do I get it to number the lines and
> print "2-up" when I hit the print button?
Try setting something like this in your emacs initialization
file:
(setq ps-n-up-printing 2)
(setq ps-line-number t)
(setq ps-line-number-step 5)
You can use emacs' customization system to set these as well,
plus lots and lots more...
Mike
|
|
|
Re: linux enscript? [message #32552 is a reply to message #32550] |
Tue, 15 October 2002 11:38  |
Bruce Bowler
Messages: 128 Registered: September 1998
|
Senior Member |
|
|
On Tue, 15 Oct 2002 12:49:39 -0400, savoie put fingers to keyboard and
said:
> Andrew Noymer <noymer@socrates.Berkeley.EDU> writes:
>
>> Bruce Bowler <bbowler@bigelow.org> writes:
>>
>>> Given that the "print the current pro file" from the IDLDE on Linux
>>> is,
>>
>> M-x ps-spool-buffer-with-faces
>
>
> That's almost what I said, but I didn't want to imply that the only
> integrated development tool for IDL on *nix is emacs.
>
> But I use 'M-x ps-print-buffer-with-faces' And it's only pretty if you
> use idlwave mode: <a href="http://www.idlwave.org">www.idlwave.org</a>
(danger will robinson - what follows is probably really an emacs
question - in case you can't tell, I'm used to using emacs as an editor, not a
development environment)
OK, I've downloaded idlwave and it seems OK so far. I opened one of my pro
files and it nicely color coded everything and when I printed it it color
coded stuff properly. Now, how do I get it to number the lines and print
"2-up" when I hit the print button?
--
+-------------------+--------------------------------------- ------------+
Bruce Bowler | Nothing is so strong as gentleness, nothing as
1.207.633.9600 | gentle as real strength. - St. Francis de Sales
bbowler@bigelow.org |
+-------------------+--------------------------------------- ------------+
|
|
|
Re: linux enscript? [message #32555 is a reply to message #32552] |
Tue, 15 October 2002 10:22  |
JD Smith
Messages: 850 Registered: December 1999
|
Senior Member |
|
|
On Tue, 15 Oct 2002 09:49:39 -0700, savoie wrote:
> Andrew Noymer <noymer@socrates.Berkeley.EDU> writes:
>
>> Bruce Bowler <bbowler@bigelow.org> writes:
>>
>>> Given that the "print the current pro file" from the IDLDE on Linux
>>> is,
>>
>> M-x ps-spool-buffer-with-faces
>
>
> That's almost what I said, but I didn't want to imply that the only
> integrated development tool for IDL on *nix is emacs.
>
> But I use 'M-x ps-print-buffer-with-faces' And it's only pretty if you
> use idlwave mode: <a href="http://www.idlwave.org">www.idlwave.org</a>
There's also a tool to convert Emacs buffers to HTML, with all background
and faces, etc. -- htmlize:
http://fly.srk.fer.hr/~hniksic/emacs/htmlize.el
XEmacs bundles it, I believe. Keep in mind that in IDLWAVE, keywords on
continuation lines are correctly highlighted only on global font-lock
passes (like when you first load the buffer, of if you explicitly
font-lock-fontify-buffer).
JD
|
|
|
Re: linux enscript? [message #32557 is a reply to message #32555] |
Tue, 15 October 2002 09:49  |
savoie
Messages: 68 Registered: September 1996
|
Member |
|
|
Andrew Noymer <noymer@socrates.Berkeley.EDU> writes:
> Bruce Bowler <bbowler@bigelow.org> writes:
>
>> Given that the "print the current pro file" from the IDLDE on Linux is,
>
> M-x ps-spool-buffer-with-faces
That's almost what I said, but I didn't want to imply that the only
integrated development tool for IDL on *nix is emacs.
But I use 'M-x ps-print-buffer-with-faces' And it's only pretty if you use
idlwave mode: <a href="http://www.idlwave.org">www.idlwave.org</a>
Matt
|
|
|
|