From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Message Mode and bidi Date: Tue, 20 Feb 2024 05:37:04 +0200 Message-ID: <86y1bfolgf.fsf@gnu.org> References: <87v86ldzpw.fsf@aura.christopherculver.com> <867cj1qg4m.fsf@gnu.org> <8734to16tw.fsf@aura.christopherculver.com> <86bk8cw20e.fsf@p200300d627023a0ad1f3c3db8ccb4c50.dip0.t-ipconnect.de> <87frxoyuq4.fsf@aura.christopherculver.com> <87ttm4klnl.fsf@ericabrahamsen.net> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40609"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Eric Abrahamsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Feb 20 04:37:45 2024 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rcGwx-000AJq-40 for ged-emacs-devel@m.gmane-mx.org; Tue, 20 Feb 2024 04:37:43 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rcGwN-0002E0-O0; Mon, 19 Feb 2024 22:37:07 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rcGwM-0002Da-PN for emacs-devel@gnu.org; Mon, 19 Feb 2024 22:37:06 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rcGwM-0007aT-Eq; Mon, 19 Feb 2024 22:37:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=IC9ac1Zv7MoiW+5e5SbDSFKI+PKIdA6OxBeDweLtTUA=; b=AM4kDtSTqDHT ekYGJYcSnS2lRk9i+WEPNeEUn6uAWZT7quccm1vOkRZVSfSeIcBKSHpvDuI+6GBXlN4Yc+wP48vWF ElNagchlmg2A5T1BFW3qjs2buQxY5WufFbaq6pO0kruRyxBiJXgkEQOd6lvc5vXfK9cc56u90X6QY UUJDuAA/hFOToUm6WyAZefBkrYzUzNox1Y0jbSNIdnerlZPTtOfw/xbCVZaULtFhyTPD7Ksrt17/5 FkEv4VSRCmPZfYAGT9LzNP3BCSNqKbRk8A2tgRUKfcfYoXrAaW7rAscXUvWJrYNlcPKTfsiqeB/su +vP+rfRiDnA4aV0aKq0lkg==; In-Reply-To: <87ttm4klnl.fsf@ericabrahamsen.net> (message from Eric Abrahamsen on Mon, 19 Feb 2024 16:46:22 -0800) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:316389 Archived-At: > From: Eric Abrahamsen > Date: Mon, 19 Feb 2024 16:46:22 -0800 > > Christopher Culver via "Emacs development discussions." > writes: > > > Joost Kremers writes: > >> When you compose a new message, is there a line "--text follows this line--" > >> separating the headers and the message text? In my case, there is (I use mu4e) > >> and when I type Arabic text on the line below this text, I get the effect you > >> mention. If I leave an empty line after "--text follows this line--", bidi works > >> as expected. > > > > Indeed, if I just go down one line and then begin typing, bidi works as > > expected. I am feeling very foolish that I did not even try this. Thank > > you for clearing up this problem, and for shedding light on how Emacs > > considers paragraphs. > > This is a bit weird, because the value of `mail-header-separator' > ("--text follows this line--") is added to both `paragraph-start' and > `paragraph-separate') in `message-mode'. You'd think one of those would > do it. Emacs doesn't use paragraph-separate and paragraph-start to define where a paragraph starts and ends, for the purposes of determining the base directionality of a paragraph. It uses separate variables for that, see the node "Bidirectional Editing" in the Emacs user manual. The reason for using separate variables is because several modes, including (but not limited to) message-mode, set the former variables to regexps that get in the way of bidi reordering, and could easily produce wrong results on display.