[PATCH 01/13] emacs: Usability improvements for `notmuch-hello'.
authorDavid Edmondson <dme@dme.org>
Wed, 19 May 2010 07:03:28 +0000 (08:03 +0100)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:37:04 +0000 (09:37 -0800)
49/235b5d42fd69e2d5981c7d47b675b023a17df6 [new file with mode: 0644]

diff --git a/49/235b5d42fd69e2d5981c7d47b675b023a17df6 b/49/235b5d42fd69e2d5981c7d47b675b023a17df6
new file mode 100644 (file)
index 0000000..00dd033
--- /dev/null
@@ -0,0 +1,132 @@
+Return-Path: <dme@dme.org>\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 04E1C409DF8\r
+       for <notmuch@notmuchmail.org>; Wed, 19 May 2010 01:53:55 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -1.9\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5\r
+       tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001] autolearn=ham\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 iFpGc1beXrQB for <notmuch@notmuchmail.org>;\r
+       Wed, 19 May 2010 01:53:43 -0700 (PDT)\r
+Received: from mail-ew0-f213.google.com (mail-ew0-f213.google.com\r
+       [209.85.219.213])\r
+       by olra.theworths.org (Postfix) with ESMTP id DEA914196F2\r
+       for <notmuch@notmuchmail.org>; Wed, 19 May 2010 01:53:42 -0700 (PDT)\r
+Received: by ewy5 with SMTP id 5so1814149ewy.0\r
+       for <notmuch@notmuchmail.org>; Wed, 19 May 2010 01:53:41 -0700 (PDT)\r
+Received: by 10.213.57.136 with SMTP id c8mr3261408ebh.5.1274259221225;\r
+       Wed, 19 May 2010 01:53:41 -0700 (PDT)\r
+Received: from ut.hh.sledj.net (host83-217-165-81.dsl.vispa.com\r
+       [83.217.165.81])\r
+       by mx.google.com with ESMTPS id 16sm3523041ewy.3.2010.05.19.01.53.38\r
+       (version=TLSv1/SSLv3 cipher=RC4-MD5);\r
+       Wed, 19 May 2010 01:53:39 -0700 (PDT)\r
+Received: by ut.hh.sledj.net (Postfix, from userid 1000)\r
+       id 3F675594099; Wed, 19 May 2010 08:03:45 +0100 (BST)\r
+From: David Edmondson <dme@dme.org>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH 01/13] emacs: Usability improvements for `notmuch-hello'.\r
+Date: Wed, 19 May 2010 08:03:28 +0100\r
+Message-Id: <1274252620-1249-2-git-send-email-dme@dme.org>\r
+X-Mailer: git-send-email 1.7.1\r
+In-Reply-To: <1274252620-1249-1-git-send-email-dme@dme.org>\r
+References: <1274252620-1249-1-git-send-email-dme@dme.org>\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, 19 May 2010 08:53:55 -0000\r
+\r
+- If no saved searches exist or are displayed, don't signal an error,\r
+- If no saved searches exist or are displayed, leave the cursor in the\r
+  search bar,\r
+- Minor layout improvements.\r
+---\r
+ emacs/notmuch-hello.el |   36 +++++++++++++++++++-----------------\r
+ 1 files changed, 19 insertions(+), 17 deletions(-)\r
+\r
+diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el\r
+index 6a1c56e..1358387 100644\r
+--- a/emacs/notmuch-hello.el\r
++++ b/emacs/notmuch-hello.el\r
+@@ -273,7 +273,7 @@ diagonal."\r
+                              (notmuch-hello-update))\r
+                    :help-echo "Refresh"\r
+                    (car (process-lines notmuch-command "count")))\r
+-      (widget-insert " messages (that's not much mail).\n\n"))\r
++      (widget-insert " messages (that's not much mail).\n"))\r
\r
+     (let ((found-target-pos nil)\r
+         (final-target-pos nil))\r
+@@ -292,7 +292,7 @@ diagonal."\r
+            (widest (max saved-widest alltags-widest)))\r
\r
+       (when saved-alist\r
+-        (widget-insert "Saved searches: ")\r
++        (widget-insert "\nSaved searches: ")\r
+         (widget-create 'push-button\r
+                        :notify (lambda (&rest ignore)\r
+                                  (customize-variable 'notmuch-saved-searches))\r
+@@ -305,18 +305,16 @@ diagonal."\r
+               (setq final-target-pos found-target-pos))\r
+           (indent-rigidly start (point) notmuch-hello-indent)))\r
\r
+-      (let ((start (point)))\r
+-        (widget-insert "\nSearch: ")\r
+-        (setq notmuch-hello-search-bar-marker (point-marker))\r
+-        (widget-create 'editable-field\r
+-                       ;; Leave some space at the start and end of the\r
+-                       ;; search boxes.\r
+-                       :size (max 8 (- (window-width) (* 2 notmuch-hello-indent)\r
+-                                       (length "Search: ")))\r
+-                       :action (lambda (widget &rest ignore)\r
+-                                 (notmuch-hello-search (widget-value widget))))\r
+-        (widget-insert "\n")\r
+-        (indent-rigidly start (point) notmuch-hello-indent))\r
++      (widget-insert "\nSearch: ")\r
++      (setq notmuch-hello-search-bar-marker (point-marker))\r
++      (widget-create 'editable-field\r
++                     ;; Leave some space at the start and end of the\r
++                     ;; search boxes.\r
++                     :size (max 8 (- (window-width) notmuch-hello-indent\r
++                                     (length "Search: ")))\r
++                     :action (lambda (widget &rest ignore)\r
++                               (notmuch-hello-search (widget-value widget))))\r
++      (widget-insert "\n")\r
\r
+       (when notmuch-hello-recent-searches\r
+         (widget-insert "\nRecent searches: ")\r
+@@ -408,9 +406,13 @@ diagonal."\r
\r
+       (widget-setup)\r
\r
+-      (goto-char final-target-pos)\r
+-      (if (not (widget-at))\r
+-        (widget-forward 1)))))\r
++      (when final-target-pos\r
++      (goto-char final-target-pos)\r
++      (unless (widget-at)\r
++        (widget-forward 1)))\r
++\r
++      (unless (widget-at)\r
++      (notmuch-hello-goto-search)))))\r
\r
+ ;;;###autoload\r
+ (defun notmuch-folder ()\r
+-- \r
+1.7.1\r
+\r