nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] Conflict between "mime" command and attach

2013-12-12 23:43:56
Jon wrote:

Ken writes:
[David wrote:]
It depends on priorities:  I'd rather be able to customize
an attachment than manually insert a simple Nmh-Attachment
header (I think that's the option you mention).  I've never
done that.

It's just that when I hear the word "customize", I ask the question:
"If you want to customize your MIME content, why aren't you just adding
a mhbuild directive to your draft?"  What are you customizing, exactly?

See examples below.

Also, the semantics behind:

Nmh-Attachment: foo.pdf

are clear to me as a casual user.

The semantics behind:

Nmh-Attachment: #application/pdf {attachment} foo.pdf

are less clear to me and requires me to parse the BNF in the mhbuild
man page.

There's no need for any user to look at it if they don't
want to.  But for anything that attach doesn't do, I'll need
to understand mhbuild directives anyway.  If attach gives me
something valid to start with, that helps a lot, even for
avoiding simple syntax errors.

Also, more to get wrong!  The only reason I want an
Nmh-Attachment header to cause a failure is from being
unable to read the file.

--Ken

I agree with Ken here.  I do want to point out that the attach command
reports an error if it can't attach a file.  So the only time you'd get
an error from send is if the file vanishes between the "at" and the "s".
Pretty small window.  Is this a real problem or just theoretical?

A disappearing or unreadable file can happen with mhbuild or
any other attachment mechanism.

And if I understand Ken's proposal, it'll let me do this:

   What now? attach foo

   What now? mime

If there's no error, I have verified that mhbuild was able
to find and read foo.  So I'll no longer postpone file
access failure to send.  And I can run edit again and
view/change the mhbuild result.  All good.

The problem is the gap between attach and mhbuild.  We've
had the examples raised in this thread of wanting to add a
character encoding and override the MIME type that attach
uses for plain text files.  The only way to get those at
this point (both now and with the current proposal) is to
use mhbuild instead of attach.

If attach used the mhbuild directive instead of the path,
I'd get the best of both.  It would produce a valid mhbuild
directive (it already does that).  It's much easier for me
to change the MIME type or add a charset to that directive
than it is for me to create it one entirely from scratch.

Ken's proposal doesn't require or depend on this.

David

_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
https://lists.nongnu.org/mailman/listinfo/nmh-workers

<Prev in Thread] Current Thread [Next in Thread>