Now that I think about it, perhaps the reason ':bwipeout "%"' fails with error E94 is because "%", with the double quotes, is passed to bwipeout which understands % as a buffer name but not "%".

I think this explains the behavior.  Thanks for the conversation!

On 05/13/2024 4:15 PM, Christian Brabandt wrote:
On Mo, 13 Mai 2024, Michael Soyka wrote:

Yes, your are right- the bwipeout command succeeds without the double
quotes in vim9script.  Thanks for the solution!

Given that, what feature of vim9script causes the error when double
quotes are used?  In legacy vimscript, it doesn't matter if double
quotes are present or not.  Perhaps this should be added to
vim9-differences documentation.
[...]
                 bwipeout "%"
There is a slight difference here. Remember that `"` is the comment
character in legacy Vim Script, so what Vim actually sees and runs is:

                 :bwipeout

On Vim9 Script, I think it sees the whole argument "%" and expands to
the current buffer name. So by coincidence it behaves the same, but just
because :bw will wipe the current buffer if no argument has been given.

Thanks,
Chris

--
--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/0dcbfcbe-b95e-4df6-8348-2a02917cb80c%40gmail.com.

Raspunde prin e-mail lui