PROMPTREMINDERS--tobeperiodicallyremindedofthingsFile:PromptReminders.ttyRevised:Feb21,1983,andApr15,1984,byJonLWhiteOnemaywanttobeperiodically"reminded"ofimportantthingsbyamessagewhichisaggressively"winked"and"flashed"inapromptwindow(oronprimaryoutputforsystemswithoutbitmapdisplay,suchasInterlisp-10andInterlisp/VAX).Itwilldesistthewink/flash"hassling"onlyafterithasbeenacknowledgedbyuserresponse,orafterapre-setintervalof"hassling"timehaselapsed.SuchisimplementedusinganInterlisp-Dbackgroundprocess(orforthenon-Interlisp-Dsystems,thefacilityofPROMPTCHARFORMS).IftheMESSAGEgivenforthereminder(seedescriptionofthefunctionSETREMINDERbelow)isalistp,thenwhenthereminder"goesoff",thatlistpwillbeEVAL'dratherthananyofthe"winking","flashing",or"hassling"mentionedabove.InInterlisp-D,theglobalvariableREMINDERSTREAMholdsthewindow(or,indeed,stream!)thatthe"winking/flashing"istooccur;ifnotsetbytheuser,itwilldefaulttoPROMPTWINDOW.Afterthe"hassling"hascompleted,thewindow(ifindeedREMINDERSTREAMholdsawindow)willbeclosed,dependingonthevalueofCLOSEREMINDERSTREAMFLG.REMINDERSisafilepkgtype,sothattheymaybeeasilysavedonfiles,andsothatthegeneraltyped-definitionfacilitiesmaybeused.OnanyfilewhichusestheREMINDERSfilepkgcom,itisadvisabletoprecedethiscommandwithacommand(FILES(SYSLOADCOMPILEDFROMLISPUSERS)PROMPTREMINDERS)sincethispackageisnotintheinitialLisploadup.Wheninitiallydefiningareminder,itispreferablefortheusertocallSETREMINDERratherthanPUTDEF;butHASDEFistheacceptedwaytoaskifsomenamecurrentlydefinesa"reminder",andDELDEFistheacceptedwaytocancelanexisting"reminder".Inthefirstexamplebelow,theuserwantstoberemindedevery30minutesthatheoughttobeusingMAKEFILEtosavehiswork;inthesecondexample,hemerelywantstobetoldonce,atprecisely4:00PMtocallhome;inthethird,hemerelychecksevery10minutestoseeifthereisaprocesscalledLISTFILES.Examples:(SETREMINDERNIL(ITIMES3060)"HaveyouMADEFILErecently?")(SETREMINDER'WOOFNIL"Don'tforgettoinformwifeofdinnerplans.""8-Jan-834:00PM")(SETREMINDERNIL600'(PROGN(AND(FIND.PROCESS'LISTFILES)(addFREQ1))(addTOTAL1)))Functions:(SETREMINDERNAMEPERIODMESSAGEINITIALDELAYEXPIRATION)Thiswillcreateandinstalla"reminder"withthenameNAME(NILgivenforanamewillbereplacedbyagensym),whichwillbeexecutedeveryPERIODnumberofsecondsbywinkingthestringMESSAGEintothepromptwindow;ifMESSAGEisnull,thenNAMEiswinked;ifMESSAGEisalistp,thenitisEVAL'dandno"winking"takesplace."Winking"meansalternatelyprintingthemessageandclearingthewindowinwhichitwasprinted,ataratedesignedtoattracttheeye'sattention.ThefirstsuchexecutionwilloccuratPERIODsecondsafterp c/ b6q b6 ` oF!$& 19;@` _ _ ^..^. \y2 #'P*/2;6n:\ [~ [~ Z& Z& X oF1; )& 2c4=NC/EEX Wv PZ %-Y09;=NC/C5Wv V'd#E&-Y49AEEV T o Z)&)*-Y17m: DD T Sn 'Zd#E'x 2c49ADD Sn RZ"n +/3::;?BXB^R P  & /69=N@D P Of 'x)8JOf N N L oF'#E&.02c BXB^L K^y "n$&,048D??K^ J1;"n$*+159;> GhJ H  )&.6H GV GV E oF $, 9>%AGbGhE Dd!$47m9?BXDD CNF'1&)& 45:>% FCN AF  $) 6;=NDGhA @ o'"n'x)=T@ ?F ?F = oF1!&)&-Y147m=NBXDD= <';$3:  o;!) 469ADD ;> 9 "n#E),9 8 oF'#E'x 0>?8 76'd #E&-Y18D99>%FF76 5y'! *.0158DC/GbGh4 3.P %)&/14DFF/& -Zd"n'x/159>%>ADD- ,vZ %(O*/46>DGbGh,v +' #E)&/46=N?C/EE+ )y' )*+,4) (n (n ' oF 1#E%)&.019 B^' % % $f oF 1;!'x-Y/59%@  oFyP'Z1$(U V V     N N  oFyP'Z1d; !"n ++   F oF 1d#E) 4 >+F  oFyP'1d#E&-Y/ 8D%C/GbGh > oF' &,/58D>BXGh>  oFZ%,/58D=NAEGh oFZ!$%+/2c4:>%@H? 6 oFd%* 4's).Returnsthename(noteabovewhenNILissuppliedforthename).(ACTIVEREMINDERNAMES)Noarguments;self-explanatory.(REMINDER.NEXTREMINDDATENAME)Returnsthetime(inGDATEformat)atwhichthenextremindingfromthenamedreminderwilloccur;NILifNAMEisn'taREMINDERS.(REMINDER.NEXTREMINDDATENAMEDate/Time.string)Setsthetimeatwhichthereminderisnexttobeexecuted.(REMINDER.EXPIRATIONDATENAME)Returnsthetime(inGDATEformat)atwhichthereminderwillbeautomaticallydeleted.(REMINDER.EXPIRATIONDATENAMEDate/Time.string)Setstheexpirationtime.(INSPECTREMINDERNAME)InInterlisp-D,thiswillcallINSPECTonthedefinitionofthenamedreminder;inothersystems,itmerelycallsSHOWDEF.FunctioninInterlisp-Donly:(UNTILKEYDOWNPFNINTERVAL.SECSDURATION.SECSsubCycleDuration.secssubCycleFN)ForaperiodofuptoDURATION.SECSseconds,thefunctionFNwillbe"run"(i.e.,appliedtonoarguments)everyINTERVAL.SECSseconds;bothofthesetimedurationsmaybefloatp's,andhencespecifyfractionalpartsofasecond.Theprocessisstoppedwheneverthereisanychangeinthestateofthekeyboard;exceptthatCTRL,LOCK,LSHIFT,RSHIFT,andLEFTandRIGHT(towofthethreemousebuttons)don'tcount.ThefunctionFN,ofcourse,maysave"state"inordertododifferentthingscyclicallyonthevarious"runnings".Butacommonstructureistohaveamajorcycleandaminorcycleforwhichsomeactivityistobeperformed.Thetwooptionalarguments,subCycleDuration.secsandsubCycleFN,allowforthissecondfunctiontobe"run"attheendofthesubCycleduration c8 b6q oF1 %+ 69@C/Ghb6 ` oF;"n$)+/48D C/D` _ oF ; &)&/47m;>%AEH9H?_ ^. oF !(O-Y/2c9BXH?^. \ oFyP'd$)&,469;>F\ [~ oF #E%.02c48D=NAEE[~ Z& oF %)&.0 7m:?DEZ& X oF1"n'x)&/8D:?BXGhX Wv oFWv V oFyP'#E&//2c8DGbH9H?V T oF"n$*.0048D>%@DIIT Sn oF'"n +047m=N?DIISn R oFZ; 'x)&014FFR P oF#E&5ADDN L oF; %)&+2c5: DDDL K^ oF "n)&,447m;>C/FFK^ J oF"n*/2c8D;C/GbGhJ H oF$*3:6;>%AGbGhH GV oF149C/C/D CNPVCN A oF1d &.02c6;? H?A @ @ ?F oFyP'#E(O-Y147m>BXEE?F = oF= < < ;> ;> 9 oF 9 8 oFyP' / 8 76 76 5 oF#E'~5 4 oFyP'#E&+2c49=NAII4 3. oF1;%)/3:59>@ I3. 1 oF#E'x51 0~ oFyP'1 #E(O+3:59F0~ /& /& - oF#E'~- ,v oFyP'#E&+2c49=NDII,v + oF' &+ ) oF#E'x5) (n oFyP'1 %*(n ' ' % oF % $f oFyP' "n&*/58D; DGbGh$f # oF"n$)149>E# ! ! ^ ^    oFyP'Z1!$ .02i V V  oF d )& 44  oFyP'Z1d; !"n#E$$%&'x(O)&; D N oFyP'Z"n$'x 3::>%EH9H?N  oFZd#E),/ 8D=N II  oF1d$)&147m?C/H9H? F oFZ !&)&*12c5EEF  oF1; $),/47m:C/II  oF&-Y048D=NADGbGh > oF#E(O-_>  oFyP'Z#E%,/4:=NBXDGbGh oF )&+/5 ?@DEE 6 oF"n$)&*/48D9>DGbGh 6 oF"n$'x) 3:47m:BXB^ oF -Y0 :?C/GbGh . oF!$)&+/2c48D?GbGh. 9 q?[Ptime.Forexample,INTERVAL.SECSmaybe0.5inordertocausea"winking"ofamessageinthePROMPTWINDOWeverysecondorso,andsubCycleDuration.secsmaybe10.0inordertocausea"flashing"ofthewholescreenevery10secondsorso.Inthiscase,themajorcycleisthe"fastratewinking"everysecond,whereastheminorcycleisthe"slowrateflashing"every10secs. c8 b6q oFb6 ` oFyP'Z +/147mDEE` _ oF;$'x* 5:@C/FII_ ^. oF$'x).0058D=N> H9H?^. \ oF'"n'x)03:67m9>%C/FF\ [~ oF;!&*2c7m>%DH9H?[~ Z& oF;!&*3:8D:?Z&6 q?[~GACHA ~GACHA Y Gj/x){PHYLUM}PROMPTREMINDERS.TTY;12JONL.PA15-Apr-84 14:55:14