From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id UGdDKN9RKV9rdwAA0tVLHw (envelope-from ) for ; Tue, 04 Aug 2020 12:17:35 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id KMQcJN9RKV+jLAAA1q6Kng (envelope-from ) for ; Tue, 04 Aug 2020 12:17:35 +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 F0F729404CA for ; Tue, 4 Aug 2020 12:17:32 +0000 (UTC) Received: from [144.217.243.247] (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id D249C29A82; Tue, 4 Aug 2020 08:17:21 -0400 (EDT) Received: from meesny.iki.fi (unknown [IPv6:2001:67c:2b0:1c1::201]) by mail.notmuchmail.org (Postfix) with ESMTPS id 9205526BD2 for ; Tue, 4 Aug 2020 08:17:18 -0400 (EDT) Received: from mithlond (mobile-access-6df022-134.dhcp.inet.fi [109.240.34.134]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: tlikonen) by meesny.iki.fi (Postfix) with ESMTPSA id 0654A20BA2 for ; Tue, 4 Aug 2020 15:17:05 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=meesny; t=1596543426; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=DBiNTylysTzjcKMBoYEDLz4+2VGHs7I/tC6UaKxenSw=; b=aGmBQ9xrdUVrBnvwe9rL587qk/X9EWp6uFJtCVBdnjkUdMGi6CktROWudC53jhF/g0Ysp4 Z/8lRJfnQ9fyFdzUGkqrtt3CRKm0ir/ipUDM/a90AJaJql2lXTsAnsfq7FoqFiOOCK/APN xzTfMppy9rkhrgs9p5RpBg/WoPqQwtg= From: Teemu Likonen To: notmuch@notmuchmail.org Subject: [PATCH v2] Emacs: Force left-to-right display for message headers In-Reply-To: <87ime0xjrs.fsf@iki.fi> References: <87lfiwxnn4.fsf@iki.fi> <87ime0xjrs.fsf@iki.fi> Date: Tue, 04 Aug 2020 15:16:56 +0300 Message-ID: <87y2muvc5j.fsf@iki.fi> MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=meesny; t=1596543426; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=DBiNTylysTzjcKMBoYEDLz4+2VGHs7I/tC6UaKxenSw=; b=LTrwszaPYn68bOxSjHBKJOezXClSrZ1BoRYtSskByRTC19iIZtJ9r8og9NNzgv3cjpupqQ KUkhiA4+yMq91hjts4p1MLeZSFewxZQqRyJZRU3cblqA05Mne2rUzgAv4B9Du9yS/ZRjNS elscMforU270o8Xeeqjd+BdVHCEXuaA= ARC-Seal: i=1; s=meesny; d=iki.fi; t=1596543426; a=rsa-sha256; cv=none; b=vBW+jN9U6qjfAwXj70UG6Mx55Hq9WURHRwXOajMCAew7jLCnpj8+zlDzIuxg6iFp7XKamU FGH0BKsmnjHmXRX3i8epi0SKrE9IUEP93xhiKN/Xpr94GCrBDH14Uxyi9znpPXuqGZFpss YXNinM0/Kihzz4HJs3g2X+YiFT0GK3M= ARC-Authentication-Results: i=1; ORIGINATING; auth=pass smtp.auth=tlikonen smtp.mailfrom=tlikonen@iki.fi Message-ID-Hash: ZQFIM77IRGFX7C3MQXCUZUCOO3LQ5APA X-Message-ID-Hash: ZQFIM77IRGFX7C3MQXCUZUCOO3LQ5APA 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: multipart/mixed; boundary="===============3215616549912464901==" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=fail (body hash did not verify) header.d=iki.fi header.s=meesny header.b=aGmBQ9xr; 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: -0.07 X-TUID: msCfch+k8yaD --===============3215616549912464901== Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable * 2020-08-03 10:37:11+03, Teemu Likonen wrote: > From 4264a1b3561c132343fe6a74e8cf2548e5127c3e Mon Sep 17 00:00:00 2001 > From: Teemu Likonen > Date: Mon, 3 Aug 2020 10:25:27 +0300 > Subject: [PATCH] Emacs: Force left-to-right display for message headers Here's slightly better patch with (string ?\x200e) instead of (string #x200e) because STRING function wants characters as argument. Conceptually: ?\x200e =3D character #x200e =3D integer In the current Emacs they are both integers (8206). This message can be applied with "git am --scissors". =2D-- 8< ---- Insert invisible U+200E LEFT-TO-RIGHT MARK at the beginning of message headers. It forces message headers to display as left-to-right text even if there are strong directional characters in header's values. See Emacs Lisp reference manual section "(elisp) Bidirectional Display" for more info. =2D-- emacs/notmuch-show.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el index c9170466..c45db57d 100644 =2D-- a/emacs/notmuch-show.el +++ b/emacs/notmuch-show.el @@ -466,9 +466,10 @@ unchanged ADDRESS if parsing fails." (defun notmuch-show-insert-headerline (headers date tags depth) "Insert a notmuch style headerline based on HEADERS for a message at DEPTH in the current thread." (let ((start (point))) =2D (insert (notmuch-show-spaces-n (* notmuch-show-indent-messages-width= depth)) + (insert (propertize (string ?\x200e) 'invisible t) ; U+200E LEFT-TO-RI= GHT MARK + (notmuch-show-spaces-n (* notmuch-show-indent-messages-width depth)) (notmuch-sanitize (notmuch-show-clean-address (plist-get headers :From))) " (" date =2D-=20 2.20.1 =2D-=20 /// Teemu Likonen - .-.. http://www.iki.fi/tlikonen/ // OpenPGP: 4E1055DC84E9DFF613D78557719D69D324539450 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iIYEARYIAC4WIQTJW2wqtelxC1gHdbitnXWr7pTCcwUCXylRuBAcdGxpa29uZW5A aWtpLmZpAAoJEK2ddavulMJzbUwA/15kSyX+VoSLGCOBBiHTgTXbbpy3lzoIbWYv qBfLt/5bAP4kCG2tJicLrYbEriaEHmzeB8MZwDwDM+5D3bnbTXaGCg== =pML6 -----END PGP SIGNATURE----- --=-=-=-- --===============3215616549912464901== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline --===============3215616549912464901==--