From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <69239ed0eda4832cf8644e945d012b7e@vitanuova.com> To: 9fans@cse.psu.edu Subject: Re: [9fans] sam command language From: rog@vitanuova.com In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Date: Tue, 7 Oct 2003 19:34:57 +0100 Content-Transfer-Encoding: quoted-printable Topicbox-Message-UUID: 65f635f8-eacc-11e9-9e20-41e7f4b1d025 > and then, in the end, i felt the need for the modified version of ^ > and $ so rarely that i don't really mind not having them. for me, it's been frequent enough to feel a little frustrated by it (particularly when dealing non-line-oriented files). i wouldn't modify the meaning of ^ and $, rooted as they are in antiquity. one could always take a brave leap into the almost unsullied waters of Unicode... for instance, one could use =C2=AB (unicode 0xab) and =C2=BB (unicode 0xb= b) to indicate a regex anchored to the start or end of "dot". e.g. ,x/[a-zA-Z0-9]+/g/=C2=ABA/d would delete all alphanumeric sequences starting with the letter 'A'; or ,y/[ \t\n]/y/=C2=AB./g/./|tr 'A-Z' 'a-z' would lowercase all but the first letter of all words. (aside: has anyone found a good use for the fact that "y" selects null ranges?) or ,x/^\.TS/.,/^\.TE/y/=C2=AB...\n/y/...=C2=BB/x/.*\n=C2=BB/g/pattern/d would delete the last line of a tbl table if it contained "pattern". it seems useful and quite natural to use (and the implementation looks trivial, in acme at any rate). BTW while on minor sam/acme gripes, is it a bug or a feature that if a file is written, changed, and the change undone, the file is not marked as changed? this means that X/'/w is not guaranteed to write out all files that have been modified from their on-disk copies, and has bitten me more than once (i don't use that idiom any more!)