Content
-------
(1)  Problem investigation
(2)  Proposed solutions
(2.1)  @ <r...@raf.org>
(2.2)  @ Bram


Hi <r...@raf.org>!

On 2013-04-18 Thursday at 13:28 +1000 <r...@raf.org> wrote:
> Roland Eggner wrote:
> > On 2013-04-17 Wednesday at 12:39 +1000 <r...@raf.org> wrote:
> > > … …
> > > test test92.in file looks wrong here. perhaps multiply-encoded.
> > > i've attached it.
> > … …
> > Hi <r...@raf.org>!
> > 
> > Thank you for your bugreport.
> > 
> > When Bram and I wrote test92, I verified it to work with all 3 of utf8, 
> > latin 
> > and C locale.  I did not take into account the case of a system providing 
> > no 
> > utf8-locale at all (would be considered a bit outdated in 21st century ..).
> 
> my system (macosx-10.6.8) does provide utf8 locales.
> 
> > If 
> > there is at least one such vim-using system, I will try to support it, 
> > probably 
> > by just skipping test92.
> 
> i think there's an encoding problem in the test92.in file itself.
> i downloaded patches from ftp.vim.org. it seems that 7.3.838 is
> badly encoded. i've attached it. something like this has happened
> before but only for patches on ftp.vim.org itself. other archives
> weren't affected.
> 
> > test93 succeeds for you?
> 
> yes, it does.
> 
> > If you want to help further, please provide the output of
> > :view src/testdir/test92.in
> 
>       vim: set ft=vim fenc=utf-8:
> 
>       Tests if :mksession saves cursor columns correctly in presence of tab 
> and 
>       multibyte characters when fileencoding=utf-8.
> 
>       STARTTEST
>       :so mbyte.vim
>       :if !has('mksession')
>       :  e! test.ok
>       :  wq! test.out
>       :endif
>       :set sessionoptions=buffers splitbelow fileencoding=utf-8
>       /^start:
>       :vsplit
>       j16|:split
>       j16|:split
>       j16|:split
>       j8|:split
>       j8|:split
>       j16|:split
>       j16|:split
>       j16|:wincmd l
>       /^start:
>       :set nowrap
>       j16|3zl:split
>       j016|3zl:split
>       j016|3zl:split
>       j08|3zl:split
>       j08|3zl:split
>       j016|3zl:split
>       j016|3zl:split
>       j016|3zl:split
>       :mksession! test.out
>       :new test.out
>       :v/\(^ *normal! 0\|^ *exe 'normal!\)/d
>       :w
>       :qa!
>       ENDTEST
> 
>       start:
>       no multibyte chAracter
>               one leaDing tab
>               four leadinG spaces
>       two             consecutive tabs
>       two     tabs    in one line
>       one … multibyteCharacter
>       a “b† two multiByte characters
>       “c†1€ three mulTibyte characters
> 
> > :set fileencodings? encoding? fileencoding? termencoding?
> 
>       fileencodings=utf-8,latin1
>       encoding=utf-8
>       fileencoding=utf-8
>       termencoding=utf-8
> 
> > :!locale
> 
>       LANG="en_AU.UTF-8"
>       LC_COLLATE="en_AU.UTF-8"
>       LC_CTYPE="en_AU.UTF-8"
>       LC_MESSAGES="en_AU.UTF-8"
>       LC_MONETARY="en_AU.UTF-8"
>       LC_NUMERIC="en_AU.UTF-8"
>       LC_TIME="en_AU.UTF-8"
>       LC_ALL=
> 
> > :!locale -a
> 
> i've skipped all of the non-english ones.
> there are many.
> 
>       en_AU
>       en_AU.ISO8859-1
>       en_AU.ISO8859-15
>       en_AU.US-ASCII
>       en_AU.UTF-8
>       en_CA
>       en_CA.ISO8859-1
>       en_CA.ISO8859-15
>       en_CA.US-ASCII
>       en_CA.UTF-8
>       en_GB
>       en_GB.ISO8859-1
>       en_GB.ISO8859-15
>       en_GB.US-ASCII
>       en_GB.UTF-8
>       en_IE
>       en_IE.UTF-8
>       en_NZ
>       en_NZ.ISO8859-1
>       en_NZ.ISO8859-15
>       en_NZ.US-ASCII
>       en_NZ.UTF-8
>       en_US
>       en_US.ISO8859-1
>       en_US.ISO8859-15
>       en_US.US-ASCII
>       en_US.UTF-8
>       C
>       POSIX

Thank you for detailed report.


(1)  Problem investigation
--------------------------

(1.1)  Looks everything ok on your side, apart from file “test92.in”, which 
gots 
mangled by improper recoding  _prior_  to upload to 
ftp://ftp.de.vim.org/patches/7.3/7.3.838
and  _prior_  to generating of
ftp://ftp.de.vim.org/patches/7.3/MD5SUMS

Currently I have no network access to ftp://ftp.vim.org/ … server seems to be 
overloaded or down, or DNS resolving to “ftp.nluug.nl” has been wrong.

(1.2)  Patch 7.3.838 exhibits a problem, which mostly does not matter, but in 
this case it does:  Patch files should generally, and this one  _needs_  to be 
treated as binary file.  This means for transmission e.g. mimetype 
“application/octet-stream”, and within vim e.g. “:view ++binary 7.3.838.patch”. 
 

Purpose of the patch is to test vim handling of text files with  _different_  
encodings on :mksession, and thus contains by design one part, which could be 
printed after decoding from binary to utf-8, and another part, which could be 
printed after decoding from binary to ISO-8859-1.  Decoding and printing of 
both 
parts  _together_  is impossible, instead the patch file needs to be treated as 
binary.

(1.3)  I must admit, even when I posted the latest version of the patch to the 
mailing list, the attachment holding the patch has been declared wrongly as 
“Content-Type: text/plain; charset=utf-8“.  Even so, we could say “by good 
luck”, it hit the mailing list correctly, as I have verified after downloading 
from
http://article.gmane.org/gmane.editors.vim.devel/37751

(1.4)  In mercurial repository the patch has been committed correctly, as I 
have 
verified after (pseudocode)
hg clone -U http://vim.googlecode.com/hg/ vim
cd vim
hg log --git --patch --rev 1c819b05529cbbc39982513271499e0217382124

(1.5)  Within transmission from mercurial repository to the mailing list the 
patch file gots mangled by improper recoding, as I have found in my mail archive
>  From: Bram Moolenaar <b...@moolenaar.net>
>  Subject: Patch 7.3.838
>  Date: Tue, 26 Feb 2013 17:23:01 +0100
… and after downloading from
http://article.gmane.org/gmane.editors.vim.devel/37820


(2)  Proposed solutions
-----------------------

(2.1)  @ <r...@raf.org>
----------------------
If you want to track “bleeding edge” versions of vim:
Use mercurial, e.g. “hg clone http://vim.googlecode.com/hg/ vim”.  As an 
additional goody this would save you troubles resulting from inconsistent 
source 
tree, because so far patches published on ftp://ftp.vim.org/ and its mirrors 
exclude everything in and below source directory “runtime”.

Otherwise, you could download the patch from URL mentioned under (1.3).

Or you could use file “test92.in” attached to this mail.

(2.2)  @ Bram
-------------
(2.2.1)  ftp://ftp.de.vim.org/patches/7.3/README already mentiones a few 
patches, which required kind of “extra treatment”.  IHMO a similar solution for 
patch 7.3.838 would help vim users of this ftp directory;  you could generate 
the fixed patch by e.g.
hg export --git --rev 1c819b05529cbbc39982513271499e0217382124

(2.2.2)  Vim provides filetype detection and syntax highlighting for patch 
files.  Maybe, vim should automatically switch on option binary on detection of 
patch files, instead of requiring users to think of option “++binary”?

-- 
Regards
Roland Eggner
Tests for getbufvar(), getwinvar(), gettabvar() and gettabwinvar().
vim: set ft=vim :

STARTTEST
:so small.vim
:"
:" test for getbufvar()
:let b:var_num = 1234
:let def_num = 5678
:$put =string(getbufvar(1, 'var_num'))
:$put =string(getbufvar(1, 'var_num', def_num))
:$put =string(getbufvar(1, ''))
:$put =string(getbufvar(1, '', def_num))
:unlet b:var_num
:$put =string(getbufvar(1, 'var_num', def_num))
:$put =string(getbufvar(1, ''))
:$put =string(getbufvar(1, '', def_num))
:$put =string(getbufvar(9, ''))
:$put =string(getbufvar(9, '', def_num))
:unlet def_num
:$put =string(getbufvar(1, '&autoindent'))
:$put =string(getbufvar(1, '&autoindent', 1))
:"
:" test for getwinvar()
:let w:var_str = "Dance"
:let def_str = "Chance"
:$put =string(getwinvar(1, 'var_str'))
:$put =string(getwinvar(1, 'var_str', def_str))
:$put =string(getwinvar(1, ''))
:$put =string(getwinvar(1, '', def_str))
:unlet w:var_str
:$put =string(getwinvar(1, 'var_str', def_str))
:$put =string(getwinvar(1, ''))
:$put =string(getwinvar(1, '', def_str))
:$put =string(getwinvar(9, ''))
:$put =string(getwinvar(9, '', def_str))
:$put =string(getwinvar(1, '&nu'))
:$put =string(getwinvar(1, '&nu',  1))
:unlet def_str
:"
:" test for gettabvar()
:tabnew
:tabnew
:let t:var_list = [1, 2, 3]
:let def_list = [4, 5, 6, 7]
:tabrewind
:$put =string(gettabvar(3, 'var_list'))
:$put =string(gettabvar(3, 'var_list', def_list))
:$put =string(gettabvar(3, ''))
:$put =string(gettabvar(3, '', def_list))
:tablast
:unlet t:var_list
:tabrewind
:$put =string(gettabvar(3, 'var_list', def_list))
:$put =string(gettabvar(9, ''))
:$put =string(gettabvar(9, '', def_list))
:$put =string(gettabvar(3, '&nu'))
:$put =string(gettabvar(3, '&nu', def_list))
:unlet def_list
:tabonly
:"
:" test for gettabwinvar()
:tabnew
:tabnew
:tabprev
:split
:split
:wincmd w
:vert split
:wincmd w
:let w:var_dict = {'dict': 'tabwin'}
:let def_dict = {'dict2': 'newval'}
:wincmd b
:tabrewind
:$put =string(gettabwinvar(2, 3, 'var_dict'))
:$put =string(gettabwinvar(2, 3, 'var_dict', def_dict))
:$put =string(gettabwinvar(2, 3, ''))
:$put =string(gettabwinvar(2, 3, '', def_dict))
:tabnext
:3wincmd w
:unlet w:var_dict
:tabrewind
:$put =string(gettabwinvar(2, 3, 'var_dict', def_dict))
:$put =string(gettabwinvar(2, 3, ''))
:$put =string(gettabwinvar(2, 3, '', def_dict))
:$put =string(gettabwinvar(2, 9, ''))
:$put =string(gettabwinvar(2, 9, '', def_dict))
:$put =string(gettabwinvar(9, 3, ''))
:$put =string(gettabwinvar(9, 3, '', def_dict))
:unlet def_dict
:$put =string(gettabwinvar(2, 3, '&nux'))
:$put =string(gettabwinvar(2, 3, '&nux', 1))
:tabonly
:"
:/^start/,$wq! test.out
ENDTEST

start:

Attachment: pgp_mMP0vldBm.pgp
Description: PGP signature

Raspunde prin e-mail lui