From: David Edmondson <dme@dme.org>
To: Teemu Likonen <tlikonen@iki.fi>, notmuch@notmuchmail.org
Cc: Teemu Likonen <tlikonen@iki.fi>
Subject: Re: [PATCH v2] Emacs: Indent first header line only when indentation is turned on
Date: Mon, 10 Aug 2020 17:15:53 +0100 [thread overview]
Message-ID: <m2imdqa346.fsf@dme.org> (raw)
In-Reply-To: <20200810143757.3681-1-tlikonen@iki.fi>
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 <dme@dme.org>
> ---
> 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.
next prev parent reply other threads:[~2020-08-10 16:16 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-09 19:01 [PATCH] Emacs: Indent first header line only when indentation is turned on Teemu Likonen
2020-08-10 10:19 ` David Edmondson
2020-08-10 14:37 ` [PATCH v2] " Teemu Likonen
2020-08-10 16:15 ` David Edmondson [this message]
2020-08-12 23:38 ` David Bremner
2020-08-15 6:28 ` [PATCH v3] " Teemu Likonen
2020-08-15 12:23 ` David Bremner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2imdqa346.fsf@dme.org \
--to=dme@dme.org \
--cc=notmuch@notmuchmail.org \
--cc=tlikonen@iki.fi \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).