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 7D9BF431FD0 for ; Sun, 23 Oct 2011 09:53:17 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 0.001 X-Spam-Level: X-Spam-Status: No, score=0.001 tagged_above=-999 required=5 tests=[FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001] 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 xOlJN8ofVacC for ; Sun, 23 Oct 2011 09:53:17 -0700 (PDT) Received: from mailout-de.gmx.net (mailout-de.gmx.net [213.165.64.22]) by olra.theworths.org (Postfix) with SMTP id BE831431FB6 for ; Sun, 23 Oct 2011 09:53:16 -0700 (PDT) Received: (qmail invoked by alias); 23 Oct 2011 16:53:15 -0000 Received: from p54BE2C59.dip.t-dialin.net (EHLO shi.workgroup) [84.190.44.89] by mail.gmx.net (mp058) with SMTP; 23 Oct 2011 18:53:15 +0200 X-Authenticated: #19296480 X-Provags-ID: V01U2FsdGVkX1/74t141lD7zpTc1GAzPjKYhQF4aPNOKwLahK06nI Ahnzqlfwvsjk0f Received: from grfz by shi.workgroup with local (Exim 4.77) (envelope-from ) id 1RI1IF-0000Al-Q5; Sun, 23 Oct 2011 18:53:03 +0200 Date: Sun, 23 Oct 2011 18:52:43 +0200 From: Gregor Zattler To: notmuch Subject: [PATCH 1/2] emacs: add customisation for message indentation width Message-ID: <20111023165243.GD21842@shi.workgroup> Mail-Followup-To: notmuch References: <87vcuz2yga.fsf@servo.factory.finestructure.net> <1311028119-50637-1-git-send-email-fgeller@gmail.com> <1311028119-50637-3-git-send-email-fgeller@gmail.com> <20110719105059.GA6472@shi.workgroup> <87wrednlzz.fsf@steelpick.2x.cz> <20111023164324.GC21842@shi.workgroup> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20111023164324.GC21842@shi.workgroup> User-Agent: Mutt/1.5.21 (2010-09-15) X-Y-GMX-Trusted: 0 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: Sun, 23 Oct 2011 16:53:17 -0000 Messages are shown indented according to their depth in message threads. Previously indentation width was hardcoded to `1' space. This patch adds a new variable `notmuch-indent-messages-width' which governs how many spaces are used per level of indentation. Defaults to `1' for compatibility with previous behaviour. --- emacs/notmuch-show.el | 14 ++++++++++++-- 1 files changed, 12 insertions(+), 2 deletions(-) diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el index 8db5435..897b492 100644 --- a/emacs/notmuch-show.el +++ b/emacs/notmuch-show.el @@ -90,6 +90,16 @@ any given message." :group 'notmuch :type 'boolean) +(defcustom notmuch-indent-messages-width 1 + "Width of message indentation in threads. + +Messages are shown indented according to their depth in a thread. +This variable determines the width of this indentation measured +in number of blanks. Defaults to `1', choose `0' to disable +indentation." + :group 'notmuch + :type 'integer) + (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,7 +247,7 @@ 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) + (insert (notmuch-show-spaces-n (* notmuch-indent-messages-width depth)) (notmuch-show-clean-address (plist-get headers :From)) " (" date @@ -738,7 +748,7 @@ current buffer, if possible." (setq content-end (point-marker)) ;; Indent according to the depth in the thread. - (indent-rigidly content-start content-end depth) + (indent-rigidly content-start content-end (* notmuch-indent-messages-width depth)) (setq message-end (point-max-marker)) -- 1.7.7