unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Andreas Schwab <schwab@linux-m68k.org>
Cc: cyd@stupidchicken.com, monnier@iro.umontreal.ca, emacs-devel@gnu.org
Subject: Re: bidi reordering in program source buffers (was: bidi-display-reordering is now non-nil by default)
Date: Sat, 20 Aug 2011 13:53:29 +0300	[thread overview]
Message-ID: <83wre84amu.fsf@gnu.org> (raw)
In-Reply-To: <m21uwgph3c.fsf@linux-m68k.org>

> From: Andreas Schwab <schwab@linux-m68k.org>
> Cc: Chong Yidong <cyd@stupidchicken.com>,  monnier@iro.umontreal.ca,  emacs-devel@gnu.org
> Date: Sat, 20 Aug 2011 11:28:23 +0200
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > And if we reorder it as a single L2R paragraph, we get this:
> >
> >   printf ("FEDCBA %d\n", foo);
> >
> > which is a bit better, but still wrong.
> 
> IMHO this is the correct way to display it.  Consider when adding more
> format directives, you must not reorder them so they still match the
> order of arguments.

Match the order on the screen or in the source file?  The latter is
not changed at all by reordering.  As for the former, any bidi-aware
format string should use directives with the parameter numbers
explicitly specified with the n$ parameter ordinals, so the user
looking at the result on the screen will know the correct order as a
side effect.

In general, having something like this on display:

 printf ("FEDCBA %d PONMLK %f ZYX %lu\n", foo, bar, baz);

for a source that in logical order reads

 printf ("ABCDEF %d KLMNOP %f XYZ %lu\n", foo, bar, baz);

which is what you suggest, is only marginally better than the original
logical-order string, because the reading order is ambiguous at best,
and downright undecipherable in more complex situations, where the
format string includes punctuation and L2R text.  So if we think the
above is acceptable, we might as well consider not reordering this at
all.



  reply	other threads:[~2011-08-20 10:53 UTC|newest]

Thread overview: 100+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-15  8:04 bidi-display-reordering is now non-nil by default Andrey Paramonov
2011-08-15  9:10 ` Eli Zaretskii
2011-08-15  9:24   ` David Kastrup
2011-08-15 10:20     ` Eli Zaretskii
2011-08-15 10:46       ` David Kastrup
2011-08-15 11:10         ` Eli Zaretskii
2011-08-15 11:27           ` David Kastrup
2011-08-15 11:56             ` Eli Zaretskii
2011-08-15 12:56               ` David Kastrup
2011-08-15 13:07                 ` Eli Zaretskii
2011-08-15 13:59     ` Stefan Monnier
2011-08-15 14:18       ` David Kastrup
2011-08-15 16:57         ` Stefan Monnier
2011-08-15 17:12         ` Eli Zaretskii
2011-08-15 16:55       ` Eli Zaretskii
2011-08-15 18:13         ` Stefan Monnier
2011-08-17 20:34           ` Lars Magne Ingebrigtsen
2011-08-18 16:14           ` Eli Zaretskii
2011-08-22  6:02             ` Eli Zaretskii
2011-08-22 19:35               ` Stefan Monnier
2011-08-23  8:05                 ` Eli Zaretskii
2011-08-23 18:19                   ` Stefan Monnier
2011-08-23 19:03                     ` Eli Zaretskii
2011-08-23 19:17                       ` Stefan Monnier
2011-08-24  6:35                         ` Eli Zaretskii
2011-08-24  9:02                         ` Eli Zaretskii
2011-08-24 14:51                           ` Stefan Monnier
2011-08-24 16:55                             ` Eli Zaretskii
2011-08-25  4:38                               ` Stefan Monnier
2011-08-25  6:12                                 ` Eli Zaretskii
2011-08-26  3:55                                   ` Stefan Monnier
2011-08-26  7:31                                     ` Eli Zaretskii
2011-08-27  2:53                                       ` Stefan Monnier
2011-08-27  8:16                                         ` Eli Zaretskii
2011-08-28  2:52                                           ` Stefan Monnier
2011-08-28  6:03                                             ` Eli Zaretskii
2011-08-29 14:46                                               ` Stefan Monnier
2011-08-25 10:50                                 ` Eli Zaretskii
2011-08-22 19:37               ` Stefan Monnier
2011-08-22 21:35                 ` Štěpán Němec
2011-08-23  1:13                   ` Stefan Monnier
2011-08-23  9:58                     ` Štěpán Němec
2011-08-23 15:29                       ` use of `mouse-face' to delimit text zones [was: bidi-display-reordering is now non-nil by default] Drew Adams
2011-08-23 16:15                         ` Eli Zaretskii
2011-08-23 18:34                           ` Stefan Monnier
2011-08-23 18:45                             ` use of `mouse-face' to delimit text zones Eli Zaretskii
2011-08-23 19:17                               ` Štěpán Němec
2011-08-23 19:22                               ` Stefan Monnier
2011-08-23 18:24                       ` bidi-display-reordering is now non-nil by default Stefan Monnier
2011-08-23 19:14                         ` Štěpán Němec
2011-08-23  8:40                 ` Eli Zaretskii
2011-08-15 18:28         ` Chong Yidong
2011-08-15 20:41           ` Eli Zaretskii
2011-08-16  1:11             ` Stefan Monnier
2011-08-16  2:02             ` Chong Yidong
2011-08-16  6:47               ` Eli Zaretskii
2011-08-16  7:07                 ` David Kastrup
2011-08-16  9:25                   ` Eli Zaretskii
2011-08-16 10:01                     ` David Kastrup
2011-08-16 10:37                       ` Eli Zaretskii
2011-08-16  7:40                 ` Andreas Schwab
2011-08-16  7:54                   ` David Kastrup
2011-08-16  9:20                     ` Eli Zaretskii
2011-08-16  9:40                       ` David Kastrup
2011-08-16 10:01                         ` Eli Zaretskii
2011-08-16 14:10                           ` Stefan Monnier
2011-08-16  9:03                   ` Eli Zaretskii
2011-08-16  9:10                     ` Andreas Schwab
2011-08-16  9:55                       ` Eli Zaretskii
2011-08-16  9:03                   ` Eli Zaretskii
2011-08-16 14:03                 ` Stefan Monnier
2011-08-16 14:48                   ` Eli Zaretskii
2011-08-16 15:48                 ` Chong Yidong
2011-08-16 17:50                   ` Eli Zaretskii
2011-08-16 22:24                     ` Chong Yidong
2011-08-17  6:30                       ` Eli Zaretskii
2011-08-17  9:34                         ` Juri Linkov
2011-08-17 10:05                           ` Eli Zaretskii
2011-08-17 22:32                         ` Chong Yidong
2011-08-18  8:21                           ` Eli Zaretskii
2011-08-18 17:13                             ` Chong Yidong
2011-08-18 17:45                               ` Eli Zaretskii
2011-08-18 22:44                                 ` Chong Yidong
2011-08-19  3:16                                   ` Stefan Monnier
2011-08-19  7:25                                     ` Eli Zaretskii
2011-08-19 20:00                                       ` Chong Yidong
2011-08-20  8:14                                         ` bidi reordering in program source buffers (was: bidi-display-reordering is now non-nil by default) Eli Zaretskii
2011-08-20  9:28                                           ` Andreas Schwab
2011-08-20 10:53                                             ` Eli Zaretskii [this message]
2011-08-25 13:51                                               ` Ehud Karni
2011-08-25 17:28                                                 ` bidi reordering in program source buffers Eli Zaretskii
2011-08-25 20:01                                                   ` Ehud Karni
2011-08-25 21:09                                                     ` Eli Zaretskii
2011-08-19 19:29                                     ` bidi-display-reordering is now non-nil by default Chong Yidong
2011-08-19  7:13                                   ` Eli Zaretskii
2011-08-19 19:43                                     ` Chong Yidong
2011-08-20  7:39                                       ` Eli Zaretskii
2011-08-19 14:51                                   ` Lars Magne Ingebrigtsen
2011-08-19 15:12                                     ` Eli Zaretskii
2011-08-15  9:27   ` Andrey Paramonov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83wre84amu.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=cyd@stupidchicken.com \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=schwab@linux-m68k.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).