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 cMDlJdJyMV+qKwAA0tVLHw (envelope-from ) for ; Mon, 10 Aug 2020 16:16:18 +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 OI75IdJyMV+sLQAAB5/wlQ (envelope-from ) for ; Mon, 10 Aug 2020 16:16:18 +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 8AB05940719 for ; Mon, 10 Aug 2020 16:16:15 +0000 (UTC) Received: from [144.217.243.247] (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 3917729B13; Mon, 10 Aug 2020 12:16:07 -0400 (EDT) Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) by mail.notmuchmail.org (Postfix) with ESMTPS id 6ECAC1FCA6 for ; Mon, 10 Aug 2020 12:16:04 -0400 (EDT) Received: by mail-wm1-x344.google.com with SMTP id 9so70772wmj.5 for ; Mon, 10 Aug 2020 09:16:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dme-org.20150623.gappssmtp.com; s=20150623; h=to:cc:subject:in-reply-to:references:from:date:message-id :mime-version; bh=LIGVdmvWrRL1NY2gL5qjDvJ8JTNzZJAXI12YU7tBjYY=; b=jvo9FBYturX1gGxcZRmczE5GqZb6bNbDDaTe9bMVpyTrhMq5QyP2wMEC04s9bVvSiu 5Z0uYNcw4QKwWsg8Fn3H8sO5x4PMeNMQvaeX4mDpaNFbQtPTaANRcRZ1eYkmiRYPk3rI PqoONEQtOZ7X1ISao/AXf8y5yUmO3nQcT1mDVGEU59QURE0QDHC4SoJTN4Ub/CEpdsUo Anis4cmSJfGtPx7NrR7X0xV59wXH8IE/mbgdOeHHRLKJNMs4mBsTke+1CiRGSXctuvqJ w6x6OasFZ585oJfDG9NqBHyz2TgsLfKk0cZnkH9ISFwmgvVk0Wgy7DZSjvESS3ZZeJ/t RMFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:cc:subject:in-reply-to:references:from:date :message-id:mime-version; bh=LIGVdmvWrRL1NY2gL5qjDvJ8JTNzZJAXI12YU7tBjYY=; b=IcpNkdSM3c1lhFiwAfSLSwl6KOdJpb3wINxsBUGyX9XLdl4bKI/g93Fx+qhN1QMeMt YS2prC/hVIHzZsqhPGQJkJu3hCbYF9rtqMx6QCsUDH0T+OkqeH51CIrggPX3dFg/ecwh 8K42MJnuQhqbzSH4zAQaPQB7sc6969T5N7N+7P7G1NaIT3jjqKMYLmhKXgdLFM0v/yVn LPf8KEB+WPzp05wLDNY2PSdEwOVeMsgy/So8SOxhQOn1mvvv7I+ZNr/zlfyOQSv24wmh bqvGN89SMSYuaID/uFpFq0SF89RL8jJRbinwx814huhKS5MeUIjunqwq4u945Q09w/d1 4iVQ== X-Gm-Message-State: AOAM532QvzDER30GECKvEV5jNX6hE1Q0Pte/BRwBoSkh6AB9dBwLaPVb DU3o3SpBVqVFshsn9xEO9dDiWfMxHc5qPQ== X-Google-Smtp-Source: ABdhPJxs4SI+TFJ0hCDaw45xlUUb9U9cRTAatideSeyoV+hBX76erwxm+lUYMKGQtwQJXu7aBOnNtA== X-Received: by 2002:a1c:a385:: with SMTP id m127mr21429wme.189.1597076155146; Mon, 10 Aug 2020 09:15:55 -0700 (PDT) Received: from disaster-area.hh.sledj.net (8.a.e.d.0.0.0.0.0.0.0.0.4.6.0.0.0.4.1.7.1.7.b.b.0.b.8.0.1.0.0.2.ip6.arpa. [2001:8b0:bb71:7140:64::dea8]) by smtp.gmail.com with ESMTPSA id j2sm22964076wrp.46.2020.08.10.09.15.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Aug 2020 09:15:54 -0700 (PDT) Received: from localhost (disaster-area.hh.sledj.net [local]) by disaster-area.hh.sledj.net (OpenSMTPD) with ESMTPA id 9c8a8137; Mon, 10 Aug 2020 16:15:53 +0000 (UTC) To: Teemu Likonen , notmuch@notmuchmail.org Cc: Teemu Likonen Subject: Re: [PATCH v2] Emacs: Indent first header line only when indentation is turned on In-Reply-To: <20200810143757.3681-1-tlikonen@iki.fi> References: <20200810143757.3681-1-tlikonen@iki.fi> X-HGTTG: heart-of-gold From: David Edmondson Date: Mon, 10 Aug 2020 17:15:53 +0100 Message-ID: MIME-Version: 1.0 Message-ID-Hash: FWYEVCJ7WO2NCM3L7HYOTWVGQCCZM3TZ X-Message-ID-Hash: FWYEVCJ7WO2NCM3L7HYOTWVGQCCZM3TZ X-MailFrom: dme@dme.org 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=dme-org.20150623.gappssmtp.com header.s=20150623 header.b=jvo9FBYt; 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: 1.53 X-TUID: kurg9jEnOyMp On Monday, 2020-08-10 at 17:37:57 +03, Teemu Likonen wrote: > 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. Reviewed-by: David Edmondson > --- > emacs/notmuch-show.el | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > > * 2020-08-10 11:19:10+01, David Edmondson wrote: >>> + (insert (notmuch-show-spaces-n >>> + (if notmuch-show-indent-content >>> + (* notmuch-show-indent-messages-width depth) >>> + 0)) >> >> Couldn't you also elide the call to `notmuch-show-spaces-n'? > > Indeed. > > > > 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 > -- > 2.20.1 dme. -- I used to get mad at my school, the teachers who taught me weren't cool.