Article View: news.software.nn
Article #4346Fun with Macros
From: Nancy McGough
Date: Fri, 25 Jun 1993 04:52
Date: Fri, 25 Jun 1993 04:52
91 lines
3446 bytes
3446 bytes
Well... I finally got tired of coming up with macro keys that don't conflict with all the keys that are already used in nn and figured out how to use the cryptically documented prefix keys. Now I invoke most of my macros by typing ; followed by a mnemonic letter. FYI here's the macro section of my init file. All comments and suggestions are welcome. Thnx. -nancy ---begin excerpt of nancym's init file--- # MACROS # Uncomment next line when debugging macros # set macro-debug # Next 2 lines establish ; as macro prefix key (aliased to mac). make map mac map both ; prefix mac # List all articles in current newsgroup. map mac a ( goto-group "a" ) # Select all (including seen) articles with subject & display base article # Assumes you have case-fold-search set, and want to do a case-sensitive # search for the base article. # FEATURE: Using SPACEBAR you see unseen articles from current menu twice. # Allows flexibility using = and/or k. # BUG: Also finds articles with current subject as substring of subject. # (Anyone know how to do an exact match?) map mac b ( :unset case-fold-search # Make case sensitive ?show goto-group "" "s" find "." 'X' :set case-fold-search # Make case insensitive again ) # Jump to group. # SEMI-BUG: Typing full newsgroup name produces error msg, but it # doesn't seem to be a problem. map mac j ( goto-group prompt "Type part or all of newsgroup name to jump to: " input "j" prompt "" # Clear prompt break ) # Mail article to me map mac m ( ?show mail yes "nancym" "" no ) # Select current author's name in all newsgroups permanently map mac n ( ?show kill-select 's' 'n' "" 'a' "p" yes ) # Pop up a level. (Does anyone know a better way to do this?) map mac p ( ?show '=' '~' '~' '$' continue ) # Select this subject for 30 days map mac s ( kill-select 's' '^M' "" ?menu '.' # In menu mode need to specify current article '^M' "" yes ) # NEXT MACRO KEY BINDINGS DON'T BEGIN WITH MAC (;) # Select this subject for 30 days and followup to current article. # Note: If there's a held article it will be used because the last yes # will be answering the question about using the held article. map show f ( kill-select 's' '^M' "" '^M' "" yes follow yes ) # Find/select on sender (as = does on subject). (This is from the nn FAQ.) map menu _ ( :set select-on-sender find input :unset select-on-sender ) ---end excerpt of nancym's init file---
Technical Details
Message-ID:
<20e0a4$hif@news.u.washington.edu>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.nn.mbox.zip!gmd.de!dearn!frmop11.cnusc.fr!ciril.fr!news.imag.fr!univ-lyon1.fr!vishnu.jussieu.fr! zaphod.crihan.fr!pipex!bnr.co.uk!bnrgate!nott!torn!howland.reston.ans.net!math.ohio-state.edu!sdd.hp.com!caen!usenet.coe.montana.edu!netnews.nwnet.net!news.u.washington.edu!stein2.u.washington.edu!nancymShow Full Headers
Complete Article Headers
Message-ID: <20e0a4$hif@news.u.washington.edu> Subject: Fun with Macros Date: Fri, 25 Jun 1993 04:52:20 +0000 From: nancym@stein2.u.washington.edu (Nancy McGough) Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.nn.mbox.zip!gmd.de!dearn!frmop11.cnusc.fr!ciril.fr!news.imag.fr!univ-lyon1.fr!vishnu.jussieu.fr! zaphod.crihan.fr!pipex!bnr.co.uk!bnrgate!nott!torn!howland.reston.ans.net!math.ohio-state.edu!sdd.hp.com!caen!usenet.coe.montana.edu!netnews.nwnet.net!news.u.washington.edu!stein2.u.washington.edu!nancym Newsgroups: news.software.nn Organization: University of Washington Lines: 92 Reply-To: nancym@u.washington.edu (Nancy McGough) NNTP-Posting-Host: stein2.u.washington.edu X-Newsreader: NN [version 6.4.16]