[PATCH] cli: add a tool for starting new message in the emacs ui
[notmuch-archives.git] / fe / 608aae9fec3289750e475aeab71963b17ebbc4
1 Return-Path: <fgeller@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 A5736431FD0\r
6         for <notmuch@notmuchmail.org>; Mon, 18 Jul 2011 11:58:40 -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.799\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5\r
12         tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
13         FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
14 Received: from olra.theworths.org ([127.0.0.1])\r
15         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
16         with ESMTP id ydZW17-iZ8nQ for <notmuch@notmuchmail.org>;\r
17         Mon, 18 Jul 2011 11:58:40 -0700 (PDT)\r
18 Received: from mail-fx0-f46.google.com (mail-fx0-f46.google.com\r
19         [209.85.161.46]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
20         (No client certificate requested)\r
21         by olra.theworths.org (Postfix) with ESMTPS id 09C82431FB6\r
22         for <notmuch@notmuchmail.org>; Mon, 18 Jul 2011 11:58:39 -0700 (PDT)\r
23 Received: by fxh19 with SMTP id 19so6761582fxh.19\r
24         for <notmuch@notmuchmail.org>; Mon, 18 Jul 2011 11:58:38 -0700 (PDT)\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;\r
26         h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references;\r
27         bh=7x4MAWpWObBdzaxYPUzaUFrDlGgcl7i8BMaBa6jJMgo=;\r
28         b=MlOXK4KnWVntBHk+BHiW7Ujk85MukGnWaUHGbjdlI0uVwbRQfNKz8qEkyPA3lF/peA\r
29         lcbKtoxCDyqcPV7tJHNECgrK4KHVi88pwrnCEZTjimO7tm+BDNhLhbyP7jDSheFkzC/+\r
30         WHVOhjKWHcJJ6Nboxt6mS6GXsFuNxIJWttBmA=\r
31 Received: by 10.223.7.10 with SMTP id b10mr10550738fab.76.1311015518525;\r
32         Mon, 18 Jul 2011 11:58:38 -0700 (PDT)\r
33 Received: from localhorst.example.com (brln-4d0cb676.pool.mediaWays.net\r
34         [77.12.182.118])\r
35         by mx.google.com with ESMTPS id 28sm3122122fax.3.2011.07.18.11.58.35\r
36         (version=TLSv1/SSLv3 cipher=OTHER);\r
37         Mon, 18 Jul 2011 11:58:37 -0700 (PDT)\r
38 Received: by localhorst.example.com (Postfix, from userid 501)\r
39         id 5FA2D471E0B4; Mon, 18 Jul 2011 20:58:34 +0200 (CEST)\r
40 From: Felix Geller <fgeller@gmail.com>\r
41 To: notmuch@notmuchmail.org\r
42 Subject: [PATCH 1/2] Added variable to toggle message indendation in Emacs'\r
43         notmuch-show\r
44 Date: Mon, 18 Jul 2011 20:57:44 +0200\r
45 Message-Id: <1311015465-8136-1-git-send-email-fgeller@gmail.com>\r
46 X-Mailer: git-send-email 1.7.6\r
47 In-Reply-To: <874o2j4f1e.fsf@servo.factory.finestructure.net>\r
48 References: <874o2j4f1e.fsf@servo.factory.finestructure.net>\r
49 X-BeenThere: notmuch@notmuchmail.org\r
50 X-Mailman-Version: 2.1.13\r
51 Precedence: list\r
52 List-Id: "Use and development of the notmuch mail system."\r
53         <notmuch.notmuchmail.org>\r
54 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
55         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
56 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
57 List-Post: <mailto:notmuch@notmuchmail.org>\r
58 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
59 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
60         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
61 X-List-Received-Date: Mon, 18 Jul 2011 18:58:40 -0000\r
62 \r
63 ---\r
64  emacs/notmuch-show.el |   13 ++++++++++---\r
65  1 files changed, 10 insertions(+), 3 deletions(-)\r
66 \r
67 diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
68 index f96743b..48df4c5 100644\r
69 --- a/emacs/notmuch-show.el\r
70 +++ b/emacs/notmuch-show.el\r
71 @@ -90,6 +90,11 @@ any given message."\r
72    :group 'notmuch\r
73    :type 'boolean)\r
74  \r
75 +(defcustom notmuch-show-indent-messages-in-thread t\r
76 +  "Should messages be indented according to their depth in a thread?"\r
77 +  :group 'notmuch\r
78 +  :type 'boolean)\r
79 +\r
80  (defcustom notmuch-show-indent-multipart nil\r
81    "Should the sub-parts of a multipart/* part be indented?"\r
82    ;; dme: Not sure which is a good default.\r
83 @@ -237,8 +242,9 @@ unchanged ADDRESS if parsing fails."\r
84    "Insert a notmuch style headerline based on HEADERS for a\r
85  message at DEPTH in the current thread."\r
86    (let ((start (point)))\r
87 -    (insert (notmuch-show-spaces-n depth)\r
88 -           (notmuch-show-clean-address (plist-get headers :From))\r
89 +    (when notmuch-show-indent-messages-in-thread\r
90 +      (insert (notmuch-show-spaces-n depth)))\r
91 +    (insert (notmuch-show-clean-address (plist-get headers :From))\r
92             " ("\r
93             date\r
94             ") ("\r
95 @@ -733,7 +739,8 @@ current buffer, if possible."\r
96      (setq content-end (point-marker))\r
97  \r
98      ;; Indent according to the depth in the thread.\r
99 -    (indent-rigidly content-start content-end depth)\r
100 +    (when notmuch-show-indent-messages-in-thread\r
101 +      (indent-rigidly content-start content-end depth))\r
102  \r
103      (setq message-end (point-max-marker))\r
104  \r
105 -- \r
106 1.7.6\r
107 \r