From: "Russ Cox" <rsc@swtch.com>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] troff ignoring .eo/.ec after first time
Date: Thu, 22 Nov 2007 11:55:10 -0500 [thread overview]
Message-ID: <20071122165500.7C5F21E8C22@holo.morphisms.net> (raw)
In-Reply-To: <3950E912-6C70-4726-B16D-79008B73FE00@mac.com>
> On about the third page, some code begins, but at the print()
> statement at the end there is some strangeness. If you look inside
> the .ms file, there are some .eo and .ec requests. .eo turns off \x
> and .ec turns it back on. But why is it ignored after that first
> page, which works correctly?
assuming that /n/sourcesdump/2007/1122/contrib/pietro/plan9prog.ms
is the file in question, the first page isn't "working" correctly either,
since your
print("hello, world\n");
turns into
print("hello, world0);
because the \n" interpolates the " register.
the reason that .eo doesn't manage to turn this off is that
the text between .P1 and .P2 gets copied into a troff
diversion for later processing, and that later processing
happens during the execution of .P2, by which time your idiom
.P1
.eo
text
.ec
.P2
has restored \ as the escape character.
you can get your desired effect by doing
.P1
.eo
text
.P2
.ec
instead.
russ
prev parent reply other threads:[~2007-11-22 16:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-21 22:06 Pietro Gagliardi
2007-11-21 22:39 ` Martin Neubauer
2007-11-22 16:55 ` Russ Cox [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20071122165500.7C5F21E8C22@holo.morphisms.net \
--to=rsc@swtch.com \
--cc=9fans@cse.psu.edu \
/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 NNTP newsgroup(s).