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.
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org