* postscript printing in emacs
@ 2013-06-19 23:46 Rami A
2013-06-20 9:40 ` Peter Dyballa
[not found] ` <mailman.2067.1371721274.22516.help-gnu-emacs@gnu.org>
0 siblings, 2 replies; 9+ messages in thread
From: Rami A @ 2013-06-19 23:46 UTC (permalink / raw)
To: help-gnu-emacs
Hi all,
I have aliased pw to be:
mp -l -s "\!*" <\!* | lp
which prints buffers in a nice format 2 pages on each printed page in landscape.
But I have to do that from a shell.
How do I incorporate this functionality in emacs so I could choose a region or simply print the whole buffer using "postscript print from buffer/region" from inside emacs?
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: postscript printing in emacs
2013-06-19 23:46 postscript printing in emacs Rami A
@ 2013-06-20 9:40 ` Peter Dyballa
2013-06-20 13:21 ` Drew Adams
[not found] ` <mailman.2067.1371721274.22516.help-gnu-emacs@gnu.org>
1 sibling, 1 reply; 9+ messages in thread
From: Peter Dyballa @ 2013-06-20 9:40 UTC (permalink / raw)
To: Rami A; +Cc: help-gnu-emacs
Am 20.06.2013 um 01:46 schrieb Rami A:
> How do I incorporate this functionality in emacs so I could choose a region or simply print the whole buffer using "postscript print from buffer/region" from inside emacs?
Have you tried to set ps-lpr-command and ps-lpr-switches via the customisation interface?
In ps-lpr-command instead of lpr you can either use "mp | lp", a pipe, and the also set ps-lpr-switches to become "-l -s" or use as ps-lpr-command directly "mp -l -s | lp".
A third option is to add an mp filter to Solaris' lpfilters. Then you could use as ps-lpr-command "lp -T MP". I am not sure where the mp options go… (too long ago)
When you are experimenting with printing options you can stop printing from the particular queue (or switch off the printer) and then use a PostScript viewer to see what the printer queue would send to the printer.
--
Greetings
Pete
Perl—the only language that looks the same before and after RSA encryption.
- Keith Bostic
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: postscript printing in emacs
2013-06-20 9:40 ` Peter Dyballa
@ 2013-06-20 13:21 ` Drew Adams
0 siblings, 0 replies; 9+ messages in thread
From: Drew Adams @ 2013-06-20 13:21 UTC (permalink / raw)
To: Peter Dyballa, Rami A; +Cc: help-gnu-emacs
> > How do I incorporate this functionality in emacs so I could choose a
> > region or simply print the whole buffer using "postscript print from
> > buffer/region" from inside emacs?
>
> Have you tried to set ps-lpr-command and ps-lpr-switches via the
> customisation interface?
>
> In ps-lpr-command instead of lpr you can either use "mp | lp", a pipe, and
> the also set ps-lpr-switches to become "-l -s" or use as ps-lpr-command
> directly "mp -l -s | lp".
>
> A third option is to add an mp filter to Solaris' lpfilters. Then you could
> use as ps-lpr-command "lp -T MP". I am not sure where the mp options go.
> (too long ago)
>
> When you are experimenting with printing options you can stop printing from
> the particular queue (or switch off the printer) and then use a PostScript
> viewer to see what the printer queue would send to the printer.
See also library printing.el, which provides a helpful interface to the ps-* features.
^ permalink raw reply [flat|nested] 9+ messages in thread
[parent not found: <mailman.2067.1371721274.22516.help-gnu-emacs@gnu.org>]
* Re: postscript printing in emacs
[not found] ` <mailman.2067.1371721274.22516.help-gnu-emacs@gnu.org>
@ 2013-06-21 16:30 ` Rami A
2013-06-21 19:13 ` Peter Dyballa
[not found] ` <mailman.2158.1371842037.22516.help-gnu-emacs@gnu.org>
0 siblings, 2 replies; 9+ messages in thread
From: Rami A @ 2013-06-21 16:30 UTC (permalink / raw)
To: help-gnu-emacs
On Thursday, June 20, 2013 2:40:59 AM UTC-7, Peter Dyballa wrote:
> Am 20.06.2013 um 01:46 schrieb Rami A:
>
>
>
> > How do I incorporate this functionality in emacs so I could choose a region or simply print the whole buffer using "postscript print from buffer/region" from inside emacs?
>
>
>
> Have you tried to set ps-lpr-command and ps-lpr-switches via the customisation interface?
>
>
>
> In ps-lpr-command instead of lpr you can either use "mp | lp", a pipe, and the also set ps-lpr-switches to become "-l -s" or use as ps-lpr-command directly "mp -l -s | lp".
>
>
>
> A third option is to add an mp filter to Solaris' lpfilters. Then you could use as ps-lpr-command "lp -T MP". I am not sure where the mp options go… (too long ago)
>
>
>
>
>
> When you are experimenting with printing options you can stop printing from the particular queue (or switch off the printer) and then use a PostScript viewer to see what the printer queue would send to the printer.
>
>
>
> --
>
> Greetings
>
>
>
> Pete
>
>
>
> Perl—the only language that looks the same before and after RSA encryption.
>
> - Keith Bostic
Thanks Pete,
I did follow your suggestions:
(setq ps-lpr-command "mp | lp")
(setq ps-lpr-switches '("-l" " -s"))
But when trying to print I get this message:
Searching for program: No such file or directory, mp | lp
It is possible that ps-lpr-command expects the path of the printing program, not a command.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: postscript printing in emacs
2013-06-21 16:30 ` Rami A
@ 2013-06-21 19:13 ` Peter Dyballa
[not found] ` <mailman.2158.1371842037.22516.help-gnu-emacs@gnu.org>
1 sibling, 0 replies; 9+ messages in thread
From: Peter Dyballa @ 2013-06-21 19:13 UTC (permalink / raw)
To: Rami A; +Cc: help-gnu-emacs
Am 21.06.2013 um 18:30 schrieb Rami A:
> But when trying to print I get this message:
> Searching for program: No such file or directory, mp | lp
>
> It is possible that ps-lpr-command expects the path of the printing program, not a command.
The documentation says:
Documentation:
Name of program for printing a PostScript file.
On MS-DOS and MS-Windows systems, if the value is an empty string then Emacs
will write directly to the printer port named by `ps-printer-name'. The
programs `print' and `nprint' (the standard print programs on Windows NT and
Novell Netware respectively) are handled specially, using `ps-printer-name' as
the destination for output; any other program is treated like `lpr' except that
an explicit filename is given as the last argument.
This is in accordance with the variable's name. It appears in ps-print.el. Here is written in a comment:
`ps-lpr-command' must name a program that does not format the files it prints.
Because the ps-print and ps-spool commands already produce PostScript. So you would have to use a simple print command. But lpr-command either does not allow to use a pipe. GNU Emacs seems to search for an executable file name with SPACEs and VERTICAL BAR (|). AFAIR mp allows to specify with -D or -P a printer queue to which its output is being sent. Why can't you use mp without ' | lpr'? And why aren't you experimenting in GNU Emacs with its own customisation interface? It allows to apply new settings just for this session – and to revert them! If a combination of settings finally works well you can save them, from each of the open *customisation* buffers, into your init file.
--
Greetings
Pete
Real Time, adj.:
Here and now, as opposed to fake time, which only occurs there and then.
^ permalink raw reply [flat|nested] 9+ messages in thread
[parent not found: <mailman.2158.1371842037.22516.help-gnu-emacs@gnu.org>]
* Re: postscript printing in emacs
[not found] ` <mailman.2158.1371842037.22516.help-gnu-emacs@gnu.org>
@ 2013-06-21 19:58 ` Rami A
2013-06-21 20:21 ` Peter Dyballa
[not found] ` <mailman.2164.1371846141.22516.help-gnu-emacs@gnu.org>
0 siblings, 2 replies; 9+ messages in thread
From: Rami A @ 2013-06-21 19:58 UTC (permalink / raw)
To: help-gnu-emacs
Hi again Pete,
Thanks for your response.
I am honestly not so proficient in emacs nor lisp.
I simply want the same format that
mp -l -s "\!*" <\!* | lp
produces when used on the command line integrated from within emacs.
I tried this:
(setq ps-lpr-command "mp")
(setq ps-lpr-switches '("-l" " -s" " | lp"))
which also did not work.
It is not that I want to use the pipe "| lp" but I just want to duplicate the same functionality to print the same kind of format.
On Friday, June 21, 2013 12:13:46 PM UTC-7, Peter Dyballa wrote:
> Am 21.06.2013 um 18:30 schrieb Rami A:
>
>
>
> > But when trying to print I get this message:
>
> > Searching for program: No such file or directory, mp | lp
>
> >
>
> > It is possible that ps-lpr-command expects the path of the printing program, not a command.
>
>
>
> The documentation says:
>
>
>
> Documentation:
>
> Name of program for printing a PostScript file.
>
>
>
> On MS-DOS and MS-Windows systems, if the value is an empty string then Emacs
>
> will write directly to the printer port named by `ps-printer-name'. The
>
> programs `print' and `nprint' (the standard print programs on Windows NT and
>
> Novell Netware respectively) are handled specially, using `ps-printer-name' as
>
> the destination for output; any other program is treated like `lpr' except that
>
> an explicit filename is given as the last argument.
>
>
>
> This is in accordance with the variable's name. It appears in ps-print.el. Here is written in a comment:
>
>
>
> `ps-lpr-command' must name a program that does not format the files it prints.
>
>
>
> Because the ps-print and ps-spool commands already produce PostScript. So you would have to use a simple print command. But lpr-command either does not allow to use a pipe. GNU Emacs seems to search for an executable file name with SPACEs and VERTICAL BAR (|). AFAIR mp allows to specify with -D or -P a printer queue to which its output is being sent. Why can't you use mp without ' | lpr'? And why aren't you experimenting in GNU Emacs with its own customisation interface? It allows to apply new settings just for this session – and to revert them! If a combination of settings finally works well you can save them, from each of the open *customisation* buffers, into your init file.
>
>
>
> --
>
> Greetings
>
>
>
> Pete
>
>
>
> Real Time, adj.:
>
> Here and now, as opposed to fake time, which only occurs there and then.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: postscript printing in emacs
2013-06-21 19:58 ` Rami A
@ 2013-06-21 20:21 ` Peter Dyballa
[not found] ` <mailman.2164.1371846141.22516.help-gnu-emacs@gnu.org>
1 sibling, 0 replies; 9+ messages in thread
From: Peter Dyballa @ 2013-06-21 20:21 UTC (permalink / raw)
To: Rami A; +Cc: help-gnu-emacs
Am 21.06.2013 um 21:58 schrieb Rami A:
> I am honestly not so proficient in emacs nor lisp.
And neither in English?
I wrote before that it's not allowed to use another formatter as ps-lpr-command because the ps-print and ps-spool commands already produce PostScript output (that you can customise). Why are you trying this again?
>
> I tried this:
> (setq ps-lpr-command "mp")
> (setq ps-lpr-switches '("-l" " -s" " | lp"))
>
> which also did not work.
And again you're not using the customisation interface of GNU Emacs (under the Options menu). I presume you are a human being, so you can be a lot more flexible than a compiled piece of software.
--
Greetings
Pete
"Indentation?! I will show you how to indent when I indent your skull!"
^ permalink raw reply [flat|nested] 9+ messages in thread
[parent not found: <mailman.2164.1371846141.22516.help-gnu-emacs@gnu.org>]
* Re: postscript printing in emacs
[not found] ` <mailman.2164.1371846141.22516.help-gnu-emacs@gnu.org>
@ 2013-06-21 21:16 ` Rami A
2013-06-21 21:49 ` Peter Dyballa
0 siblings, 1 reply; 9+ messages in thread
From: Rami A @ 2013-06-21 21:16 UTC (permalink / raw)
To: help-gnu-emacs
On Friday, June 21, 2013 1:21:55 PM UTC-7, Peter Dyballa wrote:
> Am 21.06.2013 um 21:58 schrieb Rami A:
>
>
>
> > I am honestly not so proficient in emacs nor lisp.
>
>
>
> And neither in English?
I decided to include the lisp part after I wrote the "not so" so I missed including "neither" :)
>
>
>
> I wrote before that it's not allowed to use another formatter as ps-lpr-command because the ps-print and ps-spool commands already produce PostScript output (that you can customise). Why are you trying this again?
I am honestly lost.
I don't want to produce a postscript file.
That is not my intention.
This what I had before:
At some point I was able to choose "postscript print buffer" and it would format the page and "print it" as if I am doing:
mp -l -s "\!*" <\!* | lp "buffer name"
from the command prompt in solaris.
Something changed in the environment and I can't do that anymore.
So I am trying to duplicate the same printing format in emacs "two pages in an oval bold line kind of format per page".
>
>
>
> >
>
> > I tried this:
>
> > (setq ps-lpr-command "mp")
>
> > (setq ps-lpr-switches '("-l" " -s" " | lp"))
>
> >
>
> > which also did not work.
>
>
>
> And again you're not using the customisation interface of GNU Emacs (under the Options menu). I presume you are a human being, so you can be a lot more flexible than a compiled piece of software.
I am lost again. What kind of compilation you are talking about?
I just want to include some lines of lisp in my .emacs file so I can port it to any machine and have the same printing format and functionality.
I don't prefer using the customization window for anything.
But again, maybe I am missing the actual use of this interface you are mentioning.
Will read more about it.
Thanks.
>
>
>
> --
>
> Greetings
>
>
>
> Pete
>
>
>
> "Indentation?! I will show you how to indent when I indent your skull!"
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: postscript printing in emacs
2013-06-21 21:16 ` Rami A
@ 2013-06-21 21:49 ` Peter Dyballa
0 siblings, 0 replies; 9+ messages in thread
From: Peter Dyballa @ 2013-06-21 21:49 UTC (permalink / raw)
To: Rami A; +Cc: help-gnu-emacs
Am 21.06.2013 um 23:16 schrieb Rami A:
> I don't want to produce a postscript file.
Then don't use ps-* print commands!
>
> At some point I was able to choose "postscript print buffer" and it would format the page and "print it"
There is no backup of your older init file versions? Not even those that GNU Emacs produces?
>
> Something changed in the environment and I can't do that anymore.
Which or whose environment? Are these changes documented? Why not?
>
> So I am trying to duplicate the same printing format in emacs "two pages in an oval bold line kind of format per page".
See the customisation options in GNU Emacs for PostScript printing! Options Menu -> Customise Emacs -> Browse Customisation Groups. Then go to Group PostScript. It has "Ps Print" (incorrectly spelled) and "Printing Utilities". Some combination might come near what you wish.
OTOH, can't you add mp to the system's lpfilters?
--
Greetings
Pete
The human brain operates at only 10% of its capacity. The rest is overhead for the operating system.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2013-06-21 21:49 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-19 23:46 postscript printing in emacs Rami A
2013-06-20 9:40 ` Peter Dyballa
2013-06-20 13:21 ` Drew Adams
[not found] ` <mailman.2067.1371721274.22516.help-gnu-emacs@gnu.org>
2013-06-21 16:30 ` Rami A
2013-06-21 19:13 ` Peter Dyballa
[not found] ` <mailman.2158.1371842037.22516.help-gnu-emacs@gnu.org>
2013-06-21 19:58 ` Rami A
2013-06-21 20:21 ` Peter Dyballa
[not found] ` <mailman.2164.1371846141.22516.help-gnu-emacs@gnu.org>
2013-06-21 21:16 ` Rami A
2013-06-21 21:49 ` Peter Dyballa
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.