gts@dasys1.UUCP (G. T. Samson) (08/29/89)
Hi there. I've finally figured out a proper way to use the "pick" command (from inside a script file), but for the life of me, I can't figure out how to get this script file to execute automatically! What I'm trying to do is to toss out certain mail, move other mail to separate mailboxes for later perusal, etc. - all the things that the "pick" command does best. Now, how do I get this to happen every time that mush starts up? I know that I shouldn't put it in the .mushrc file, as no messages have yet been read in when that's executed... but I even tried to bind the command that I want to run to a key, and it wouldn't let me pass an argument. Now, I have a feeling that I'm just going about this the wrong way, so could someone kind please E-MAIL me a hint about this? I have no idea what to do from here, and I can't seem to get a printout of the mush man page... Any help much appreciated! -- Name: Gregory T. Samson, the Evil MicroWizard [and once An Insane Man] Nets: ARPA: gts@tardis.harvard.edu UUCP: ...cmcl2!hombre!dasys1!gts ALSO: hombre!dasys1!gts@cmcl2.nyu.edu OR: dasys1!gts@masa.com Quote: "You've made my day, and now you have to sleep in it." - TMBG
dheller@cory.Berkeley.EDU (Dan Heller) (08/30/89)
In article <10569@dasys1.UUCP> dasys1!gts@cmcl2.nyu.edu (G. T. Samson) writes:
What I'm trying to do is to toss out certain mail, move other
mail to separate mailboxes for later perusal, etc. - all the
things that the "pick" command does best. Now, how do I get
this to happen every time that mush starts up? I know that I
shouldn't put it in the .mushrc file, as no messages have yet
been read in when that's executed... but I even tried to bind
the command that I want to run to a key, and it wouldn't let
me pass an argument.
Use the -source arguemnt to mush when you start up:
% mush -source script_file
This file is sourced after your folder has been read in.
Dan Heller <island!argv@sun.com>
cudcv@warwick.ac.uk (Rob McMahon) (09/12/89)
>Dan Heller writes: >>Use the -source arguemnt to mush when you start up: >> >>% mush -source script_file >> >>This file is sourced after your folder has been read in. Unfortunately this doesn't work too cleanly in conjunction with `-C'. Mush puts up the list of headers, and then the output from the script destroys the display again, so that you immediately have to redraw it. Rob -- UUCP: ...!mcvax!ukc!warwick!cudcv PHONE: +44 203 523037 JANET: cudcv@uk.ac.warwick ARPA: cudcv@warwick.ac.uk Rob McMahon, Computing Services, Warwick University, Coventry CV4 7AL, England
schaefer@ogccse.ogc.edu (Barton E. Schaefer) (09/16/89)
In article <204@titania.warwick.ac.uk> cudcv@warwick.ac.uk (Rob McMahon) writes: } >Dan Heller writes: } >> } >>% mush -source script_file } } Unfortunately this doesn't work too cleanly in conjunction with `-C'. Mush } puts up the list of headers, and then the output from the script destroys the } display again, so that you immediately have to redraw it. Presumably, if the script has output, you would like to see it? .-, [*] Unfortunately, the problem is actually worse than you describe. If any of the commands in the script rearrange the messages, the curses header display will be incorrect. It is advisable to end all scripts that will be read by the -source option with: if iscurses headers endif Using these as the last 3 lines will magically correct the display in most cases. ____________ * That's a half-smiley, if you look closely. ____________ -- Bart Schaefer "And if you believe that, you'll believe anything." -- DangerMouse CSNET / Internet schaefer@cse.ogc.edu UUCP ...{sequent,tektronix,verdix}!ogccse!schaefer
garym@telesoft.telesoft.com (Gary Morris @nova) (09/18/89)
In article <4762@ogccse.ogc.edu>, schaefer@ogccse.ogc.edu (Barton) writes: > In article <204@titania.warwick.ac.uk> cudcv@warwick.ac.uk (Rob) writes: > } >Dan Heller writes: > } >>% mush -source script_file > } > } Unfortunately this doesn't work too cleanly in conjunction with `-C'. Mush > } puts up the list of headers, and then the output from the script destroys > } the > } display again, so that you immediately have to redraw it. Another way of handling this problem is to use -N (-noheaders) (which only seems to work in line mode), then start up in line mode instead of curses (without the -C), and finally switch to curses mode at the end of the script being sourced. This starts up without the header display, does your stuff and then goes into curses mode and displays the header. It seemed to work OK on my version (6.5.6) even when the script rearranged the order of the messages. BTW, the "curses" command itself isn't mentioned in the man page except in one place, the section on initialization says not to use the "curses" command from an initialization file. It's not in the list of line mode commands, though it does work. I take it that means it can't go in .mushrc but it's ok in a file that used with -source. --GaryM -- Gary Morris uunet!ucsd!telesoft!garym TeleSoft, San Diego telesoft!garym@ucsd.ucsd.edu (619) 457-2700 garym@crash.cts.com
schaefer@ogccse.ogc.edu (Barton E. Schaefer) (09/20/89)
In article <501@telesoft.telesoft.com> garym@telesoft.com (Gary) writes: } In article <4762@ogccse.ogc.edu>, schaefer@ogccse.ogc.edu (Barton) writes: } > In article <204@titania.warwick.ac.uk> cudcv@warwick.ac.uk (Rob) writes: } > } >Dan Heller writes: } > } >>% mush -source script_file } > } } > } Unfortunately this doesn't work too cleanly in conjunction with `-C'. } } Another way of handling this problem is to use -N (-noheaders) (which only } seems to work in line mode), then start up in line mode instead of curses } (without the -C), and finally switch to curses mode at the end of the script } being sourced. This starts up without the header display, does your stuff } and then goes into curses mode and displays the header. It seemed to work } OK on my version (6.5.6) even when the script rearranged the order of the } messages. Correct. The problem with -curses -source is that the curses screen gets generated when the folder is first loaded, and unless something in the script redraws it, it won't change. If you wait until after the script has finished to go into curses mode, then the screen gets built at that time with the correct headers. } BTW, the "curses" command itself isn't mentioned in the man page except in } one place, the section on initialization says not to use the "curses" } command from an initialization file. It's not in the list of line mode } commands, though it does work. I take it that means it can't go in } .mushrc but it's ok in a file that used with -source. That is precisely what it means, although its omission from the list of line mode commands in the man page is an oversight (it shows up in the list from the ? command). Furthermore, I have just removed from 7.0 alpha the restriction on giving the "curses" command from a .mushrc file. Effectively, the "curses" command in a .mushrc file now turns on the -C switch. Look for that in the next release. -- Bart Schaefer "And if you believe that, you'll believe anything." -- DangerMouse CSNET / Internet schaefer@cse.ogc.edu UUCP ...{sequent,tektronix,verdix}!ogccse!schaefer