From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: bidi-display-reordering is now non-nil by default Date: Sun, 31 Jul 2011 05:34:35 -0400 Message-ID: References: <20110731.082721.451360942.wl@gnu.org> <20110731.085115.40009301.wl@gnu.org> <877h6yanje.fsf@fencepost.gnu.org> <878vre95g3.fsf@fencepost.gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1312104889 16353 80.91.229.12 (31 Jul 2011 09:34:49 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 31 Jul 2011 09:34:49 +0000 (UTC) Cc: emacs-devel@gnu.org To: David Kastrup Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jul 31 11:34:40 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QnSPv-0008QQ-9H for ged-emacs-devel@m.gmane.org; Sun, 31 Jul 2011 11:34:39 +0200 Original-Received: from localhost ([::1]:57025 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QnSPu-0001Do-QX for ged-emacs-devel@m.gmane.org; Sun, 31 Jul 2011 05:34:38 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:52581) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QnSPt-0001Dh-1A for emacs-devel@gnu.org; Sun, 31 Jul 2011 05:34:37 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QnSPs-0003Vm-6P for emacs-devel@gnu.org; Sun, 31 Jul 2011 05:34:37 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]:37894) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QnSPs-0003Vg-4R for emacs-devel@gnu.org; Sun, 31 Jul 2011 05:34:36 -0400 Original-Received: from eliz by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1QnSPr-0005Vl-NZ; Sun, 31 Jul 2011 05:34:35 -0400 In-reply-to: <878vre95g3.fsf@fencepost.gnu.org> (message from David Kastrup on Sun, 31 Jul 2011 11:15:24 +0200) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.10 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:142553 Archived-At: > From: David Kastrup > Date: Sun, 31 Jul 2011 11:15:24 +0200 > > > The paragraph direction is determined by the paragraph beginning, not > > by all of it. The first "strong directional" character in the > > paragraph, either a left-to-right character or a right-to-left > > character, will determine the base direction of that paragraph. E.g., > > a single Latin letter is all that's needed for determining that the > > paragraph direction is left-to-right. > > So we are apparently searching for the paragraph beginning of a > humongous paragraph for each keystroke. In the case in point, yes. Also for each cursor motion command. > >> It might also be reasonable to set the paragraph boundary detection > >> regexps to nil in buffers where no paragraphs will ever be found > > > > How to detect these buffers? > > I was not suggesting detecting them. I was suggesting that modes > creating buffers where paragraphs are not a usable concept disable > paragraph detection. Manually. Setting bidi-paragraph-direction to a non-nil value has precisely the same effect, except that it will also DTRT when the mode wants all its paragraphs have right-to-left direction. Disabling detection of paragraph direction can only support left-to-right, by contrast (or some other static default). > That's another bottomless pit We could do this through the modes (buffer-menu.el already does), but my concern was about modes that are not bundled with Emacs, such as mew, which was what triggered this thread in the first place. There's also a bug #9209 about a similar problem with vm, another unbundled package; I haven't yet heard from the OP in that case, but I presume the reason is identical. That is why I suggested to have a list of known names of buffers that need a certain fixed value of bidi-paragraph-direction. But that idea is by no means sacred; if there are better ones, let's hear them. > but at least it approaches the problem from an angle that is not > bidi-related and might make sense on versions (including XEmacs) > that don't bother about bidi at all and consequently don't support > bidi-paragraph-direction. bidi-paragraph-direction is a variable. Setting a variable cannot hurt, even if the version of Emacs one runs doesn't know about it. Am I missing something?