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 cOlALjykKV9ELAAA0tVLHw (envelope-from ) for ; Tue, 04 Aug 2020 18:09:00 +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 IO4NKjykKV9fOQAA1q6Kng (envelope-from ) for ; Tue, 04 Aug 2020 18:09:00 +0000 Received: from mail.notmuchmail.org (nmbug.tethera.net [144.217.243.247]) (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 5ACCA9401CF for ; Tue, 4 Aug 2020 18:08:59 +0000 (UTC) Received: from [144.217.243.247] (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id B009B29A8D; Tue, 4 Aug 2020 14:08:49 -0400 (EDT) X-Greylist: delayed 359 seconds by postgrey-1.36 at nmbug; Tue, 04 Aug 2020 14:08:46 EDT Received: from lahtoruutu.iki.fi (lahtoruutu.iki.fi [185.185.170.37]) by mail.notmuchmail.org (Postfix) with ESMTPS id 29C9526BD2 for ; Tue, 4 Aug 2020 14:08:46 -0400 (EDT) Received: from mithlond.arda (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 X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: tlikonen) by lahtoruutu.iki.fi (Postfix) with ESMTPSA id 86EF01B00C5B; Tue, 4 Aug 2020 21:02:42 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=lahtoruutu; t=1596564162; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=gTwIMTZ4FDz6G5guzunCu6mIK/Wh7IAsyrVjjEDw58I=; b=FvZkU+xNCiM8gninhrPcxrRr9+uQpGr+bHMqCBSowouLjQCZlGzybezxNYSN4wCwpVaRKV 6aZY8PAOkrrgP+dQ/2SspCNcZ67oyiOcaWOZhLmt7I+HaSjMne5F3AnPDKK4u2pS46G9dN BpQg+dFpV75OdyobQRliawTHi+bYYK4jGRva4NaI/G8jEg49bQD2ynM7/079inqYCDtukV RZHd7ZA1g1xcPj2Rx8l+cAd3PFfl9BxmkufGGrv2RurxVBRmPVLjRl/mVRwQW/tc7Nu/Jc axVATl3aq3Xku/6P7WoTHBsL1cGr32R7FSV3hFJYlbF550ZLAhPpvVDqrr2Uuw== From: Teemu Likonen To: notmuch@notmuchmail.org Cc: Teemu Likonen Subject: [PATCH v3] Emacs: Force left-to-right display for message headers Date: Tue, 4 Aug 2020 21:02:25 +0300 Message-Id: <20200804180225.12888-1-tlikonen@iki.fi> X-Mailer: git-send-email 2.20.1 In-Reply-To: <87y2muvc5j.fsf@iki.fi> References: <87y2muvc5j.fsf@iki.fi> MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=lahtoruutu; t=1596564162; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=gTwIMTZ4FDz6G5guzunCu6mIK/Wh7IAsyrVjjEDw58I=; b=LpKxpEPIy3N4nruWzJ+6icdIDt/pxTaOB7EiiNK+yO6ob13z4Yh2sBaaviM2qxvSXgCSDi wl3v1FRrLduKsvffJpEVP5PstCqqgWo7I35ANMGtjQLBLi48Ksg4aJQbWdgVHnu64X8x3u QniwCTtRgtg+J4diIiGkDdGjk/6Ku+8y5IwdiRnLrD7mTxrdd8h0ZJLFjeo5UX0fS1NXR2 RqLOJD3TGniHr6oCZhZOR0zvsBEw4Ykz9IXVZMy2vBAK1i1I7n4SROq8qFEUhsPLAFlq5u 6guYJ94xYW4TS46mto8gLNWO0h3qmMwyu2vVbzwj8dUf29DHU6VWBR686elqUw== ARC-Seal: i=1; s=lahtoruutu; d=iki.fi; t=1596564162; a=rsa-sha256; cv=none; b=dKMmh2IknvBj/op7ron7wuOQP0sRv40f8XMkJwyUztJeYyLu+TPBmKHnBSeKIhXHpBj7v5 ZBvdgWPDypb6dw6Fq+Wtwk/GxkTP517S2FbhWcPoMabbvrkwYE5ZMq95k0/DN9pbdRdb5+ vYbVB9DUYQiE6vOqpzOUNasuyrKSsn3IcEy8rCq5ne8HpeznuwgV/ql6XYKV/kejfz3rhO bMQLe3s4SKMREChZKxSf0uh7ht5epaBCh+OuJiNyMaND7ZleHw7e+r4DR6SOYraVtn2e0+ hU0g9hT4J6LAMseCMSSI/uTRkxw1XffB0kU4bL4t4ChF/knzJuecV9T6uQ2O6g== ARC-Authentication-Results: i=1; ORIGINATING; auth=pass smtp.auth=tlikonen smtp.mailfrom=tlikonen@iki.fi Message-ID-Hash: BFOCCGBQE6DQLF67NKPYJXIMA4KRZNGY X-Message-ID-Hash: BFOCCGBQE6DQLF67NKPYJXIMA4KRZNGY 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: 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=iki.fi header.s=lahtoruutu header.b=FvZkU+xN; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 144.217.243.247 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Spam-Score: 3.03 X-TUID: 7PML0i4I3qBs 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. --- > This message can be applied with "git am --scissors". Sorry, it doesn't apply with "git am". Maybe PGP/MIME or quoted-printable encoding messed it up. This time I try with "git send-email". 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 --- 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))) - (insert (notmuch-show-spaces-n (* notmuch-show-indent-messages-width depth)) + (insert (propertize (string ?\x200e) 'invisible t) ; U+200E LEFT-TO-RIGHT MARK + (notmuch-show-spaces-n (* notmuch-show-indent-messages-width depth)) (notmuch-sanitize (notmuch-show-clean-address (plist-get headers :From))) " (" date -- 2.20.1