From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.devel Subject: Re: bidi-display-reordering is now non-nil by default Date: Tue, 09 Aug 2011 12:07:05 -0400 Message-ID: <87sjpar2l2.fsf@stupidchicken.com> References: <87fwlm7fam.fsf@fencepost.gnu.org> <87bowa7dza.fsf@fencepost.gnu.org> <877h6y7chn.fsf@fencepost.gnu.org> <831ux6cv5o.fsf@gnu.org> <87d3gpku3o.fsf@gnus.org> <834o1ypa2b.fsf@gnu.org> <87aabnn3mz.fsf@stupidchicken.com> <83mxfnwwyd.fsf@gnu.org> <87ipqbzogt.fsf@stupidchicken.com> <83liv7wqhe.fsf@gnu.org> <87liv75xsh.fsf@stupidchicken.com> <83k4arvx05.fsf@gnu.org> <87bow116je.fsf@stupidchicken.com> <83wrepyq3r.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1312906050 6124 80.91.229.12 (9 Aug 2011 16:07:30 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 9 Aug 2011 16:07:30 +0000 (UTC) Cc: larsi@gnus.org, list-general@mohsen.1.banan.byname.net, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Aug 09 18:07:26 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 1Qqopy-0008Gt-5J for ged-emacs-devel@m.gmane.org; Tue, 09 Aug 2011 18:07:26 +0200 Original-Received: from localhost ([::1]:43166 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qqopx-0004bB-Hn for ged-emacs-devel@m.gmane.org; Tue, 09 Aug 2011 12:07:25 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:43684) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qqops-0004ar-1b for emacs-devel@gnu.org; Tue, 09 Aug 2011 12:07:23 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qqopo-0003Tv-7k for emacs-devel@gnu.org; Tue, 09 Aug 2011 12:07:20 -0400 Original-Received: from vm-emlprdomr-04.its.yale.edu ([130.132.50.145]:37398) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qqopj-0003SV-MB; Tue, 09 Aug 2011 12:07:12 -0400 Original-Received: from furball (dhcp-128-36-225-145.central.yale.edu [128.36.225.145]) (authenticated bits=0) by vm-emlprdomr-04.its.yale.edu (8.14.4/8.14.4) with ESMTP id p79G75lO008534 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Tue, 9 Aug 2011 12:07:06 -0400 In-Reply-To: <83wrepyq3r.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 07 Aug 2011 22:32:40 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-Scanned-By: MIMEDefang 2.71 on 130.132.50.145 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 130.132.50.145 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:143062 Archived-At: Eli Zaretskii writes: > Seriously, though: why do you need any conditions here? An LRM will > have no effect if str is not reordered, so why not put it there > unconditionally? Suppose a user kills some text from a Gnus summary buffer which contains these LRM characters, and yanks it into a latin-1 file. Suddenly, that file can't be saved, even though there is no non-latin-1 script in the buffer clearly visible. If we can trivially avoid most such occurrences, why not do so? > But if you insist on doing that only when str might need that, then I > think you want to check each character in str with > get-char-code-property, like this: > > (get-char-code-property (aref str i) 'bidi-class) > > If this returns 'R for any character, it means the string _might_ need > LRM to be appended. OK, let's go with this unless someone comes up with a better idea.