Article View: comp.mail.mush
Article #264Re: goto-msg considered harmful
From: Barton E. Schaefer
Date: Tue, 14 Nov 1989 05:49
Date: Tue, 14 Nov 1989 05:49
55 lines
2987 bytes
2987 bytes
In article <424@mohawk.cs.utexas.edu> bryan@cs.utexas.edu writes:
}
} cmd waiting 'update -N;await'
} bind a macro '[line-mode]waiting\ng`headers :n`\nn'
}
} where 'g' is bound to goto-msg. [....] Unfortunately,
} this fails when the system mailbox contains only the [one] new message
} [...] because goto-msg detects that there is only one message in
} the mailbox, prints 'Not enough messages' and returns an error [....]
}
} This special case behavior doesn't seem to me to have any use.
The -list commands ([save-list] etc.) used to have this problem as
well. (Some of them still may, I hardly ever have only one message
in my mailbox so I seldom notice.) This is a throwback to the days
before mush had macros, when refusing to do this kind of operation
on a one-message folder seemed "helpful" (don't let the user type
something that won't work). We've been repairing these as we find
(or remember) them.
} Of course, this wouldn't be a problem if there were a line-mode goto command.
You can use
cmd goto "from -"
bind a macro '[line-mode]waiting|goto\n[display-next]'
which has the drawback of printing the header summaries of the new
messages twice before displaying the first new message.
} As far as I can see, there is no way to explicitly change the current message
} pointer in line mode without doing anything else. [....] Why is this?
It's because all the line-mode commands that "affect" messages will
change the current message automatically. "Affect" here is sort
of a difficult concept to classify; just displaying the message's
header summary isn't enough (pick, headers), but almost anything
else is. The "from +" and "from -" special cases are as close as
mush gets to a line-mode goto.
This probably won't help bryan, but more recent beta versions of
mush support options to "pick" to take head and/or tail of a list
of messages. So even if [goto-msg] worked, I'd rewrite this as
cmd waiting 'update -N ; await'
cmd first 'pick +1 | next'
bind-macro a '[line-mode]waiting | first\n'
except that I wouldn't use 'a' as the trigger-key; too easy to set
off an update -N accidentally when I really wouldn't want one.
--
Bart Schaefer "Sometimes I think the surest sign that intelligent life
exists elsewhere in the universe is that none of it has
schaefer@cse.ogc.edu tried to contact us." -- Calvin
(soon to be cse.ogi.edu)
Technical Details
Message-ID:
<5603@ogccse.ogc.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!gem.mps.ohio-state.edu!apple!agate!ucbvax!ucsd!ogccse!schaeferReferences:
<424@mohawk.cs.utexas.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!gem.mps.ohio-state.edu!apple!agate!ucbvax!ucsd!ogccse!schaefer From: schaefer@ogccse.ogc.edu (Barton E. Schaefer) Newsgroups: comp.mail.mush Subject: Re: goto-msg considered harmful Message-ID: <5603@ogccse.ogc.edu> Date: 14 Nov 89 05:49:30 GMT References: <424@mohawk.cs.utexas.edu> Reply-To: schaefer@ogccse.UUCP (Barton E. Schaefer) Organization: Oregon Graduate Center, Beaverton, OR Lines: 55