[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Updating *vc-dir* marks from *VC-log*
From: |
Dan Nicolaescu |
Subject: |
Re: Updating *vc-dir* marks from *VC-log* |
Date: |
Sun, 21 Nov 2010 12:02:19 -0500 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) |
Bob Rogers <address@hidden> writes:
> From: Dan Nicolaescu <address@hidden>
> Date: Sat, 20 Nov 2010 23:46:40 -0500
>
> Bob Rogers <address@hidden> writes:
>
> > . . . With multiple pending commits, what is needed is a way to return
> > to vc-dir and "swap in" the log buffer fileset. The patch below adds a
> > new log-edit-visit-files-in-vc-dir command to do this. I have
> > tentatively bound it to "C-c @" in log-edit-mode, which I hope is
> > sufficiently mnemonic for "mark".
>
> I am not sure what you are trying to do here...
> In the *VC log* buffer the vc-parent-buffer buffer-local variable
> points to the *vc dir* buffer that was used to create it.
> Doesn't this simplify what you are trying to do?
>
> Hmm. It could conceivably make vc-dir-find-buffer-for-file unnecessary.
> (I had written that for another hack where vc-parent-buffer may not be
> defined, or may not point to a vc-dir buffer, and just used it
> unthinkingly here.)
>
> On the other hand, one would have to assume that users only want to
> adjust the filesets of commits started from vc-dir buffers.
> vc-dir-find-buffer-for-file would still be useful if the user originally
> typed "C-x v v" in a file buffer, and then had second thoughts.
It's still unclear what you are trying to do, could you please
describe in detail the use-case you have in mind?
>
> But, at the very least, I ought to check vc-parent-buffer first,
> since that would always DTRT if the file appears in multiple vc-dir
> buffers. Thanks for making that apparent.
>
> BTW, this is a subproject that came up while trying to make Emacs
> smarter about changing marked files in vc-dir during the commit (see
> bug#7350).
That's quite easy (I have it in my local copy).
`log-edit-files' gives you a list of files that *VC log* would check in.
`vc-deduce-fileset' in `vc-parent-buffer' gives you the currently selected
files in *vc dir*
Re: Updating *vc-dir* marks from *VC-log*, Stefan Monnier, 2010/11/21