Re: [PATCH] emacs: wash: make word-wrap bound message width
[notmuch-archives.git] / 78 / 917368ca9cfad2473b9c99d4070d3f9a60f142
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 E2A4D431FD2\r
6         for <notmuch@notmuchmail.org>; Wed,  2 Oct 2013 06:00:05 -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.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 aRDfh13T4SRY for <notmuch@notmuchmail.org>;\r
18         Wed,  2 Oct 2013 06:00:00 -0700 (PDT)\r
19 Received: from mail-wg0-f46.google.com (mail-wg0-f46.google.com\r
20  [74.125.82.46])        (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  39A46431FCF    for <notmuch@notmuchmail.org>; Wed,  2 Oct 2013 06:00:00 -0700\r
23  (PDT)\r
24 Received: by mail-wg0-f46.google.com with SMTP id k14so828487wgh.25\r
25         for <notmuch@notmuchmail.org>; Wed, 02 Oct 2013 05:59:57 -0700 (PDT)\r
26 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
27         h=from:to:cc:subject:date:message-id;\r
28         bh=Rsc7MwRIParoQm4AAA4avKR+S1HARV7HkA952arArQA=;\r
29         b=h9Zi+G5uJb/v+J8F6CvIy5InpdRBBSt/8u/mybsYiKhHu9E7YTGiJPdB9HsTnuSNK7\r
30         1cJLViogp7x99OEuT/52Jb9enrp3g+uEcUINZ9AouQIThMKhwnjHEvaZsZkcPBSB9BzX\r
31         vW7glDBS+NgknLe4XLEp5Ovam/DLmIqhmtCaKGTP5q93bthC3flSWVUrOp27h0TD85nl\r
32         Mv1tEHbQWiw8ixnmlGvncCRCcmw57nq18Xkv+rsq3OFZvTVBS4EEA/trqH6LZarh+Jyu\r
33         zLZRH+w8W6hj5FoK3DQ7Vh6zwajWkzYG3pZ9JBANo2/QmlcLEt7VwKAjy+8NwLhUx9t6\r
34         RIOA==\r
35 X-Received: by 10.180.73.113 with SMTP id k17mr23241346wiv.6.1380718797490;\r
36         Wed, 02 Oct 2013 05:59:57 -0700 (PDT)\r
37 Received: from localhost (93-97-24-31.zone5.bethere.co.uk. [93.97.24.31])\r
38         by mx.google.com with ESMTPSA id i8sm3353623wib.1.1969.12.31.16.00.00\r
39         (version=TLSv1.2 cipher=RC4-SHA bits=128/128);\r
40         Wed, 02 Oct 2013 05:59:57 -0700 (PDT)\r
41 From: Mark Walters <markwalters1009@gmail.com>\r
42 To: notmuch@notmuchmail.org\r
43 Subject: [PATCH] contrib: pick: unset current-prefix-arg for notmuch-show\r
44 Date: Wed,  2 Oct 2013 13:59:48 +0100\r
45 Message-Id: <1380718788-18165-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: Wed, 02 Oct 2013 13:00:06 -0000\r
60 \r
61 notmuch-show looks at the prefix argument directly (ie via\r
62 current-prefix-arg) rather than using some form of the interactive\r
63 command. Thus we need to unset current-prefix-arg before calling notmuch-show.\r
64 ---\r
65 I was just doing final tests for pick to mainline when I discovered\r
66 the following bug. The show-out option was not working quite correctly\r
67 (it was eliding the non-matching messages). I traced this to the\r
68 following: notmuch-show looks at current-prefix-arg directly. The\r
69 recent change to call notmuch-pick-show-message-out via a prefix arg\r
70 rather than its own keybinding meant that this prefix arg is being\r
71 passed on to the subsidary notmuch-show call. \r
72 \r
73 To avoid this we unset current-prefix-arg before calling\r
74 notmuch-show. It seems neatest to do this in\r
75 notmuch-pick-show-message.\r
76 \r
77 Sorry for not spotting this before.\r
78 \r
79 Best wishes\r
80 \r
81 Mark\r
82 \r
83 \r
84 \r
85 \r
86 \r
87  contrib/notmuch-pick/notmuch-pick.el |   11 +++++++----\r
88  1 files changed, 7 insertions(+), 4 deletions(-)\r
89 \r
90 diff --git a/contrib/notmuch-pick/notmuch-pick.el b/contrib/notmuch-pick/notmuch-pick.el\r
91 index 0aa651e..6b727b2 100644\r
92 --- a/contrib/notmuch-pick/notmuch-pick.el\r
93 +++ b/contrib/notmuch-pick/notmuch-pick.el\r
94 @@ -488,10 +488,13 @@ Does NOT change the database."\r
95  Shows in split pane or whole window according to value of\r
96  `notmuch-pick-show-out'. A prefix argument reverses the choice."\r
97    (interactive "P")\r
98 -  (if (or (and notmuch-pick-show-out  (not arg))\r
99 -         (and (not notmuch-pick-show-out) arg))\r
100 -      (notmuch-pick-show-message-out)\r
101 -    (notmuch-pick-show-message-in)))\r
102 +  ;; We have to unset current-prefix-arg as notmuch-show examines it\r
103 +  ;; directly.\r
104 +  (let ((current-prefix-arg nil))\r
105 +    (if (or (and notmuch-pick-show-out (not arg))\r
106 +           (and (not notmuch-pick-show-out) arg))\r
107 +       (notmuch-pick-show-message-out)\r
108 +      (notmuch-pick-show-message-in))))\r
109  \r
110  (defun notmuch-pick-scroll-message-window ()\r
111    "Scroll the message window (if it exists)"\r
112 -- \r
113 1.7.9.1\r
114 \r