[comp.mail.mush] Save excursions for mush?

michael@fts1.uucp (Michael Richardson) (11/12/90)

  I often find myself doing a lot of 
   set savrec=$record; 
   set record=blah;
   mail -lotsOfNeatOptions
   set record=$savrec

  etc...

  I would much rather do something like:
  save_settings {
    set record=blah;
    mail -lotsOfneatOptions
  }
   
  I think that setopts could be used for this, but I'm not sure I really want to
do that.

  Will I be stuck doing the first case forever?


-- 
   :!mcr!:            |    The postmaster never          |  So much mail,
   Michael Richardson |            resolves twice.       |  so few cycles.
 Play: mcr@julie.UUCP Work: michael@fts1.UUCP Fido: 1:163/109.10 1:163/138
    Amiga----^     - Pay attention only to _MY_ opinions. -   ^--Amiga--^

argv@turnpike.Eng.Sun.COM (Dan Heller) (11/16/90)

In article <1990Nov12.024506.13412@fts1.uucp> michael@fts1.uucp (Michael Richardson) writes:
>   I often find myself doing a lot of 
>    set savrec=$record; 
>    set record=blah;
>    mail -lotsOfNeatOptions
>    set record=$savrec

build your own command:

cmd foo "set saverec=$record; set record=blah; mail \!*; set record=$saverec"

then just say "foo -lotsOfNeatOptions"

--
dan
----------------------------------------------------
O'Reilly && Associates   argv@sun.com / argv@ora.com
Opinions expressed reflect those of the author only.

michael@fts1.uucp (Michael Richardson) (11/16/90)

In article <2867@exodus.Eng.Sun.COM> argv@turnpike.Eng.Sun.COM (Dan Heller) writes:
>In article <1990Nov12.024506.13412@fts1.uucp> michael@fts1.uucp (Michael Richardson) writes:
>>   I often find myself doing a lot of 
>>    set savrec=$record; 
>>    set record=blah;
>>    mail -lotsOfNeatOptions
>>    set record=$savrec
>
>build your own command:
>
>cmd foo "set saverec=$record; set record=blah; mail \!*; set record=$saverec"

  Sorry, I should have been more explicit: I want to use this in my macros. 
While interactive, I have a good enough memory to not worry about where I came from...

-- 
   :!mcr!:            |    The postmaster never          |  So much mail,
   Michael Richardson |            resolves twice.       |  so few cycles.
 Play: mcr@julie.UUCP Work: michael@fts1.UUCP Fido: 1:163/109.10 1:163/138
    Amiga----^     - Pay attention only to _MY_ opinions. -   ^--Amiga--^

argv@turnpike.Eng.Sun.COM (Dan Heller) (11/17/90)

In article <1990Nov16.080151.6729@fts1.uucp> michael@fts1.uucp (Michael Richardson) writes:
> >>   I often find myself doing a lot of 
> >>    set savrec=$record; 
> >>    set record=blah;
> >>    mail -lotsOfNeatOptions
> >>    set record=$savrec
> >
> >build your own command:
> >
> >cmd foo "set saverec=$record; set record=blah; mail \!*; set record=$saverec"
> 
>   Sorry, I should have been more explicit: I want to use this in my macros. 

No problem.  Now that you have the cmd, just include it in a macro:

bind-macro * [line-mode]foo\n

(use something other than * if you want)
--
dan
----------------------------------------------------
O'Reilly && Associates   argv@sun.com / argv@ora.com
Opinions expressed reflect those of the author only.

michael@fts.ocug.on.ca (Michael Richardson) (11/21/90)

In article <2951@exodus.Eng.Sun.COM> argv@turnpike.Eng.Sun.COM (Dan Heller) writes:
>> >
>> >build your own command:
>> >
>> >cmd foo "set saverec=$record; set record=blah; mail \!*; set record=$saverec"
>> 
>>   Sorry, I should have been more explicit: I want to use this in my macros. 
>
>No problem.  Now that you have the cmd, just include it in a macro:

  Curses! I never use that mode. 
  Sorry. I mean I want to do:
  'cmd foo "save-excusion 'blah-command'"'

-- 
   :!mcr!:            |    The postmaster never          |  So much mail,
   Michael Richardson |            resolves twice.       |  so few cycles.
 Play: mcr@julie.UUCP Work: michael@fts1.UUCP Fido: 1:163/109.10 1:163/138
    Amiga----^     - Pay attention only to _MY_ opinions. -   ^--Amiga--^

argv@turnpike.Eng.Sun.COM (Dan Heller) (11/21/90)

In article michael@fts.ocug.on.ca (Michael Richardson) writes:
> In article argv@turnpike.Eng.Sun.COM (Dan Heller) writes:
> >> >build your own command:
> >> >cmd foo "set saverec=$record; set record=blah; mail \!*; set record=$saverec"
> >>   Sorry, I should have been more explicit: I want to use this in my macros. 
> >No problem.  Now that you have the cmd, just include it in a macro:
> 
>   Curses! I never use that mode. 
>   Sorry. I mean I want to do:
>   'cmd foo "save-excusion 'blah-command'"'

We seem to be going around in circles.  Suffice to say that whatever
you want done -can- be done.  the first thing to do is figure out
what it is that you want to do! :-)  However, you seem to be getting
the hang of it, so I'll let you go on your own.

--
dan
----------------------------------------------------
O'Reilly && Associates   argv@sun.com / argv@ora.com
Opinions expressed reflect those of the author only.