From: David Edmondson <dme@dme.org>
To: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>
Cc: notmuch <notmuch@notmuchmail.org>
Subject: Re: [PATCH v2] emacs: Make the part content available to the mm-inline* checks.
Date: Thu, 19 Jan 2012 07:39:32 +0000 [thread overview]
Message-ID: <cunboq06szv.fsf@hotblack-desiato.hh.sledj.net> (raw)
In-Reply-To: <874nvs96ps.fsf@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1798 bytes --]
On Wed, 18 Jan 2012 23:00:15 +0400, Dmitry Kurochkin <dmitry.kurochkin@gmail.com> wrote:
> > That would allow a sane default (("image/*" "text/*") perhaps), but also
> > allow more to be added to that list (or some to be removed), either by
> > code that detected the (in)ability to render it or the user.
>
> Perhaps there is such a list in mm already?
There's a function which does almost exactly this - `mm-inlinable-p'. It
has a list of types and tests, `mm-inline-media-tests'. Some of those
tests require access to the part content to decide if the part is
inlinable. Many of them don't. The image/jpeg test _does_ want access to
the part content.
We're already using this function, of course.
`mm-inlined-p' is the corresponding "does the user want this part
inlined" test. It's much simpler and never looks at the part content.
Currently we merge those tests into one:
(if (and (mm-inlinable-p handle)
(mm-inlined-p handle))
and have acquired part content either before or after the combined test.
Perhaps we could test `mm-inlined-p' first, then insert the content,
then test `mm-inlinable-p'? That way we would not acquire the content
for parts for which the user (or code) has selected not to inline the
content.
Currently `mm-inlined-p' suggests that the following should be inlined
by default:
"image/.*" "text/.*" "message/delivery-status" "message/rfc822"
"message/partial" "message/external-body" "application/emacs-lisp"
"application/x-emacs-lisp" "application/pgp-signature"
"application/x-pkcs7-signature" "application/pkcs7-signature"
"application/x-pkcs7-mime" "application/pkcs7-mime"
These are the only types for which we'd acquire the part content for
examination by `mm-inlinable-p' (by default).
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
next prev parent reply other threads:[~2012-01-19 7:39 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-18 17:33 [PATCH] emacs: Make the part content available to the mm-inline* checks David Edmondson
2012-01-18 17:35 ` David Edmondson
2012-01-18 17:39 ` [PATCH v2] " David Edmondson
2012-01-18 18:04 ` Dmitry Kurochkin
2012-01-18 18:30 ` David Edmondson
2012-01-18 19:00 ` Dmitry Kurochkin
2012-01-18 19:35 ` Austin Clements
2012-01-18 19:59 ` Dmitry Kurochkin
2012-01-20 20:13 ` Jameson Graef Rollins
2012-01-23 8:00 ` David Edmondson
2012-01-19 7:39 ` David Edmondson [this message]
2012-01-19 9:23 ` Dmitry Kurochkin
2012-01-19 9:34 ` [PATCH] emacs: Make the part content available to `mm-inlinable-p' David Edmondson
2012-01-19 9:37 ` Dmitry Kurochkin
2012-01-19 17:31 ` Aaron Ecay
2012-01-20 14:18 ` Tomi Ollila
2012-01-20 20:04 ` Jameson Graef Rollins
2012-01-23 8:02 ` David Edmondson
2012-01-26 12:28 ` David Bremner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cunboq06szv.fsf@hotblack-desiato.hh.sledj.net \
--to=dme@dme.org \
--cc=dmitry.kurochkin@gmail.com \
--cc=notmuch@notmuchmail.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).