On Wed, Dec 11, 2013 at 5:55 PM, Ben Fritz <[email protected]> wrote:
> On Wednesday, December 11, 2013 4:00:22 PM UTC-6, Manuel Ortega wrote:
> > > Now, since lowercase marks are associated with the *buffer* and not
> the *file*, I would in fact expect :bwipe to zap those.
> >
> >
> > Huh? Lowercase marks are associated with *files*.
>
> Lowercase marks are valid only within a single buffer. The :help section I
> quoted refers specifically to buffers, i.e. "Jump to the mark {a-z} in the
> current buffer."
>
I didn't say that each lowercase mark was "valid in" every buffer. I said
lowercase marks are associated with files. Viminfo contains implicitly (if
you make some lowercase marks) a mapping from lowercase marks to one or
more files. If that is not an association, I don't know what is.
Uppercase marks are valid anywhere, and will jump to a place in a file
> regardless of whether that file is currently loaded into a buffer or not.
> The help specifically refers to files, i.e. "[jump] to the mark {A-Z0-9} in
> the file where it was set".
>
Right, I never said otherwise.
I am objecting to the view that :bwipe should preserve the uppercase marks
but not the lowercase marks. I claim no reason has been given for treating
them differently. You made an argument that the lowercase should be
deleted and the uppercase should be kept, because (i) lowercase marks are
associated with buffers not with files, whereas (ii) uppercase marks are
associated purely to files.
I then pointed out that (i) is false. You and Christian replied, in
effect, that "associated with buffers" means "whether or not you can use
the mark depends on what buffer you are currently in".
*That* is true, never denied by me, and if you replace (i) with *it* in the
above argument, the argument collapses.
Suppose I have a file foo. Call its buffer "bfoo". There are some
lowercase and uppercase marks associated with foo, and by extension with
bfoo. Upon quitting, Vim records these marks, lower and upper, as
belonging to foo (it also records some of the lowercase marks as also
belonging to other files, but that's not relevant here).
Now suppose for some reason I want to :bwipe. Not delete the file foo, but
just :bwipe. If I want to *keep* an uppercase mark to foo, so that I can
later return to it at will, why on earth would I automatically want to
*lose* the lowercase marks? After all, it's not as though they can
interfere with other lowercase marks once bfoo is bwiped. Is it to free up
some memory? The memory involved is trivial. Is it to remove any record
that I have been looking at foo (Christian's reason)? Surely not, as the
uppercase mark, which is preserved, contains that information; one would
need to blast away the uppercase marks too, as :bwipe currently does.
Further down there is a separate section for "viminfo-file-marks" that
> talks about the uppercase marks and the numbered marks. Just above is a
> paragraph that talks about "normal" marks, where it talks about manually
> calling :wviminfo if you want to keep those marks saved when you use
> :bdelete. This text is missing from the viminfo-file-marks section.
>
The distinction made between upper and lower here is totally without
relevance to the question of whether :bwipe should delete
both/neither/one-but-not-the-other.
(Incidentally, it repeatedly uses phrases like "marks for a file", which
helps explain why the claim you made, that marks are not associated with
files, sounds bizarre until one realizes that by "associated with buffers"
you meant something about when the marks can or can't be invoked.)
Furthermore, note that the special marks '0 through '9 are NOT currently
> removed by :bwipe. And those marks are noted in the same help location as
> manual uppercase marks (:help 'A and :help '0 go to the same place). I'd
> expect '0 and 'A to act mostly the same, then.
Agreed. It is bizarre that the different kinds of marks are treated
differently by :bwipe. If there is a buffer and there is no corresponding
file (bt=nofile, or just not saved yet), then there are no numbered or
uppercase marks, and if you make some lowercase marks they should be
destroyed by :bwipe. If on the other hand the buffer does have a
corresponding file, then :bwipe leaves the file in place. If the file is
left, I see no reason at all why :bwipe should delete any marks at all.
(Though I stand by my claim that there should be some built-in and easy,
argument-free way--perhaps ":destroymarks" to instantly destroy all marks
associated with a file).
So either way --- corresponding file or no corresponding file --- :bwipe
should not treat the different kinds of marks differently. In the former
case, they should all be left alone, and in the latter case, none should
survive (probably upper and numbered don't even exist to begin with).
-Manny
--
--
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.