Re: [Nmh-workers] Line wrapping in mhl

2012-01-26 Thread Valdis . Kletnieks
On Thu, 26 Jan 2012 10:22:26 PST, Bill Wohler said:

 Definitely need to treat quoted text ( or some supercite format) as
 pre-formatted text and not touch it.

Debatable.  I've had to reply to far too many e-mails that contained
 some sort of line that went on for ever and ever off the right side of the 
 screen, because somebody was using a mail client that didn't tag it as 
 format=flowed, and the next person's MUA quoted the long line, leaving me 
 with a quoted long line to deal with.

:)

Probably is correct to not reflow it by default, but you really need
to have a provision to allow it when requested.



pgpqknaDKeACz.pgp
Description: PGP signature
___
Nmh-workers mailing list
Nmh-workers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/nmh-workers


Re: [Nmh-workers] Line wrapping in mhl

2012-01-26 Thread Paul Vixie
On 1/26/2012 6:43 PM, valdis.kletni...@vt.edu wrote:
 Probably is correct to not reflow it by default, but you really need
 to have a provision to allow it when requested.

given lproc and moreproc, isn't the MH way to do this something like
parproc?


___
Nmh-workers mailing list
Nmh-workers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/nmh-workers


Re: [Nmh-workers] Line wrapping in mhl

2012-01-26 Thread Ken Hornstein
I'm more of the opinion that mhl *should* do some basic line wrapping,
but with the option to instead invoke an external app that might be
able to do a better job. I don't have a massively strong objection to
not doing so, but it seems wrong to be shipping mhl in essentially a
broken state. I know we've been doing so since forever, but I'd like
the out of the box behaviour to be good, even if a bit of customization
to call external utilities could make it better.

Okay, I understand your point.  I'm just thinking ... ew, that code
is a mess, and I'm not crazy about making it worse.  Specifically,
the line break happens inside of uip/mhlsbr.c:putch().  The
decision to make the line break happens on a per-character basis
so reworking that all is going to be some digging.  I think I'm
going to have to invoke the someone can gladly tackle that, as
long as it's not me rule. :-)

Other people have asked about pulling par into nmh; that feels wrong to
me.  As Lyndon pointed out more isn't part of nmh either.  Calling
out to another program which already does this is more like the toolset
philosophy that makes MH powerful.

So what I'm thinking is twofold:

- An option to disable any kind of line breaking in mhl.
- An option to filter mhl content through a program.  I'm thinking maybe
  a flag like format and using a mh_profile entry called formatproc.

Sounds good?

--Ken

___
Nmh-workers mailing list
Nmh-workers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/nmh-workers


Re: [Nmh-workers] Line wrapping in mhl

2012-01-26 Thread Paul Vixie
On 1/26/2012 7:35 PM, Ken Hornstein wrote:
 ... So what I'm thinking is twofold: - An option to disable any kind
 of line breaking in mhl. - An option to filter mhl content through a
 program. I'm thinking maybe a flag like format and using a
 mh_profile entry called formatproc. Sounds good? --Ken

+1.


___
Nmh-workers mailing list
Nmh-workers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/nmh-workers


Re: [Nmh-workers] Line wrapping in mhl

2012-01-26 Thread Jerrad Pierce
Quoth Lyndon:
Par isn't part of nmh any more than 'less' is.
My point was that if there's an existing tool we recommend deferring the
heavy lifting to, particularly something that is not part of a standard
*nx kit, maybe it should be included in the distro.

Quoth Valdis:
given lproc and moreproc, isn't the MH way to do this something like
parproc?
Probably fmtproc (formatproc) if fmt is standard , and then we can
simply recommend par over fmt without actually bundling it...

Might be worth mirroring though?

___
Nmh-workers mailing list
Nmh-workers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/nmh-workers


Re: [Nmh-workers] Line wrapping in mhl

2012-01-26 Thread Valdis . Kletnieks
On Thu, 26 Jan 2012 14:35:42 EST, Ken Hornstein said:

 - An option to disable any kind of line breaking in mhl.
 - An option to filter mhl content through a program.  I'm thinking maybe
   a flag like format and using a mh_profile entry called formatproc.

GIven those two, I think I've convinced myself that we can synthesize
all the different needed behaviors.


pgpvJFZOiMXeQ.pgp
Description: PGP signature
___
Nmh-workers mailing list
Nmh-workers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/nmh-workers


Re: [Nmh-workers] Line wrapping in mhl

2012-01-26 Thread Howard Bampton
On Thu, Jan 26, 2012 at 3:04 PM, Paul Vixie vi...@isc.org wrote:
 On 1/26/2012 7:35 PM, Ken Hornstein wrote:
 ... So what I'm thinking is twofold: - An option to disable any kind
 of line breaking in mhl. - An option to filter mhl content through a
 program. I'm thinking maybe a flag like format and using a
 mh_profile entry called formatproc. Sounds good? --Ken

 +1.

Concur. An easy way to do it that doesn't involve me hacking a vi
macro or the like would be my preferred solution.

___
Nmh-workers mailing list
Nmh-workers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/nmh-workers


Re: [Nmh-workers] Line wrapping in mhl

2012-01-25 Thread Joel Uckelman
Thus spake Howard Bampton:
 On Wed, Jan 25, 2012 at 4:48 PM, Tethys sta...@astradyne.co.uk wrote:
 
  I swear by par and use it every day. It's basically just fmt(1) that
  understands quoting and handles it properly (as well as having a more
  intelligent line breaking algorithm).
 
 I agree that par does the job well, and use it often.

How are you guys using par calling it? From a script? manually?

-- 
J.

___
Nmh-workers mailing list
Nmh-workers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/nmh-workers


Re: [Nmh-workers] Line wrapping in mhl

2012-01-25 Thread Ralph Corderoy
Hi,

As an aside, I use repl's -format, i.e. each line prefixed with ` '
with no wrapping and so no issues, and then use vim's normal built-in
formatting to handle getting the line length down once I've done by
trimming of the quoted text to just what's pertinent.  I have to format
my text anyway so formatting the quoted stuff isn't a big deal, in fact
it happens almost as a side effect of proof-reading the draft with `gq}'
for the first paragraph and `.' for the others.

par's man page is fun.  :-)

Cheers, Ralph.

___
Nmh-workers mailing list
Nmh-workers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/nmh-workers


Re: [Nmh-workers] Line wrapping in mhl

2012-01-25 Thread Tethys

Joel Uckelman writes:

How are you guys using par calling it? From a script? manually?

From within vi:

!}par

or
!Gpar

Tet

___
Nmh-workers mailing list
Nmh-workers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/nmh-workers


Re: [Nmh-workers] Line wrapping in mhl

2012-01-25 Thread Simon Burge
Tethys wrote:

 
 Joel Uckelman writes:
 
 How are you guys using par calling it? From a script? manually?
 
 From within vi:
 
   !}par
 
 or
   !Gpar

I use it in vi as well, and have the following in my .exrc:

   parse the entire paragraph through par - an fmt replacement
map * {!}par^M}j
   parse paragraph though par with user supplied arguments
map   {!}par

(note the ^M above is an actual carriage return).  I then just press *
in the middle of a paragraph to reformat it, and it leaves me at the
start of the next paragraph.  Repeatedly pressing * then lets me format
sequential paragraphs.  I use  very rarely.

I then have

PARINIT=rTbgqR B=.,?_A_a Q=_s|

in my environment.  It's been that way for a decade or more, and I don't recall
what many of those mean anymore :).

Cheers,
Simon.

___
Nmh-workers mailing list
Nmh-workers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/nmh-workers


Re: [Nmh-workers] Line wrapping in mhl

2012-01-25 Thread Ken Hornstein
My replgroupcomps is broadly similar to the system one.  I think it's
the -format that stops the wrapping;  repl(1):

No, definitely not.  I just tried that on a message with long lines and
it did the same crappy line wrapping.  And I've been inside of that code
today and I can't see of a way to turn off line wrapping either.

Dumb questions time:

- How wide is your terminal?
- Do you ever reply to messages that have lines longer than your terminal
  width?

--Ken

___
Nmh-workers mailing list
Nmh-workers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/nmh-workers


Re: [Nmh-workers] Line wrapping in mhl

2012-01-25 Thread Ralph Corderoy
Hi Ken,

  My replgroupcomps is broadly similar to the system one.  I think
  it's the -format that stops the wrapping;  repl(1):
 
 No, definitely not.  I just tried that on a message with long lines
 and it did the same crappy line wrapping.  And I've been inside of
 that code today and I can't see of a way to turn off line wrapping
 either.

You're quite right, I'm sorry to mislead.  Clearly my main terminal is
wide enough (100) to not cause the wrap often, and when it does I've
blamed something else, deleted what mhl has produced with `!Gshow -nos'
or `!Gmhshow', and Ctrl-V'd in the ` ' myself.

Cheers, Ralph.

___
Nmh-workers mailing list
Nmh-workers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/nmh-workers


Re: [Nmh-workers] Line wrapping in mhl

2012-01-25 Thread rader

  My replgroupcomps is broadly similar to the system one.  I think it's
  the -format that stops the wrapping;  repl(1):
  
  No, definitely not.  I just tried that on a message with long lines and
  it did the same crappy line wrapping.  And I've been inside of that code
  today and I can't see of a way to turn off line wrapping either.
  
  Dumb questions time:
  
  - How wide is your terminal?
  - Do you ever reply to messages that have lines longer than your terminal
width?

Aside from Ken's dumb questions, isn't width= a dump answer?

steve
--


___
Nmh-workers mailing list
Nmh-workers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/nmh-workers


Re: [Nmh-workers] Line wrapping in mhl

2012-01-25 Thread Ken Hornstein
Alright, so let me see if I can read the mood of the room ...

People aren't so crazy about adding more text formatting smarts to mhl;
that makes sense to me, I think whatever code I add wouldn't be as good
as something like fmt or par, and that's keeping with the toolset idea
of nmh.

So here's what I'm thinking might be useful:

- Create a filter option to disable the line wrapping inside of mhl.

- Create a filter option to run the body of the message through an external
  filter program.  Actually, it occurs to me that it would be easy enough to
  generalize this so it could be any component.  I am thinking that this
  would happen before the insertion of any prefix characters.

The only wrinkle I see about this in the future is that par currently doesn't
support UTF-8 (there's a patch which claims to do so ... maybe I should
bug the author of par about that).

Thoughts?

--Ken

___
Nmh-workers mailing list
Nmh-workers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/nmh-workers