Commit Graph

86 Commits

Author SHA1 Message Date
djcb 08f2bb2ef4 mu4e: allow for message body rewriting
Add `mu4e-message-body-rewrite-functions', a list of functions to
transform the message body text. Add a small example to the
documentation.
2017-01-29 13:21:53 +02:00
djcb 02e651a8fc mu4e: rework html2text conversion
Rework the conversion from html to text; the functions doing that now
expect to receive one parameter, the message, and return the converted
message.

In the old way, the function got invoked in a buffer with html text, and
were expected to modify it to text. This old way is still supported for
backward compatibility.
2017-01-24 08:27:21 +02:00
djcb edcae719e4 mu4e: pass msg to html2text functions
Add a `msg' parameter to html2text functions, but for backward
compatibility, introspect the functions, and if they don't support it,
use the old ways of running the function in the context of a buffer with
the html text.
2017-01-22 22:20:08 +02:00
djcb 68fd3b71d3 mu4e: fix toggling between html/text 2016-11-27 14:34:50 +02:00
Stig Brautaset 786e02c67f Fix typo / grammar in mu4e-html2text-command doc 2016-11-21 22:59:24 +00:00
djcb 9a3ff05192 mu4e: handle overflow for plaintext-ratio-heuristic
Handle overflow when multiplying
mu4e-view-html-plaintext-ratio-heuristic by most-positive-fixnum.
2016-10-03 21:27:06 +03:00
Dirk-Jan C. Binnema a49ccf4ff0 Merge pull request #897 from liweitianux/aly
mu4e: use builtin function "shr-render-region" for simplicity
2016-09-03 11:30:19 +03:00
djcb 49ea3bec58 mu4e: update html/URL handling
Make mu4e-view-toggle-html _not_ toggle the global value of of
mu4e-view-prefer-html, but only the current one.

Make the link map 'permanent', so it survives the buffer changes when
refreshing. This fixes issue #904.
2016-08-13 10:57:49 +03:00
djcb 75412ec3b1 mu4e: document mu4e-view-html-plaintext-ratio-heuristic
Add note about most-positive-fixnum. This fixes issue #903.
2016-08-13 09:42:33 +03:00
Aaron LI 9b54c2745e mu4e: use builtin function "shr-render-region" for simplicity 2016-08-02 22:19:51 +08:00
djcb 24194b4d12 Remove some debug 2016-02-20 12:35:43 +02:00
djcb ace2f2ad2c mu4e: clean up creating html files
Clean up the creation of html files a bit, and automatically clean them
up after a short while, so we don't clutter /tmp.

Refactor the html-generating actions, so we don't repeat ourselves too
much.
2016-02-20 11:21:24 +02:00
djcb 41455fe524 mu4e: default to mu4e-shr2text when available
Make shr the default renderer for rich-text emails, if shr is
available. Update the documentation.
2016-02-07 14:33:24 +02:00
djcb 967b3cb727 mu4e: update copyright years 2016-01-09 21:28:03 +02:00
djcb 74aa4679d3 mu4e: improve mu4e-message-contact-field-matches
Improve mu4e-message-contact-field-matches so you can pass it a list of
header fields to match instead of having to check each of them
separately.
2015-12-29 18:55:58 +02:00
djcb 48388c9d1b mu4e: tweak mu4e-view-html-plaintext-ratio-heuristic to 5
Some mails were not showing; this was because they had a short (useless)
text part and an html-part with the content. However, the short part was
still too big to fail our heuristic in
    mu4e-view-html-plaintext-ratio-heuristic

Set it to 5 instead. This fixed #743, though not the more general case.
2015-12-27 09:45:54 +02:00
Jean Schurger 783cfae414 Let not be stuck into *mu4e-output* after rendering html. Reduce by one levels of (with-temp-buffer. 2015-02-05 10:42:45 -05:00
Jean Schurger f32092210e mu4e: moved 'tmp-file' deletion at the right place. 2015-02-03 16:40:52 -05:00
Jean Schurger d63f1b3114 mu4e: Used temporary file instead of region to call the html renderer. (fix encoding issues) 2015-02-03 15:44:21 -05:00
djcb 80b4c17edc mu4e: make it easy to use shr for viewing rich text message
new emacs versions have the shr html renderer; we can use it to render
rich text messages. And some snippet to do so, and document it.
2014-11-01 12:41:55 +02:00
djcb 852ac46789 * mu4e: allow mu4e-html2text-command to be a function (thanks to tmalsburg) 2013-10-19 11:45:30 +03:00
djcb 020a13dbd4 * cosmetics 2013-10-14 22:43:56 +03:00
djcb 5ecbb40557 * mu4e: when replying to messages written by self, keep the same to:/cc: 2013-07-07 18:30:30 +03:00
Thomas Cordival c2efc5543a Add custom var mu4e-view-html-plaintext-ratio-heuristic
Add a custom var to enable the customisation of the ratio between the length of the html and the plaintext parts under which the text is considered to be garbage
2013-05-26 07:47:10 -05:00
Dmitry Neverov 9db55ac7ab Fix 'Â' letters in a message view 2012-12-24 00:04:46 +04:00
Jonas Bernoulli 8a3d4c27de improve doc-strings
The first sentence should summarize the variable's or function's
purpose and it should fit on the first line.  Change existing
doc-string by:

* Move first sentence onto first line even if that makes it _a bit_
  long.
* Move additional notes out of first sentence and add them later,
  possibly as complete sentences.
* If I am uncertain whether doing the above would alter the meaning,
  _don't_ do it.
* If fitting the initial sentence on the first line would require a
  complete rewrite of the doc-string _don't_ do so unless it is very
  easy to do.
* Remove indentation from second and later lines if it is there to
  align them with the first in the source code, instead of in
  `describe-*' output.
* Make "pullet point" lists a bit more consistent.

Obviously this does not fix all problems but it's a start.
2012-11-10 14:01:17 +01:00
djcb 5630273d51 * mu4e: add functions mu4e-message-field-at-point, mu4e-message-has-field 2012-10-28 19:31:13 +02:00
djcb 88e76d50df * mu4e: let mu4e-message-contact-field-matches accept lists of regexps to
match as well.
2012-10-20 16:07:01 +03:00
djcb ea0c9e536e * mu4e: fix mu4e-message-field 2012-10-20 13:06:49 +03:00
djcb 3359615bdc * mu4e-message: mu4e-message-field: return "" for nil-strings, 0 for
nil-numbers; add mu4e-message-field-raw to get the non-massaged values
2012-10-16 10:56:46 +03:00
djcb 77a2999c8b * mu4e: cosmetics 2012-10-14 17:01:37 +03:00
djcb 1a785abdca * minor 2012-10-01 21:18:42 +03:00
djcb 40c5ddbb70 * mu4e: improve mu4e-message-contact-field-matches 2012-09-27 17:21:22 +03:00
djcb 5c2025a12c * mu4e: mu4e-message part 3 2012-09-26 17:28:30 +03:00
djcb 97c13d0920 * mu4e: mu4e-message part 2 2012-09-26 16:47:42 +03:00
djcb 7d831184b7 * mu4e: abstract access to the mu4e-message plist 2012-09-26 12:25:38 +03:00