Re: [nmh-workers] Flagging messages

2019-06-08 Thread Ralph Corderoy
Hi,

Arthur wrote:
> In the end, I’ve decided not to accomplish this through nmh but rather
> use Diane Skoll’s remind program. I think it sums my needs better in
> the long run.

That's https://dianne.skoll.ca/projects/remind/

-- 
Cheers, Ralph.

-- 
nmh-workers
https://lists.nongnu.org/mailman/listinfo/nmh-workers

[nmh-workers] Flagging messages

2019-06-07 Thread Arthur Alinovi
My apologies for taking so long to respond. It was not intentional but one 
thing led to another and before I knew it more than  a week had gone by.

I’d like to thank all who responded, either directly to me or to the list.

In the end, I’ve decided not to accomplish this through nmh but rather use 
Diane Skoll’s remind program. I think it sums my needs better in the long run.

Reading through the archives it becomes clear that the people here know more 
than I ever will. To use an old cliche; most of you have forgotten more than 
I’ll ever know.

That said, again I appreciate the time people took to respond either directly 
to me or to the list/


-- 
nmh-workers
https://lists.nongnu.org/mailman/listinfo/nmh-workers

Re: [nmh-workers] Flagging messages

2019-05-27 Thread Andy Bradford
Thus said aalin...@riseup.net on Sat, 25 May 2019 10:37:17 -0400:

> Scenario:  you receive  an email  from  Geico informing  you your  car
> insurance payment  is due in  4 weeks. In mutt  or Apple Mail  you can
> flag that message so you're reminded of it each time you log in.

I'm not sure what "log in" means  in your environment. If you're using X
you could do something like this:

Identify a message for which you want a reminder

Use "mark -seq remind" to add the message to the remind sequence
or use "refile -link +Reminders" to link the message into a folder

Then in your .xsession you could place:

REMINDERS=`scan +folder -width 132 remind`
test "$REMINDERS" && xmessage -default okay -center -timeout 60 "$REMINDERS"

Or if using a folder:

REMINDERS=`scan +Reminders -width 132`
test "$REMINDERS" && xmessage -default okay -center -timeout 60 "$REMINDERS"

Then when  done you remove the  message from either the  sequence or the
folder.

Andy
-- 
TAI64 timestamp: 40005cec1f2e



-- 
nmh-workers
https://lists.nongnu.org/mailman/listinfo/nmh-workers


Re: [nmh-workers] Flagging messages

2019-05-27 Thread Ken Hornstein
>  | IBM mainfraimes with RECFM=FB, LRECL=80 (the classic format
>  | for punchcards)?  Don't forget the EBCDIC encoding fun :-)
>
>Oh, I know systems with fixed lenght records exist(ed).  The question
>was whether any of them actually did anything which pretended to be
>RFC822 format e-mail (and used fixed length record files to do it).

I remember those systems well, but AFAIK when they communicated via
email with the rest of the world they sent "standard" RFC 822 messages,
with no funny stuff like completely blank lines.  Well, besides the eternal
confusion of ASCII<->EBCDIC character mapping :-)

--Ken

-- 
nmh-workers
https://lists.nongnu.org/mailman/listinfo/nmh-workers


Re: [nmh-workers] Flagging messages

2019-05-27 Thread Wolfgang Denk
Dear Robert,

In message <5654.1558957...@jinx.noi.kre.to> you wrote:
>
> Yes, I'd forgotton that one.   Having lines which contain just spaces
> legal, and meaning something different than an empty line, played havoc
> on systems that did e-mail using fixed length space padded records.

IBM mainfraimes with RECFM=FB, LRECL=80 (the classic format
for punchcards)?  Don't forget the EBCDIC encoding fun :-)

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,  Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
"More software projects have gone awry for lack of calendar time than
for all other causes combined."
 - Fred Brooks, Jr., _The Mythical Man Month_

-- 
nmh-workers
https://lists.nongnu.org/mailman/listinfo/nmh-workers


Re: [nmh-workers] Flagging messages

2019-05-27 Thread Robert Elz
Date:Mon, 27 May 2019 16:04:40 +0200
From:Wolfgang Denk 
Message-ID:  <20190527140440.38680240...@gemini.denx.de>

  | IBM mainfraimes with RECFM=FB, LRECL=80 (the classic format
  | for punchcards)?  Don't forget the EBCDIC encoding fun :-)

Oh, I know systems with fixed lenght records exist(ed).  The question
was whether any of them actually did anything which pretended to be
RFC822 format e-mail (and used fixed length record files to do it).

kre


-- 
nmh-workers
https://lists.nongnu.org/mailman/listinfo/nmh-workers


Re: [nmh-workers] Flagging messages

2019-05-27 Thread Robert Elz
Date:Sun, 26 May 2019 21:39:00 -0400
From:Ken Hornstein 
Message-ID:  <20190527013904.40e6d61...@pb-smtp20.pobox.com>

  | Comments and white space, sadly, are still allowed in all sorts of
  | crazy places using the "Obsolete" syntax as of RFC 5322.

They should be recognised.   But generating that stuff has been
incorrect since 2822, which has to be close to 20 years ago
(if not more than that).

I kind of suspect that most things which generated any of that
have long perished (most of it was very rare, even in true 822
days - generally only from pedants, not from software).

I doubt anyone is going to care now if software stops processing
all of the obs-xxx syntax elements - about the only possible use
left is to handle ancient e-mail archives, on the assumption that
there are any still around which contain any of that stuff (it was
made obsolete because it was horrid, but also required that no-one
knew of anything active (back then) which actually used it).

  |In the obsolete syntax, any amount of folding white space MAY be
  |inserted where the obs-FWS rule is allowed.

Yes, I'd forgotton that one.   Having lines which contain just spaces
legal, and meaning something different than an empty line, played havoc
on systems that did e-mail using fixed length space padded records.
Assuming that there actually were any - they were rumored to exist,
but I don't reall ever talking to someone who had first hand experience
of such a thing.

kre


-- 
nmh-workers
https://lists.nongnu.org/mailman/listinfo/nmh-workers


Re: [nmh-workers] Flagging messages

2019-05-27 Thread Ralph Corderoy
Hi Valdis,

> Note that '--component pattern' has 'component' bolded as if it is a
> keyword rather than a user-supplied value.

Yes, that's wrong.  fmttest(1) too.

-- 
Cheers, Ralph.

-- 
nmh-workers
https://lists.nongnu.org/mailman/listinfo/nmh-workers


Re: [nmh-workers] Flagging messages

2019-05-26 Thread Ken Hornstein
Geez Valdis, I think we've talked about this before on this very list!

>So the grammar was changed to explicitly specify where spaces,
>and where comments, could be inserted (in the middle of a time
>is not one of them).   I don't recall whether before the ":"
>after a field-name is one of them however (I tend to assume not,
>and I should check, but...).

Comments and white space, sadly, are still allowed in all sorts of
crazy places using the "Obsolete" syntax as of RFC 5322.  From §4:

   One important difference between the obsolete (interpreting) and the
   current (generating) syntax is that in structured header field bodies
   (i.e., between the colon and the CRLF of any structured header
   field), white space characters, including folding white space, and
   comments could be freely inserted between any syntactic tokens.  This
   allowed many complex forms that have proven difficult for some
   implementations to parse.

Also, from §4.2:

   In the obsolete syntax, any amount of folding white space MAY be
   inserted where the obs-FWS rule is allowed.  This creates the
   possibility of having two consecutive "folds" in a line, and
   therefore the possibility that a line which makes up a folded header
   field could be composed entirely of white space.

Good times!

--Ken

-- 
nmh-workers
https://lists.nongnu.org/mailman/listinfo/nmh-workers

Re: [nmh-workers] Flagging messages

2019-05-26 Thread Robert Elz
Date:Sun, 26 May 2019 11:29:07 -0400
From:"Valdis Kl=?utf-8?Q?=c4=93?=tnieks" 
Message-ID:  <15456.1558884547@turing-police>

  | I even went back and checked rfc822, and it says:
  |
  |  field   =  field-name ":" [ field-body ] CRLF
  |  field-name  =  1*

Ah, the mysteries of RFC-822...

If you go back and really read that, you'll discover that you're
allowed to have horizontal white space (ie: spaces and tabs)
between any two tokens in the grammar, so when it writes

field-name ":" [ field-body ] CRLF

there can be whote space between the field-name and the ":", between
the ":" and the optional field-body (or the CRLF) and between the
optional field-body and the CRLF.

  | So what is that '[ \t]*' there for?

For that.   But it isn't really adequate (unless comments have
already been removed from the field) as anywhere that white space
is permitted, comments (strings in parentheses) are also permitted,
so RFC-822 permits

to (you should really read this message) : addr, ...
cc (for your information, if you care) : addr, ...

  | Does that ever actually happen?

Spaces, yes, it used to once - some people/mailers liked to line
up the colons so it all looked neat.   Back in the days when people were
generally show messages more or less raw.   Comments, not that I have
ever seen.   But it was rare, even back in the 70's and early 80's.

But I think 2822 or 5322 or something has tightened the rules,
certainly 2822 got rid of the "spaces or comments between any
two tokens" stuff, as if you look at it carefully, that allows
spaces (and comments) in some of the most bizarre places, like
around the ':' chars in a time
17 (hours) : (and) 23 (minutes) : (plus) 19 (seconds)
is a legal RFC-822 time.Almost nothing would correctly
parse that.

So the grammar was changed to explicitly specify where spaces,
and where comments, could be inserted (in the middle of a time
is not one of them).   I don't recall whether before the ":"
after a field-name is one of them however (I tend to assume not,
and I should check, but...).

kre


-- 
nmh-workers
https://lists.nongnu.org/mailman/listinfo/nmh-workers


Re: [nmh-workers] Flagging messages

2019-05-26 Thread Valdis Klētnieks
On Sun, 26 May 2019 10:12:56 +0100, Ralph Corderoy said:

> anno does have a -component option, but pick doesn't.
> I think you mean
>
> scan `pick --x-reminder bill`
>
> with the double dash.

Gaah.  And I even checked 'man pick' because I don't use 'pick' that often, so
figured I better double-check.  Which is why I screwed it up. ;)

Manpage quibble:

Note that '--component pattern'   has 'component' bolded as if it is a keyword
rather than a user-supplied value.  See image below.

Also... maybe I need to run out to the supermarket and get some more caffeine, 
but
this is still confusing me:

   The expression

`--component pattern'

   is a shorthand for specifying

`-search "component[ \t]*:.*pattern" '

I even went back and checked rfc822, and it says:

 field   =  field-name ":" [ field-body ] CRLF
 field-name  =  1*

So what is that '[ \t]*' there for?  Does that ever actually happen?




pgpbQ6tUa8Fe7.pgp
Description: PGP signature
-- 
nmh-workers
https://lists.nongnu.org/mailman/listinfo/nmh-workers

Re: [nmh-workers] Flagging messages

2019-05-26 Thread David Levine
Ralph wrote:

> You have seen scan(1) highlight the current message with a `+' after its
> number.  That's done using the, somewhat unique, formatting language
> that tests each message to see if it's the current one and output either
> a space or a plus depending.  You could reserve a column for `flagged'
> in a similar manner.

Or highlight with colors or other attributes that can be set using
terminal escape sequences, see scan.highlighted in the nmh etc
directory.

David

-- 
nmh-workers
https://lists.nongnu.org/mailman/listinfo/nmh-workers


Re: [nmh-workers] Flagging messages

2019-05-26 Thread Ralph Corderoy
Hi aalinovi,

> In mutt, new messages and messages that have been flagged are
> indicated in the sidebar.

You have seen scan(1) highlight the current message with a `+' after its
number.  That's done using the, somewhat unique, formatting language
that tests each message to see if it's the current one and output either
a space or a plus depending.  You could reserve a column for `flagged'
in a similar manner.

-- 
Cheers, Ralph.

-- 
nmh-workers
https://lists.nongnu.org/mailman/listinfo/nmh-workers


Re: [nmh-workers] Flagging messages

2019-05-26 Thread Ralph Corderoy
Hi Valdis,

> Hmm.. 'anno +folder cur -component X-Reminder -text "Pay This Bill"
> and then run   scan `pick -component X-Reminder`

anno does have a -component option, but pick doesn't.
I think you mean

scan `pick --x-reminder bill`

with the double dash.

The discrepancy is odd.  It suggests

anno --foo 'bar xyzzy'

should be allowed.

-- 
Cheers, Ralph.

-- 
nmh-workers
https://lists.nongnu.org/mailman/listinfo/nmh-workers


Re: [nmh-workers] Flagging messages

2019-05-25 Thread Valdis Klētnieks
On Sat, 25 May 2019 10:37:17 -0400, aalin...@riseup.net said:

> Is there a way to do something similar in nmh? If not how do nmh users handle
> such a situation?

Hmm.. 'anno +folder cur -component X-Reminder -text "Pay This Bill"

and then run   scan `pick -component X-Reminder`

Or   'refile +reminders cur -link'and then 'scan +reminders'

The latter may be more efficient, especially for large inboxes


pgpwxPPlxd103.pgp
Description: PGP signature
-- 
nmh-workers
https://lists.nongnu.org/mailman/listinfo/nmh-workers

Re: [nmh-workers] Flagging messages

2019-05-25 Thread aalinovi
 >  Hi aalinovi,
 >
 >  > Scenario: you receive an email from Geico informing you your car
 >  > insurance payment is due in 4 weeks. In mutt or Apple Mail you can
 >  > flag that message so you're reminded of it each time you log in.
 >
 >  How does it remind you?  A pop-up per message?  Highlighting then 
when
 >  you happen to list that folder?  Putting them at the top of the 
folder?

 In mutt, new messages and messages that have been flagged are 
indicated in the sidebar.
 Apple moves messages into a "Flagged" folder.

 >  > Is there a way to do something similar in nmh? If not how do nmh 
users
 >  > handle such a situation?
 
 And now that I think of it, I could easily do the same thing - keep 
the message in
 the Geico folder and link it to a "Flagged" folder. Then, a script 
could show the
 messages in the "Flagged" folder each time I logged in.
 
 Thanks

-- 
nmh-workers
https://lists.nongnu.org/mailman/listinfo/nmh-workers


Re: [nmh-workers] Flagging messages

2019-05-25 Thread Ralph Corderoy
Hi aalinovi,

> Scenario: you receive an email from Geico informing you your car
> insurance payment is due in 4 weeks. In mutt or Apple Mail you can
> flag that message so you're reminded of it each time you log in.

How does it remind you?  A pop-up per message?  Highlighting then when
you happen to list that folder?  Putting them at the top of the folder?

> Is there a way to do something similar in nmh? If not how do nmh users
> handle such a situation?

Well, I use at(1) to generate future reminder emails, but nmh methods
could include anno(1) to add a header to the email, or mark(1) to put it
in a sequence, and then your other nmh-wrapping commands from ~/bin
could pick(1) out that header, or use that sequence, to show you those
emails.  One could imagine ~/.profile scan(1)-ing them, for example.

-- 
Cheers, Ralph.

-- 
nmh-workers
https://lists.nongnu.org/mailman/listinfo/nmh-workers


[nmh-workers] Flagging messages

2019-05-25 Thread aalinovi
Scenario: you receive an email from Geico informing you your car insurance 
payment is due in
4 weeks. In mutt or Apple Mail you can flag that message so you're reminded of 
it each time you
log in.

Is there a way to do something similar in nmh? If not how do nmh users handle 
such a situation?

Thanks

-- 
nmh-workers
https://lists.nongnu.org/mailman/listinfo/nmh-workers