Re: [patch] Fix modeline of some documents

2018-10-06 Fir de Conversatie h_east
Hi Tony,

2018-10-6(Sat) 1:52:53 UTC+9 Tony Mechelynck:
> On Fri, Oct 5, 2018 at 6:58 AM h_east wrote:
> >
> > Hi Bram and list,
> >
> > The following documents sets 'formatoptions' in modeline.
> >
> > runtime/doc/help.txt
> > runtime/doc/os_390.txt
> > runtime/doc/os_win32.txt
> >
> > "fo=tcq2:"
> >
> > Even if write "set fo+=mM" in my .vimrc, it will be overwritten with this 
> > modeline.
> > When I apply this modeline to a doc/*.txt translated file (e.g. *.jax), It 
> > will not work well for editing.
> > So I currently applied the exclude "fo=tcq2:" from modeline.
> > If possible, I want to prevent the difference of modeline between .txt and 
> > .jax.
> >
> > Could you change "fo=tcq2:" to "fo+=2:" ?
> > Please include an attached patch.
> >
> Options set by modeline are always set as if by :setlocal, and since
> 'formatoptions' is a buffer-local option, it will not override
> whatever you set for other files. (Modelines, or the :setlocal
> command, will only override your global options if they mention a
> global-only option.)
> 
> Now none of the mentioned helpfiles is in CJK hanzi/kanji/hanja - kana
> - hangeul so ":selocal fo+=mM" is, for them, not necessary and even
> IMHO possibly harmful. OTOH for translations of the same helpfiles it
> is IMHO the translator's business to adapt the modelines as needed by
> the target language and writing system, and for instance to add mM to
> the formatoptions in the modelines of CJK translated helpfiles. There
> is absolutely no requirement that the modelines for Japanese, Korean,
> Chinese-Simplified or Chinese-Traditional helpfiles be exactly
> identical to those for the English-US ones; and in particular if
> Russian or Hebrew translators reasoned the way you do, they would want
> to set fo-=mM on _their_ translated helpfiles to make sure that
> separate words are kept separate when anyone edits their Russian or
> Hebrew text even if they do it in UTF-8 (where Russian and Hebrew use
> multibyte characters above U+00FF) rather than some 8-bit 'encoding'
> targeting their specific language. ;-)
> 
> BTW, Esperanto uses Latin script, but with the letters Ĉĉ Ĝĝ Ĥĥ Ĵĵ Ŝŝ
> Ŭŭ which are above U+00FF, and even though those same letters also
> exist in ISO-8859-3, AFAIK most Esperantists prefer "universal"
> Unicode, which can also encode their native language whatever it might
> be, over that "Turkish - Maltese - Esperanto" 8-bit charset, which
> possibly cannot. (Proportionately more Russians might still prefer
> 8-bit charsets cp866, KOI8-R or ISO/IEC 8859-5, and similarly mutatis
> mutandis for Hebrew; but Unicode's "market share" is rising together
> with the globalization of EDP.)

Your point is slightly out of alignment.
Perhaps it was hard to understand the sentences I wrote.
My main point is below.

> > If possible, I want to prevent the difference of modeline between .txt and 
> > .jax.

I am mentioning that Japanese translators will edit *.jax.

--
Best regards,
Hirohito Higashi (h_east)

-- 
-- 
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 vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [patch] Fix modeline of some documents

2018-10-05 Fir de Conversatie Bram Moolenaar


Hirohito Higashi wrote:

> The following documents sets 'formatoptions' in modeline.
> 
> runtime/doc/help.txt
> runtime/doc/os_390.txt
> runtime/doc/os_win32.txt
> 
> "fo=tcq2:"
> 
> Even if write "set fo+=mM" in my .vimrc, it will be overwritten with
> this modeline.
> When I apply this modeline to a doc/*.txt translated file (e.g.
> *.jax), It will not work well for editing.
> So I currently applied the exclude "fo=tcq2:" from modeline.
> If possible, I want to prevent the difference of modeline between .txt
> and .jax.
> 
> Could you change "fo=tcq2:" to "fo+=2:" ?
> Please include an attached patch.

I think we can leave out setting 'fo' completely.  It's already set from
the help ftplugin (which you can overrule) and the "2" isn't really
needed for these files.  It's only needed for a paragraph style where
the second line has a different indent from the first line, which I
don't see in these files.


-- 
hundred-and-one symptoms of being an internet addict:
152. You find yourself falling for someone you've never seen or hardly
 know, but, boy can he/she TYPE!!

 /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net   \\\
///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org///
 \\\help me help AIDS victims -- http://ICCF-Holland.org///

-- 
-- 
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 vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [patch] Fix modeline of some documents

2018-10-05 Fir de Conversatie Tony Mechelynck
On Fri, Oct 5, 2018 at 6:58 AM h_east  wrote:
>
> Hi Bram and list,
>
> The following documents sets 'formatoptions' in modeline.
>
> runtime/doc/help.txt
> runtime/doc/os_390.txt
> runtime/doc/os_win32.txt
>
> "fo=tcq2:"
>
> Even if write "set fo+=mM" in my .vimrc, it will be overwritten with this 
> modeline.
> When I apply this modeline to a doc/*.txt translated file (e.g. *.jax), It 
> will not work well for editing.
> So I currently applied the exclude "fo=tcq2:" from modeline.
> If possible, I want to prevent the difference of modeline between .txt and 
> .jax.
>
> Could you change "fo=tcq2:" to "fo+=2:" ?
> Please include an attached patch.
>
Options set by modeline are always set as if by :setlocal, and since
'formatoptions' is a buffer-local option, it will not override
whatever you set for other files. (Modelines, or the :setlocal
command, will only override your global options if they mention a
global-only option.)

Now none of the mentioned helpfiles is in CJK hanzi/kanji/hanja - kana
- hangeul so ":selocal fo+=mM" is, for them, not necessary and even
IMHO possibly harmful. OTOH for translations of the same helpfiles it
is IMHO the translator's business to adapt the modelines as needed by
the target language and writing system, and for instance to add mM to
the formatoptions in the modelines of CJK translated helpfiles. There
is absolutely no requirement that the modelines for Japanese, Korean,
Chinese-Simplified or Chinese-Traditional helpfiles be exactly
identical to those for the English-US ones; and in particular if
Russian or Hebrew translators reasoned the way you do, they would want
to set fo-=mM on _their_ translated helpfiles to make sure that
separate words are kept separate when anyone edits their Russian or
Hebrew text even if they do it in UTF-8 (where Russian and Hebrew use
multibyte characters above U+00FF) rather than some 8-bit 'encoding'
targeting their specific language. ;-)

BTW, Esperanto uses Latin script, but with the letters Ĉĉ Ĝĝ Ĥĥ Ĵĵ Ŝŝ
Ŭŭ which are above U+00FF, and even though those same letters also
exist in ISO-8859-3, AFAIK most Esperantists prefer "universal"
Unicode, which can also encode their native language whatever it might
be, over that "Turkish - Maltese - Esperanto" 8-bit charset, which
possibly cannot. (Proportionately more Russians might still prefer
8-bit charsets cp866, KOI8-R or ISO/IEC 8859-5, and similarly mutatis
mutandis for Hebrew; but Unicode's "market share" is rising together
with the globalization of EDP.)

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 vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[patch] Fix modeline of some documents

2018-10-04 Fir de Conversatie h_east
Hi Bram and list,

The following documents sets 'formatoptions' in modeline.

runtime/doc/help.txt
runtime/doc/os_390.txt
runtime/doc/os_win32.txt

"fo=tcq2:"

Even if write "set fo+=mM" in my .vimrc, it will be overwritten with this 
modeline.
When I apply this modeline to a doc/*.txt translated file (e.g. *.jax), It will 
not work well for editing.
So I currently applied the exclude "fo=tcq2:" from modeline.
If possible, I want to prevent the difference of modeline between .txt and .jax.

Could you change "fo=tcq2:" to "fo+=2:" ?
Please include an attached patch.

--
Best regards,
Hirohito Higashi (h_east)

-- 
-- 
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 vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
diff --git a/runtime/doc/help.txt b/runtime/doc/help.txt
index 239de9d81..6a658af78 100644
--- a/runtime/doc/help.txt
+++ b/runtime/doc/help.txt
@@ -225,4 +225,4 @@ will try to find help for it.  Especially for options in single quotes, e.g.
 'compatible'.
 
 --
- vim:tw=78:fo=tcq2:isk=!-~,^*,^\|,^\":ts=8:noet:ft=help:norl:
+ vim:tw=78:fo+=2:isk=!-~,^*,^\|,^\":ts=8:noet:ft=help:norl:
diff --git a/runtime/doc/os_390.txt b/runtime/doc/os_390.txt
index ab88cc671..7f049841c 100644
--- a/runtime/doc/os_390.txt
+++ b/runtime/doc/os_390.txt
@@ -131,4 +131,4 @@ Also look at:
 
 
 --
- vim:tw=78:fo=tcq2:ts=8:noet:ft=help:norl:
+ vim:tw=78:fo+=2:ts=8:noet:ft=help:norl:
diff --git a/runtime/doc/os_win32.txt b/runtime/doc/os_win32.txt
index 9a5f748af..d90dba279 100644
--- a/runtime/doc/os_win32.txt
+++ b/runtime/doc/os_win32.txt
@@ -303,4 +303,4 @@ A. Yes, place your favorite icon in bitmaps/vim.ico in a directory of
'runtimepath'.  For example ~/vimfiles/bitmaps/vim.ico.
 
 
- vim:tw=78:fo=tcq2:ts=8:noet:ft=help:norl:
+ vim:tw=78:fo+=2:ts=8:noet:ft=help:norl: