[prev in list] [next in list] [prev in thread] [next in thread] 

List:       nedit-discuss
Subject:    Re: Language-dependent print command?
From:       Yury Burkatovsky <tby () telrad ! co ! il>
Date:       2004-07-09 16:52:12
Message-ID: Pine.WNT.4.60.0407091922150.2600 () pc5350 ! telradnetworks ! co ! il
[Download RAW message or body]

On Thu, 8 Jul 2004 matthijs.van.aalten@philips.com wrote:

> I'm using something called 'lprng' as my print command. It is capable of
> using a2ps as a postprocessor - including language-specific formatting.
>
> To use that, I would like to have a language-dependent print command in
> Nedit:
> - Normal, double-sided, black&white as a default,
> - language-specific highlighting, singled sided color for VHDL & C files.
>
> I haven't found a way to achieve this. Is something like that possible?

Yes, though it would not give you the same functionality like the usual 
"Print..." dialog.

The print widget is stand-alone and does not supply any API, so the user 
cannot make it depend on the current editing status, e.g. on the fact that 
syntax highlighting has been applied to the buffer. You may want to create 
a Nedit *macro* that does have the information about the current language 
mode, syntax highlighting being switched on etc. This macro would tailor 
the proper shell command according to the editing status and then call 
your lprng command if applicable. The macro even can be bound to the usual 
Ctrl-P sequence thus virtually replacing the default dialog.

In any case, the macro would lack the fancy GUI of the native "Print..." 
command that enables to configure the number of copies and destination 
printer - all in one dialog frame. This functionality is feasible in macro 
programming, too, but would require a separate dialog for every parameter.

Hope this helps.
-- 
Regards,
 	Yury

Telrad Networks, Israel
tel.(972)(3)9157287
-- 
NEdit Discuss mailing list - Discuss@nedit.org
http://www.nedit.org/mailman/listinfo/discuss
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic