unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* Hiding HTML mime-parts and/or scrubbing (gmail's) HTML-based citation
@ 2011-02-22 18:19 Albin Stjerna
  2011-02-22 18:33 ` Daniel Kahn Gillmor
  0 siblings, 1 reply; 11+ messages in thread
From: Albin Stjerna @ 2011-02-22 18:19 UTC (permalink / raw)
  To: notmuch

[-- Attachment #1: Type: text/plain, Size: 1260 bytes --]

Hello, notmuch list!

I've noticed many email clients (gmail most notably) send all mails—even
when strictly unnecessary—both as html and as plain text MIME, making
them harder to read in standard (Emacs) notmuch—you get each message
two times!

Also, the html view doesn't handle citing very well, which is really bad
in the gmail case, since gmail encourages top-posting and ever-growing
stacks of citation through its design. And those aren't fun to scroll
through, to say the least. Also, I've seen a lot of encoding problems
with the html mime parts (umlauts replaced with »?« for example).

However, I do not want to hide /all/ html mime parts, since I'm
following a lot of RSS feeds through sluk, which sends them as (only)
html email (and no plain text).

As far as I can tell, there's two solutions to this:
1. not showing the html mime part if there's also a plain-text part or
2. teaching notmuch's citation-scrubbing feature (hook?) to recognize
   citations in html as well, most urgently gmail's.

Have any of these two solutions been attempted by anyone?

Thanks in advance,
 Albin

P.S. I'm sorry I first sent this email from the wrong address, I think
I've cancelled my waiting for moderator approval now.

[-- Attachment #2: Type: application/pgp-signature, Size: 489 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Hiding HTML mime-parts and/or scrubbing (gmail's) HTML-based citation
  2011-02-22 18:19 Hiding HTML mime-parts and/or scrubbing (gmail's) HTML-based citation Albin Stjerna
@ 2011-02-22 18:33 ` Daniel Kahn Gillmor
  2011-02-22 19:42   ` Albin Stjerna
  0 siblings, 1 reply; 11+ messages in thread
From: Daniel Kahn Gillmor @ 2011-02-22 18:33 UTC (permalink / raw)
  To: Albin Stjerna; +Cc: notmuch

[-- Attachment #1: Type: text/plain, Size: 967 bytes --]

On 02/22/2011 01:19 PM, Albin Stjerna wrote:
> As far as I can tell, there's two solutions to this:
> 1. not showing the html mime part if there's also a plain-text part or
> 2. teaching notmuch's citation-scrubbing feature (hook?) to recognize
>    citations in html as well, most urgently gmail's.

i think the correct solution would have nothing to do with text/html vs
text/plain, but would have to do with whether the message is
multipart/mixed or multipart/alternative.

for multipart/alternative messages, a reasonable MUA will select exactly
one of the alternatives for presentation (possibly allowing the user to
switch to other variants).

for multipart/mixed messages, a reasonable MUA should attempt to render
all parts of the message (though it may choose to avoid rendering parts
marked with Content-Disposition: attachment, making these parts
available to the user for saving locally or rendering, at the user's
option).

	--dkg


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 1030 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Hiding HTML mime-parts and/or scrubbing (gmail's) HTML-based citation
  2011-02-22 18:33 ` Daniel Kahn Gillmor
@ 2011-02-22 19:42   ` Albin Stjerna
  2011-02-22 19:59     ` Daniel Kahn Gillmor
  0 siblings, 1 reply; 11+ messages in thread
From: Albin Stjerna @ 2011-02-22 19:42 UTC (permalink / raw)
  To: Daniel Kahn Gillmor; +Cc: notmuch

[-- Attachment #1: Type: text/plain, Size: 570 bytes --]

On Tue, 22 Feb 2011 13:33:56 -0500, Daniel Kahn Gillmor <dkg@fifthhorseman.net> wrote:
> i think the correct solution would have nothing to do with text/html vs
> text/plain, but would have to do with whether the message is
> multipart/mixed or multipart/alternative.

Thanks for pointing that out — I see my poor knowledge of MIME is showing.

Of course, that sounds like the correct thing to do. However, I'm
looking for a (reasonably) quick fix, and what you're suggesting sounds
like a re-design of at least a part of the MUA. Isn't there an easier way?

[-- Attachment #2: Type: application/pgp-signature, Size: 489 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Hiding HTML mime-parts and/or scrubbing (gmail's) HTML-based citation
  2011-02-22 19:42   ` Albin Stjerna
@ 2011-02-22 19:59     ` Daniel Kahn Gillmor
  2011-02-23  1:13       ` Rob Browning
  2011-02-23 14:10       ` Albin Stjerna
  0 siblings, 2 replies; 11+ messages in thread
From: Daniel Kahn Gillmor @ 2011-02-22 19:59 UTC (permalink / raw)
  To: Albin Stjerna; +Cc: notmuch

[-- Attachment #1: Type: text/plain, Size: 1237 bytes --]

On 02/22/2011 02:42 PM, Albin Stjerna wrote:
> On Tue, 22 Feb 2011 13:33:56 -0500, Daniel Kahn Gillmor <dkg@fifthhorseman.net> wrote:
>> i think the correct solution would have nothing to do with text/html vs
>> text/plain, but would have to do with whether the message is
>> multipart/mixed or multipart/alternative.
> 
> Thanks for pointing that out — I see my poor knowledge of MIME is showing.
> 
> Of course, that sounds like the correct thing to do. However, I'm
> looking for a (reasonably) quick fix, and what you're suggesting sounds
> like a re-design of at least a part of the MUA. Isn't there an easier way?

I'm running the crypto branch (from jrollins, available at
git://finestructure.net/notmuch ), which incorporates dme's multipart
MIME overhaul.

For me, messages from gmail users show up like this:

--------------------
[ multipart/alternative ]
[ text/plain ]
 blah blah


[ text/html (not shown) ]
--------------------

this is how i like it, though it appears i'm only able to save the
text/html part to a file, rather than force it through whatever html
renderer notmuch would otherwise use (even with M-x
notmuch-show-view-all-mime-parts, which surprises me a bit).

	--dkg


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 1030 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Hiding HTML mime-parts and/or scrubbing (gmail's) HTML-based citation
  2011-02-22 19:59     ` Daniel Kahn Gillmor
@ 2011-02-23  1:13       ` Rob Browning
  2011-02-26 23:57         ` Xavier Maillard
  2011-02-23 14:10       ` Albin Stjerna
  1 sibling, 1 reply; 11+ messages in thread
From: Rob Browning @ 2011-02-23  1:13 UTC (permalink / raw)
  To: notmuch

Daniel Kahn Gillmor <dkg@fifthhorseman.net> writes:

> On 02/22/2011 02:42 PM, Albin Stjerna wrote:
>> On Tue, 22 Feb 2011 13:33:56 -0500, Daniel Kahn Gillmor <dkg@fifthhorseman.net> wrote:
>>> i think the correct solution would have nothing to do with text/html vs
>>> text/plain, but would have to do with whether the message is
>>> multipart/mixed or multipart/alternative.
>> 
>> Thanks for pointing that out — I see my poor knowledge of MIME is showing.
>> 
>> Of course, that sounds like the correct thing to do. However, I'm
>> looking for a (reasonably) quick fix, and what you're suggesting sounds
>> like a re-design of at least a part of the MUA. Isn't there an easier way?
>

> this is how i like it, though it appears i'm only able to save the
> text/html part to a file, rather than force it through whatever html
> renderer notmuch would otherwise use (even with M-x
> notmuch-show-view-all-mime-parts, which surprises me a bit).

The "Display Customization" section in the emacs/mime info pages might
also be interesting.  i.e. at the moment I use
mm-discouraged-alternatives like this (via Gnus):

  (setq mm-discouraged-alternatives
        '("text/html" "text/richtext")
        mm-automatic-display
        (remove "text/html" mm-automatic-display))

Though it's been so long since I set that up, I can't describe exactly
what it does off the top of my head, but I originally set it up to help
quash the display of html alternatives.

-- 
Rob Browning
rlb @defaultvalue.org and @debian.org
GPG as of 2002-11-03 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Hiding HTML mime-parts and/or scrubbing (gmail's) HTML-based citation
  2011-02-22 19:59     ` Daniel Kahn Gillmor
  2011-02-23  1:13       ` Rob Browning
@ 2011-02-23 14:10       ` Albin Stjerna
  2011-02-23 19:01         ` Jameson Rollins
  1 sibling, 1 reply; 11+ messages in thread
From: Albin Stjerna @ 2011-02-23 14:10 UTC (permalink / raw)
  To: Daniel Kahn Gillmor; +Cc: notmuch

[-- Attachment #1: Type: text/plain, Size: 395 bytes --]

On Tue, 22 Feb 2011 14:59:03 -0500, Daniel Kahn Gillmor <dkg@fifthhorseman.net> wrote:

> I'm running the crypto branch (from jrollins, available at
> git://finestructure.net/notmuch ), which incorporates dme's multipart
> MIME overhaul.

Ah. I've now built and installed that one, and it works as you described
it. Thanks!

Is there a plan for the inclusion of this branch in mainline notmuch?

[-- Attachment #2: Type: application/pgp-signature, Size: 489 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Hiding HTML mime-parts and/or scrubbing (gmail's) HTML-based citation
  2011-02-23 14:10       ` Albin Stjerna
@ 2011-02-23 19:01         ` Jameson Rollins
  2011-02-27  0:00           ` Xavier Maillard
  0 siblings, 1 reply; 11+ messages in thread
From: Jameson Rollins @ 2011-02-23 19:01 UTC (permalink / raw)
  To: Albin Stjerna; +Cc: notmuch

[-- Attachment #1: Type: text/plain, Size: 682 bytes --]

On Wed, 23 Feb 2011 15:10:22 +0100, Albin Stjerna <albin@eval.nu> wrote:
> On Tue, 22 Feb 2011 14:59:03 -0500, Daniel Kahn Gillmor <dkg@fifthhorseman.net> wrote:
> 
> > I'm running the crypto branch (from jrollins, available at
> > git://finestructure.net/notmuch ), which incorporates dme's multipart
> > MIME overhaul.
> 
> Ah. I've now built and installed that one, and it works as you described
> it. Thanks!
> 
> Is there a plan for the inclusion of this branch in mainline notmuch?

Carl has expressed interest in the crypto work, but he hasn't commented
on the work in that branch directly yet.  I will certainly continue to
push for it's inclusion.

jamie.

[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Hiding HTML mime-parts and/or scrubbing (gmail's) HTML-based citation
  2011-02-23  1:13       ` Rob Browning
@ 2011-02-26 23:57         ` Xavier Maillard
  0 siblings, 0 replies; 11+ messages in thread
From: Xavier Maillard @ 2011-02-26 23:57 UTC (permalink / raw)
  To: Rob Browning, notmuch

Hi Rob,

On Tue, 22 Feb 2011 19:13:26 -0600, Rob Browning <rlb@defaultvalue.org> wrote:

> The "Display Customization" section in the emacs/mime info pages might
> also be interesting.  i.e. at the moment I use
> mm-discouraged-alternatives like this (via Gnus):
> 
>   (setq mm-discouraged-alternatives
>         '("text/html" "text/richtext")
>         mm-automatic-display
>         (remove "text/html" mm-automatic-display))

Doest it have any action on notmuch.el buffers or is it just some
GNUS/Mime specific setup ?

Thank you

/Xavier

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Hiding HTML mime-parts and/or scrubbing (gmail's) HTML-based citation
  2011-02-23 19:01         ` Jameson Rollins
@ 2011-02-27  0:00           ` Xavier Maillard
  2011-02-27  0:27             ` running the crypto branch [was: Re: Hiding HTML mime-parts and/or scrubbing (gmail's) HTML-based citation] Jameson Rollins
  0 siblings, 1 reply; 11+ messages in thread
From: Xavier Maillard @ 2011-02-27  0:00 UTC (permalink / raw)
  To: Jameson Rollins, Albin Stjerna; +Cc: notmuch

Hi,

On Wed, 23 Feb 2011 11:01:27 -0800, Jameson Rollins <jrollins@finestructure.net> wrote:
> On Wed, 23 Feb 2011 15:10:22 +0100, Albin Stjerna <albin@eval.nu> wrote:
> > On Tue, 22 Feb 2011 14:59:03 -0500, Daniel Kahn Gillmor <dkg@fifthhorseman.net> wrote:
> > 
> > > I'm running the crypto branch (from jrollins, available at
> > > git://finestructure.net/notmuch ), which incorporates dme's multipart
> > > MIME overhaul.
> > 
> > Ah. I've now built and installed that one, and it works as you described
> > it. Thanks!
> > 
> > Is there a plan for the inclusion of this branch in mainline notmuch?
> 
> Carl has expressed interest in the crypto work, but he hasn't commented
> on the work in that branch directly yet.  I will certainly continue to
> push for it's inclusion.

What is the easy way to switch to your codebase from notmuch mainline ?
I mean, what exact commands do we need to type in order to use your
branch code ? Knowing that would certainly help people in switching and
testing your code.

Thank you

/Xavier

^ permalink raw reply	[flat|nested] 11+ messages in thread

* running the crypto branch [was: Re: Hiding HTML mime-parts and/or scrubbing (gmail's) HTML-based citation]
  2011-02-27  0:00           ` Xavier Maillard
@ 2011-02-27  0:27             ` Jameson Rollins
  2011-02-28 13:32               ` Xavier Maillard
  0 siblings, 1 reply; 11+ messages in thread
From: Jameson Rollins @ 2011-02-27  0:27 UTC (permalink / raw)
  To: Xavier Maillard, Albin Stjerna; +Cc: notmuch

[-- Attachment #1: Type: text/plain, Size: 1500 bytes --]

On Sun, 27 Feb 2011 01:00:08 +0100, Xavier Maillard <xavier@maillard.im> wrote:
> What is the easy way to switch to your codebase from notmuch mainline ?
> I mean, what exact commands do we need to type in order to use your
> branch code ? Knowing that would certainly help people in switching and
> testing your code.

Hey, Xavier.  Thanks for asking.  Here's what I would suggest:

1. Add my public repo as a remote in your notmuch git repository:

$ git remote add jrollins git://finestructure.net/notmuch

2. Update your remotes to pull in the remote branches

$ git remote update

At this point you should see my public branches as remote-tracking
branches in your repository, e.g.:

$ git branch -a
...
  remotes/jrollins/crypto
  remotes/jrollins/master
  remotes/jrollins/personal

3. Check out my crypto branch into a local branch:

$ git checkout --track jrollins/crypto

This will put you in a new local branch in your repository called
"crypto" that will be tracking my public crypto branch.

4. Compile notmuch in the crypto branch and install it, however you
usually do.  I do something like this:

./configure --prefix=~/opt/notmuch
make
make test
make install

I then run notmuch in emacs like this:

export LD_LIBRARY_PATH=~/opt/notmuch/lib:$LD_LIBRARY_PATH
emacs -L ~/opt/notmuch/share/emacs/site-lisp -f notmuch

I hope that helps.  Please let me know if you have any other questions.
And of course we'd love to hear any and all feedback on the new
cryptographic features!

jamie.

[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: running the crypto branch [was: Re: Hiding HTML mime-parts and/or scrubbing (gmail's) HTML-based citation]
  2011-02-27  0:27             ` running the crypto branch [was: Re: Hiding HTML mime-parts and/or scrubbing (gmail's) HTML-based citation] Jameson Rollins
@ 2011-02-28 13:32               ` Xavier Maillard
  0 siblings, 0 replies; 11+ messages in thread
From: Xavier Maillard @ 2011-02-28 13:32 UTC (permalink / raw)
  To: Jameson Rollins, Albin Stjerna; +Cc: notmuch

Hey Jamie,

On Sat, 26 Feb 2011 16:27:35 -0800, Jameson Rollins <jrollins@finestructure.net> wrote:
> On Sun, 27 Feb 2011 01:00:08 +0100, Xavier Maillard <xavier@maillard.im> wrote:
> > What is the easy way to switch to your codebase from notmuch mainline ?
> > I mean, what exact commands do we need to type in order to use your
> > branch code ? Knowing that would certainly help people in switching and
> > testing your code.

> I hope that helps.  Please let me know if you have any other
> questions.

It is crystal clear ! I have noew switched to your crypto branch. Thank
you.

> And of course we'd love to hear any and all feedback on the new
> cryptographic features!

I will report as soon as I have discovered all the new stuff.

/Xavier

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2011-02-28 13:22 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-22 18:19 Hiding HTML mime-parts and/or scrubbing (gmail's) HTML-based citation Albin Stjerna
2011-02-22 18:33 ` Daniel Kahn Gillmor
2011-02-22 19:42   ` Albin Stjerna
2011-02-22 19:59     ` Daniel Kahn Gillmor
2011-02-23  1:13       ` Rob Browning
2011-02-26 23:57         ` Xavier Maillard
2011-02-23 14:10       ` Albin Stjerna
2011-02-23 19:01         ` Jameson Rollins
2011-02-27  0:00           ` Xavier Maillard
2011-02-27  0:27             ` running the crypto branch [was: Re: Hiding HTML mime-parts and/or scrubbing (gmail's) HTML-based citation] Jameson Rollins
2011-02-28 13:32               ` Xavier Maillard

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).