Re: [PATCH v4 02/16] Move crypto.c into libutil
[notmuch-archives.git] / 8f / b7ba90f32e06970b8d59d817d50e811509b23d
1 Return-Path: <too@guru-group.fi>\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 19745431FAF\r
6         for <notmuch@notmuchmail.org>; Thu, 18 Jul 2013 09:07:17 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 0\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
12         autolearn=disabled\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id nZ+yh1fjwFkr for <notmuch@notmuchmail.org>;\r
16         Thu, 18 Jul 2013 09:07:09 -0700 (PDT)\r
17 Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])\r
18         by olra.theworths.org (Postfix) with ESMTP id 82118431FAE\r
19         for <notmuch@notmuchmail.org>; Thu, 18 Jul 2013 09:07:09 -0700 (PDT)\r
20 Received: by guru.guru-group.fi (Postfix, from userid 501)\r
21         id 400F91000F4; Thu, 18 Jul 2013 19:06:59 +0300 (EEST)\r
22 From: Tomi Ollila <tomi.ollila@iki.fi>\r
23 To: notmuch@notmuchmail.org\r
24 Subject: [PATCH] emacs: show/search: switch to caller/parent buffer when quit\r
25 Date: Thu, 18 Jul 2013 19:06:57 +0300\r
26 Message-Id: <1374163617-23740-1-git-send-email-tomi.ollila@iki.fi>\r
27 X-Mailer: git-send-email 1.8.0\r
28 Cc: tomi.ollila@iki.fi\r
29 X-BeenThere: notmuch@notmuchmail.org\r
30 X-Mailman-Version: 2.1.13\r
31 Precedence: list\r
32 List-Id: "Use and development of the notmuch mail system."\r
33         <notmuch.notmuchmail.org>\r
34 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
35         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
36 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
37 List-Post: <mailto:notmuch@notmuchmail.org>\r
38 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
39 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
40         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
41 X-List-Received-Date: Thu, 18 Jul 2013 16:07:17 -0000\r
42 \r
43 hello/search: in notmuch-hello-search-continuation switch (eventually)\r
44 call notmuch-hello with nil as no-display argument so that notmuch-hello\r
45 buffer is always switched to, instead of possibly to some other buffer\r
46 user may have visited in between.\r
47 \r
48 show: added function `notmuch-show-quit` which switches to parent buffer\r
49 (of that is live) after killing current buffer. Otherwise control may\r
50 go to some other buffer user may have visited in between. This function\r
51 is now bound to "q" in notmuch-show-mode-map.\r
52 ---\r
53  emacs/notmuch-hello.el |  2 +-\r
54  emacs/notmuch-show.el  | 10 +++++++++-\r
55  2 files changed, 10 insertions(+), 2 deletions(-)\r
56 \r
57 diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el\r
58 index 147c08c..00d8785 100644\r
59 --- a/emacs/notmuch-hello.el\r
60 +++ b/emacs/notmuch-hello.el\r
61 @@ -472,7 +472,7 @@ Such a list can be computed with `notmuch-hello-query-counts'."\r
62  (defimage notmuch-hello-logo ((:type png :file "notmuch-logo.png")))\r
63  \r
64  (defun notmuch-hello-search-continuation()\r
65 -  (notmuch-hello-update t))\r
66 +  (notmuch-hello-update nil))\r
67  \r
68  (defun notmuch-hello-update (&optional no-display)\r
69    "Update the current notmuch view."\r
70 diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
71 index e5de977..b346002 100644\r
72 --- a/emacs/notmuch-show.el\r
73 +++ b/emacs/notmuch-show.el\r
74 @@ -1262,7 +1262,7 @@ reset based on the original query."\r
75  (defvar notmuch-show-mode-map\r
76        (let ((map (make-sparse-keymap)))\r
77         (define-key map "?" 'notmuch-help)\r
78 -       (define-key map "q" 'notmuch-kill-this-buffer)\r
79 +       (define-key map "q" 'notmuch-show-quit)\r
80         (define-key map (kbd "<C-tab>") 'widget-backward)\r
81         (define-key map (kbd "M-TAB") 'notmuch-show-previous-button)\r
82         (define-key map (kbd "<backtab>") 'notmuch-show-previous-button)\r
83 @@ -1540,6 +1540,14 @@ marked as unread, i.e. the tag changes in\r
84  \r
85  ;; Commands typically bound to keys.\r
86  \r
87 +(defun notmuch-show-quit ()\r
88 +  "Exit the show buffer, switching to parent buffer if it is live."\r
89 +  (interactive)\r
90 +  (let ((parent-buffer notmuch-show-parent-buffer))\r
91 +    (notmuch-kill-this-buffer)\r
92 +    (if (buffer-live-p parent-buffer)\r
93 +       (switch-to-buffer parent-buffer))))\r
94 +\r
95  (defun notmuch-show-advance ()\r
96    "Advance through thread.\r
97  \r
98 -- \r
99 1.8.0\r
100 \r