Re: [PATCH v3] Emacs: Force left-to-right display for message headers

Subject: Re: [PATCH v3] Emacs: Force left-to-right display for message headers

Date: Wed, 05 Aug 2020 12:40:06 +0300

To: David Edmondson, notmuch@notmuchmail.org

Cc:

From: Teemu Likonen


* 2020-08-05 09:45:23+01, David Edmondson wrote:

> I've no idea if this is the appropriate approach to addressing this, but
> the resulting behaviour is obviously an improvement over what happens
> now.

I think there are two options:

 1. Add a string like "From: " in the beginning of notmuch-show header
    paragraph so that the paragraph always starts with left-to-right
    characters (those latin letters "From").

 2. Add invisible characters that force left-to-right text for the
    paragraph. Character U+200E LEFT-TO-RIGHT MARK is meant for
    controlling exactly that.

My patch implements the option 2 and...

> It would make sense to add some commentary to the code as well as the
> commit message explaining the reason for inserting the seemingly
> arbitrary character.

...it has at least comment

    ; U+200E LEFT-TO-RIGHT MARK

in the code. I think that explains the purpose quite well. More verbose
explanation could be something like this:

    ;; Add invisible U+200E LEFT-TO-RIGHT MARK character to force the
    ;; header paragraph as left-to-right text even if some header's
    ;; content is right-to-left.

-- 
/// Teemu Likonen - .-.. http://www.iki.fi/tlikonen/
// OpenPGP: 4E1055DC84E9DFF613D78557719D69D324539450
signature.asc (application/pgp-signature)
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: