Re: [vim/vim] patch 7.4.2111 (8c08b5b)

2016-11-23 Fir de Conversatie Tony Mechelynck
On Wed, Nov 23, 2016 at 5:08 PM, James McCoy  wrote:
> It could be an issue for anyone that didn't have a .vimrc file.
>
> Correct, and there are far more of those than I would have expected.
>
> I think root would be the most popular of that class of users.
>
> Right, so the environment that's most uncommonly used and typically for
> quick tasks now behaves quite differently than experience has taught for the
> past couple decades.
>

IMHO, even for root it's better to have a vimrc; but nowadays, without
a vimrc you don't anymore get 'compatible' but defaults.vim. That is
IMHO "saner" but of course it is not backward-compatible. There are
several ways to counteract it explicitly.

On my home computer (which no one uses except me) my /root/.vimrc
(vimrc for root) is actually a symlink to /home/tonymec/.vimrc (vimrc
for my usual non-root username) which belongs to user "tonymec", group
"users" so either of these login names can modify it and it will
always be common to both, making Vim behave identically in both cases
(considering that I explicitly set to the value I prefer any option
known to me with different defaults for root and for others). Easier
for my peace of mind.

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.


Re: "ch_read()" couldn't tell the difference between "not enough message" and "a empty line"

2016-11-23 Fir de Conversatie skywind3000
skywind3000 wrote:
> The callback of "out_cb" is convenience to use, but has performance issue:
> Gui gets freezed if the background job continues outputing massive data (eg, 
> grep a high frequency word "to" on the documents root, or some crazy stl 
> errors).
> 
> Vim is busy in receiving the data and invoking "out_cb" which cause gui no 
> responsed for a very noticeable period.
> 
> The practice way to prevent gui freeze is introducing a flow control for 
> background process by reading the fixed number of lines from the channel on a 
> timer (eg, read 50 lines from stdout each 100ms interval).
> 
> If the grep output is faster then the reader in the timer, system pipe will 
> be full and "invoking write()" will block the child process until the system 
> pipe buffer has free space again (some data have been readed out by vim).
> 
> In order to process the job output more smoothly, I tried to use this 
> approach but when I am ready to read data from the channel in a timer, It is 
> confused that both "\n" (empty line) and "not enough data" return "" from 
> ch_read().
> 
> If I want to read out at most 100 lines from a channel in an interval, how 
> can I tell if there is no data at the moment or it's just a "\n" from child 
> process ?
> 
> No clue to decide whether to continue reading or just break out.
> 
> When I am using "(pipe object).readline()" from python's subprocess module, 
> "abc\n" means a line "abc", "\n" means an empty line and "" means not enough 
> data. It's very simple without any ambiguity.
> 
> But when I am using "ch_read()" in vim. "abc" means a line "abc", and both 
> (empty line) and (no message) return "".
> 
> Is it a "logic fallacy" of "ch_read()" ??

btw, the "ch_read()" referenced before is invoked with "timeout=0" in "NL" mode.

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


"ch_read()" couldn't tell the difference between "not enough message" and "a empty line"

2016-11-23 Fir de Conversatie skywind3000
The callback of "out_cb" is convenience to use, but has performance issue:
Gui gets freezed if the background job continues outputing massive data (eg, 
grep a high frequency word "to" on the documents root, or some crazy stl 
errors).

Vim is busy in receiving the data and invoking "out_cb" which cause gui no 
responsed for a very noticeable period.

The practice way to prevent gui freeze is introducing a flow control for 
background process by reading the fixed number of lines from the channel on a 
timer (eg, read 50 lines from stdout each 100ms interval).

If the grep output is faster then the reader in the timer, system pipe will be 
full and "invoking write()" will block the child process until the system pipe 
buffer has free space again (some data have been readed out by vim).

In order to process the job output more smoothly, I tried to use this approach 
but when I am ready to read data from the channel in a timer, It is confused 
that both "\n" (empty line) and "not enough data" return "" from ch_read().

If I want to read out at most 100 lines from a channel in an interval, how can 
I tell if there is no data at the moment or it's just a "\n" from child process 
?

No clue to decide whether to continue reading or just break out.

When I am using "(pipe object).readline()" from python's subprocess module, 
"abc\n" means a line "abc", "\n" means an empty line and "" means not enough 
data. It's very simple without any ambiguity.

But when I am using "ch_read()" in vim. "abc" means a line "abc", and both 
(empty line) and (no message) return "".

Is it a "logic fallacy" of "ch_read()" ??

-- 
-- 
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: [vim/vim] patch 8.0.0056 (d0b5138)

2016-11-23 Fir de Conversatie François Ingelrest
On 23 November 2016 at 15:17, Matlink wrote:
> Doesn't work on my 2:7.4.488-7 on debian.

Have you upgraded the package? I got an upgrade this morning, I guess
it fixed the issue.

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