Re: [vim/vim] job_stop(some_job, "int") closes the channel even if process does not quit (#1632)

2017-04-11 Fir de Conversatie Nikolay Aleksandrovich Pavlov
2017-04-11 23:43 GMT+03:00 Bram Moolenaar :
>
> Martin Gammelsæter wrote:
>
>> I'm not sure whether this is intended or not, but it seems like there
>> currently is no way of sending SIGINT to a job through the jobs api
>> without also closing the channel.
>>
>> To reproduce:
>>
>> ```
>> let job = job_start("bash", {"mode": "raw"})
>> call job_stop(job, "int")
>> call ch_sendraw(job_getchannel(job), "ls\n")
>> ```
>> Errors with `E906: not an open channel`
>>
>> Vim version 8.0.329
>
> Currently we only check for "hup". We should probably do it the other
> way around, only assume a job gets killed by "term" and "kill".

SIGTERM may be ignored. Also provoke doing something (including
writing to the channel) before exiting. I do not know how second
variant is going to be handled, but first definitely implies that
`term` needs not close a channel.

And I would rather go explicit: *no* signals close the channel at all,
channel should only be closed explicitly or when corresponding file
descriptor is closed by the child (or by its death).

---

BTW, I found in `:h job_stop()` “The status of the job isn't checked,
the operation will even be done when Vim thinks the job isn't
running.” Does this mean that Vim will kill random process which
happened to take former jobs PID if job happened to die and be
collected (as opposed to leaving a zombie) in this case?

>
> --
> Q: Why do ducks have flat feet?
> A: To stamp out forest fires.
>
> Q: Why do elephants have flat feet?
> A: To stamp out flaming ducks.
>
> /// 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 are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub
>
> --
> --
> 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.

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

2017-04-11 Fir de Conversatie Elimar Riesebieter
* Bram Moolenaar  [2017-04-11 22:44 +0200]:

> 
> Patch 8.0.0563
> Problem:Crash when getting the window position in tmux. (Marvin Schmidt)
> Solution:   Add t_GP to the list of terminal options. (closes #1627)
> Files:  src/option.c

Works here on $TERM=tmux-256color ;-)

Thanks
Elimar
-- 
  Alles was viel bedacht wird ist bedenklich!;-)
 Friedrich Nietzsche

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

2017-04-11 Fir de Conversatie Bram Moolenaar

Patch 8.0.0563
Problem:Crash when getting the window position in tmux. (Marvin Schmidt)
Solution:   Add t_GP to the list of terminal options. (closes #1627)
Files:  src/option.c


*** ../vim-8.0.0562/src/option.c2017-04-07 15:42:20.158333009 +0200
--- src/option.c2017-04-11 22:33:23.609901609 +0200
***
*** 3174,3179 
--- 3174,3180 
  p_term("t_vi", T_VI)
  p_term("t_vs", T_VS)
  p_term("t_WP", T_CWP)
+ p_term("t_GP", T_CGP)
  p_term("t_WS", T_CWS)
  p_term("t_xn", T_XN)
  p_term("t_xs", T_XS)
*** ../vim-8.0.0562/src/version.c   2017-04-10 22:45:26.140352638 +0200
--- src/version.c   2017-04-11 22:34:20.209510497 +0200
***
*** 766,767 
--- 766,769 
  {   /* Add new patch number below this line */
+ /**/
+ 563,
  /**/

-- 
Not too long ago, a program was something you watched on TV...

 /// 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: Unnamed register only contains the last deleted text when appending deleted text to a register

2017-04-11 Fir de Conversatie Bram Moolenaar

Ben Fritz wrote:

> On Monday, April 10, 2017 at 3:40:21 PM UTC-5, Wolfgang Jeltsch wrote:
> > Am Montag, den 10.04.2017, 08:32 -0700 schrieb Ben Fritz:
> > > My mistake. I CAN reproduce the issue, I tested the wrong thing. Sorry
> > > about that! I also see that pasting from the unnamed register, after a
> > > series of deletes into an UPPERCASE named register, pastes only the
> > > last delete instead of the entire named register.
> > > 
> > > I agree it looks like a bug, and it looks like it's been around for a
> > > while now!
> > > 
> > > At least, the help text doesn't match the actual behavior. I think the
> > > behavior described in the help text would be more useful than the
> > > actual behavior.
> > 
> > I also think that the behavior described in the help text would be more
> > useful.
> > 
> > Should I file a bug report somewhere?
> > 
> 
> Posting to this list should be enough.

I have added an item in the todo list:

Unnamed register only contains the last deleted text when appending deleted
text to a register. (Wolfgang Jeltsch, reproduced by Ben Fritz, 2017 Apr 10)

-- 
Luxury. We used to have to get out of the lake at three o'clock in the 
morning, clean the lake, eat a handful of hot gravel, go to work at the 
mill every day for tuppence a month, come home, and Dad would beat us 
around the head and neck with a broken bottle, if we were LUCKY!

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


modeline documentation is misleading

2017-04-11 Fir de Conversatie Bruno Bronosky
https://github.com/vim/vim/blame/e0720cbf63eb3045be8d965e3182c0c392c7b5e9/runtime/doc/options.txt#L505

The second form (this is compatible with some versions of Vi):


https://github.com/vim/vim/blame/e0720cbf63eb3045be8d965e3182c0c392c7b5e9/runtime/doc/options.txt#L513-L514

se[t] the string "set " or "se " (note the space); When
"Vim" is used it must be "set".


The first line came in with v7. The last line was added many (7+?) years
later. I'd like to change the first line to say...

https://github.com/RichardBronosky/vim/commit/9e96fc0a79b5a1d2563cf0462a7f81db397b10ef

The second form (this is compatible with some pre-7.0 versions of Vi):



.!# BrunoBronosky #!.

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

2017-04-11 Fir de Conversatie Bram Moolenaar

Marius Gedminas wrote:

> On Mon, Apr 10, 2017 at 09:47:02PM +0200, Bram Moolenaar wrote:
> > 
> > Patch 8.0.0560
> > Problem::windo allows for ! but it's not supported.
> > Solution:   Disallow passing !. (Hirohito Higashi)
> > Files:  src/ex_cmds.h
> 
> This looks like a different patch than the above description implies:
> 
> > diff --git a/src/tag.c b/src/tag.c
> > index e2795b8..d6d1df2 100644
> > --- a/src/tag.c
> > +++ b/src/tag.c

Weird, how did that get there?  This should be the right patch:

*** ../vim-8.0.0559/src/ex_cmds.h   2017-04-11 12:38:37.415500103 +0200
--- src/ex_cmds.h   2017-04-11 12:36:49.860183241 +0200
***
*** 1623,1629 
NEEDARG|WORD1|RANGE|NOTADR,
ADDR_WINDOWS),
  EX(CMD_windo, "windo",ex_listdo,
!   BANG|NEEDARG|EXTRA|NOTRLCOM|RANGE|NOTADR|DFLALL,
ADDR_WINDOWS),
  EX(CMD_winpos,"winpos",   ex_winpos,
EXTRA|TRLBAR|CMDWIN,
--- 1623,1629 
NEEDARG|WORD1|RANGE|NOTADR,
ADDR_WINDOWS),
  EX(CMD_windo, "windo",ex_listdo,
!   NEEDARG|EXTRA|NOTRLCOM|RANGE|NOTADR|DFLALL,
ADDR_WINDOWS),
  EX(CMD_winpos,"winpos",   ex_winpos,
EXTRA|TRLBAR|CMDWIN,
*** ../vim-8.0.0559/src/version.c   2017-04-11 12:37:52.987782292 +0200
--- src/version.c   2017-04-11 12:38:05.287704168 +0200
***
*** 766,767 
--- 766,769 
  {   /* Add new patch number below this line */
+ /**/
+ 560,
  /**/


-- 
You were lucky. We lived for three months in a brown paper bag in a 
septic tank. We used to have to get up at six o'clock in the morning, 
clean the bag, eat a crust of stale bread, go to work down mill for 
fourteen hours a day week in-week out. When we got home, our Dad
would thrash us to sleep with his belt!

 /// 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 8.0.0560

2017-04-11 Fir de Conversatie Christian Brabandt
Hi Marius!

On Di, 11 Apr 2017, Marius Gedminas wrote:

> On Mon, Apr 10, 2017 at 09:47:02PM +0200, Bram Moolenaar wrote:
> > 
> > Patch 8.0.0560
> > Problem::windo allows for ! but it's not supported.
> > Solution:   Disallow passing !. (Hirohito Higashi)
> > Files:  src/ex_cmds.h
> 
> This looks like a different patch than the above description implies:

The commit in github however is about the problem. The patch in this 
mail seems to be from 8.0.0550 (fix emacs tags problem).

Best,
Christian
-- 
Im Alter liebt man Personalien, in der Jugend Realien.
-- Jean Paul

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

2017-04-11 Fir de Conversatie Marius Gedminas
On Mon, Apr 10, 2017 at 09:47:02PM +0200, Bram Moolenaar wrote:
> 
> Patch 8.0.0560
> Problem::windo allows for ! but it's not supported.
> Solution:   Disallow passing !. (Hirohito Higashi)
> Files:  src/ex_cmds.h

This looks like a different patch than the above description implies:

> diff --git a/src/tag.c b/src/tag.c
> index e2795b8..d6d1df2 100644
> --- a/src/tag.c
> +++ b/src/tag.c
> @@ -2355,18 +2355,19 @@ find_tags(
>   }
>   else
>   {
> -#define TAG_SEP 0x01
> +#define TAG_SEP 0x02
>   size_t tag_fname_len = STRLEN(tag_fname);
>  #ifdef FEAT_EMACS_TAGS
>   size_t ebuf_len = 0;
>  #endif
>  
>   /* Save the tag in a buffer.
> -  * Use 0x01 to separate fields (Can't use NUL, because the
> -  * hash key is terminated by NUL).
> -  * Emacs tag: <0x01><0x01>
> -  * other tag: <0x01><0x01>
> -  * without Emacs tags: <0x01>
> +  * Use 0x02 to separate fields (Can't use NUL because the
> +  * hash key is terminated by NUL, or Ctrl_A because that is
> +  * part of some Emacs tag files -- see parse_tag_line).
> +  * Emacs tag: <0x02><0x02>
> +  * other tag: <0x02><0x02>
> +  * without Emacs tags: <0x02>
>* Here  is the "mtt" value plus 1 to avoid NUL.
>*/
>   len = (int)tag_fname_len + (int)STRLEN(lbuf) + 3;
> diff --git a/src/testdir/test_taglist.vim b/src/testdir/test_taglist.vim
> index b89b25e..2d1557e 100644
> --- a/src/testdir/test_taglist.vim
> +++ b/src/testdir/test_taglist.vim
> @@ -19,3 +19,40 @@ func Test_taglist()
>bwipe
>  endfunc
>  
> +func Test_taglist_native_etags()
> +  if !has('emacs_tags')
> +return
> +  endif
> +  call writefile([
> + \ "\x0c",
> + \ "src/os_unix.c,13491",
> + \ "set_signals(\x7f1335,32699",
> + \ "reset_signals(\x7f1407,34136",
> + \ ], 'Xtags')
> +
> +  set tags=Xtags
> +
> +  call assert_equal([['set_signals', '1335,32699'], ['reset_signals', 
> '1407,34136']],
> + \ map(taglist('set_signals'), {i, v -> [v.name, v.cmd]}))
> +
> +  call delete('Xtags')
> +endfunc
> +
> +func Test_taglist_ctags_etags()
> +  if !has('emacs_tags')
> +return
> +  endif
> 
> -- 
> I'd like to meet the man who invented sex and see what he's working on now.
> 
>  /// 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.

Marius Gedminas
-- 
America and England are two countries separated by a common language.

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


signature.asc
Description: PGP signature