[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

From: Ken Hornstein
Subject: Re: [Nmh-workers] Conflict between "mime" command and attach
Date: Thu, 12 Dec 2013 15:56:42 -0500

>You pointed out,
>the two paths, starting with mbuild-directives and attach-headers, take
>a long time to converge and interfere.  "mime" runs mhbuild, job done.
>"attach" puts in the header which is seen late-on by post(8), and only
>then constructs mhbuild-directives and runs mhbuild.
>The attach-header is a subset of mhbuild functionality.  My suggestion
>to alter attach to append mhbuild-directives to the draft was driven by
>trying to merge the two paths earlier and without interference.

Alright, I can understand that, but that tells me that maybe a different
approach is needed.

>How about if `#' was configurable and could be multiple characters?  And
>that could further be overridden on a per-message basis by an

Hmm ... that just strikes me as too complicated.  I mean, it just feels
like the wrong thing.

>You're suggesting mhbuild runs on the "send".  Does "mime" then
>disappear since mhbuild isn't idempotent?  I'd like some way to inspect
>the results of my mhbuild-directives before the email hits the wire.
>Would that be a send option that feeds mhbuild-output to $PAGER and then

Well, let me make this alternate proposal:

- "attach" adds Nmh-Attachment headers as per usual.  Maybe we'll add
  something like: "attaching foo.pdf to message as application/pdf" so
  the user can see what MIME type is being used (really, that's all
  I care about).

- You can add or not add mhbuild directives to the message if you want.

- If you add mhbuild directives, you can run "mime" (also, you can run
  "mime" even if you don't). mhbuild will be in charge of processing
  Nmh-Attachment headers.  If there are mhbuild directives, they get
  added per usual; any content specified by Nmh-Attachment headers
  gets appended to the message after all other content.  This is a
  significant change to the _implementation_, but it feels like where
  that functionality should belong.

- If you try to "attach" after a "mime", you get an error.

- send runs "mhbuild -auto -nodirectives".  "-auto" means, "don't error
  out if there's a MIME-Version header, just don't process the draft".
  "-nodirectives" means "don't process directives".  But ... Nmh-Attachment
  headers are still processed.

How does that look?  More code rework, but it feels better.  Also, with this
I think it actually accomplishes what you want (attach + inspection).


reply via email to

[Prev in Thread] Current Thread [Next in Thread]