Re: [PATCH v4 13/16] add indexopts to notmuch python bindings.
[notmuch-archives.git] / 80 / 88c5d294018bc0214c6f0be62f787e4dfa8e87
1 Return-Path: <markwalters1009@gmail.com>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5         by olra.theworths.org (Postfix) with ESMTP id 9ADC0431FAF\r
6         for <notmuch@notmuchmail.org>; Sat, 22 Dec 2012 12:49:13 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 0.201\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0.201 tagged_above=-999 required=5\r
12         tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
13         FREEMAIL_ENVFROM_END_DIGIT=1, FREEMAIL_FROM=0.001,\r
14         RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
15 Received: from olra.theworths.org ([127.0.0.1])\r
16         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
17         with ESMTP id U2SnnVOySOKw for <notmuch@notmuchmail.org>;\r
18         Sat, 22 Dec 2012 12:49:13 -0800 (PST)\r
19 Received: from mail-wg0-f50.google.com (mail-wg0-f50.google.com\r
20  [74.125.82.50])        (using TLSv1 with cipher RC4-SHA (128/128 bits))        (No client\r
21  certificate requested) by olra.theworths.org (Postfix) with ESMTPS id\r
22  0CDFE431FAE    for <notmuch@notmuchmail.org>; Sat, 22 Dec 2012 12:49:12 -0800\r
23  (PST)\r
24 Received: by mail-wg0-f50.google.com with SMTP id es5so2738985wgb.5\r
25         for <notmuch@notmuchmail.org>; Sat, 22 Dec 2012 12:49:11 -0800 (PST)\r
26 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
27         h=x-received:from:to:cc:subject:date:message-id:x-mailer;\r
28         bh=D73ByNkW8fS3VjhQ7r/dSid+jYji88JFyDc8P2ivp3w=;\r
29         b=Ll2DhRTguQSLgRezYauBZpPhask6QvGeonigFdZ8MXL9/FvzHwU45+MbPoD+OaQ7pr\r
30         zdf7N9isWqgBBdYvylq5VNdpk93OBW7c06fZb9UZQbIlwyxVP5Y4QQ2jCY1hVcKcm9iF\r
31         j/71lzkMNHbc5hUVCuYBx9pycsANNGHmoE7+DskEejSgLMwcwwFgjWdg/XfW5Tc5HnF4\r
32         2L0wQ0clrujN8k4+bnldBlKNAgOBtBYm3Q61RelqvkNPP3uLORwX9vueYNn1PsH4q75V\r
33         g8Is+uq9usFv88HfnSClJ6IPa+ONlruSFUe12TxR3GhtVXYr8IcaaOKDgU3zxOWYcmAT\r
34         Tr5w==\r
35 X-Received: by 10.194.238.226 with SMTP id vn2mr29541817wjc.23.1356209351794; \r
36         Sat, 22 Dec 2012 12:49:11 -0800 (PST)\r
37 Received: from localhost (93-97-24-31.zone5.bethere.co.uk. [93.97.24.31])\r
38         by mx.google.com with ESMTPS id eo10sm25090226wib.9.2012.12.22.12.49.10\r
39         (version=TLSv1/SSLv3 cipher=OTHER);\r
40         Sat, 22 Dec 2012 12:49:11 -0800 (PST)\r
41 From: Mark Walters <markwalters1009@gmail.com>\r
42 To: notmuch@notmuchmail.org\r
43 Subject: [PATCH] emacs: tweak error buffer handling\r
44 Date: Sat, 22 Dec 2012 20:49:05 +0000\r
45 Message-Id: <1356209345-11712-1-git-send-email-markwalters1009@gmail.com>\r
46 X-Mailer: git-send-email 1.7.9.1\r
47 X-BeenThere: notmuch@notmuchmail.org\r
48 X-Mailman-Version: 2.1.13\r
49 Precedence: list\r
50 List-Id: "Use and development of the notmuch mail system."\r
51         <notmuch.notmuchmail.org>\r
52 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
53         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
54 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
55 List-Post: <mailto:notmuch@notmuchmail.org>\r
56 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
57 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
58         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
59 X-List-Received-Date: Sat, 22 Dec 2012 20:49:13 -0000\r
60 \r
61 view-mode-enter changed between emacs 23 and emacs 24: the current\r
62 code makes the error buffer disappear in emacs 24 on quitting it (ie\r
63 pressing q) but this just kills the buffer without closing the split\r
64 window in emacs 23.\r
65 \r
66 This patch makes the error buffer window disappear in emacs 23\r
67 too. Since the view-mode-enter function changed we have to test for\r
68 version and do the correct thing in each case.\r
69 ---\r
70 \r
71 This seems to work but I have only tested on 23.4 and 24.2\r
72 \r
73 Best wishes\r
74 \r
75 Mark\r
76 \r
77 \r
78 \r
79  emacs/notmuch-lib.el |    8 +++++---\r
80  1 files changed, 5 insertions(+), 3 deletions(-)\r
81 \r
82 diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el\r
83 index 77a591d..0407f8a 100644\r
84 --- a/emacs/notmuch-lib.el\r
85 +++ b/emacs/notmuch-lib.el\r
86 @@ -324,15 +324,17 @@ the user dismisses it."\r
87  \r
88    (let ((buf (get-buffer-create "*Notmuch errors*")))\r
89      (with-current-buffer buf\r
90 -      (view-mode-enter nil #'kill-buffer)\r
91 +      (pop-to-buffer buf)\r
92 +      (view-mode-enter (when (< emacs-major-version 24)\r
93 +                          (cons (selected-window) (cons nil t)))\r
94 +                      #'kill-buffer)\r
95        (let ((inhibit-read-only t))\r
96         (goto-char (point-max))\r
97         (unless (bobp)\r
98           (insert "\n"))\r
99         (insert msg)\r
100         (unless (bolp)\r
101 -         (insert "\n"))))\r
102 -    (pop-to-buffer buf)))\r
103 +         (insert "\n"))))))\r
104  \r
105  (defun notmuch-check-async-exit-status (proc msg)\r
106    "If PROC exited abnormally, pop up an error buffer and signal an error.\r
107 -- \r
108 1.7.9.1\r
109 \r