Skip to content

Conversation

Shougo
Copy link
Contributor

@Shougo Shougo commented Jun 18, 2018

It is the next of #7407.

"v:errmsg", "v:shell_error" and "v:this_session" distinct from v: variables.

Note: "v:version" is not changed yet.
The next PR is for "v:version" variable and to remove VV_COMPAT feature.

@Shougo Shougo changed the title Make "errmsg", "shell_error" and "this_session" distinct [RFC] Make "errmsg", "shell_error" and "this_session" distinct Jun 18, 2018
@Shougo Shougo changed the title [RFC] Make "errmsg", "shell_error" and "this_session" distinct [RFC] Make "v:errmsg", "v:shell_error" and "v:this_session" distinct Jun 18, 2018
@marvim marvim added the RFC label Jun 19, 2018
@justinmk
Copy link
Member

We can do this for v:errmsg in 0.3.1, but the others are too risky for 0.3.1, which will be released in a few weeks.

Note: "v:version" is not changed yet.
The next PR is for "v:version" variable and to remove VV_COMPAT feature.

I don't think we can ever do that. It will break many plugins which blindly copy the version check from old examples.

@Shougo
Copy link
Contributor Author

Shougo commented Jun 19, 2018

We can do this for v:errmsg in 0.3.1, but the others are too risky for 0.3.1, which will be released in a few weeks.

I don't know shell_error or this_session is used in the plugins.
I agree with it is risky for 0.3.1.

I don't think we can ever do that. It will break many plugins which blindly copy the version check from old examples.

Any examples exists?

@Shougo
Copy link
Contributor Author

Shougo commented Jun 19, 2018

OH, it is too bad.

https://github.com/search?l=Vim+script&q=version+user%3Avim-scripts&type=Code

version is used for v:version in many old Vim scripts.

@justinmk
Copy link
Member

@Shougo
Copy link
Contributor Author

Shougo commented Jun 20, 2018

this_session is used as v:this_session, it seems bug though.

https://github.com/vim-scripts/session.vim/blob/6bd8becf666d81a17c9b7e5e8478dad23e7345f7/plugin/session.vim

Other plugins do not use it.
So v:this_session is not high risk.

@justinmk
Copy link
Member

? In that script you linked, this_session is assigned: https://github.com/vim-scripts/session.vim/blob/6bd8becf666d81a17c9b7e5e8478dad23e7345f7/plugin/session.vim#L63

And that's how v:this_session is used. So that plugin would break.

@Shougo
Copy link
Contributor Author

Shougo commented Jun 21, 2018

And that's how v:this_session is used. So that plugin would break.

Sorry, it is in if_python routine.
So it does not use this_session variable in Vim script.
It works with this PR.

I have researched this_session and shell_error in vim-scripts.org.
They are not used in old Vim scripts. So it is no risk.

@justinmk justinmk added this to the 0.3.2 milestone Jun 22, 2018
@justinmk
Copy link
Member

My mistake. Let's do this after the 0.3.1 release,

@Shougo
Copy link
Contributor Author

Shougo commented Jul 22, 2018

Hi. 0.3.1 is merged. It will be merged in 0.3.2?

`count` do not alias to |v:count|
`errmsg` do not alias to |v:errmsg|
`shell_error` do not alias to |v:shell_error|
`this_session` do not alias to |v:this_session|
Copy link
Member

@justinmk justinmk Jul 22, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"does not" is probably better for all of these cases. Also can remove "to".

@@ -1813,7 +1812,6 @@ v:shell_error Result of the last shell command. When non-zero, the last
:if v:shell_error
: echo 'could not rename "foo" to "bar"!'
:endif
< "shell_error" also works, for backwards compatibility.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the < in column 1 is still needed .

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The other case as well. I fixed this in the merge-commit.

@justinmk
Copy link
Member

@Shougo If you can rebase and address the minor comments , will merge.

@Shougo
Copy link
Contributor Author

Shougo commented Jul 22, 2018

Thanks. I have fixed the problems and rebased.

@justinmk justinmk added the compatibility compatibility with Vim or older Neovim label Jul 23, 2018
@justinmk justinmk modified the milestones: 0.3.3, 0.3.2 Jul 23, 2018
@justinmk justinmk merged commit 03bd5a4 into neovim:master Jul 23, 2018
justinmk added a commit that referenced this pull request Jul 23, 2018
@justinmk justinmk removed the RFC label Jul 23, 2018
@Shougo
Copy link
Contributor Author

Shougo commented Jul 26, 2018

Thank you

@Shougo Shougo deleted the compat branch July 26, 2018 00:00
justinmk added a commit to justinmk/neovim that referenced this pull request Dec 30, 2018
Besides the "visible" improvements, this release features numerous
internal improvements to the UI/screen code and test infrastructure.

Numerous patches were merged from Vim, which are not mentioned below.

FEATURES:

07ad5d7 clipboard: Support custom VimL functions neovim#9304
725da1f neovim#9401 win/TUI: Improve terminal/console support
7a8dadb neovim#9077 startup: Use $XDG_CONFIG_DIRS/nvim/sysinit.vim if it exists
feec926 neovim#9299 support <cmd> mapping in more places
0653ed6 neovim#9028 diff/highlight: Show underline for low-priority CursorLine
bddcbbb signs: Add "numhl" argument neovim#9113
05f9c7c clipboard: support Wayland (neovim#9230)
14ae394 neovim#9052 TUI: add support for undercurl and underline color
4fa3492 neovim#9023 man.vim: soft (dynamic) wrap neovim#9023

API:

8b39e4e neovim#6920 API: implement object namespaces
b1aaa0a API: Implement nvim_win_set_buf() neovim#9100
8de87c7 neovim#8180 API: virtual text annotations (nvim_buf_set_virtual_text)
2b9fc9a neovim#8660 API: add nvim_buf_is_loaded()
    API: buf_get_lines, buf_line_count handle unloaded buffers
88f77c2 API: nvim_buf_get_offset_for_line
94841e5 API/UI: neovim#8221 ext_newgrid, ext_hlstate
    (use line-based rather than char-based updates)

UI

b5cfac0 neovim#8806 TUI: use BCE again more often, (smoother resizes/scrolling)
77b5e9a neovim#9315 screen: add missing status redraw when redraw_later(CLEAR) was used
5f15788 TUI: clip invalid regions on resize (neovim#8779), fixes neovim#8774
c936ae0 neovim#9193 TUI: improvements for scrolling and clearing
f204274 neovim#9143 UI: disable clearing almost everywhere
f4b2b66 neovim#9079 TUI: always use safe cursor movement after resize
d36afaf neovim#9211 ui_options: also send when starting or from OptionSet
67f80d4 TUI: Avoid reset_cursor_color in old VTE neovim#9191
e55ebae neovim#9021 don't erase screen on `:hi Normal` during startup
c5790d9 neovim#8915 TUI: Hint wrapped lines to terminals.

FIXES:

231de72 RPC: turn errors from async calls into notifications
907ad92 TUI: Restore terminal title via "title stacking" (neovim#9407)
cb76a8a genappimage: Unset $ARGV0 at invocation neovim#9376
b48efd9 neovim#9347 TUI: FreeBSD: Improve support for BSD vt console
c16529a TUI: Konsole 18.07.70 supports DECSCUSR (neovim#9364)
aec096f os/lang: use the correct LC_NUMERIC also for OS X
5fee0be provider: improve error message (neovim#9344)
3c42d7a TUI: alacritty supports set_cursor_color neovim#9353
7bff9a5 TUI: Alacritty supports DECSCUSR (neovim#9048)
57acfce macOS: infer primary language if $LANG is empty neovim#9345
bc132ae runtime/syntax: Fix highlighting of augroup contents (neovim#9328)
715fdfe neovim#9297 VimL/confirm(): Show dialog even if :silent
799d9c3 clipboard: Prefer xclip (neovim#9302)
6dae777 provider/nodejs: fix npm,yarn detection
16bc1e9 neovim#9218 channel: avoid buffering output when only terminal and no callbacks are active
72fecad neovim#8804 Fix crash in lang_init() on macOS if lang_region = NULL
d581398 ruby: detect rbenv shims for other versions (neovim#8733)
e568ac7 neovim#9123 third-party/unibilium: Fix parsing of extended capability entries
c4c74c3 jobstart(): Fix hang on non-executable cwd neovim#9204
1cf50cb provider/nodejs: Simultaneously query npm and yarn neovim#9054
6c496db undo: Fix infinite loop if undo_read_byte returns EOF neovim#2880
f8f8357 neovim#9034 'swapfile: always show dialog'

CHANGES:

c236e80 neovim#9024 --embed: wait for UI unless --headless
180b50d neovim#9248 python: 'neovim' module was renamed to 'pynvim'
2000b6a neovim#8589 VimL: Remove legacy aliases "v:errmsg", "v:shell_error", "v:this_session"
deb18a0 defaults: background=dark neovim#2894 (neovim#9205)
c1187d4 defaults: win: 'shellpipe' for cmd.exe (neovim#8827)
justinmk added a commit to justinmk/neovim that referenced this pull request Dec 31, 2018
Besides the "visible" improvements, this release features numerous
internal improvements to the UI/screen code and test infrastructure.

Numerous patches were merged from Vim, which are not mentioned below.

FEATURES:

07ad5d7 clipboard: Support custom VimL functions neovim#9304
725da1f neovim#9401 win/TUI: Improve terminal/console support
7a8dadb neovim#9077 startup: Use $XDG_CONFIG_DIRS/nvim/sysinit.vim if it exists
feec926 neovim#9299 support <cmd> mapping in more places
0653ed6 neovim#9028 diff/highlight: Show underline for low-priority CursorLine
bddcbbb signs: Add "numhl" argument neovim#9113
05f9c7c clipboard: support Wayland (neovim#9230)
14ae394 neovim#9052 TUI: add support for undercurl and underline color
4fa3492 neovim#9023 man.vim: soft (dynamic) wrap neovim#9023

API:

8b39e4e neovim#6920 API: implement object namespaces
b1aaa0a API: Implement nvim_win_set_buf() neovim#9100
8de87c7 neovim#8180 API: virtual text annotations (nvim_buf_set_virtual_text)
2b9fc9a neovim#8660 API: add nvim_buf_is_loaded()
    API: buf_get_lines, buf_line_count handle unloaded buffers
88f77c2 API: nvim_buf_get_offset_for_line
94841e5 API/UI: neovim#8221 ext_newgrid, ext_hlstate
    (use line-based rather than char-based updates)

UI

b5cfac0 neovim#8806 TUI: use BCE again more often, (smoother resizes/scrolling)
77b5e9a neovim#9315 screen: add missing status redraw when redraw_later(CLEAR) was used
5f15788 TUI: clip invalid regions on resize (neovim#8779), fixes neovim#8774
c936ae0 neovim#9193 TUI: improvements for scrolling and clearing
f204274 neovim#9143 UI: disable clearing almost everywhere
f4b2b66 neovim#9079 TUI: always use safe cursor movement after resize
d36afaf neovim#9211 ui_options: also send when starting or from OptionSet
67f80d4 TUI: Avoid reset_cursor_color in old VTE neovim#9191
e55ebae neovim#9021 don't erase screen on `:hi Normal` during startup
c5790d9 neovim#8915 TUI: Hint wrapped lines to terminals.

FIXES:

231de72 RPC: turn errors from async calls into notifications
907ad92 TUI: Restore terminal title via "title stacking" (neovim#9407)
cb76a8a genappimage: Unset $ARGV0 at invocation neovim#9376
b48efd9 neovim#9347 TUI: FreeBSD: Improve support for BSD vt console
c16529a TUI: Konsole 18.07.70 supports DECSCUSR (neovim#9364)
aec096f os/lang: use the correct LC_NUMERIC also for OS X
5fee0be provider: improve error message (neovim#9344)
3c42d7a TUI: alacritty supports set_cursor_color neovim#9353
7bff9a5 TUI: Alacritty supports DECSCUSR (neovim#9048)
57acfce macOS: infer primary language if $LANG is empty neovim#9345
bc132ae runtime/syntax: Fix highlighting of augroup contents (neovim#9328)
715fdfe neovim#9297 VimL/confirm(): Show dialog even if :silent
799d9c3 clipboard: Prefer xclip (neovim#9302)
6dae777 provider/nodejs: fix npm,yarn detection
16bc1e9 neovim#9218 channel: avoid buffering output when only terminal and no callbacks are active
72fecad neovim#8804 Fix crash in lang_init() on macOS if lang_region = NULL
d581398 ruby: detect rbenv shims for other versions (neovim#8733)
e568ac7 neovim#9123 third-party/unibilium: Fix parsing of extended capability entries
c4c74c3 jobstart(): Fix hang on non-executable cwd neovim#9204
1cf50cb provider/nodejs: Simultaneously query npm and yarn neovim#9054
6c496db undo: Fix infinite loop if undo_read_byte returns EOF neovim#2880
f8f8357 neovim#9034 'swapfile: always show dialog'

CHANGES:

c236e80 neovim#9024 --embed: wait for UI unless --headless
180b50d neovim#9248 python: 'neovim' module was renamed to 'pynvim'
2000b6a neovim#8589 VimL: Remove legacy aliases "v:errmsg", "v:shell_error", "v:this_session"
deb18a0 defaults: background=dark neovim#2894 (neovim#9205)
c1187d4 defaults: win: 'shellpipe' for cmd.exe (neovim#8827)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compatibility compatibility with Vim or older Neovim
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants