--- /dev/null
+Return-Path: <too@guru.guru-group.fi>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by olra.theworths.org (Postfix) with ESMTP id 8A18C429E36\r
+ for <notmuch@notmuchmail.org>; Wed, 25 Jan 2012 07:21:26 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
+ autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+ by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id dh0vufp3OLVM for <notmuch@notmuchmail.org>;\r
+ Wed, 25 Jan 2012 07:21:25 -0800 (PST)\r
+Received: from guru.guru-group.fi (guru-group.fi [87.108.86.66])\r
+ by olra.theworths.org (Postfix) with ESMTP id 79C7B431FBC\r
+ for <notmuch@notmuchmail.org>; Wed, 25 Jan 2012 07:21:25 -0800 (PST)\r
+Received: by guru.guru-group.fi (Postfix, from userid 501)\r
+ id C3FCA68056; Wed, 25 Jan 2012 17:21:27 +0200 (EET)\r
+From: Tomi Ollila <tomi.ollila@iki.fi>\r
+To: <notmuch@notmuchmail.org>\r
+Subject: [RFC PATCH] bikeshed uncrustify options\r
+Date: Wed, 25 Jan 2012 17:21:26 +0200\r
+Message-Id: <1327504886-8730-1-git-send-email-tomi.ollila@iki.fi>\r
+X-Mailer: git-send-email 1.7.6.1\r
+Cc: Tomi Ollila <tomi.ollila@iki.fi>\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Wed, 25 Jan 2012 15:21:26 -0000\r
+\r
+Look or try. thoughts ?\r
+\r
+Questions:\r
+\r
+Is (generally) using *INDENT-(OFF|ON)* ok ? \r
+ \r
+Would it be ok to have\r
+#define STRINGIFY(s) STRINGIFY_ (s)\r
+\r
+(now such expansion disabled by INDENT-OFF)\r
+When used, it is still thought as function call,\r
+and whitespace added.\r
+\r
+What about enum { } \n format_sel change below ?\r
+\r
+After applying this patch and running:\r
+\r
+$ uncrustify --replace -c devel/uncrustify.cfg *.[ch]\r
+\r
+one can discuss (at least):\r
+\r
+* should there be space after '!'\r
+* should there be space after (cast)\r
+\r
+---\r
+ devel/uncrustify.cfg | 3 ++-\r
+ notmuch-client.h | 5 ++++-\r
+ notmuch-reply.c | 2 ++\r
+ notmuch-search.c | 13 +++++++++----\r
+ notmuch-show.c | 8 ++++++++\r
+ notmuch-time.c | 3 +++\r
+ 6 files changed, 28 insertions(+), 6 deletions(-)\r
+\r
+diff --git a/devel/uncrustify.cfg b/devel/uncrustify.cfg\r
+index d8075ba..a752fae 100644\r
+--- a/devel/uncrustify.cfg\r
++++ b/devel/uncrustify.cfg\r
+@@ -58,7 +58,8 @@ nl_after_struct = 0\r
+ # Extra types used in notmuch source.\r
+ # (add more on demand)\r
+ \r
+-type GMimeObject mime_node_t\r
++type GMimeObject GMimeCryptoContext GMimeCipherContext\r
++type mime_node_t notmuch_message_t\r
+ \r
+ #\r
+ # inter-character spacing options\r
+diff --git a/notmuch-client.h b/notmuch-client.h\r
+index e0eb594..131e453 100644\r
+--- a/notmuch-client.h\r
++++ b/notmuch-client.h\r
+@@ -59,8 +59,10 @@\r
+ \r
+ #define unused(x) x __attribute__ ((unused))\r
+ \r
++/* *INDENT-OFF* */\r
+ #define STRINGIFY(s) STRINGIFY_(s)\r
+ #define STRINGIFY_(s) #s\r
++/* *INDENT-ON* */\r
+ \r
+ struct mime_node;\r
+ struct notmuch_show_params;\r
+@@ -377,7 +379,8 @@ mime_node_t *\r
+ mime_node_child (mime_node_t *parent, int child);\r
+ \r
+ /* Return the nth child of node in a depth-first traversal. If n is\r
+- * 0, returns node itself. Returns NULL if there is no such part. */\r
++ * 0, returns node itself. Returns NULL if there is no such part.\r
++ */\r
+ mime_node_t *\r
+ mime_node_seek_dfs (mime_node_t *node, int n);\r
+ \r
+diff --git a/notmuch-reply.c b/notmuch-reply.c\r
+index f55b1d2..57742c4 100644\r
+--- a/notmuch-reply.c\r
++++ b/notmuch-reply.c\r
+@@ -31,6 +31,7 @@ static void\r
+ reply_part_content (GMimeObject *part);\r
+ \r
+ static const notmuch_show_format_t format_reply = {\r
++/* *INDENT-OFF* */\r
+ "", NULL,\r
+ "", NULL,\r
+ "", NULL, reply_headers_message_part, ">\n",\r
+@@ -44,6 +45,7 @@ static const notmuch_show_format_t format_reply = {\r
+ "",\r
+ "", "",\r
+ ""\r
++/* *INDENT-ON* */\r
+ };\r
+ \r
+ static void\r
+diff --git a/notmuch-search.c b/notmuch-search.c\r
+index d504051..57ec603 100644\r
+--- a/notmuch-search.c\r
++++ b/notmuch-search.c\r
+@@ -65,6 +65,7 @@ format_thread_text (const void *ctx,\r
+ const char *authors,\r
+ const char *subject);\r
+ static const search_format_t format_text = {\r
++/* *INDENT-OFF* */\r
+ "",\r
+ "",\r
+ format_item_id_text,\r
+@@ -75,6 +76,7 @@ static const search_format_t format_text = {\r
+ "",\r
+ "\n",\r
+ "",\r
++/* *INDENT-ON* */\r
+ };\r
+ \r
+ static void\r
+@@ -91,6 +93,7 @@ format_thread_json (const void *ctx,\r
+ const char *authors,\r
+ const char *subject);\r
+ static const search_format_t format_json = {\r
++/* *INDENT-OFF* */\r
+ "[",\r
+ "{",\r
+ format_item_id_json,\r
+@@ -101,6 +104,7 @@ static const search_format_t format_json = {\r
+ "}",\r
+ "]\n",\r
+ "]\n",\r
++/* *INDENT-ON* */\r
+ };\r
+ \r
+ static void\r
+@@ -160,7 +164,7 @@ format_item_id_json (const void *ctx,\r
+ printf ("%s", json_quote_str (ctx_quote, item_id));\r
+ \r
+ talloc_free (ctx_quote);\r
+- \r
++\r
+ }\r
+ \r
+ static void\r
+@@ -333,7 +337,7 @@ do_search_messages (const search_format_t *format,\r
+ \r
+ first_message = 0;\r
+ }\r
+- \r
++\r
+ notmuch_filenames_destroy( filenames );\r
+ \r
+ } else { /* output == OUTPUT_MESSAGES */\r
+@@ -427,8 +431,9 @@ notmuch_search_command (void *ctx, int argc, char *argv[])\r
+ size_t search_exclude_tags_length;\r
+ unsigned int i;\r
+ \r
+- enum { NOTMUCH_FORMAT_JSON, NOTMUCH_FORMAT_TEXT }\r
+- format_sel = NOTMUCH_FORMAT_TEXT;\r
++ enum { /* note: also emacs indents this wrongly if not like this. */\r
++ NOTMUCH_FORMAT_JSON, NOTMUCH_FORMAT_TEXT\r
++ } format_sel = NOTMUCH_FORMAT_TEXT;\r
+ \r
+ notmuch_opt_desc_t options[] = {\r
+ { NOTMUCH_OPT_KEYWORD, &sort, "sort", 's',\r
+diff --git a/notmuch-show.c b/notmuch-show.c\r
+index dec799c..dfe37bc 100644\r
+--- a/notmuch-show.c\r
++++ b/notmuch-show.c\r
+@@ -42,6 +42,7 @@ static void\r
+ format_part_end_text (GMimeObject *part);\r
+ \r
+ static const notmuch_show_format_t format_text = {\r
++ /* *INDENT-OFF* */\r
+ "", NULL,\r
+ "\fmessage{ ", format_message_text,\r
+ "\fheader{\n", format_headers_text, format_headers_message_part_text, "\fheader}\n",\r
+@@ -55,6 +56,7 @@ static const notmuch_show_format_t format_text = {\r
+ "\fbody}\n",\r
+ "\fmessage}\n", "",\r
+ ""\r
++ /* *INDENT-ON* */\r
+ };\r
+ \r
+ static void\r
+@@ -89,6 +91,7 @@ static void\r
+ format_part_end_json (GMimeObject *part);\r
+ \r
+ static const notmuch_show_format_t format_json = {\r
++ /* *INDENT-OFF* */\r
+ "[", NULL,\r
+ "{", format_message_json,\r
+ "\"headers\": {", format_headers_json, format_headers_message_part_json, "}",\r
+@@ -102,6 +105,7 @@ static const notmuch_show_format_t format_json = {\r
+ "]",\r
+ "}", ", ",\r
+ "]"\r
++ /* *INDENT-ON* */\r
+ };\r
+ \r
+ static void\r
+@@ -110,6 +114,7 @@ format_message_mbox (const void *ctx,\r
+ unused (int indent));\r
+ \r
+ static const notmuch_show_format_t format_mbox = {\r
++ /* *INDENT-OFF* */\r
+ "", NULL,\r
+ "", format_message_mbox,\r
+ "", NULL, NULL, "",\r
+@@ -123,12 +128,14 @@ static const notmuch_show_format_t format_mbox = {\r
+ "",\r
+ "", "",\r
+ ""\r
++ /* *INDENT-ON* */\r
+ };\r
+ \r
+ static void\r
+ format_part_content_raw (GMimeObject *part);\r
+ \r
+ static const notmuch_show_format_t format_raw = {\r
++ /* *INDENT-OFF* */\r
+ "", NULL,\r
+ "", NULL,\r
+ "", NULL, format_headers_message_part_text, "\n",\r
+@@ -142,6 +149,7 @@ static const notmuch_show_format_t format_raw = {\r
+ "",\r
+ "", "",\r
+ ""\r
++ /* *INDENT-ON* */\r
+ };\r
+ \r
+ static const char *\r
+diff --git a/notmuch-time.c b/notmuch-time.c\r
+index e250c3d..a223a99 100644\r
+--- a/notmuch-time.c\r
++++ b/notmuch-time.c\r
+@@ -38,9 +38,12 @@\r
+ * (if any) will be reclaimed.\r
+ *\r
+ */\r
++\r
+ #define MINUTE (60)\r
++/* *INDENT-OFF* -- smells like a bug in uncrustify (up to 0.59...) */\r
+ #define HOUR (60 * MINUTE)\r
+ #define DAY (24 * HOUR)\r
++/* *INDENT-ON* */\r
+ #define RELATIVE_DATE_MAX 20\r
+ const char *\r
+ notmuch_time_relative_date (const void *ctx, time_t then)\r
+-- \r
+1.7.8.2\r
+\r