Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id A5736431FD0 for ; Mon, 18 Jul 2011 11:58:40 -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 ydZW17-iZ8nQ for ; Mon, 18 Jul 2011 11:58:40 -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 09C82431FB6 for ; Mon, 18 Jul 2011 11:58:39 -0700 (PDT) Received: by fxh19 with SMTP id 19so6761582fxh.19 for ; Mon, 18 Jul 2011 11:58:38 -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=7x4MAWpWObBdzaxYPUzaUFrDlGgcl7i8BMaBa6jJMgo=; b=MlOXK4KnWVntBHk+BHiW7Ujk85MukGnWaUHGbjdlI0uVwbRQfNKz8qEkyPA3lF/peA lcbKtoxCDyqcPV7tJHNECgrK4KHVi88pwrnCEZTjimO7tm+BDNhLhbyP7jDSheFkzC/+ WHVOhjKWHcJJ6Nboxt6mS6GXsFuNxIJWttBmA= Received: by 10.223.7.10 with SMTP id b10mr10550738fab.76.1311015518525; Mon, 18 Jul 2011 11:58:38 -0700 (PDT) Received: from localhorst.example.com (brln-4d0cb676.pool.mediaWays.net [77.12.182.118]) by mx.google.com with ESMTPS id 28sm3122122fax.3.2011.07.18.11.58.35 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 18 Jul 2011 11:58:37 -0700 (PDT) Received: by localhorst.example.com (Postfix, from userid 501) id 5FA2D471E0B4; Mon, 18 Jul 2011 20:58:34 +0200 (CEST) From: Felix Geller To: notmuch@notmuchmail.org Subject: [PATCH 1/2] Added variable to toggle message indendation in Emacs' notmuch-show Date: Mon, 18 Jul 2011 20:57:44 +0200 Message-Id: <1311015465-8136-1-git-send-email-fgeller@gmail.com> X-Mailer: git-send-email 1.7.6 In-Reply-To: <874o2j4f1e.fsf@servo.factory.finestructure.net> References: <874o2j4f1e.fsf@servo.factory.finestructure.net> 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 18:58:40 -0000 --- 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