Re: questions about the Previous-Sequence

2020-03-23 Thread Valdis Klētnieks
On Mon, 23 Mar 2020 13:16:56 +0100, Philipp said:
> [2020-03-22 14:53] 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.
>
> May I ask, why do you prefer it over the history and command line editing?

Keep in mind that some of us have been using Unix-style systems since *long*
before readline existed, so all the fancy 'command line editing" didn't exist, 
and
before shell history sprouted all its fancy features. So alternatives were 
invented.

And muscle memory is hard to overcome.

(Says the guy still using e16 as a window manager rather than Gnome, mostly
because of muscle memory type reasons)


pgp2NHqBnMtL2.pgp
Description: PGP signature


Re: questions about the Previous-Sequence

2020-03-23 Thread Philipp
[2020-03-22 21:13] 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

I have following in my profile:

marku: -sequence u -add -nozero

So if I want to unsee a mail I have just read, I just type marku. This
only works if I read only one mail at the time or reuse the sequence/pick.

Philipp



Re: questions about the Previous-Sequence

2020-03-23 Thread Philipp
[2020-03-22 14:53] 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.

May I ask, why do you prefer it over the history and command line editing?

> >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".

Thanks for this info.

Philipp

Ps: Please don't put me in to or cc. I'm subcribed to the list and use
the list-id field for scan and filtering.



Re: questions about the Previous-Sequence

2020-03-23 Thread Ralph Corderoy
Hi Conrad,

>   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!)

There's

show -file `mhpath .`

that may give some success depending on your showproc and whether
mhshow(1) is run by show(1).  But it only handles one filename and show
doesn't accept multiple -file options.

The other way would be to run show in an environment that doesn't say to
update the unseen sequence ‘un’ so the update doesn't need undoing.

-- 
Cheers, Ralph.



Re: questions about the Previous-Sequence

2020-03-23 Thread Ralph Corderoy
Hi Ken,

> 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.

I don't use it, but then my .mh_profile has

pick: -sequence p

following Peek's book's suggestion to cover that one case.

That sequence ‘p’ is so useful I also have a ~/bin/mk that does

exec mark -sequence p "$@"

so I can fine tune a result with

mk -d p:3 p:-1

If I want to keep it, it's then a

pick -seq foo p

except my ~/bin/p is 

exec pick "$@"

Just thought it may be interesting to others to share.

-- 
Cheers, Ralph.



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



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 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 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.