From: Eli Zaretskii <eliz@gnu.org>
Subject: Re: Printing from WindowXP version of emacs
Date: Tue, 20 Dec 2005 06:54:20 +0200 [thread overview]
Message-ID: <u1x08fjwj.fsf@gnu.org> (raw)
In-Reply-To: <do7lo1$2tcg$1@agate.berkeley.edu> (message from Ilya Zakharevich on Tue, 20 Dec 2005 01:11:29 +0000 (UTC))
> From: Ilya Zakharevich <nospam-abuse@ilyaz.org>
> Date: Tue, 20 Dec 2005 01:11:29 +0000 (UTC)
> Bcc: ilya@gnu.org
> Originator: ilya@powdermilk.math.berkeley.edu
>
> > But if it's a Windows-style so called ``printer share
> > name'', then writing `a' to it _will_ print `a' (give or take some
> > command to force the printer to eject the page after printing a single
> > character).
>
> What is "a command" when a pipe is concerned? Do you mean FormFeed
> character, or what?
It depends on the printer and intimate details of its interface with
the computer. Sending a formfeed would do in (almost) all cases, but
some printers will even do that automatically after some timeout, and
in other cases the printer driver does that. Some old printers
required that you do that from the printer's panel.
> But I still doubt very much that what you say is actually universally
> true. Here are some questions which force my doubts:
>
> In what encoding is this 'a' printed?
I don't understand the question: the printer is a display device, so
it produces a glyph, not an encoding. Are you asking in what form the
character arrives at the printer's input line?
> Are long lines wrapped or lost? What is the page size in lines of
> input? Should line be terminated by CRLF, CR, or LF?
Can't say, it depends on the printer's setup, its driver software, and
any other software that sits in between the application that sent the
text and the wire.
> My understanding of printer pipes was that they are just ways to
> communicate with the printer without any "format translation" software
> in between
Then we were talking about two different things. The ``named pipes''
which Windows users are advised to use in conjunction with Emacs
printing are not direct ways to talk to the printer via the wire, the
traffic to those ``pipes'' is intercepted by spooling software,
translated any number of times as the printer requires (e.g., if the
printer's interface is PostScript, one of those translations converts
the sent text to a PostScript program), and eventually sent over the
wire by a printer driver.
> and contemporary printers do not have "DOS compatibility"
> mode, when you can dump arbitrary ASCII text to them, and they will
> print in Courier.
That's true. But I wasn't talking about such a mode. On a modern
Windows system, when you write text to LPT1, the text is captured by
system software and processed as appropriate (which indeed converts it
into commands, but that's something an application is not aware of).
> Maybe Win* stuff is organized differently
It's not, AFAIK, since `lpr' and the printer drivers after it on Unix
are conceptually similar to what happens on Windows.
> but then I would like to see an exact specification - your claim
> that 'a' is printed as 'a' shows that one cannot expect to print any
> Unicode character (given that UTF-8 is not the "Win* way").
I don't have experience with Unicode printing, so I can only
speculate. I would think that Unicode printing requires to tell the
printer to select an appropriate font, like with terminals.
> > I will assume what happens in reality, not some silly rules of game
> > that you just invented. In reality, the printer expects the text sent
> > to it to come in some encoding.
>
> Definitely, *IF* it accepts text.
Well, when I said ``printer'', I actually meant the ``virtual''
printer that is all the applications knows, not the physical printer
(which indeed doesn't accept plain characters nowadays). For an
application, the name it uses as a file or a pipe is all it knows
about the printer, and that ``virtual printer'' indeed accepts plain
text.
> > If you know how to send text from an Emacs buffer to a printer at all,
> > then sending `a' _will_ print `a'.
>
> You again discuss "sending text". This is hardly correlates with
> "printing" as it stands today.
I hope I explained the confusion above.
> > We are not talking at this level, since normal applications never
> > communicate to printers directly, but through some device driver or
> > some other piece of software.
>
> On Win* this piece of software is called "the operating system". You
> open GDI context (sp?), and draw to this context.
That's one way, yes. But you can also set up a port, such as LPT1, to
be captured and sent to the printer, and then when you write to a file
whose name is "LPT1", the OS will do the GDI thing for you. I think,
conceptually, this is like piping to `lpr' on Unix.
> > That funny pipe you invented is normally a symbolic name whose I/O
> > is intercepted by such an interface software and converted into
> > signals that run on the wire; then the issue of uni- vs
> > bi-directional communications is relevant.
>
> True; but you need a way to configure this interface software. At
> least a way to switch it to Unicode input.
Ideally, the OS would do this itself, when it sees UTF-8, but I don't
know if this is how it works.
next prev parent reply other threads:[~2005-12-20 4:54 UTC|newest]
Thread overview: 119+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-15 15:31 Printing from WindowXP version of emacs sbrown
2005-12-15 18:30 ` Mathias Dahl
2005-12-15 18:35 ` Lennart Borgman
2005-12-16 7:50 ` Eli Zaretskii
2005-12-16 8:29 ` Lennart Borgman
2005-12-16 8:53 ` Eli Zaretskii
2005-12-16 14:53 ` Lennart Borgman
2005-12-16 15:31 ` Eli Zaretskii
2005-12-17 2:42 ` Lennart Borgman
2005-12-17 8:20 ` Eli Zaretskii
2005-12-17 9:38 ` Peter Dyballa
2005-12-17 11:11 ` Eli Zaretskii
2005-12-17 15:50 ` Lennart Borgman
2005-12-17 16:31 ` Peter Dyballa
2005-12-17 21:25 ` Lennart Borgman
2005-12-17 23:55 ` Peter Dyballa
2005-12-21 18:15 ` Lennart Borgman
2005-12-21 21:51 ` Eli Zaretskii
2005-12-21 22:50 ` Lennart Borgman
2005-12-21 23:41 ` Edward O'Connor
2005-12-21 23:51 ` Lennart Borgman
2005-12-17 9:51 ` Lennart Borgman
2005-12-17 13:11 ` Lennart Borgman
[not found] ` <mailman.19684.1134911288.20277.help-gnu-emacs@gnu.org>
2005-12-18 18:22 ` Ilya Zakharevich
2005-12-18 19:23 ` Eli Zaretskii
[not found] ` <mailman.19772.1134933877.20277.help-gnu-emacs@gnu.org>
2005-12-19 17:53 ` Ilya Zakharevich
2005-12-19 21:43 ` Eli Zaretskii
[not found] ` <mailman.19861.1135028638.20277.help-gnu-emacs@gnu.org>
2005-12-20 1:11 ` Ilya Zakharevich
2005-12-20 4:54 ` Eli Zaretskii [this message]
[not found] ` <mailman.19893.1135054520.20277.help-gnu-emacs@gnu.org>
2005-12-20 22:40 ` Ilya Zakharevich
2005-12-21 4:42 ` Eli Zaretskii
[not found] ` <mailman.20004.1135140203.20277.help-gnu-emacs@gnu.org>
2005-12-22 23:11 ` Ilya Zakharevich
2005-12-23 8:41 ` Eli Zaretskii
[not found] ` <mailman.20241.1135327583.20277.help-gnu-emacs@gnu.org>
2005-12-30 0:38 ` Ilya Zakharevich
2005-12-30 11:44 ` Eli Zaretskii
[not found] ` <mailman.20871.1135945105.20277.help-gnu-emacs@gnu.org>
2006-01-05 6:53 ` Ilya Zakharevich
2006-01-05 16:39 ` Eli Zaretskii
[not found] ` <mailman.21485.1136479302.20277.help-gnu-emacs@gnu.org>
2006-01-07 12:02 ` Ilya Zakharevich
2006-01-07 12:55 ` Eli Zaretskii
2005-12-20 14:45 ` Peter Boettcher
2005-12-20 20:21 ` Eli Zaretskii
2005-12-20 22:22 ` Lennart Borgman
2005-12-21 4:34 ` Eli Zaretskii
2005-12-21 7:49 ` Lennart Borgman
2005-12-21 18:39 ` Lennart Borgman
2005-12-21 19:33 ` Eli Zaretskii
2005-12-21 20:11 ` Lennart Borgman
2005-12-21 22:15 ` Eli Zaretskii
2005-12-21 22:48 ` Lennart Borgman
2005-12-22 4:38 ` Eli Zaretskii
2005-12-22 8:02 ` Lennart Borgman
2005-12-22 19:37 ` Eli Zaretskii
2005-12-22 20:46 ` Lennart Borgman
2005-12-23 8:21 ` Eli Zaretskii
2005-12-23 14:06 ` Lennart Borgman
2005-12-23 15:20 ` Eli Zaretskii
2005-12-24 13:49 ` Eli Zaretskii
2005-12-24 14:39 ` Eli Zaretskii
2005-12-24 14:58 ` Eli Zaretskii
2005-12-16 9:26 ` Peter Dyballa
2005-12-16 10:45 ` Eli Zaretskii
2005-12-16 9:19 ` Peter Dyballa
2005-12-16 10:46 ` Eli Zaretskii
2005-12-16 14:19 ` Lennart Borgman
[not found] ` <mailman.19545.1134911104.20277.help-gnu-emacs@gnu.org>
2005-12-19 9:58 ` Mathias Dahl
2005-12-19 21:25 ` Eli Zaretskii
[not found] ` <mailman.19857.1135027571.20277.help-gnu-emacs@gnu.org>
2005-12-20 7:41 ` Mathias Dahl
2005-12-20 19:58 ` Eli Zaretskii
2005-12-20 20:59 ` Drew Adams
2005-12-15 19:36 ` Eli Zaretskii
-- strict thread matches above, loose matches on Subject: below --
2005-12-15 19:36 Jay Bingham
2005-12-19 11:18 LENNART BORGMAN
2005-12-19 21:29 ` Eli Zaretskii
2005-12-19 22:11 ` Lennart Borgman
2005-12-19 23:05 ` Eli Zaretskii
2005-12-19 23:30 ` Lennart Borgman
2005-12-20 4:30 ` Eli Zaretskii
[not found] <mailman.19804.1134991437.20277.help-gnu-emacs@gnu.org>
2005-12-19 16:28 ` Mathias Dahl
2005-12-20 10:58 LENNART BORGMAN
[not found] <mailman.19907.1135077565.20277.help-gnu-emacs@gnu.org>
2005-12-20 17:15 ` Mathias Dahl
2006-01-03 0:49 BRUCE INGALLS
2006-01-03 5:10 ` Eli Zaretskii
2006-01-03 9:44 ` Peter Dyballa
[not found] ` <mailman.21202.1136265134.20277.help-gnu-emacs@gnu.org>
2006-01-03 13:06 ` Chris McMahan
2006-01-03 19:18 ` Eli Zaretskii
2006-01-03 21:52 ` Lennart Borgman
[not found] ` <mailman.21297.1136325265.20277.help-gnu-emacs@gnu.org>
2006-01-03 22:08 ` David Kastrup
2006-01-03 22:12 ` Lennart Borgman
2006-01-03 13:08 LENNART BORGMAN
2006-01-03 19:20 ` Eli Zaretskii
2006-01-04 0:34 BRUCE INGALLS
2006-01-04 10:00 ` Peter Dyballa
2006-01-05 1:56 ` BRUCE INGALLS
2006-01-05 13:01 ` Peter Dyballa
2006-01-05 15:41 ` Lennart Borgman
2006-01-05 21:17 ` Peter Dyballa
2006-01-06 8:39 ` Eli Zaretskii
2006-01-05 20:44 ` Eli Zaretskii
2006-01-05 21:18 ` Peter Dyballa
2006-01-06 8:36 ` Eli Zaretskii
2006-01-06 11:59 ` Peter Dyballa
2006-01-06 14:07 ` Eli Zaretskii
2006-01-04 5:10 BRUCE INGALLS
2006-01-04 8:45 LENNART BORGMAN
2006-01-04 18:22 ` Eli Zaretskii
2006-01-04 19:14 ` Lennart Borgman
2006-01-05 1:17 ` BRUCE INGALLS
2006-01-05 9:24 LENNART BORGMAN
2006-01-05 16:43 ` Eli Zaretskii
2006-01-05 21:01 ` Lennart Borgman
2006-01-06 9:09 ` Eli Zaretskii
2006-01-07 5:00 BRUCE INGALLS
2006-01-07 9:18 ` Eli Zaretskii
2006-01-08 1:06 BRUCE INGALLS
2006-01-08 4:12 ` Eli Zaretskii
2006-01-09 8:29 LENNART BORGMAN
2006-01-09 11:42 ` Lennart Borgman
2006-01-10 3:13 ` BRUCE INGALLS
2006-01-10 10:19 LENNART BORGMAN
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=u1x08fjwj.fsf@gnu.org \
--to=eliz@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).