From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id gI45F0VIMF9lNgAA0tVLHw (envelope-from ) for ; Sun, 09 Aug 2020 19:02:29 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id GDnsEkVIMF8WbgAAbx9fmQ (envelope-from ) for ; Sun, 09 Aug 2020 19:02:29 +0000 Received: from mail.notmuchmail.org (nmbug.tethera.net [IPv6:2607:5300:201:3100::1657]) (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 215119403EE for ; Sun, 9 Aug 2020 19:02:27 +0000 (UTC) Received: from [144.217.243.247] (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 82D6329AE8; Sun, 9 Aug 2020 15:02:17 -0400 (EDT) Received: from meesny.iki.fi (unknown [IPv6:2001:67c:2b0:1c1::201]) by mail.notmuchmail.org (Postfix) with ESMTPS id 01E4E1FFA7 for ; Sun, 9 Aug 2020 15:02:15 -0400 (EDT) Received: from mithlond.arda (mobile-access-bceea9-5.dhcp.inet.fi [188.238.169.5]) (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 97C8B2008C; Sun, 9 Aug 2020 22:02:02 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=meesny; t=1596999722; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=zl7mY+R03+xl/HcOAR6c8DyWnk+dYKF8pkAhi8qcWLg=; b=qqYAEPG+d22rIeC55/YNldkBWXqEr1aMd2Zq6wJN6wGhYvtA3sUExGWwT5glJTCscHlQVJ bVYHW82nDf1ITtGxAprZ7Mip4HYnn6MAmm6J2+ortWmFjMt5dRGD6wA911mU3sAaBRZk5n 1ykf+8EcHcYzNxrEe88EW0E95e71iII= From: Teemu Likonen To: notmuch@notmuchmail.org Cc: Teemu Likonen Subject: [PATCH] Emacs: Indent first header line only when indentation is turned on Date: Sun, 9 Aug 2020 22:01:44 +0300 Message-Id: <20200809190144.25459-1-tlikonen@iki.fi> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=meesny; t=1596999722; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=zl7mY+R03+xl/HcOAR6c8DyWnk+dYKF8pkAhi8qcWLg=; b=DvZH6c8GaOWXZYDYPDQfCt2uyVe1uKK3p9bsm98skrsozNVtWy8UGgneddGUfmkuAKuCEc JJxHmCYTMAtaLKs1omC0sbIXHFkeHyhovoiXzzWnxJvMwuES5H39oZi44MrjtD6ROyJjJj TL8DXxOpqnAh8u9l8OVu4TRF3PQTIYQ= ARC-Seal: i=1; s=meesny; d=iki.fi; t=1596999722; a=rsa-sha256; cv=none; b=VHWzEYA4C5s0RTaG6w7QmlWHjxMIplV3chUcfkwbOVXMWUMPzUjN9mOnrK6xW0LqfnRQyl jrHaT1TVs2NeSUjlYGd4/NLHuneDl6BAhAJhiiN6tSo1Ie5CDij2BE3pUQfukbhwxFDg/t WA59MbbUYGDKflHeB4ydBFoaElmCy/c= ARC-Authentication-Results: i=1; ORIGINATING; auth=pass smtp.auth=tlikonen smtp.mailfrom=tlikonen@iki.fi Message-ID-Hash: AQC4NRC2RJZZSHFWFYCH367COTLUXUCS X-Message-ID-Hash: AQC4NRC2RJZZSHFWFYCH367COTLUXUCS 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=qqYAEPG+; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2607:5300:201:3100::1657 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Spam-Score: 3.03 X-TUID: VIVBGyRRB5gw 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. --- emacs/notmuch-show.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el index 0eb27e33..2310017a 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 (notmuch-show-spaces-n + (if notmuch-show-indent-content + (* notmuch-show-indent-messages-width depth) + 0)) from " (" date -- 2.20.1