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 reordering in program source buffers Date: Fri, 26 Aug 2011 00:09:37 +0300 Message-ID: <83y5yhfbam.fsf@gnu.org> References: <4E48D309.6050503@acdlabs.ru> <874o1j10zv.fsf@fencepost.gnu.org> <8362lyvcli.fsf@gnu.org> <87fwl2r0l4.fsf@stupidchicken.com> <83zkjatnkz.fsf@gnu.org> <877h6et8oi.fsf@stupidchicken.com> <83vctxua2y.fsf@gnu.org> <87r54le4rd.fsf@stupidchicken.com> <8362lxtfeb.fsf@gnu.org> <87d3g56llz.fsf@stupidchicken.com> <8339h0tur0.fsf@gnu.org> <87ippvwtwx.fsf@stupidchicken.com> <83liurruz4.fsf@gnu.org> <87k4aaej7f.fsf@stupidchicken.com> <83ippusjej.fsf@gnu.org> <87vctuz6eb.fsf@stupidchicken.com> <837h69sw0h.fsf@gnu.org> <87liuptbmp.fsf@stupidchicken.com> <83obzkqz2z.fsf@gnu.org> <83wre84amu.fsf@gnu.org> <201108251351.p7PDpsa7021517@beta.mvs.co.il> <8339gph03l.fsf@gnu.org> <201108252001.p7PK1cdL017264@beta.mvs.co.il> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1314306624 17548 80.91.229.12 (25 Aug 2011 21:10:24 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 25 Aug 2011 21:10:24 +0000 (UTC) Cc: cyd@stupidchicken.com, schwab@linux-m68k.org, monnier@iro.umontreal.ca, emacs-devel@gnu.org To: ehud@unix.mvs.co.il Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Aug 25 23:10:19 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 1QwhBq-000833-PM for ged-emacs-devel@m.gmane.org; Thu, 25 Aug 2011 23:10:18 +0200 Original-Received: from localhost ([::1]:49969 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QwhBq-0000wj-7l for ged-emacs-devel@m.gmane.org; Thu, 25 Aug 2011 17:10:18 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:56213) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QwhBn-0000wP-T4 for emacs-devel@gnu.org; Thu, 25 Aug 2011 17:10:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QwhBm-0001mE-EF for emacs-devel@gnu.org; Thu, 25 Aug 2011 17:10:15 -0400 Original-Received: from mtaout21.012.net.il ([80.179.55.169]:39013) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QwhBm-0001m9-3t for emacs-devel@gnu.org; Thu, 25 Aug 2011 17:10:14 -0400 Original-Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0LQI00J0058CGZ00@a-mtaout21.012.net.il> for emacs-devel@gnu.org; Fri, 26 Aug 2011 00:09:34 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([84.228.21.112]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LQI00J445FXG730@a-mtaout21.012.net.il>; Fri, 26 Aug 2011 00:09:34 +0300 (IDT) In-reply-to: <201108252001.p7PK1cdL017264@beta.mvs.co.il> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-Received-From: 80.179.55.169 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:143584 Archived-At: > Date: Thu, 25 Aug 2011 23:01:38 +0300 > From: "Ehud Karni" > Cc: cyd@stupidchicken.com, schwab@linux-m68k.org, monnier@iro.umontreal.ca, > emacs-devel@gnu.org > > On Thu, 25 Aug 2011 20:28:30 Eli Zaretskii wrote: > > > > So in your opinion, buffers that display source code should not be > > reordered, not even the strings and comments they display? IOW, we > > should give up showing human-readable portions of those buffers in a > > legible display form? That's a bit harsh, no? > > Yes, not even in comments or strings, see more below. > > > > I think a (global) function that toggles the bidi reordering > > > ONLY for the local buffer should ease the work of Emacs users. > > > > Can you elaborate why this is needed? > > > > In any case, the function should simply toggle the value of > > bidi-display-reordering, as it's per-buffer variable. But I rather > > think Emacs should set this variable correctly without user > > intervention. > > I meant a command like `toggle-truncate-lines' or `toggle-word-wrap'. > Then the user can assign it to a key, so she can easily change from > logical to bidi ordered. In this way she can easily edit the R2L text > when she needs, but with one keystroke see the logic of the program > even if the R2L text is harder to read. But without any reasonable way of displaying strings in printf-like function calls, what good will it do to the user to turn on reordering? She will just see jumbled text, with no real way of knowing the reading order except moving the cursor with C-f. OTOH, if we do have a reasonable way of showing the reordered text, then why not have it on at all times? > On second thought, may be the command should change the input method > too ? Strings are not necessarily made of only R2L characters. Only the user knows which parts she wants to edit.