home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.editors
- Path: sparky!uunet!usc!cs.utexas.edu!swrinde!sdd.hp.com!ux1.cso.uiuc.edu!news.cso.uiuc.edu!ux2.cso.uiuc.edu!ejk
- From: ejk@ux2.cso.uiuc.edu (Ed Kubaitis - CCSO)
- Subject: Re: Sam (was Re: sam and cursor control)
- References: <1992Dec14.133826.7789@alw.nih.gov> <1gpj37INNj6t@nemesis.muppet.bt.co.uk> <BzGzGM.1uJ@news.cso.uiuc.edu>
- Message-ID: <BzIp00.8rF@news.cso.uiuc.edu>
- Sender: usenet@news.cso.uiuc.edu (Net Noise owner)
- Organization: University of Illinois - Urbana
- Date: Sat, 19 Dec 1992 17:38:22 GMT
- Lines: 22
-
- ejk@ux2.cso.uiuc.edu (Ed Kubaitis - CCSO) writes:
- |... Anyway,
- |attached is a perl script that provides some tags functionality for sam.
- |...
- |You say '!tag <tag>' in the command window, select the two lines printed
- |out by the script, and hit the 'send' menu2 item. I used it for about 20
- |minutes ...
-
- Hmmm. 20 minutes was clearly not enough. Found 3 bugs in the 6 line
- original. Attached is a repaired version.
-
- ----------------------------------
- Ed Kubaitis (ejk@ux2.cso.uiuc.edu)
- Computing & Communications Services Office - University of Illinois, Urbana
- ==============================================================================
- #! /usr/local/bin/perl
- # generate Sam commands from tags file
- $#ARGV == 0 || die "usage: tag tag\n";
- $_ = `look -t "$ARGV[0]\t" tags`;
- /^[^\t]+\t([^\t]+)\t(.+)$/; $file =$1; $re =$2;
- $re =~ s/([()*[\]])/\\$1/g;
- print "B $file\n$re\n";
-