unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Mixed L2R and R2L paragraphs and horizontal scroll
@ 2010-01-30 13:44 Eli Zaretskii
  2010-01-30 15:14 ` David De La Harpe Golden
                   ` (5 more replies)
  0 siblings, 6 replies; 98+ messages in thread
From: Eli Zaretskii @ 2010-01-30 13:44 UTC (permalink / raw)
  To: emacs-devel; +Cc: emacs-bidi

Here's a peculiar design decision that needs to be made for the bidi
display: how to display horizontally scrolled lines in a buffer with
mixed L2R and R2L paragraphs.

Let me start with an example of 2 single-line paragraphs (the frame
around the text shows the window borders):

      +---------------------------------------+
      |abcdefghijk                            |
      |                            KJIHGFEDCBA|
      |                                       |
      +---------------------------------------+

Looks okay, right?  But what if I split the window horizontally (with
"C-x 3"):

      +-------------------+-------------------+
      |abcdefghijk        |abcdefghijk        |
      |        KJIHGFEDCBA|        KJIHGFEDCBA|
      |                   |                   |
      +-------------------+-------------------+

Does this look correct?  Is anyone bothered by the fact that the
relative horizontal position of the two lines has changed, and yet
there are no line truncation glyphs anywhere in sight?

Some word processors have a rigid length of a line: they display a
ruler somewhere above or below the text, and therefore a line's length
is known as some fixed multiple of a standard character size.  In
these word processors, changing the window width preserves the
relative horizontal position of L2R and R2L lines.  But Emacs does not
have a rigid line length, so flushing the R2L lines against the right
margin of the window makes their position depend on the window width.
Is that okay?  (I think it is.)

Now let's split the leftmost window again, so lines get truncated:

      +---------+---------+-------------------+
      |abcdefgh$|abcdefgh$|abcdefghijk        |
      |$HGFEDCBA|$HGFEDCBA|        KJIHGFEDCBA|
      |         |         |                   |
      +---------+---------+-------------------+

Does this still look okay?  (I think it does.)

Now the crucial question: what do you think should happen if I scroll
the leftmost window horizontally so that the end of the first line
(the characters "ijk") become visible?  I think it should be this:

      +---------+---------+-------------------+
      |$ijk     |abcdefgh$|abcdefghijk        |
      |$HGFEDCBA|$HGFEDCBA|        KJIHGFEDCBA|
      |         |         |                   |
      +---------+---------+-------------------+

Note that the display of the second line in the leftmost window did
not change, and as result, the amounts of horizontal scroll in the 1st
and the 2nd lines are different.  This is unlike in the current
unidirectional display, where all the lines are always hscrolled by
the same amount.

Does this behavior look reasonable?  If not, what are the
alternatives?  Note that any alternative should be consistent about
the fact that Emacs does not have a rigid line length, therefore any
initial relative horizontal position of characters (before we split
the window) is arbitrary, and is a function of the window's initial
arbitrary width.

^ permalink raw reply	[flat|nested] 98+ messages in thread

end of thread, other threads:[~2010-02-12 12:36 UTC | newest]

Thread overview: 98+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-30 13:44 Mixed L2R and R2L paragraphs and horizontal scroll Eli Zaretskii
2010-01-30 15:14 ` David De La Harpe Golden
2010-01-30 15:33   ` Eli Zaretskii
2010-01-30 16:36 ` martin rudalics
2010-01-30 17:01   ` Eli Zaretskii
2010-01-30 17:22     ` martin rudalics
2010-01-30 17:52       ` Eli Zaretskii
2010-01-30 18:31         ` martin rudalics
2010-01-30 19:12           ` Eli Zaretskii
2010-01-30 19:45             ` martin rudalics
2010-01-30 21:40               ` Eli Zaretskii
2010-01-31  9:36                 ` martin rudalics
2010-01-31 18:02                   ` Eli Zaretskii
2010-01-31 20:01                     ` martin rudalics
2010-01-31 21:53                       ` Miles Bader
2010-02-01  4:12                         ` Eli Zaretskii
2010-02-01  8:34                         ` martin rudalics
2010-02-01  4:11                       ` Eli Zaretskii
2010-02-01  8:34                         ` martin rudalics
2010-02-01 20:21                           ` Eli Zaretskii
2010-02-02  8:08                             ` martin rudalics
2010-02-02 19:30                               ` Eli Zaretskii
2010-02-03 16:06                                 ` martin rudalics
2010-02-01 21:05                       ` Richard Stallman
2010-02-02  8:08                         ` martin rudalics
2010-02-02 13:23                           ` tomas
2010-02-02 14:39                             ` martin rudalics
2010-02-02 19:32                             ` Eli Zaretskii
2010-02-06  6:29                               ` tomas
2010-02-02 21:21                             ` Richard Stallman
2010-02-06  6:35                               ` tomas
2010-02-06 14:46                                 ` David De La Harpe Golden
2010-02-06 22:55                                 ` Richard Stallman
2010-02-02 21:21                           ` Richard Stallman
2010-01-30 23:26 ` David De La Harpe Golden
2010-01-31 12:42 ` Richard Stallman
2010-01-31 15:02   ` David De La Harpe Golden
2010-01-31 18:20     ` Eli Zaretskii
2010-01-31 18:16   ` Eli Zaretskii
2010-02-01 21:05     ` Richard Stallman
2010-02-01 21:51       ` Eli Zaretskii
2010-02-02 21:21         ` Richard Stallman
2010-02-01 14:00 ` Ehud Karni
2010-02-01 20:18   ` Eli Zaretskii
2010-02-01 22:05     ` [emacs-bidi] " Ehud Karni
2010-02-02 20:04       ` Eli Zaretskii
2010-02-03 13:10         ` Ehud Karni
2010-02-03 18:59           ` Eli Zaretskii
2010-02-04 11:01             ` Richard Stallman
2010-02-04 15:14               ` [emacs-bidi] " Stefan Monnier
2010-02-04 15:57                 ` David Kastrup
2010-02-04 17:21                   ` Davis Herring
2010-02-04 19:33                   ` Eli Zaretskii
2010-02-04 20:46                   ` [emacs-bidi] " tomas
2010-02-04 22:23                     ` Eli Zaretskii
2010-02-06  6:41                       ` [emacs-bidi] " tomas
2010-02-04 22:05                   ` Stefan Monnier
2010-02-04 19:12               ` Eli Zaretskii
2010-02-05 12:44                 ` Richard Stallman
2010-02-05 13:30                   ` Eli Zaretskii
2010-02-05 18:06                     ` [emacs-bidi] " Stefan Monnier
2010-02-05 21:48                       ` Eli Zaretskii
2010-02-06 22:55                         ` Richard Stallman
2010-02-07  4:08                           ` Eli Zaretskii
2010-02-07  8:35                             ` David Kastrup
2010-02-07 15:05                             ` Richard Stallman
2010-02-04 14:02             ` [emacs-bidi] " Ehud Karni
2010-02-04 19:30               ` Eli Zaretskii
2010-02-04 19:48                 ` [emacs-bidi] " Eli Zaretskii
2010-02-06  6:52               ` tomas
2010-02-03 21:02           ` Davis Herring
2010-02-04  4:16             ` Bidirectional embeddings (was: Mixed L2R and R2L paragraphs and horizontal scroll) Eli Zaretskii
2010-02-04 16:21             ` [emacs-bidi] Mixed L2R and R2L paragraphs and horizontal scroll Ehud Karni
2010-02-04 19:40               ` Eli Zaretskii
2010-02-04 22:13                 ` [emacs-bidi] " Stefan Monnier
2010-02-05  9:50                   ` Eli Zaretskii
2010-02-05 10:47                     ` Eli Zaretskii
2010-02-05 18:06                     ` [emacs-bidi] " Stefan Monnier
2010-02-06 13:39                     ` David De La Harpe Golden
2010-02-06 15:45                       ` Ehud Karni
2010-02-06 19:38                       ` Eli Zaretskii
2010-02-06 21:18                         ` [emacs-bidi] " David De La Harpe Golden
2010-02-11 21:40                     ` Beni Cherniavsky
2010-02-12 11:03                       ` Eli Zaretskii
2010-02-12 12:36                         ` Eli Zaretskii
2010-02-05 12:21                 ` [emacs-bidi] " Ehud Karni
2010-02-05 13:47                   ` Eli Zaretskii
2010-02-05 14:22                     ` Miles Bader
2010-02-05 14:52                       ` Eli Zaretskii
2010-02-06  1:07                         ` Miles Bader
2010-02-06  9:03                           ` Eli Zaretskii
2010-02-06  9:32                             ` Miles Bader
2010-02-06 15:42                     ` [emacs-bidi] " Ehud Karni
2010-02-06 19:14                       ` Eli Zaretskii
2010-02-03 13:22         ` [emacs-bidi] " Ehud Karni
2010-02-03 19:01           ` Eli Zaretskii
2010-02-04 14:08             ` [emacs-bidi] " Ehud Karni
2010-02-01 15:36 ` Stefan Monnier

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).