[PATCH v4 6/7] On deletion, replace with ghost when other active messages in thread
[notmuch-archives.git] / 2b / ca988b03c4b8d0e19069cd109e63934b1d9e46
1 Return-Path: <error4me@gmx.de>\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 7D9BF431FD0\r
6         for <notmuch@notmuchmail.org>; Sun, 23 Oct 2011 09:53: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.001\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0.001 tagged_above=-999 required=5\r
12         tests=[FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001]\r
13         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 xOlJN8ofVacC for <notmuch@notmuchmail.org>;\r
17         Sun, 23 Oct 2011 09:53:17 -0700 (PDT)\r
18 Received: from mailout-de.gmx.net (mailout-de.gmx.net [213.165.64.22])\r
19         by olra.theworths.org (Postfix) with SMTP id BE831431FB6\r
20         for <notmuch@notmuchmail.org>; Sun, 23 Oct 2011 09:53:16 -0700 (PDT)\r
21 Received: (qmail invoked by alias); 23 Oct 2011 16:53:15 -0000\r
22 Received: from p54BE2C59.dip.t-dialin.net (EHLO shi.workgroup) [84.190.44.89]\r
23         by mail.gmx.net (mp058) with SMTP; 23 Oct 2011 18:53:15 +0200\r
24 X-Authenticated: #19296480\r
25 X-Provags-ID: V01U2FsdGVkX1/74t141lD7zpTc1GAzPjKYhQF4aPNOKwLahK06nI\r
26         Ahnzqlfwvsjk0f\r
27 Received: from grfz by shi.workgroup with local (Exim 4.77)\r
28         (envelope-from <error4me@gmx.de>)\r
29         id 1RI1IF-0000Al-Q5; Sun, 23 Oct 2011 18:53:03 +0200\r
30 Date: Sun, 23 Oct 2011 18:52:43 +0200\r
31 From: Gregor Zattler <telegraph@gmx.net>\r
32 To: notmuch <notmuch@notmuchmail.org>\r
33 Subject: [PATCH 1/2] emacs: add customisation for message indentation width\r
34 Message-ID: <20111023165243.GD21842@shi.workgroup>\r
35 Mail-Followup-To: notmuch <notmuch@notmuchmail.org>\r
36 References: <87vcuz2yga.fsf@servo.factory.finestructure.net>\r
37         <1311028119-50637-1-git-send-email-fgeller@gmail.com>\r
38         <1311028119-50637-3-git-send-email-fgeller@gmail.com>\r
39         <20110719105059.GA6472@shi.workgroup>\r
40         <87wrednlzz.fsf@steelpick.2x.cz>\r
41         <20111023164324.GC21842@shi.workgroup>\r
42 MIME-Version: 1.0\r
43 Content-Type: text/plain; charset=us-ascii\r
44 Content-Disposition: inline\r
45 In-Reply-To: <20111023164324.GC21842@shi.workgroup>\r
46 User-Agent: Mutt/1.5.21 (2010-09-15)\r
47 X-Y-GMX-Trusted: 0\r
48 X-BeenThere: notmuch@notmuchmail.org\r
49 X-Mailman-Version: 2.1.13\r
50 Precedence: list\r
51 List-Id: "Use and development of the notmuch mail system."\r
52         <notmuch.notmuchmail.org>\r
53 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
54         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
55 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
56 List-Post: <mailto:notmuch@notmuchmail.org>\r
57 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
58 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
59         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
60 X-List-Received-Date: Sun, 23 Oct 2011 16:53:17 -0000\r
61 \r
62 Messages are shown indented according to their depth in message\r
63 threads.  Previously indentation width was hardcoded to `1'\r
64 space.  This patch adds a new variable `notmuch-indent-messages-width' \r
65 which governs how many spaces are used per level of indentation.\r
66 Defaults to `1' for compatibility with previous behaviour.\r
67 ---\r
68  emacs/notmuch-show.el |   14 ++++++++++++--\r
69  1 files changed, 12 insertions(+), 2 deletions(-)\r
70 \r
71 diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
72 index 8db5435..897b492 100644\r
73 --- a/emacs/notmuch-show.el\r
74 +++ b/emacs/notmuch-show.el\r
75 @@ -90,6 +90,16 @@ any given message."\r
76    :group 'notmuch\r
77    :type 'boolean)\r
78  \r
79 +(defcustom notmuch-indent-messages-width 1\r
80 +  "Width of message indentation in threads.\r
81 +\r
82 +Messages are shown indented according to their depth in a thread.\r
83 +This variable determines the width of this indentation measured\r
84 +in number of blanks.  Defaults to `1', choose `0' to disable\r
85 +indentation."\r
86 +  :group 'notmuch\r
87 +  :type 'integer)\r
88 +\r
89  (defcustom notmuch-show-indent-multipart nil\r
90    "Should the sub-parts of a multipart/* part be indented?"\r
91    ;; dme: Not sure which is a good default.\r
92 @@ -237,7 +247,7 @@ unchanged ADDRESS if parsing fails."\r
93    "Insert a notmuch style headerline based on HEADERS for a\r
94  message at DEPTH in the current thread."\r
95    (let ((start (point)))\r
96 -    (insert (notmuch-show-spaces-n depth)\r
97 +    (insert (notmuch-show-spaces-n (* notmuch-indent-messages-width depth))\r
98             (notmuch-show-clean-address (plist-get headers :From))\r
99             " ("\r
100             date\r
101 @@ -738,7 +748,7 @@ current buffer, if possible."\r
102      (setq content-end (point-marker))\r
103  \r
104      ;; Indent according to the depth in the thread.\r
105 -    (indent-rigidly content-start content-end depth)\r
106 +    (indent-rigidly content-start content-end (* notmuch-indent-messages-width depth))\r
107  \r
108      (setq message-end (point-max-marker))\r
109  \r
110 -- \r
111 1.7.7\r
112 \r