Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error detected while processing BufWritePost Autocommands for "<buffer=X>" #573

Closed
ravexina opened this issue Sep 30, 2020 · 8 comments
Closed

Comments

@ravexina
Copy link

ravexina commented Sep 30, 2020

Does this bug happen when you install plugin without vim-polyglot?
No

Describe the bug:
While trying to save a newly created Html file, vim saves the file but also gives these errors:

"test.html" [New] 1L, 15C written
Error detected while processing BufWritePost Autocommands for "<buffer=1>":
E492: Not an editor command: ++once call polyglot#detect#Html()

To Reproduce:

  • Open vim.
  • :e test.html
  • Write something in the buffer.
  • :w

Additional data:

  • I just updated vim-polyglot.
  • I tried disabling all other plugins and I got the same result.
  • VIM - Vi IMproved 8.1
@sheerun
Copy link
Owner

sheerun commented Oct 1, 2020

I don't get this error. Do you get it with vim 8.2?

@sheerun
Copy link
Owner

sheerun commented Oct 1, 2020

Hmm I think you're using vim before patch 8.1.1113 at which ++once was introduced, I'll fix this

@sheerun
Copy link
Owner

sheerun commented Oct 2, 2020

94ec9c3 should have fixed this

@sheerun sheerun closed this as completed Oct 2, 2020
@ravexina
Copy link
Author

ravexina commented Oct 2, 2020

Thanks for your response.

I'm actually using version 8.1.1401 (The default version on Debian Buster's stable repository).

Included patches: 1-875, 878, 884, 948, 1046, 1365-1368, 1382, 1401

After updating vim-polyglot I'm still getting the errors. However with vim version 8.1.2269 and patches 1-2269 I don't get any errors.

sheerun added a commit that referenced this issue Oct 2, 2020
@sheerun
Copy link
Owner

sheerun commented Oct 2, 2020

huh sorry, I've refactored half of the code to be able remove, but not removed ++once. It should be fixed now

@bstaint
Copy link

bstaint commented Oct 4, 2020

vim version: 8.2.1783.
when save twice, command line will echo current line:
GIF

:au BufWritePost

filetypedetect  BufWritePost
    <buffer=2>
              | call polyglot#detect#Html()

@sheerun sheerun reopened this Oct 4, 2020
@sheerun sheerun closed this as completed in d221139 Oct 4, 2020
@sheerun
Copy link
Owner

sheerun commented Oct 4, 2020

I took different approach which should work, and should work even for Vim with tiny features set

@bstaint
Copy link

bstaint commented Oct 5, 2020

Tks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants