Re: [PATCH 00/32] [emacs] Add outline headings and switch to lexical scope

2020-12-30 Thread Jonas Bernoulli
Tomi Ollila  writes:

> The patch series did not apply for me (fully) anymore.

Since you got it applied now I am not sending a second iteration just
yet, or should I?

By the way, a regularly rebased version can be found in the "pending"
branch at https://github.com/tarsiiformes/notmuch.git.  Currently it
ends with two additional commits that are not from this patch series but
which I have submitted separately (their commit messages are prefixed
with "[copy]").

> I like the series (on paper), 2 comments

:D

> In patch 23/32, line

Fixed

> Then, I personally don't see enough point for requiring subr-x
> just just for changing (string= foo "") to (string-empty-p). If
> there were more features picked from subr-x then that would be
> different...

I was on the fence about that too.  I left it in for now but have
no problems removing it before merge.

 Thanks for taking a look,
 Jonas
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


Re: filtering headers from forwarded messages

2020-12-30 Thread Teemu Likonen
* 2020-12-24 12:56:09-0500, Daniel Kahn Gillmor wrote:

>> On Wed 2020-01-08 10:25:50 -0500, Daniel Kahn Gillmor wrote:
>>> Thanks for the pointer! it looks like
>>> message-forward-{ignored,included}-headers should do (roughly) what
>>> i want. I'll try them out.

> Hm, it now looks to me like message-forward-ignored-headers isn't
> working since i upgraded to emacs 27.1. In particular, since:
>
> https://lists.defectivebydesign.org/archive/html/emacs-diffs/2018-04/msg00135.html

I don't know any automatic way to remove headers from an email message
that is stored as a MIME part.

When a forwarded message is stored as inline text (setq
message-forward-as-mime nil) then the message is rendered at the time of
composing the message. Unnecessary headers are removed, character
encodings are decoded etc.

When the forwarded message is stored as MIME type "message/rfc822" (setq
message-forward-as-mime t) then the message is meant to be rendered by
the receiver's email program which will decode all necessary headers,
especially MIME headers, convert between character sets and pretty-print
the message's headers and some of the MIME "text/*" parts.

Filtering or editing headers of email MIME part (message/rfc822) can be
tricky: there are message's main headers which tell the "Content-Type"
of the body, and the body can contain different MIME parts with some of
their own headers. If we filter too much or convert between character
sets the message is not proper message/rfc822 part anymore and can't be
rendered correctly.

What about forwarding a message as MIME part which is just "text/plain"
(and not "message/rfc822")? At least this can be done by setting (setq
message-forward-as-mime nil) and manually inserting Emacs MML tags in
the (notmuch-)message-mode buffer:

C-c RET p text/plain RET

or calling from Lisp code:

(mml-insert-part "text/plain")

The inserted MML tags need to be put manually around the forwarded
message. With some hackery one could write a semi-automatic function for
that.

-- 
/// Teemu Likonen - .-.. https://www.iki.fi/tlikonen/
// OpenPGP: 4E1055DC84E9DFF613D78557719D69D324539450


signature.asc
Description: PGP signature
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org