From cb3dcaea73cee0fb8a9ea030c95f47bff2e9a851 Mon Sep 17 00:00:00 2001
From: Carl Worth <cworth@cworth.org>
Date: Wed, 23 Apr 2014 00:32:39 -0700
Subject: [PATCH] Revert "Drop the --get-query option"

This reverts commit f55ff7e7dcea67f544050c4a9508b3d1764d7c69.

Jani and Walter convinced me that this functionality is actually
useful, (to avoid replicating much of the logic of this script in
calling scripts).
---
 notmuch-to-html | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/notmuch-to-html b/notmuch-to-html
index 0d0831f..712fbb7 100755
--- a/notmuch-to-html
+++ b/notmuch-to-html
@@ -266,6 +266,8 @@ group.add_argument('--query', help='path to configuration file',
                    metavar='PATH')
 parser.add_argument('--list-views', help='list views',
                     action='store_true')
+parser.add_argument('--get-query', help='get query for view',
+                    metavar='VIEW')
 
 args = parser.parse_args()
 
@@ -343,6 +345,11 @@ if args.list_views:
     for view in config['views']:
         print(view['title'])
     sys.exit(0)
+elif args.get_query != None:
+    for view in config['views']:
+        if args.get_query == view['title']:
+            print(' and '.join(view['query']))
+    sys.exit(0)
 else:
     # only import notmuch if needed
     import notmuch
-- 
2.45.2