Christian Brabandt wrote: > On Mo, 09 Dez 2013, Bram Moolenaar wrote: > > > > Christian Brabandt wrote: > > > > > Bram, > > > I use an uppercase mark to access a blowfish encrypted file. I therefore > > > :bwipe that buffer when I'm done with this file. Unfortunately, I can't > > > use the uppercase mark again, to reload that file, Vim throws E92 error. > > > > > > Attached patch fixes it and includes a test. > > > > Seems useful. However, why not only :bdelete the buffer? What remains > > behind that :bwipe does get rid of? > > I didn't want to leave behind any way to see what buffers where loaded.
Ehm, but your patch keeps the mark, so you leave that behind. That more or less indicates you were editing that file. > > What if someone relies on :bwipe clearing the mark? E.g., when it's a > > temp file with a weird name that you don't want to accidentally jump > > back to? > > Is this really a problem, that someone wipes a buffer and relies on the > fact, that going back to that mark errors out? One should rather use > :delmark or use setpos() function in that case. No, when one edits text in a temp file, you just :bwipe it to avoid going back to that file in any way. That works because the file name was only stored in the buffer and it's gone. You don't have to think about where else the name would be stored or what marks point into that file. So, instead of your patch, you could create a command ":WipeBufKeepMark" that uses setpos(). Except that setpos() requires a buffer number... Hmm. Perhaps we should add a way to have setpos() accept a file name? Then you can solve it in Vimscript. -- Seen it all, done it all, can't remember most of it. /// Bram Moolenaar -- [email protected] -- 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 [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
