From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id E84DC429E3A for ; Mon, 18 Jul 2011 15:29:24 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.799 X-Spam-Level: X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id C7zdTuubi8pA for ; Mon, 18 Jul 2011 15:29:23 -0700 (PDT) Received: from mail-fx0-f46.google.com (mail-fx0-f46.google.com [209.85.161.46]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 2DD11429E31 for ; Mon, 18 Jul 2011 15:29:19 -0700 (PDT) Received: by mail-fx0-f46.google.com with SMTP id 19so7015353fxh.19 for ; Mon, 18 Jul 2011 15:29:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=Y+5nlOl15aDsBpanxt8Q4Iuj07ALOAnua/EeQUKyfuA=; b=k2Q8kyiN2mlfw7iBn7kogpzfHHq/4+IiIonjcJKC955g4ElAQxFkEFXsB4i0TPPVWh SyJ5cpq/g21JZ2GQJNnxUsKtKDJmvy5GsebMSnM+UTG5uDmciBkF9W52eXGCNBmxdfuC T1uNMWd6Tkzh7MgBd0wP0rzcDR0pFjnO+ke60= Received: by 10.223.127.195 with SMTP id h3mr10753431fas.135.1311028158857; Mon, 18 Jul 2011 15:29:18 -0700 (PDT) Received: from localhorst.example.com (brln-4d0cb676.pool.mediaWays.net [77.12.182.118]) by mx.google.com with ESMTPS id h20sm14243fai.44.2011.07.18.15.29.17 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 18 Jul 2011 15:29:18 -0700 (PDT) Received: by localhorst.example.com (Postfix, from userid 501) id E1F174720604; Tue, 19 Jul 2011 00:29:16 +0200 (CEST) From: Felix Geller To: notmuch@notmuchmail.org Subject: [PATCH 2/2] Emacs: Add variable to toggle thread indentation to notmuch-show Date: Tue, 19 Jul 2011 00:28:39 +0200 Message-Id: <1311028119-50637-3-git-send-email-fgeller@gmail.com> X-Mailer: git-send-email 1.7.6 In-Reply-To: <1311028119-50637-1-git-send-email-fgeller@gmail.com> References: <87vcuz2yga.fsf@servo.factory.finestructure.net> <1311028119-50637-1-git-send-email-fgeller@gmail.com> X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Jul 2011 22:29:25 -0000 Add customizable variable notmuch-show-indent-messages-in-thread to toggle indentation of messages in a thread in a notmuch-show buffer. --- emacs/notmuch-show.el | 13 ++++++++++--- 1 files changed, 10 insertions(+), 3 deletions(-) diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el index f96743b..48df4c5 100644 --- a/emacs/notmuch-show.el +++ b/emacs/notmuch-show.el @@ -90,6 +90,11 @@ any given message." :group 'notmuch :type 'boolean) +(defcustom notmuch-show-indent-messages-in-thread t + "Should messages be indented according to their depth in a thread?" + :group 'notmuch + :type 'boolean) + (defcustom notmuch-show-indent-multipart nil "Should the sub-parts of a multipart/* part be indented?" ;; dme: Not sure which is a good default. @@ -237,8 +242,9 @@ unchanged ADDRESS if parsing fails." "Insert a notmuch style headerline based on HEADERS for a message at DEPTH in the current thread." (let ((start (point))) - (insert (notmuch-show-spaces-n depth) - (notmuch-show-clean-address (plist-get headers :From)) + (when notmuch-show-indent-messages-in-thread + (insert (notmuch-show-spaces-n depth))) + (insert (notmuch-show-clean-address (plist-get headers :From)) " (" date ") (" @@ -733,7 +739,8 @@ current buffer, if possible." (setq content-end (point-marker)) ;; Indent according to the depth in the thread. - (indent-rigidly content-start content-end depth) + (when notmuch-show-indent-messages-in-thread + (indent-rigidly content-start content-end depth)) (setq message-end (point-max-marker)) -- 1.7.6