Cannot compile with +rightleft and +arabic

42 views
Skip to first unread message

Tony Mechelynck

unread,
Oct 8, 2022, 7:54:16 PM10/8/22
to Bram Moolenaar, vim_dev
Whatever I do, my Vim executables come now out with -rightleft and
-arabic (since patchlevel 700 maybe?).

These features used to work well enough, and that is the reason why I
haven't been filing bug reports or posting feedback about them. Now I
see that at lines 237 to 247 of feature.h, both FEAT_RIGHTLEFT and
FEAT_ARABIC are now forcibly undefined even if they had been defined
earlier (and even in Huge builds) on the pretext that no bug reports
and no feedback have been seen about them recently. Configure
arguments --enable-rightleft and --enable-arabic also have no effect.

Similarly, keymaps work well, and I wonder why they have been
relegated to the Huge build. IMHO, keymaps (and possibly langmaps,
which I don't use because I am lucky enough to have a mother languague
using the Latin alphabet) are an essential feature when working with
non-Latin scripts. I have taken the trouble to write owncoded keymaps
for both Russian (Cyrillic) and Arabic, but now my workhouse Big build
(downgraded to Normal level) can't use them anymore. They used to be
usable with a Big build but now a Huge build (with, from my point of
view, lots of unneeded ballast) is required.

Best regards,
Tony.

Bram Moolenaar

unread,
Oct 9, 2022, 6:45:25 AM10/9/22
to vim...@googlegroups.com, Tony Mechelynck, Bram Moolenaar

Tony wrote:

> Whatever I do, my Vim executables come now out with -rightleft and
> -arabic (since patchlevel 700 maybe?).
>
> These features used to work well enough, and that is the reason why I
> haven't been filing bug reports or posting feedback about them. Now I
> see that at lines 237 to 247 of feature.h, both FEAT_RIGHTLEFT and
> FEAT_ARABIC are now forcibly undefined even if they had been defined
> earlier (and even in Huge builds) on the pretext that no bug reports
> and no feedback have been seen about them recently. Configure
> arguments --enable-rightleft and --enable-arabic also have no effect.

That was intentional. I asked around about people using the +rightleft
feature and got no response. Since I suspected the message wasn't read
I have disabled the features, but the code is still there.

I have been wondering how well the right-left support works, since there
were no bug fixes in that area while there must have been changes and
features that interfere. The code has many #ifdefs for this, thus if
it's not used then I rather get rid of it. But if, as you say, it works
well enough then it's worth keeping.

I'll keep them disabled for a few more days, hopefully that triggers
useful feedback.

> Similarly, keymaps work well, and I wonder why they have been
> relegated to the Huge build. IMHO, keymaps (and possibly langmaps,
> which I don't use because I am lucky enough to have a mother languague
> using the Latin alphabet) are an essential feature when working with
> non-Latin scripts. I have taken the trouble to write owncoded keymaps
> for both Russian (Cyrillic) and Arabic, but now my workhouse Big build
> (downgraded to Normal level) can't use them anymore. They used to be
> usable with a Big build but now a Huge build (with, from my point of
> view, lots of unneeded ballast) is required.

It is rather arbitrary. I moved features related to highlighting to the
normal build, and features related to natural language support to the
huge build. Now we have three builds that are different enough to
justify their existence. You can pick the normal build and cherry-pick
some features, or use the huge build and disable features that you don't
want.

--
FATHER: Did you kill all those guards?
LAUNCELOT: Yes ... I'm very sorry ...
FATHER: They cost fifty pounds each!
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

Tony Mechelynck

unread,
Oct 9, 2022, 9:05:08 AM10/9/22
to Bram Moolenaar, vim...@googlegroups.com
On Sun, Oct 9, 2022 at 12:45 PM Bram Moolenaar <Br...@moolenaar.net> wrote:
>
>
> Tony wrote:
>
> > Whatever I do, my Vim executables come now out with -rightleft and
> > -arabic (since patchlevel 700 maybe?).
> >
> > These features used to work well enough, and that is the reason why I
> > haven't been filing bug reports or posting feedback about them. Now I
> > see that at lines 237 to 247 of feature.h, both FEAT_RIGHTLEFT and
> > FEAT_ARABIC are now forcibly undefined even if they had been defined
> > earlier (and even in Huge builds) on the pretext that no bug reports
> > and no feedback have been seen about them recently. Configure
> > arguments --enable-rightleft and --enable-arabic also have no effect.
>
> That was intentional. I asked around about people using the +rightleft
> feature and got no response. Since I suspected the message wasn't read
> I have disabled the features, but the code is still there.
>
> I have been wondering how well the right-left support works, since there
> were no bug fixes in that area while there must have been changes and
> features that interfere. The code has many #ifdefs for this, thus if
> it's not used then I rather get rid of it. But if, as you say, it works
> well enough then it's worth keeping.
>
> I'll keep them disabled for a few more days, hopefully that triggers
> useful feedback.

I can't believe that I'm the only one using these Vim features,
because I expect that:
• anyone writing in Hebrew, even occasionally, would need +rightleft;
• anyone wriling in Arabic (or Farsi or Urdu or...), even
occasionally, would need both +rightleft and +arabic.

I remember when Nadim added the +arabic feature, and I helped him test
it, especially at first. I think there has been an occasional change
as successive Unicode versions defined new RTL characters. These
changes may have gone relatively unnoticed by people who don't use
them, but I can assure you that, with its known limitations such as
not offering true-bidi except in a bidi terminal such as mlterm, the
+arabic feature is quite usable, and I expect that +rightleft is even
better for writing Hebrew (where +arabic is unnecessary because
letters usually stand apart from each other).

>
> > Similarly, keymaps work well, and I wonder why they have been
> > relegated to the Huge build. IMHO, keymaps (and possibly langmaps,
> > which I don't use because I am lucky enough to have a mother languague
> > using the Latin alphabet) are an essential feature when working with
> > non-Latin scripts. I have taken the trouble to write owncoded keymaps
> > for both Russian (Cyrillic) and Arabic, but now my workhouse Big build
> > (downgraded to Normal level) can't use them anymore. They used to be
> > usable with a Big build but now a Huge build (with, from my point of
> > view, lots of unneeded ballast) is required.
>
> It is rather arbitrary. I moved features related to highlighting to the
> normal build, and features related to natural language support to the
> huge build. Now we have three builds that are different enough to
> justify their existence. You can pick the normal build and cherry-pick
> some features, or use the huge build and disable features that you don't
> want.

However, +multi_byte was made unconditional (moved to Tiny) some time
ago. Isn't that natural language support too? OTOH, Unicode support is
becoming more and more universal these days, especially on Linux (but
AFAIR not in your own email client as configured).

Best regards,
Tony.

Bram Moolenaar

unread,
Oct 9, 2022, 10:55:45 AM10/9/22
to vim...@googlegroups.com, Tony Mechelynck

Thanks for your opinion on the right-left feature. I'll await remarks
from others.

> > > Similarly, keymaps work well, and I wonder why they have been
> > > relegated to the Huge build. IMHO, keymaps (and possibly langmaps,
> > > which I don't use because I am lucky enough to have a mother languague
> > > using the Latin alphabet) are an essential feature when working with
> > > non-Latin scripts. I have taken the trouble to write owncoded keymaps
> > > for both Russian (Cyrillic) and Arabic, but now my workhouse Big build
> > > (downgraded to Normal level) can't use them anymore. They used to be
> > > usable with a Big build but now a Huge build (with, from my point of
> > > view, lots of unneeded ballast) is required.
> >
> > It is rather arbitrary. I moved features related to highlighting to the
> > normal build, and features related to natural language support to the
> > huge build. Now we have three builds that are different enough to
> > justify their existence. You can pick the normal build and cherry-pick
> > some features, or use the huge build and disable features that you don't
> > want.
>
> However, +multi_byte was made unconditional (moved to Tiny) some time
> ago. Isn't that natural language support too? OTOH, Unicode support is
> becoming more and more universal these days, especially on Linux (but
> AFAIR not in your own email client as configured).

Unicode support is a basic feature these days, it is required for
reliably opening a file and being able to view the contents.

The features moved to "huge" are for editing specific languages. Most
languages don't need these features. Digraph support is in the "normal"
build, because I expect this to be much more widely used. But in the
end it is a bit arbitrary, we don't have actual usage statistics.

--
GUARD #1: What -- a swallow carrying a coconut?
ARTHUR: It could grip it by the husk!
GUARD #1: It's not a question of where he grips it! It's a simple question
of weight ratios! A five ounce bird could not carry a 1 pound
coconut.
The Quest for the Holy Grail (Monty Python)

Tony Mechelynck

unread,
Oct 9, 2022, 12:21:42 PM10/9/22
to Bram Moolenaar, vim...@googlegroups.com
On Sun, Oct 9, 2022 at 12:45 PM Bram Moolenaar <Br...@moolenaar.net> wrote:
> It is rather arbitrary. I moved features related to highlighting to the
> normal build, and features related to natural language support to the
> huge build. Now we have three builds that are different enough to
> justify their existence. You can pick the normal build and cherry-pick
> some features, or use the huge build and disable features that you don't
> want.

OK, I'll compile a not-so-huge build and a really-huge build then (in
addition to smaller builds used mostly as a sanity check), as follows:

This is the really-huge build:

# configuration for Huge Vim
export CONF_OPT_GUI='--enable-gui=gtk3'
export CONF_OPT_PERL='--enable-perlinterp'
export CONF_OPT_PYTHON='--enable-pythoninterp'
export CONF_OPT_PYTHON3='--disable-python3interp'
export CONF_OPT_TCL='--enable-tclinterp'
# /usr/bin/tclsh (softlink) is correctly set
export CONF_OPT_RUBY='--enable-rubyinterp'
export CONF_OPT_LUA='--enable-luainterp'
export CONF_OPT_MZSCHEME='--disable-mzschemeinterp'
#export CONF_OPT_PLTHOME='--with-plthome=/usr/local/plt'
export CONF_OPT_CSCOPE='--enable-cscope'
export CONF_OPT_MULTIBYTE='--enable-multibyte'
export CONF_OPT_TERMINAL='--enable-terminal'
export CONF_OPT_AUTOSERVE='--enable-autoservername'
export CONF_OPT_FEAT='--with-features=huge'
export CONF_ARGS2='--with-vim-name=vim-huge'
export CONF_OPT_COMPBY='"--with-compiledby=antoine.m...@gmail.com"'

and this is ne not-so-huge one:

# Configuration for Big (or "simplified Huge") Vim build
export CONF_OPT_GUI='--enable-gui=gtk3'
# the multibyte feature (+multi_byte) is now always enabled
# so the following is not really needed anymore
export CONF_OPT_MULTIBYTE='--enable-multibyte'
export CONF_OPT_TERMINAL='--disable-terminal'
export CONF_OPT_AUTOSERVE='--enable-autoservername'
export CONF_OPT_FEAT='--with-features=huge'
# export CONF_ARGS2='--with-vim-name=vim-big'
# let's actually name it "vim" (with symlinks from gvim, view, etc.)
export CONF_OPT_COMPBY='"--with-compiledby=antoine.m...@gmail.com"'

The difference is mostly in the interpreted languages and in the
terminal feature, all of which are disabled in the lesser of the two.
I'll keep an eye on how the featureset (as shown by :version) evolves.

Best regards,
Tony.

Ron Aaron

unread,
Oct 12, 2022, 2:46:35 AM10/12/22
to vim_dev
I, for one, use the rightleft functionality all the time, and I believe many others do as well. It's not perfect, but it works well enough. Getting it yanked out all of a sudden came as a bad surprise.

Bram Moolenaar

unread,
Oct 12, 2022, 5:56:59 AM10/12/22
to vim...@googlegroups.com, Ron Aaron

Ron Aaron wrote:

> I, for one, use the rightleft functionality all the time, and I believe
> many others do as well. It's not perfect, but it works well enough. Getting
> it yanked out all of a sudden came as a bad surprise.

Thanks for your feedback. I got a couple more remarks like this.
Not much though.

I'll put back the flags, so it will be in the huge build again.

I do hope that someone takes the time to make improvements. And at
least adds more tests. There currently are only a few tests for Arabic
mode. With these tests we should be able to prevent it from breaking
when code is changed.

--
ARTHUR: You fight with the strength of many men, Sir knight.
I am Arthur, King of the Britons. [pause]
I seek the finest and the bravest knights in the land to join me
in my Court of Camelot. [pause]
You have proved yourself worthy; will you join me? [pause]
You make me sad. So be it. Come, Patsy.
BLACK KNIGHT: None shall pass.

Ron Aaron

unread,
Oct 12, 2022, 8:49:06 AM10/12/22
to vim_dev
Thank you, Bram -
I don't usually view the newsgroup, which is why I didn't see the discussion around this. I certainly would have jumped in had I noticed it.

Best regards,
Ron
Reply all
Reply to author
Forward
0 new messages