From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 2EwEGKiAN19MAQAA0tVLHw (envelope-from ) for ; Sat, 15 Aug 2020 06:28:56 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id WDkAFKiAN1+bbQAAB5/wlQ (envelope-from ) for ; Sat, 15 Aug 2020 06:28:56 +0000 Received: from mail.notmuchmail.org (nmbug.tethera.net [144.217.243.247]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (2048 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 81A309402C8 for ; Sat, 15 Aug 2020 06:28:54 +0000 (UTC) Received: from [144.217.243.247] (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 2051B29B8C; Sat, 15 Aug 2020 02:28:44 -0400 (EDT) Received: from meesny.iki.fi (meesny.iki.fi [195.140.195.201]) by mail.notmuchmail.org (Postfix) with ESMTPS id EAFC31FA22 for ; Sat, 15 Aug 2020 02:28:40 -0400 (EDT) Received: from mithlond.arda (mobile-access-bceeee-200.dhcp.inet.fi [188.238.238.200]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: tlikonen) by meesny.iki.fi (Postfix) with ESMTPSA id F1AF720099; Sat, 15 Aug 2020 09:28:35 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=meesny; t=1597472916; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=NVEBE3noDw9KkAWpaL3YvtMSvIIBTv+D/fRnZ+xboio=; b=B3AHooezAyNqR9LSq58O9KovjmXwDHV5Y1yg28YMtt4l4+Y0EXex+xkZKqGG2sjW1CKxTi yRTwxXpaERsrDX3JFX4i9rjn6ElEfQfMn9FP0zWRT6v4gdZpajZYF5P9WHXL3o3ABO1KOW TeMKRKhCch3JhxFJndqSV/oXhwyuVPo= From: Teemu Likonen To: David Bremner , David Edmondson , notmuch@notmuchmail.org Subject: [PATCH v3] Emacs: Indent first header line only when indentation is turned on Date: Sat, 15 Aug 2020 09:28:29 +0300 Message-Id: <20200815062829.4987-1-tlikonen@iki.fi> X-Mailer: git-send-email 2.20.1 In-Reply-To: <874kp7sae9.fsf@tethera.net> References: <874kp7sae9.fsf@tethera.net> MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=meesny; t=1597472916; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=NVEBE3noDw9KkAWpaL3YvtMSvIIBTv+D/fRnZ+xboio=; b=qCJ6cFuAjCB/rkkS05Zn2sTJQgVphL7+94Ys7e8bdnRfgw1dgauCxmjtuwUZSPhZQxOyLJ k16Lm76zKccVklGP/5v1nWGbgOmN6xwhJatUA7BpfvLagmfGMgXS/nJDu0L1xYZ98OF6zH x5aYmK8XPYt4EdYEXl7nL1P6o7cmt7A= ARC-Seal: i=1; s=meesny; d=iki.fi; t=1597472916; a=rsa-sha256; cv=none; b=JHV4z+2GBtyHFIzN5SgO8kmEfg7NxFKwxW5ACBEBCJmYgZi6miTBOrwcVhp0ZiGK8ufvsk 54YcDjL8z7Q8uRKcf0KNdpQgnVp6AexyuoyinhT9ZQKw12CCO7OzVG7jkAGejQHGQn3LWr Su20Sdrd7U5ZVOLVNGSVsaLGpXdgPOA= ARC-Authentication-Results: i=1; ORIGINATING; auth=pass smtp.auth=tlikonen smtp.mailfrom=tlikonen@iki.fi Message-ID-Hash: OHMWS3TE5BJS5HT7SIVKHI3JAYZ5SYB6 X-Message-ID-Hash: OHMWS3TE5BJS5HT7SIVKHI3JAYZ5SYB6 X-MailFrom: tlikonen@iki.fi X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.1 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=fail (body hash did not verify) header.d=iki.fi header.s=meesny header.b=B3AHooez; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 144.217.243.247 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Spam-Score: 4.53 X-TUID: 08voYhwJD+/o Previously in message-show mode message's first header line (From header) was always indented, even if user had turned thread indentation off with "<" (notmuch-show-toggle-thread-indentation) command. This change modifies notmuch-show-insert-headerline function so that it doesn't indent the first header line if notmuch-show-indent-content variable is nil. This change also modifies tests so that they expect this new output format: test/emacs-show.expected-output/notmuch-show-indent-thread-content-off --- emacs/notmuch-show.el | 5 ++++- .../notmuch-show-indent-thread-content-off | 12 ++++++------ 2 files changed, 10 insertions(+), 7 deletions(-) * 2020-08-12 20:38:06-03, David Bremner wrote: > the test "notmuch-show: disable indentation of thread content (w/ > notmuch-show-toggle-thread-indentation)" in T450-emacs-show needs to be > adjusted for this change (i.e. it fails as is). Thanks. This version has updated test output files. diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el index 0eb27e33..444b2a45 100644 --- a/emacs/notmuch-show.el +++ b/emacs/notmuch-show.el @@ -474,7 +474,10 @@ message at DEPTH in the current thread." ;; invisible U+200E LEFT-TO-RIGHT MARK character which forces ;; the header paragraph as left-to-right text. (insert (propertize (string ?\x200e) 'invisible t))) - (insert (notmuch-show-spaces-n (* notmuch-show-indent-messages-width depth)) + (insert (if notmuch-show-indent-content + (notmuch-show-spaces-n (* notmuch-show-indent-messages-width + depth)) + "") from " (" date diff --git a/test/emacs-show.expected-output/notmuch-show-indent-thread-content-off b/test/emacs-show.expected-output/notmuch-show-indent-thread-content-off index 1a06374d..0bb58330 100644 --- a/test/emacs-show.expected-output/notmuch-show-indent-thread-content-off +++ b/test/emacs-show.expected-output/notmuch-show-indent-thread-content-off @@ -31,8 +31,8 @@ Cheers, [ application/pgp-signature ] [ text/plain ] [ 4-line signature. Click/Enter to show. ] - Mikhail Gusarov (2009-11-17) (inbox signed unread) - Lars Kellogg-Stedman (2009-11-17) (inbox signed) +Mikhail Gusarov (2009-11-17) (inbox signed unread) +Lars Kellogg-Stedman (2009-11-17) (inbox signed) Subject: Re: [notmuch] Working with Maildir storage? To: Mikhail Gusarov Cc: notmuch@notmuchmail.org @@ -57,9 +57,9 @@ It doesn't look like the patch is in git yet. [ application/pgp-signature ] [ text/plain ] [ 4-line signature. Click/Enter to show. ] - Mikhail Gusarov (2009-11-17) (inbox unread) - Keith Packard (2009-11-17) (inbox unread) - Lars Kellogg-Stedman (2009-11-18) (inbox signed unread) +Mikhail Gusarov (2009-11-17) (inbox unread) +Keith Packard (2009-11-17) (inbox unread) +Lars Kellogg-Stedman (2009-11-18) (inbox signed unread) Subject: Re: [notmuch] Working with Maildir storage? To: Keith Packard Cc: notmuch@notmuchmail.org @@ -79,4 +79,4 @@ missing "#include " (for the uint32_t on line 466). [ application/pgp-signature ] [ text/plain ] [ 4-line signature. Click/Enter to show. ] - Carl Worth (2009-11-18) (inbox unread) +Carl Worth (2009-11-18) (inbox unread) -- 2.20.1