home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / editors / 3081 < prev    next >
Encoding:
Text File  |  1992-12-21  |  1.4 KB  |  34 lines

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