[vim/vim] netrw: avoid clobbering filetype when opening netrw (#6866)

18 views
Skip to first unread message

wwade

unread,
Sep 4, 2020, 12:30:30 PM9/4/20
to vim/vim, Subscribed

Some filetypes are set manually, or using autocmd, and do not work
properly with filetype detect, so in netrw, save and restore the
buffer's current filetype to be used in place of filetype detect in
NetrwOptionRestore().

The original filetype detect call is left in place to account for the
possibility that {a:vt}netrw_ftkeep is not set.


You can view, comment on, or merge this pull request online at:

  https://github.com/vim/vim/pull/6866

Commit Summary

  • netrw: avoid clobbering filetype when opening netrw

File Changes

Patch Links:


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

codecov[bot]

unread,
Sep 4, 2020, 12:57:55 PM9/4/20
to vim/vim, Subscribed

Codecov Report

Merging #6866 into master will decrease coverage by 0.00%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@

##           master    #6866      +/-   ##

==========================================

- Coverage   88.51%   88.50%   -0.01%     

==========================================

  Files         147      147              

  Lines      160941   160941              

==========================================

- Hits       142454   142439      -15     

- Misses      18487    18502      +15     
Impacted Files Coverage Δ
src/gui.c 62.75% <0.00%> (-0.55%) ⬇️
src/sign.c 94.77% <0.00%> (-0.18%) ⬇️
src/clipboard.c 83.21% <0.00%> (-0.11%) ⬇️
src/gui_gtk_x11.c 58.59% <0.00%> (-0.10%) ⬇️
src/terminal.c 91.02% <0.00%> (-0.04%) ⬇️
src/os_unix.c 70.48% <0.00%> (+0.08%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 077cc7a...0ab2d32. Read the comment docs.

Gary Johnson

unread,
Sep 4, 2020, 3:14:19 PM9/4/20
to reply+ACY5DGGKHX2OWU5MT5...@reply.github.com, vim...@googlegroups.com
On 2020-09-04, wwade wrote:
> Some filetypes are set manually, or using autocmd, and do not work
> properly with filetype detect, so in netrw, save and restore the
> buffer's current filetype to be used in place of filetype detect in
> NetrwOptionRestore().
>
> The original filetype detect call is left in place to account for the
> possibility that {a:vt}netrw_ftkeep is not set.
>
> -------------------------------------------------------------------------------
>
> You can view, comment on, or merge this pull request online at:
>
> https://github.com/vim/vim/pull/6866
>
> Commit Summary
>
> • netrw: avoid clobbering filetype when opening netrw
>
> File Changes
>
> • M runtime/autoload/netrw.vim (7)
>
> Patch Links:
>
> • https://github.com/vim/vim/pull/6866.patch
> • https://github.com/vim/vim/pull/6866.diff

Vim plugins are maintained by their maintainers, usually the
authors, and not by other Vim developers. Contact information
appears at the top of each plugin.

As it says at the top of the file containing ":help netrw", the
author of netrw is Charles Campbell. Bug reports and enhancement
requests should be sent directly to him.

Regards,
Gary

vim-dev ML

unread,
Sep 4, 2020, 3:14:41 PM9/4/20
to vim/vim, vim-dev ML, Your activity

On 2020-09-04, wwade wrote:
> Some filetypes are set manually, or using autocmd, and do not work
> properly with filetype detect, so in netrw, save and restore the
> buffer's current filetype to be used in place of filetype detect in
> NetrwOptionRestore().
>
> The original filetype detect call is left in place to account for the
> possibility that {a:vt}netrw_ftkeep is not set.
>
> -------------------------------------------------------------------------------

>
> You can view, comment on, or merge this pull request online at:
>
> https://github.com/vim/vim/pull/6866
>
> Commit Summary
>
> • netrw: avoid clobbering filetype when opening netrw
>
> File Changes
>
> • M runtime/autoload/netrw.vim (7)
>
> Patch Links:
>
> • https://github.com/vim/vim/pull/6866.patch
> • https://github.com/vim/vim/pull/6866.diff

Vim plugins are maintained by their maintainers, usually the
authors, and not by other Vim developers. Contact information
appears at the top of each plugin.

As it says at the top of the file containing ":help netrw", the
author of netrw is Charles Campbell. Bug reports and enhancement
requests should be sent directly to him.

Regards,
Gary

wwade

unread,
Sep 4, 2020, 5:41:48 PM9/4/20
to vim/vim, vim-dev ML, Comment

Hi Gary,

Understood, but from what I can tell Chip is no longer maintaining this one, and Bram has actually taken over the work, at least according to the recent commits. The last update on the vim.org/scripts page is from 2014, for example.

I tried reach out a couple of times, it's actually been a couple years with no response, so I'd given up on that route.

What do you think?

  • Wade

PS apologies if there's a dupe message that's similar, but not identical, to this one. I tried posting via google groups and I'm not entirely sure what happened.


You are receiving this because you commented.

K.Takata

unread,
Sep 4, 2020, 6:23:23 PM9/4/20
to vim/vim, vim-dev ML, Comment

but from what I can tell Chip is no longer maintaining this one,

He is still maintaining netrw. His mail address is written here:
https://github.com/vim/vim/blob/0ab2d326ff391b66f4f619b4ffd452cd369ee852/runtime/autoload/netrw.vim#L5
(Please remove "N", "O", "S", "P", "A", "M".)

The last update on the vim.org/scripts page is from 2014, for example.

The latest one is available here:
http://www.drchip.org/astronaut/vim/index.html#NETRW


You are receiving this because you commented.

wwade

unread,
Sep 4, 2020, 6:32:44 PM9/4/20
to vim/vim, vim-dev ML, Comment

Yes, I've emailed him on a couple of instances, but let me try again.


You are receiving this because you commented.

K.Takata

unread,
Sep 4, 2020, 6:34:49 PM9/4/20
to vim/vim, vim-dev ML, Comment

Cc: @cecamp


You are receiving this because you commented.

Wade C

unread,
Sep 4, 2020, 7:45:48 PM9/4/20
to vim_dev
Hi Gary, 

Understood.  Unfortunately I've been unable to reach Charles, I've reached out over the past couple years, and had no response.  He seems to have stopped maintaining it for the past 6 years.

In addition, it seems to be, in those 6 years, exclusively mainained by Bram, instead, so I decided to try going this route.

What do you think?
- Wade


James McCoy

unread,
Sep 4, 2020, 10:46:20 PM9/4/20
to vim/vim, vim-dev ML, Comment

Bram has actually taken over the work, at least according to the recent commits

Bram is the only one that commits to this repository, so don't go by that.


You are receiving this because you commented.

wwade

unread,
Sep 4, 2020, 11:52:22 PM9/4/20
to vim/vim, vim-dev ML, Comment

Thanks for the help, everyone, with the new email address, I managed to get in touch with Chip. I'll close this one down for now.


You are receiving this because you commented.

wwade

unread,
Sep 4, 2020, 11:52:22 PM9/4/20
to vim/vim, vim-dev ML, Comment

Closed #6866.


You are receiving this because you commented.

Reply all
Reply to author
Forward
0 new messages