[PATCH] RFC: all deleting all properties with a given key
[notmuch-archives.git] / c6 / c53c6cf188b8802511cd1d7b4f86c98b9c8119
1 Return-Path: <jrollins@finestructure.net>\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 C417A4196F2\r
6         for <notmuch@notmuchmail.org>; Sat,  6 Nov 2010 14:35:24 -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: -4.2\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-4.2 tagged_above=-999 required=5\r
12         tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3] autolearn=ham\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 zx9eKbFcR5yW for <notmuch@notmuchmail.org>;\r
16         Sat,  6 Nov 2010 14:35:12 -0700 (PDT)\r
17 Received: from brinza.cc.columbia.edu (brinza.cc.columbia.edu [128.59.29.8])\r
18         by olra.theworths.org (Postfix) with ESMTP id AFF524196F0\r
19         for <notmuch@notmuchmail.org>; Sat,  6 Nov 2010 14:35:12 -0700 (PDT)\r
20 Received: from servo.finestructure.net (cpe-74-66-82-137.nyc.res.rr.com\r
21         [74.66.82.137])\r
22         (user=jgr2110 author=jrollins@finestructure.net mech=PLAIN bits=0)\r
23         by brinza.cc.columbia.edu (8.14.4/8.14.3) with ESMTP id oA6LZAw6007517\r
24         (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT)\r
25         for <notmuch@notmuchmail.org>; Sat, 6 Nov 2010 17:35:11 -0400 (EDT)\r
26 Received: from jrollins by servo.finestructure.net with local (Exim 4.72)\r
27         (envelope-from <jrollins@finestructure.net>) id 1PEqPk-0001rR-Tn\r
28         for notmuch@notmuchmail.org; Sat, 06 Nov 2010 17:35:08 -0400\r
29 From: Jameson Rollins <jrollins@finestructure.net>\r
30 To: Notmuch Mail <notmuch@notmuchmail.org>\r
31 Subject: [PATCH 1/2] Don't use kill-this-buffer to kill notmuch emacs buffers\r
32 Date: Sat, 6 Nov 2010 16:49:28 -0400\r
33 Message-ID: <87y696yw37.fsf@servo.finestructure.net>\r
34 MIME-Version: 1.0\r
35 Content-Type: text/plain; charset=us-ascii\r
36 X-No-Spam-Score: Local\r
37 X-Scanned-By: MIMEDefang 2.68 on 128.59.29.8\r
38 X-BeenThere: notmuch@notmuchmail.org\r
39 X-Mailman-Version: 2.1.13\r
40 Precedence: list\r
41 List-Id: "Use and development of the notmuch mail system."\r
42         <notmuch.notmuchmail.org>\r
43 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
44         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
45 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
46 List-Post: <mailto:notmuch@notmuchmail.org>\r
47 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
48 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
49         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
50 X-List-Received-Date: Sat, 06 Nov 2010 21:35:24 -0000\r
51 \r
52 kill-this-buffer appears to be a function intended specifically for\r
53 use in the menu bar, and causes problem killing notmuch buffers when\r
54 multiple frames have been used.  This patch replaces kill-this-buffer\r
55 with notmuch-kill-this-buffer, which in turn just simply calls\r
56 (kill-buffer (current-buffer)).\r
57 ---\r
58  emacs/notmuch-hello.el |    2 +-\r
59  emacs/notmuch-lib.el   |    5 +++++\r
60  emacs/notmuch-show.el  |    4 ++--\r
61  emacs/notmuch.el       |    4 ++--\r
62  4 files changed, 10 insertions(+), 5 deletions(-)\r
63 \r
64 diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el\r
65 index 4b6a90d..e58dd24 100644\r
66 --- a/emacs/notmuch-hello.el\r
67 +++ b/emacs/notmuch-hello.el\r
68 @@ -294,7 +294,7 @@ should be. Returns a cons cell `(tags-per-line width)'."\r
69      (define-key map "v" '(lambda () "Display the notmuch version" (interactive)\r
70                             (message "notmuch version %s" (notmuch-version))))\r
71      (define-key map "?" 'notmuch-help)\r
72 -    (define-key map "q" 'kill-this-buffer)\r
73 +    (define-key map "q" 'notmuch-kill-this-buffer)\r
74      (define-key map "=" 'notmuch-hello-update)\r
75      (define-key map "G" 'notmuch-hello-poll-and-update)\r
76      (define-key map (kbd "<C-tab>") 'widget-backward)\r
77 diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el\r
78 index abcbfa1..dfdcd05 100644\r
79 --- a/emacs/notmuch-lib.el\r
80 +++ b/emacs/notmuch-lib.el\r
81 @@ -87,6 +87,11 @@ the user hasn't set this variable with the old or new value."\r
82    "Return the user.primary_email value from the notmuch configuration."\r
83    (notmuch-config-get "user.primary_email"))\r
84  \r
85 +(defun notmuch-kill-this-buffer ()\r
86 +  "Kill the current buffer."\r
87 +  (interactive)\r
88 +  (kill-buffer (current-buffer)))\r
89 +\r
90  ;;\r
91  \r
92  ;; XXX: This should be a generic function in emacs somewhere, not\r
93 diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
94 index 7ec6aa5..6b2268f 100644\r
95 --- a/emacs/notmuch-show.el\r
96 +++ b/emacs/notmuch-show.el\r
97 @@ -555,7 +555,7 @@ function is used. "\r
98  (defvar notmuch-show-mode-map\r
99        (let ((map (make-sparse-keymap)))\r
100         (define-key map "?" 'notmuch-help)\r
101 -       (define-key map "q" 'kill-this-buffer)\r
102 +       (define-key map "q" 'notmuch-kill-this-buffer)\r
103         (define-key map (kbd "<C-tab>") 'widget-backward)\r
104         (define-key map (kbd "M-TAB") 'notmuch-show-previous-button)\r
105         (define-key map (kbd "<backtab>") 'notmuch-show-previous-button)\r
106 @@ -1038,7 +1038,7 @@ argument, hide all of the messages."\r
107         until (not (notmuch-show-goto-message-next)))\r
108    ;; Move to the next item in the search results, if any.\r
109    (let ((parent-buffer notmuch-show-parent-buffer))\r
110 -    (kill-this-buffer)\r
111 +    (notmuch-kill-this-buffer)\r
112      (if parent-buffer\r
113         (progn\r
114           (switch-to-buffer parent-buffer)\r
115 diff --git a/emacs/notmuch.el b/emacs/notmuch.el\r
116 index 2a87ab9..4a9223e 100644\r
117 --- a/emacs/notmuch.el\r
118 +++ b/emacs/notmuch.el\r
119 @@ -232,7 +232,7 @@ For a mouse binding, return nil."\r
120    "Exit the search buffer, calling any defined continuation function."\r
121    (interactive)\r
122    (let ((continuation notmuch-search-continuation))\r
123 -    (kill-this-buffer)\r
124 +    (notmuch-kill-this-buffer)\r
125      (when continuation\r
126        (funcall continuation))))\r
127  \r
128 @@ -824,7 +824,7 @@ same relative position within the new buffer."\r
129         (target-thread (notmuch-search-find-thread-id))\r
130         (query notmuch-search-query-string)\r
131         (continuation notmuch-search-continuation))\r
132 -    (kill-this-buffer)\r
133 +    (notmuch-kill-this-buffer)\r
134      (notmuch-search query oldest-first target-thread target-line continuation)\r
135      (goto-char (point-min))))\r
136  \r
137 -- \r
138 1.7.2.3\r
139 \r