Re: tagging by message-id?

2017-01-28 Thread Lucas Hoffmann
Quoting ng0 (2017-01-28 18:21:10)
> Is it possible to apply tags to message-ids, something similar to
>
> notmuch tag -inbox +python +python::list -- python-list-requ...@python.org OR 
> python-l...@python.org OR id:*python-l...@python.org

If notmuch search can find it notmuch tag should be able to tag it. So
you can try notmuch search first (maybe have a look at the man page
notmuch-search and check --output=files).

> I'm also open to other solutions (the untagged messages share at
> least a common folder structure
> "/home/user/mail.python.org/.lists-python-1999-March/" as an
> example), this runs in a script anyway.

And check notmuch-search-terms(1) to see if the folder: or path: search
terms can help you.


signature.asc
Description: signature
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


tagging by message-id?

2017-01-28 Thread ng0
Hi,

I recently imported some archives.
The problematic parts I have (almost) fixed with some sed
scripts.

But some messages just have message-ids, because the "From:" was
stripped in the past.

Is it possible to apply tags to message-ids, something similar to

notmuch tag -inbox +python +python::list -- python-list-requ...@python.org OR 
python-l...@python.org OR id:*python-l...@python.org

I'm also open to other solutions (the untagged messages share at
least a common folder structure
"/home/user/mail.python.org/.lists-python-1999-March/" as an
example), this runs in a script anyway.

-- 
♥Ⓐ  ng0 -- https://www.inventati.org/patternsinthechaos/
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


Re: [PATCH] cli/show: list all filenames of a message in the formatted output

2017-01-28 Thread Jani Nikula
On Wed, 25 Jan 2017, Tomi Ollila  wrote:
> On Tue, Jan 10 2017, Jani Nikula  wrote:
>
>> Instead of just having the first filename for the message, list all
>> duplicate filenames of the message as a list in the formatted
>> outputs. This bumps the format version to 3.
>
> Great stuff -- just now quite a few (~33) tests fail ;)

I'll fix that up iff we decide this is the way to go.

BR,
Jani.


>
>>
>> ---
>>
>> I presume the UI could do fancy things with this to highlight messages
>> with dupes better. I haven't quite figured out yet what that could be,
>> but this seems like the right thing to do regardless.
>> ---
>>  devel/schemata   |  5 -
>>  notmuch-client.h |  2 +-
>>  notmuch-show.c   | 16 +++-
>>  3 files changed, 20 insertions(+), 3 deletions(-)
>>
>> diff --git a/devel/schemata b/devel/schemata
>> index 41dc4a60fff3..6dede7a453d7 100644
>> --- a/devel/schemata
>> +++ b/devel/schemata
>> @@ -26,6 +26,9 @@ v1
>>  v2
>>  - Added the thread_summary.query field.
>>  
>> +v3
>> +- Replaced message.filename string with a list of filenames.
>> +
>>  Common non-terminals
>>  
>>  
>> @@ -59,7 +62,7 @@ message = {
>>  # (format_message_sprinter)
>>  id: messageid,
>>  match:  bool,
>> -filename:   string,
>> +filename:   [string*],
>>  timestamp:  unix_time, # date header as unix time
>>  date_relative:  string,   # user-friendly timestamp
>>  tags:   [string*],
>> diff --git a/notmuch-client.h b/notmuch-client.h
>> index d026e6004239..21b087980a17 100644
>> --- a/notmuch-client.h
>> +++ b/notmuch-client.h
>> @@ -145,7 +145,7 @@ chomp_newline (char *str)
>>   * this.  New (required) map fields can be added without increasing
>>   * this.
>>   */
>> -#define NOTMUCH_FORMAT_CUR 2
>> +#define NOTMUCH_FORMAT_CUR 3
>>  /* The minimum supported structured output format version.  Requests
>>   * for format versions below this will return an error. */
>>  #define NOTMUCH_FORMAT_MIN 1
>> diff --git a/notmuch-show.c b/notmuch-show.c
>> index 22fa655ad20d..3b9e31247f2c 100644
>> --- a/notmuch-show.c
>> +++ b/notmuch-show.c
>> @@ -133,7 +133,21 @@ format_message_sprinter (sprinter_t *sp, 
>> notmuch_message_t *message)
>>  sp->boolean (sp, notmuch_message_get_flag (message, 
>> NOTMUCH_MESSAGE_FLAG_EXCLUDED));
>>  
>>  sp->map_key (sp, "filename");
>> -sp->string (sp, notmuch_message_get_filename (message));
>> +if (notmuch_format_version >= 3) {
>> +notmuch_filenames_t *filenames;
>> +
>> +sp->begin_list (sp);
>> +for (filenames = notmuch_message_get_filenames (message);
>> + notmuch_filenames_valid (filenames);
>> + notmuch_filenames_move_to_next (filenames)) {
>> +sp->string (sp, notmuch_message_get_filename (message));
>> +sp->separator (sp);
>> +}
>> +notmuch_filenames_destroy (filenames);
>> +sp->end (sp);
>> +} else {
>> +sp->string (sp, notmuch_message_get_filename (message));
>> +}
>>  
>>  sp->map_key (sp, "timestamp");
>>  date = notmuch_message_get_date (message);
>> -- 
>> 2.11.0
>>
>> ___
>> notmuch mailing list
>> notmuch@notmuchmail.org
>> https://notmuchmail.org/mailman/listinfo/notmuch
> ___
> notmuch mailing list
> notmuch@notmuchmail.org
> https://notmuchmail.org/mailman/listinfo/notmuch
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


[RFC Patch 1/2] lib: merge internal prefix tables

2017-01-28 Thread David Bremner
Replace multiple tables with some flags in a single table. This makes
the code a bit shorter, and it should also make it easier to add
other options to fields, e.g. regexp searching.
---
 lib/database-private.h |  7 
 lib/database.cc| 86 +++---
 2 files changed, 46 insertions(+), 47 deletions(-)

diff --git a/lib/database-private.h b/lib/database-private.h
index ccc1e9a1..32357ce0 100644
--- a/lib/database-private.h
+++ b/lib/database-private.h
@@ -148,6 +148,13 @@ operator&=(_notmuch_features &a, _notmuch_features b)
 return a;
 }
 
+/*
+ * Configuration options for xapian database fields */
+typedef enum notmuch_field_flags {
+NOTMUCH_FIELD_EXTERNAL = 1,
+NOTMUCH_FIELD_PROBABILISTIC = 2
+} notmuch_field_flag_t;
+
 #define NOTMUCH_QUERY_PARSER_FLAGS (Xapian::QueryParser::FLAG_BOOLEAN | \
Xapian::QueryParser::FLAG_PHRASE | \
Xapian::QueryParser::FLAG_LOVEHATE | \
diff --git a/lib/database.cc b/lib/database.cc
index 2d19f20c..b98468a6 100644
--- a/lib/database.cc
+++ b/lib/database.cc
@@ -42,6 +42,7 @@ using namespace std;
 typedef struct {
 const char *name;
 const char *prefix;
+int flags;
 } prefix_t;
 
 #define NOTMUCH_DATABASE_VERSION 3
@@ -247,37 +248,37 @@ typedef struct {
  * nearly universal to all mail messages).
  */
 
-static prefix_t BOOLEAN_PREFIX_INTERNAL[] = {
-{ "type",  "T" },
-{ "reference", "XREFERENCE" },
-{ "replyto",   "XREPLYTO" },
-{ "directory", "XDIRECTORY" },
-{ "file-direntry", "XFDIRENTRY" },
-{ "directory-direntry","XDDIRENTRY" },
-};
-
-static prefix_t BOOLEAN_PREFIX_EXTERNAL[] = {
-{ "thread","G" },
-{ "tag",   "K" },
-{ "is","K" },
-{ "id","Q" },
-{ "path",  "P" },
-{ "property",  "XPROPERTY" },
+static prefix_t PREFIX[] = {
+/* nameterm prefix flags */
+{ "type",  "T",0 },
+{ "reference", "XREFERENCE",   0 },
+{ "replyto",   "XREPLYTO", 0 },
+{ "directory", "XDIRECTORY",   0 },
+{ "file-direntry", "XFDIRENTRY",   0 },
+{ "directory-direntry","XDDIRENTRY",   0 },
+{ "thread","G",NOTMUCH_FIELD_EXTERNAL 
},
+{ "tag",   "K",NOTMUCH_FIELD_EXTERNAL },
+{ "is","K",NOTMUCH_FIELD_EXTERNAL },
+{ "id","Q",NOTMUCH_FIELD_EXTERNAL },
+{ "path",  "P",NOTMUCH_FIELD_EXTERNAL },
+{ "property",  "XPROPERTY",NOTMUCH_FIELD_EXTERNAL },
 /*
  * Unconditionally add ':' to reduce potential ambiguity with
  * overlapping prefixes and/or terms that start with capital
  * letters. See Xapian document termprefixes.html for related
  * discussion.
  */
-{ "folder","XFOLDER:" },
-};
-
-static prefix_t PROBABILISTIC_PREFIX[]= {
-{ "from",  "XFROM" },
-{ "to","XTO" },
-{ "attachment","XATTACHMENT" },
-{ "mimetype",  "XMIMETYPE"},
-{ "subject",   "XSUBJECT"},
+{ "folder","XFOLDER:", NOTMUCH_FIELD_EXTERNAL 
},
+{ "from",  "XFROM",NOTMUCH_FIELD_EXTERNAL |
+   NOTMUCH_FIELD_PROBABILISTIC },
+{ "to","XTO",  NOTMUCH_FIELD_EXTERNAL |
+   NOTMUCH_FIELD_PROBABILISTIC },
+{ "attachment","XATTACHMENT",  NOTMUCH_FIELD_EXTERNAL |
+   NOTMUCH_FIELD_PROBABILISTIC },
+{ "mimetype",  "XMIMETYPE",NOTMUCH_FIELD_EXTERNAL |
+   NOTMUCH_FIELD_PROBABILISTIC },
+{ "subject",   "XSUBJECT", NOTMUCH_FIELD_EXTERNAL |
+   NOTMUCH_FIELD_PROBABILISTIC },
 };
 
 const char *
@@ -285,19 +286,9 @@ _find_prefix (const char *name)
 {
 unsigned int i;
 
-for (i = 0; i < ARRAY_SIZE (BOOLEAN_PREFIX_INTERNAL); i++) {
-   if (strcmp (name, BOOLEAN_PREFIX_INTERNAL[i].name) == 0)
-   return BOOLEAN_PREFIX_INTERNAL[i].prefix;
-}
-
-for (i = 0; i < ARRAY_SIZE (BOOLEAN_PREFIX_EXTERNAL); i++) {
-   if (strcmp (name, BOOLEAN_PREFIX_EXTERNAL[i].name) == 0)
-   return BOOLEAN_PREFIX_EXTERNAL[i].prefix;
-}
-
-for (i = 0; i < ARRAY_SIZE (PROBABILISTIC_PREFIX); i++) {
-   if (strcmp (name, PROBABILISTIC_PREFIX[i].name) == 0)
-   return PROBABILISTIC_PREFIX[i].prefix;
+for (i = 0; i < ARRAY_SIZE (PREFIX); i

[RFC Patch 2/2] lib: Let Xapian manage the memory for FieldProcessors

2017-01-28 Thread David Bremner
It turns out this is exactly what release() is for; Xapian will
deallocate the objects when it's done with them.
---
 lib/database-private.h |  4 
 lib/database.cc| 19 ---
 2 files changed, 8 insertions(+), 15 deletions(-)

diff --git a/lib/database-private.h b/lib/database-private.h
index 32357ce0..3eac3c7e 100644
--- a/lib/database-private.h
+++ b/lib/database-private.h
@@ -194,10 +194,6 @@ struct _notmuch_database {
 Xapian::TermGenerator *term_gen;
 Xapian::ValueRangeProcessor *value_range_processor;
 Xapian::ValueRangeProcessor *date_range_processor;
-#if HAVE_XAPIAN_FIELD_PROCESSOR
-Xapian::FieldProcessor *date_field_processor;
-Xapian::FieldProcessor *query_field_processor;
-#endif
 Xapian::ValueRangeProcessor *last_mod_range_processor;
 };
 
diff --git a/lib/database.cc b/lib/database.cc
index b98468a6..c1563ca7 100644
--- a/lib/database.cc
+++ b/lib/database.cc
@@ -1029,10 +1029,14 @@ notmuch_database_open_verbose (const char *path,
 #if HAVE_XAPIAN_FIELD_PROCESSOR
/* This currently relies on the query parser to pass anything
 * with a .. to the range processor */
-   notmuch->date_field_processor = new DateFieldProcessor();
-   notmuch->query_parser->add_boolean_prefix("date", 
notmuch->date_field_processor);
-   notmuch->query_field_processor = new QueryFieldProcessor 
(*notmuch->query_parser, notmuch);
-   notmuch->query_parser->add_boolean_prefix("query", 
notmuch->query_field_processor);
+   {
+   Xapian::FieldProcessor * date_fp = new DateFieldProcessor();
+   Xapian::FieldProcessor * query_fp =
+   new QueryFieldProcessor (*notmuch->query_parser, notmuch);
+
+   notmuch->query_parser->add_boolean_prefix("date", date_fp->release 
());
+   notmuch->query_parser->add_boolean_prefix("query", 
query_fp->release ());
+   }
 #endif
notmuch->last_mod_range_processor = new 
Xapian::NumberValueRangeProcessor (NOTMUCH_VALUE_LAST_MOD, "lastmod:");
 
@@ -1125,13 +1129,6 @@ notmuch_database_close (notmuch_database_t *notmuch)
 delete notmuch->last_mod_range_processor;
 notmuch->last_mod_range_processor = NULL;
 
-#if HAVE_XAPIAN_FIELD_PROCESSOR
-delete notmuch->date_field_processor;
-notmuch->date_field_processor = NULL;
-delete notmuch->query_field_processor;
-notmuch->query_field_processor = NULL;
-#endif
-
 return status;
 }
 
-- 
2.11.0

___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


library prefix / field processor cleanup

2017-01-28 Thread David Bremner
I started trying to generalize the regexp stuff to include
message-ids [1], but didn't get that far.  I think both of these patches
are defensible on their own, particularly the second. I'll probably
include something like them in a revised series for regexp searching.

Probably we should use more of the the "release()" style memory
management with Xapian; I didn't follow that up yet as I didn't want
to get _too_ distracted from current goal.


[1]: the complication is that message-ids are boolean fields, while
 from and subject are probabilistic. It's not insurmountable, but it
 did inspire re-thinking the way query fields are initialized.
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


[PATCH 1/2] cli/show: abstract get content disposition

2017-01-28 Thread Jani Nikula
Reduce duplication in follow-up work. As a side effect, handle error
returns from g_mime_content_disposition_get_disposition() without
segfaulting.
---
 notmuch-show.c | 16 +---
 1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/notmuch-show.c b/notmuch-show.c
index 22fa655ad20d..8b38fe6db136 100644
--- a/notmuch-show.c
+++ b/notmuch-show.c
@@ -110,6 +110,17 @@ _get_one_line_summary (const void *ctx, notmuch_message_t 
*message)
from, relative_date, tags);
 }
 
+static const char *_get_disposition(GMimeObject *meta)
+{
+GMimeContentDisposition *disposition;
+
+disposition = g_mime_object_get_content_disposition (meta);
+if (!disposition)
+   return NULL;
+
+return g_mime_content_disposition_get_disposition (disposition);
+}
+
 /* Emit a sequence of key/value pairs for the metadata of message.
  * The caller should begin a map before calling this. */
 static void
@@ -450,14 +461,13 @@ format_part_text (const void *ctx, sprinter_t *sp, 
mime_node_t *node,
notmuch_message_get_flag (message, 
NOTMUCH_MESSAGE_FLAG_EXCLUDED) ? 1 : 0,
notmuch_message_get_filename (message));
 } else {
-   GMimeContentDisposition *disposition = 
g_mime_object_get_content_disposition (meta);
+   const char *disposition = _get_disposition (meta);
const char *cid = g_mime_object_get_content_id (meta);
const char *filename = leaf ?
g_mime_part_get_filename (GMIME_PART (node->part)) : NULL;
 
if (disposition &&
-   strcasecmp (g_mime_content_disposition_get_disposition 
(disposition),
-   GMIME_DISPOSITION_ATTACHMENT) == 0)
+   strcasecmp (disposition, GMIME_DISPOSITION_ATTACHMENT) == 0)
part_type = "attachment";
else
part_type = "part";
-- 
2.11.0

___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


[PATCH 2/2] cli/show: add content-disposition to structured output message parts

2017-01-28 Thread Jani Nikula
Help the clients decide how to display parts.

---

I'm not sure if this should bump the version in schemata, because the
comment in notmuch-client.h says new map fields can be added without
increasing NOTMUCH_FORMAT_CUR. Yet the schemata version history says
thread_summary.query was added in v2... which looks like a change that
shouldn't need a version bump. Confused.

The problem could be avoided by conflating both this change and
id:20170110201929.21875-1-j...@nikula.org into v3... ;)
---
 devel/schemata | 1 +
 notmuch-show.c | 6 ++
 2 files changed, 7 insertions(+)

diff --git a/devel/schemata b/devel/schemata
index 41dc4a60fff3..c94459eb783a 100644
--- a/devel/schemata
+++ b/devel/schemata
@@ -76,6 +76,7 @@ part = {
 sigstatus?: sigstatus,
 
 content-type:   string,
+content-disposition?:   string,
 content-id?:string,
 # if content-type starts with "multipart/":
 content:[part*],
diff --git a/notmuch-show.c b/notmuch-show.c
index 8b38fe6db136..8e69b3465886 100644
--- a/notmuch-show.c
+++ b/notmuch-show.c
@@ -582,6 +582,7 @@ format_part_sprinter (const void *ctx, sprinter_t *sp, 
mime_node_t *node,
 GMimeObject *meta = node->envelope_part ?
GMIME_OBJECT (node->envelope_part) : node->part;
 GMimeContentType *content_type = g_mime_object_get_content_type (meta);
+const char *disposition = _get_disposition (meta);
 const char *cid = g_mime_object_get_content_id (meta);
 const char *filename = GMIME_IS_PART (node->part) ?
g_mime_part_get_filename (GMIME_PART (node->part)) : NULL;
@@ -611,6 +612,11 @@ format_part_sprinter (const void *ctx, sprinter_t *sp, 
mime_node_t *node,
 sp->map_key (sp, "content-type");
 sp->string (sp, g_mime_content_type_to_string (content_type));
 
+if (disposition) {
+   sp->map_key (sp, "content-disposition");
+   sp->string (sp, disposition);
+}
+
 if (cid) {
sp->map_key (sp, "content-id");
sp->string (sp, cid);
-- 
2.11.0

___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


[PATCH] emacs: fully add the notmuch-address customize group

2017-01-28 Thread Mark Walters
We now have several customizable options for address completion. There
is a customize group notmuch-address but it only contains one of these
options. Add all the others, and make it part of the notmuch customize
group.
---

Bremner pointed out that many of these were not in the notmuch-addres
customize group, so we add them all.

Best wishes

Mark



 emacs/notmuch-address.el | 7 ++-
 emacs/notmuch-lib.el | 4 
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/emacs/notmuch-address.el b/emacs/notmuch-address.el
index 15c709d..d504ff2 100644
--- a/emacs/notmuch-address.el
+++ b/emacs/notmuch-address.el
@@ -66,6 +66,7 @@ disabled."
  (const :tag "Disable address completion" nil)
  (string :tag "Use external completion command"))
   :group 'notmuch-send
+  :group 'notmuch-address
   :group 'notmuch-external)
 
 (defcustom notmuch-address-internal-completion '(sent nil)
@@ -93,6 +94,7 @@ This should be a list of the form '(DIRECTION FILTER), where
 (setq notmuch-address-completions (clrhash 
notmuch-address-completions))
 (setq notmuch-address-full-harvest-finished nil))
   :group 'notmuch-send
+  :group 'notmuch-address
   :group 'notmuch-external)
 
 (defcustom notmuch-address-save-filename nil
@@ -104,6 +106,7 @@ should make sure it is not somewhere publicly readable."
   :type '(choice (const :tag "Off" nil)
 (file :tag "Filename"))
   :group 'notmuch-send
+  :group 'notmuch-address
   :group 'notmuch-external)
 
 (defcustom notmuch-address-selection-function 
'notmuch-address-selection-function
@@ -115,6 +118,7 @@ See documentation of function 
`notmuch-address-selection-function'
 to know how address selection is made by default."
   :type 'function
   :group 'notmuch-send
+  :group 'notmuch-address
   :group 'notmuch-external)
 
 (defcustom notmuch-address-post-completion-functions nil
@@ -145,7 +149,8 @@ matching `notmuch-address-completion-headers-regexp'.
 (defcustom notmuch-address-use-company t
   "If available, use company mode for address completion"
   :type 'boolean
-  :group 'notmuch-send)
+  :group 'notmuch-send
+  :group 'notmuch-address)
 
 (defun notmuch-address-setup ()
   (let* ((setup-company (and notmuch-address-use-company
diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el
index 5dc6797..337b20a 100644
--- a/emacs/notmuch-lib.el
+++ b/emacs/notmuch-lib.el
@@ -74,6 +74,10 @@
   "Running external commands from within Notmuch."
   :group 'notmuch)
 
+(defgroup notmuch-address nil
+  "Address completion."
+  :group 'notmuch)
+
 (defgroup notmuch-faces nil
   "Graphical attributes for displaying text"
   :group 'notmuch)
-- 
2.1.4

___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


[PATCH] emacs: company: remove two build warnings

2017-01-28 Thread Mark Walters
This adds two defvars to avoid two build warnings in the notmuch emacs
code. These were both introduced (by me) in commit 827c28a0.
---

The defvar for notmuch-address-command is clearly correct as that is
defined in notmuch-address so will definitely be defined when this
code is run.

The other, for company-idle-timeout, is slightly less clear, as the
user may not use company. It feels a little unpleasant to be defining
variables outside our namespace but we do the same with
company-backends.

[Incidentally I don't think emacs compiler should complain as the
actual use (line 59) is a macro which does bind the variable in any
case.]

Best wishes

Mark




emacs/notmuch-company.el | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/emacs/notmuch-company.el b/emacs/notmuch-company.el
index dca6471..3e12e7a 100644
--- a/emacs/notmuch-company.el
+++ b/emacs/notmuch-company.el
@@ -37,12 +37,14 @@
 (declare-function company-mode "company")
 (declare-function company-manual-begin "company")
 (defvar company-backends)
+(defvar company-idle-delay)
 
 (declare-function notmuch-address-harvest "notmuch-address")
 (declare-function notmuch-address-harvest-trigger "notmuch-address")
 (declare-function notmuch-address-matching "notmuch-address")
 (declare-function notmuch-address--harvest-ready "notmuch-address")
 (defvar notmuch-address-completion-headers-regexp)
+(defvar notmuch-address-command)
 
 ;;;###autoload
 (defun notmuch-company-setup ()
-- 
2.1.4

___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


[PATCH v2] emacs: show: stop display of application/* parts

2017-01-28 Thread Mark Walters
Gnus seems to display application/zip and application/tar by
default. This doesn't seem desirable so we override it.

We only override if the user has not customized
mm-inline-override-types themselves.
---

I think this fixes all the bugs (and typos). Thanks to Tomas and Tomi
for finding and verifying the correct way to get the default value of
a defcustom variable.

It's only lightly tested but seems to work.

Best wishes

Mark



emacs/notmuch-show.el | 10 +-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index 364004b..c670160 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -1227,7 +1227,15 @@ matched."
   (interactive "sNotmuch show: \nP")
   (let ((buffer-name (generate-new-buffer-name
  (or buffer-name
- (concat "*notmuch-" thread-id "*")
+ (concat "*notmuch-" thread-id "*"
+   ;; We override mm-inline-override-types to stop application/*
+   ;; parts from being displayed unless the user has customized
+   ;; it themselves.
+   (mm-inline-override-types
+(if (equal mm-inline-override-types
+   (eval (car (get 'mm-inline-override-types 
'standard-value
+(cons "application/*" mm-inline-override-types)
+  mm-inline-override-types)))
 (switch-to-buffer (get-buffer-create buffer-name))
 ;; No need to track undo information for this buffer.
 (setq buffer-undo-list t)
-- 
2.1.4

___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


[alot] announcing v0.5

2017-01-28 Thread Patrick Totzke
Hi everyone!

I have just tagged alot v0.5; You can get a tarball here [0].

This release contains only minor usability improvements but lots of internal
cleanups. We are making good progress on porting alot to python 3, finally
introduced a testing suite and now make use of build-testing on travis.ci and
(partly automated) code reviews for pull requests on github.

A big thanks goes to Lucas Hoffmann (lucc) and Dylan Baker (dcbaker),
who contributed most of this work.

Usage updates since v0.4:
* save command prompt, recipient and sender history across program restarts
* new config option: "handle_mouse" to enable interpretation of mouse events
* prompt for unsent messages before closing
* enable variable interpolation in config file
* Add encryption to CC addresses
* Add bufferlist, tablist and pyshell subcommands to the command line interface
* new hook: "loop_hook", that runs periodically
* new config option: "periodic_hook_frequency" to adjust how often to fire 
"loop_hook"

As usual, a quick hall of fame of recent contributors:
$ git shortlog -s -n 0.4...
86  Lucas Hoffmann
76  Dylan Baker
54  Patrick Totzke
 4  Ian Denhardt
 2  Jody Foo
 1  Atilla Mas
 1  Christian Geier
 1  Hamish Downer
 1  Pol Van Aubel
 1  Ruben Pollan
 1  Samantha Marshall

New bug reports, feature or pull requests via the projects github page [1]
are always welcome.

Cheers,
P

[0]: https://github.com/pazz/alot/tarball/0.5
[1]: https://github.com/pazz/alot
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch