On Fri, Jul 27, 2018 at 5:40 PM,  <[email protected]> wrote:
> On Friday, July 27, 2018 at 12:50:44 AM UTC-4, Tony Mechelynck wrote:
>> On Fri, Jul 27, 2018 at 3:41 AM,  <[email protected]> wrote:
>> > If Vim is built with the 'autochdir' feature defined, it is not reported 
>> > as such by the ":version" command and has('autochdir') returns zero.
>>
>> Maybe this is only a documentation error under :help 'autochdir' ?
>> Such a feature is also not mentioned under :h feature-list and :h
>> +feature-list.
>
> However, AUTOCHDIR is listed as a "feature" in feature.h so I would think it 
> should included in feature-list and therefore should be recognized by has() 
> and :version.  Why should some "features" be recognized and not others?
>
>>
>> AFAICT, Huge, Big and Normal builds return 1 as the value of
>> exists('+autochdir'), and neither exists() nor has() can be tested in
>> Small and Tiny builds, which lack expression evaluation.
>
> My experience is different.  Here's the full disclosure.
>
> I always build Vim under Windows using mingw and specify FEATURES=NORMAL.  I 
> wanted to have the 'autochdir' feature but did not want to build with BIG 
> features because I have no use for 'rightleft', 'farsi', and others.  So I 
> added -DFEAT_AUTOCHDIR to the make variable DEFINES in Make_cyg_ming.mak.  I 
> was able to build without error and all tests passed.  To make sure that the 
> 'autochdir' feature was included, I tried has() and :version and saw that it 
> was not listed.  An investigation into why then lead to my proposed patches.
>
> -mike

Well, I build all 5 featuresets of Vim on Linux64; here are the
environment variables defining my configure settings for the Normal
build:

export CONF_OPT_GUI='--enable-gui=gtk2'
export CONF_OPT_MULTIBYTE='--enable-multibyte'
export CONF_OPT_AUTOSERVE='--enable-autoservername'
export CONF_OPT_FEAT='--with-features=normal'
export CONF_ARGS='--with-vim-name=vim-normal'
export CONF_OPT_COMPBY='"[email protected]"'

As you can see, the 'autochdir' feature (which I personally don't use)
is defaulted; but when I invoke the "vim-normal" executable in konsole
and ask it
    :echo exists('+autochdir')
it answers 1, meaning (according to ":help exists()") that the
'autochdir' option not only is known, but works in this executable.

Note also that neither :help 'autochdir', :help feature-list nor :help
+feature-list mention any +autochdir feature; what is said under :help
'autochdir' about it is

            {only available when compiled with it, use
            exists("+autochdir") to check}

IOW, IMHO trying to use has('autochdir'), and expecting it to return 1
if the option works, is unsupported behaviour.


Best regards,
Tony.

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui