questions about the Previous-Sequence

2020-03-22 Thread Philipp
Hi all

Disclaimer first: I'm a mmh-developer and user

We think currently about removing the Previous-Sequence support for
mmh. But because we don't use it we are not sure, if we missed some
aspect of it. Therefor I would like to ask some questions.

When and why was the Previous-Sequence introduced to mh or nmh?

What are the use cases? We found two:
1. in the shell using the same messages again and spare some typing
2. put messages in a sequence after a refile[0]

The first completely covered with the shell history. The second
one can don with the new sequence or the -retainsequences switch.

Did we miss some use cases? Are there other reasons to keep this feature?

Philipp

Ps: really nice work you do.

[0] https://lists.nongnu.org/archive/html/nmh-workers/2005-12/msg00086.html



Re: questions about the Previous-Sequence

2020-03-22 Thread Robert Elz
Date:Sun, 22 Mar 2020 15:42:25 +0100
From:Philipp 
Message-ID:  

  | The first completely covered with the shell history.

Aside from what Ralph said, what shell history is that?   Consider
a user using dash, or some similar shell.Also consider that the
commands may be in a script, in which even shells that support some
kind of history usualy do not enable it, and command line editing
is certainly not going to be available.

Never rely upon shell history to handle anything in any application
excecpt the shell in question.

kre




Re: questions about the Previous-Sequence

2020-03-22 Thread Ralph Corderoy
Hi Philipp,

> 1. in the shell using the same messages again and spare some typing
...
> The first completely covered with the shell history.

If the arguments given to the last nmh command don't have a side effect
then shell history may be useful, but

show next:3
scan !$

doesn't achieve the same as Previous-Sequence.

Not arguing you shouldn't remove it, just spotting a case you may not
have considered.

-- 
Cheers, Ralph.



Re: questions about the Previous-Sequence

2020-03-22 Thread Philipp
[2020-03-22 14:58] Ralph Corderoy 
> > 1. in the shell using the same messages again and spare some typing
> ...
> > The first completely covered with the shell history.
>
> If the arguments given to the last nmh command don't have a side effect
> then shell history may be useful, but
>
> show next:3
> scan !$
>
> doesn't achieve the same as Previous-Sequence.
>
> Not arguing you shouldn't remove it, just spotting a case you may not
> have considered.

Yes we have overseen this case, thanks.

Philipp



Re: questions about the Previous-Sequence

2020-03-22 Thread Ken Hornstein
>We think currently about removing the Previous-Sequence support for
>mmh. But because we don't use it we are not sure, if we missed some
>aspect of it. Therefor I would like to ask some questions.

I personally find the previous-sequence rather useful myself (when you
find, for example, the results of "pick" were rather larger than you
expected and didn't put it in a sequence).  But that's up to you.

>When and why was the Previous-Sequence introduced to mh or nmh?

Looks like it has been around for a while.  From mh4/MHCHANGES:

Mon Jul 16 00:21:52 1984  Rand MH mail system (agent: Marshall Rose) 

Install the new Previous-Sequence mechanism.  Introduce the SEQMOD
flag to the msgs structure.  Just about every MH program now calls
m_setseq () upon parsing the messages and calls m_sync() prior to
exiting.

Before my time, so I can't really answer the "why".

--Ken



Re: questions about the Previous-Sequence

2020-03-22 Thread Conrad Hughes
One of the things I use it for is "unseeing" a message.  Let's say I see
someone has emailed me, I'm about to go out, want to take a peek at the
message but don't want to mark it as seen — or alternatively I look at a
message, think "gosh that's gonna take a lot of work to deal with" so
want to mark it as unseen again, so I come back to it.  My
unseen-sequence is "un", and my previous-sequence is "ditto", so I have
this alias to "unsee" whatever I just looked at:

  mark -sequence un -add ditto

.. then I have another alias to do the first job — looking at something
without "seeing" it:

  show !*; mark -sequence un -add ditto

I bet there are magic command line switches to do this now (seems to
happen half the time I post these days!), but I've had these for a long
time and use them regularly.

Conrad