unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* bidi, auto-composition-mode
@ 2010-04-20 20:46 Eduard Wiebe
  2010-04-21  3:15 ` Eli Zaretskii
  2010-04-23 18:37 ` Eli Zaretskii
  0 siblings, 2 replies; 11+ messages in thread
From: Eduard Wiebe @ 2010-04-20 20:46 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 350 bytes --]


 Hello,

I'm playing with the new bidi-feature, thanks Eli, and receive a
strange result.  When i insert following hebrew text:

בָּרוךְ אַתָּה ד' אֱלקֵינוּ מֶלֶךְ הָעוֹלם

and evaluate (setq-default bidi-display-reordering t) the display order
indeed reversed but some characters are duplicated (s. attachment).

[-- Attachment #2: hebrew.png --]
[-- Type: image/png, Size: 19890 bytes --]

[-- Attachment #3: Type: text/plain, Size: 277 bytes --]


The effect of duplicated characters disappers if i switch
auto-composition-mode on.  Any ideas?

Apropos auto-composition-mode:
if i toggle auto-composition-mode i don't receive any messages ala
"Auto-Composition mode disabled/enabled" in the trunk version.

-- 
Eduard Wiebe

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

* Re: bidi, auto-composition-mode
@ 2010-04-20 23:00 Angelo Graziosi
  2010-04-21  3:09 ` Eli Zaretskii
  0 siblings, 1 reply; 11+ messages in thread
From: Angelo Graziosi @ 2010-04-20 23:00 UTC (permalink / raw)
  To: Emacs; +Cc: Eli Zaretskii

[-- Attachment #1: Type: text/plain, Size: 551 bytes --]

Eduard Wiebe wrote:
> I'm playing with the new bidi-feature, thanks Eli, and receive a
> strange result.
[...]
> the display order
> indeed reversed but some characters are duplicated (s. attachment).

The same happens on Cygwin (GTK build of the trunk).

Trying to write "This is a test", it writes, initially, two T instead of 
one, so the result is

This is a testT
              ^^^
I have attached a screen shot.

> The effect of duplicated characters disappers if i switch
> auto-composition-mode on.

Confirmed also on Cygwin!

Thanks,
Angelo.

[-- Attachment #2: bidi-test.jpg --]
[-- Type: image/jpeg, Size: 49285 bytes --]

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

* Re: bidi, auto-composition-mode
  2010-04-20 23:00 bidi, auto-composition-mode Angelo Graziosi
@ 2010-04-21  3:09 ` Eli Zaretskii
  2010-04-21  8:05   ` Angelo Graziosi
  0 siblings, 1 reply; 11+ messages in thread
From: Eli Zaretskii @ 2010-04-21  3:09 UTC (permalink / raw)
  To: Angelo Graziosi; +Cc: emacs-devel

> Date: Wed, 21 Apr 2010 01:00:38 +0200
> From: Angelo Graziosi <angelo.graziosi@alice.it>
> CC: Eli Zaretskii <eliz@gnu.org>
> 
> Eduard Wiebe wrote:
> > I'm playing with the new bidi-feature, thanks Eli, and receive a
> > strange result.
> [...]
> > the display order
> > indeed reversed but some characters are duplicated (s. attachment).
> 
> The same happens on Cygwin (GTK build of the trunk).
> 
> Trying to write "This is a test", it writes, initially, two T instead of 
> one, so the result is
> 
> This is a testT
>               ^^^

??? The OP used Hebrew letters and auto-composed characters, but you
used only ASCII, so this is a different problem.  Please tell me what
did you type to get this displayed flushed to the right and T doubled.




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

* Re: bidi, auto-composition-mode
  2010-04-20 20:46 bidi, auto-composition-mode Eduard Wiebe
@ 2010-04-21  3:15 ` Eli Zaretskii
  2010-04-23 18:37 ` Eli Zaretskii
  1 sibling, 0 replies; 11+ messages in thread
From: Eli Zaretskii @ 2010-04-21  3:15 UTC (permalink / raw)
  To: Eduard Wiebe; +Cc: emacs-devel

> From: Eduard Wiebe <usenet@pusto.de>
> Date: Tue, 20 Apr 2010 22:46:53 +0200
> 
>  Hello,
> 
> I'm playing with the new bidi-feature, thanks Eli, and receive a
> strange result.  When i insert following hebrew text:
> 
> בָּרוךְ אַתָּה ד' אֱלקֵינוּ מֶלֶךְ הָעוֹלם
> 
> and evaluate (setq-default bidi-display-reordering t) the display order
> indeed reversed but some characters are duplicated (s. attachment).

Thanks.  This is a known problem with character compositions: they
don't yet work correctly with bidi reordering.  It's on my todo.

> Apropos auto-composition-mode:
> if i toggle auto-composition-mode i don't receive any messages ala
> "Auto-Composition mode disabled/enabled" in the trunk version.

I have no idea about this one.





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

* Re: bidi, auto-composition-mode
  2010-04-21  3:09 ` Eli Zaretskii
@ 2010-04-21  8:05   ` Angelo Graziosi
  2010-04-21 16:12     ` Eli Zaretskii
  0 siblings, 1 reply; 11+ messages in thread
From: Angelo Graziosi @ 2010-04-21  8:05 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

Il 21/04/2010 5.09, Eli Zaretskii ha scritto:
>> Date: Wed, 21 Apr 2010 01:00:38 +0200
>> From: Angelo Graziosi<angelo.graziosi@alice.it>
>> CC: Eli Zaretskii<eliz@gnu.org>
>>
>> Eduard Wiebe wrote:
>>> I'm playing with the new bidi-feature, thanks Eli, and receive a
>>> strange result.
>> [...]
>>> the display order
>>> indeed reversed but some characters are duplicated (s. attachment).
>>
>> The same happens on Cygwin (GTK build of the trunk).
>>
>> Trying to write "This is a test", it writes, initially, two T instead of
>> one, so the result is
>>
>> This is a testT
>>                ^^^
>
> ??? The OP used Hebrew letters and auto-composed characters, but you
> used only ASCII, so this is a different problem.  Please tell me what
> did you type to get this displayed flushed to the right and T doubled.

OK. In my $HOME/.emacs.d/init.el file I have added this:

;; Use C-x 8 RET RIGHT-TO-LEFT MARK to write from right to left
(setq-default bidi-display-reordering t)

Then, in Emacs, I do this

C-x C-f foo.txt
C-x 8 RET RIGHT-TO-LEFT MARK

Then I start to type "This is a test" (all starts to the right, 
obviously). When I type the firt 'T', really in Emacs, I see two 'T',

TT

Then, I type 'h',

ThT

and so on

ThiT
ThisT
This iT
This isT
...
This is a testT

with the cursor always to the left of the most left 'T' (that near the 
'h', i.e. 'Th'). If now I do

M-x auto-composition-mode

the result is:

This is a test

without the most right 'T'!

I obtain the *same* results both on Cygwin and on GNU/Linux kubuntu 9.10 
(GTK builds rev. >= 99951).

Ciao,
Angelo.




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

* Re: bidi, auto-composition-mode
  2010-04-21  8:05   ` Angelo Graziosi
@ 2010-04-21 16:12     ` Eli Zaretskii
  2010-04-25 16:13       ` bidi, auto-composition-mode [core dump] Angelo Graziosi
  0 siblings, 1 reply; 11+ messages in thread
From: Eli Zaretskii @ 2010-04-21 16:12 UTC (permalink / raw)
  To: Angelo Graziosi; +Cc: emacs-devel

> Date: Wed, 21 Apr 2010 10:05:30 +0200
> From: Angelo Graziosi <angelo.graziosi@alice.it>
> CC: emacs-devel@gnu.org
> 
> OK. In my $HOME/.emacs.d/init.el file I have added this:
> 
> ;; Use C-x 8 RET RIGHT-TO-LEFT MARK to write from right to left
> (setq-default bidi-display-reordering t)
> 
> Then, in Emacs, I do this
> 
> C-x C-f foo.txt
> C-x 8 RET RIGHT-TO-LEFT MARK

Thanks, now everything is clear.  Emacs composes the RIGHT-TO-LEFT
MARK (and other zero-width characters) with the next character, and
compositions don't yet work with bidi reordering.  The effect is
indeed duplication of characters.  You can see another example of this
problem in HELLO, in the Arabic and Hebrew lines -- they also use RLM.




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

* Re: bidi, auto-composition-mode
  2010-04-20 20:46 bidi, auto-composition-mode Eduard Wiebe
  2010-04-21  3:15 ` Eli Zaretskii
@ 2010-04-23 18:37 ` Eli Zaretskii
  2010-04-26 14:36   ` Eduard Wiebe
  1 sibling, 1 reply; 11+ messages in thread
From: Eli Zaretskii @ 2010-04-23 18:37 UTC (permalink / raw)
  To: Eduard Wiebe; +Cc: emacs-devel

> From: Eduard Wiebe <usenet@pusto.de>
> Date: Tue, 20 Apr 2010 22:46:53 +0200
> 
> I'm playing with the new bidi-feature, thanks Eli, and receive a
> strange result.  When i insert following hebrew text:
> 
> בָּרוךְ אַתָּה ד' אֱלקֵינוּ מֶלֶךְ הָעוֹלם
> 
> and evaluate (setq-default bidi-display-reordering t) the display order
> indeed reversed but some characters are duplicated (s. attachment).

If you resync with the development trunk, you will see (I hope) that
the duplicate characters are gone.  The diacriticals are still not
displayed correctly wrt the consonants, because composing characters
while reordering them still does not work; that's on my TODO.

Thanks for reporting this.





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

* Re: bidi, auto-composition-mode [core dump]
  2010-04-21 16:12     ` Eli Zaretskii
@ 2010-04-25 16:13       ` Angelo Graziosi
  2010-04-25 16:22         ` Eli Zaretskii
  0 siblings, 1 reply; 11+ messages in thread
From: Angelo Graziosi @ 2010-04-25 16:13 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

Il 21/04/2010 18.12, Eli Zaretskii ha scritto:
>> Date: Wed, 21 Apr 2010 10:05:30 +0200
>> From: Angelo Graziosi<angelo.graziosi@alice.it>
>> CC: emacs-devel@gnu.org
>>
>> OK. In my $HOME/.emacs.d/init.el file I have added this:
>>
>> ;; Use C-x 8 RET RIGHT-TO-LEFT MARK to write from right to left
>> (setq-default bidi-display-reordering t)
>>
>> Then, in Emacs, I do this
>>
>> C-x C-f foo.txt
>> C-x 8 RET RIGHT-TO-LEFT MARK
>
> Thanks, now everything is clear.  Emacs composes the RIGHT-TO-LEFT
> MARK (and other zero-width characters) with the next character, and
> compositions don't yet work with bidi reordering.  The effect is
> indeed duplication of characters.  You can see another example of this
> problem in HELLO, in the Arabic and Hebrew lines -- they also use RLM.

Just now, I have discovered (with rev. 100032) that Emacs does not like 
any more this:

(setq-default bidi-display-reordering t)

in my initialization file: it aborts!

To reproduce: add the above to .emacs (or to .emacs.d/init.el) file; 
then 'short circuit' the desktop file, if any. For example renaming it:

mv desktop desktop.save

In this way Emacs should starts with the 'scratch' buffer.

Then

$ emacs &

aborts. If you want to use the desktop file, after Emacs is started, you 
should switch buffer up to the 'scratch', for example clicking with 
mouse-1 on buffer name in the mode line: then switching from 'Messages' 
buffer to scratch' causes Emacs to abort.

In short, Emacs does not like the above (setq...) in .emacs and the 
'scratch' buffer.

I have verified this both on GNU/Linux Kubuntu 9.10 and on Cygwin.

Ciao,
Angelo.




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

* Re: bidi, auto-composition-mode [core dump]
  2010-04-25 16:13       ` bidi, auto-composition-mode [core dump] Angelo Graziosi
@ 2010-04-25 16:22         ` Eli Zaretskii
  2010-04-25 17:14           ` Eli Zaretskii
  0 siblings, 1 reply; 11+ messages in thread
From: Eli Zaretskii @ 2010-04-25 16:22 UTC (permalink / raw)
  To: Angelo Graziosi; +Cc: emacs-devel

> Date: Sun, 25 Apr 2010 18:13:56 +0200
> From: Angelo Graziosi <angelo.graziosi@alice.it>
> CC: emacs-devel@gnu.org
> 
> Just now, I have discovered (with rev. 100032) that Emacs does not like 
> any more this:
> 
> (setq-default bidi-display-reordering t)
> 
> in my initialization file: it aborts!

This is bug#6030.  I already have a fix for it, and will commit in a
short while.

Thanks.




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

* Re: bidi, auto-composition-mode [core dump]
  2010-04-25 16:22         ` Eli Zaretskii
@ 2010-04-25 17:14           ` Eli Zaretskii
  0 siblings, 0 replies; 11+ messages in thread
From: Eli Zaretskii @ 2010-04-25 17:14 UTC (permalink / raw)
  To: angelo.graziosi, emacs-devel

> Date: Sun, 25 Apr 2010 19:22:42 +0300
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: emacs-devel@gnu.org
> 
> > Date: Sun, 25 Apr 2010 18:13:56 +0200
> > From: Angelo Graziosi <angelo.graziosi@alice.it>
> > CC: emacs-devel@gnu.org
> > 
> > Just now, I have discovered (with rev. 100032) that Emacs does not like 
> > any more this:
> > 
> > (setq-default bidi-display-reordering t)
> > 
> > in my initialization file: it aborts!
> 
> This is bug#6030.  I already have a fix for it, and will commit in a
> short while.

Done.




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

* Re: bidi, auto-composition-mode
  2010-04-23 18:37 ` Eli Zaretskii
@ 2010-04-26 14:36   ` Eduard Wiebe
  0 siblings, 0 replies; 11+ messages in thread
From: Eduard Wiebe @ 2010-04-26 14:36 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Eduard Wiebe <usenet@pusto.de>
>> Date: Tue, 20 Apr 2010 22:46:53 +0200
>> 
>> I'm playing with the new bidi-feature, thanks Eli, and receive a
>> strange result.  When i insert following hebrew text:
>> 
>> בָּרוךְ אַתָּה ד' אֱלקֵינוּ מֶלֶךְ הָעוֹלם
>> 
>> and evaluate (setq-default bidi-display-reordering t) the display order
>> indeed reversed but some characters are duplicated (s. attachment).
>

Sorry for delayed response.

> If you resync with the development trunk, you will see (I hope) that
> the duplicate characters are gone. 

Indeed, Great.

> The diacriticals are still not displayed correctly wrt the consonants,
> because composing characters while reordering them still does not
> work; that's on my TODO.

I'm looking forward.

-- 
Eduard Wiebe




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

end of thread, other threads:[~2010-04-26 14:36 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-20 23:00 bidi, auto-composition-mode Angelo Graziosi
2010-04-21  3:09 ` Eli Zaretskii
2010-04-21  8:05   ` Angelo Graziosi
2010-04-21 16:12     ` Eli Zaretskii
2010-04-25 16:13       ` bidi, auto-composition-mode [core dump] Angelo Graziosi
2010-04-25 16:22         ` Eli Zaretskii
2010-04-25 17:14           ` Eli Zaretskii
  -- strict thread matches above, loose matches on Subject: below --
2010-04-20 20:46 bidi, auto-composition-mode Eduard Wiebe
2010-04-21  3:15 ` Eli Zaretskii
2010-04-23 18:37 ` Eli Zaretskii
2010-04-26 14:36   ` Eduard Wiebe

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