From: Dmitry Gutov <dgutov@yandex.ru>
To: Juri Linkov <juri@linkov.net>
Cc: Lars Ingebrigtsen <larsi@gnus.org>, 34949@debbugs.gnu.org
Subject: bug#34949: 27.0.50; Docstring of `vc-deduce-fileset' incomplete
Date: Wed, 19 Feb 2020 00:27:12 +0200 [thread overview]
Message-ID: <5d2163b9-4bf4-e072-ef9e-0fc1550a2108@yandex.ru> (raw)
In-Reply-To: <87zhdghjca.fsf@mail.linkov.net>
On 18.02.2020 1:42, Juri Linkov wrote:
> The difficultly comes from the need to get a VC state from every marked file
> and to confirm that all marked files are in the same state.
Makes sense, that was my second guess.
> So I implemented this in vc-dired-deduce-fileset whose basic
> algorithm was taken from vc-dir-deduce-fileset.
>
> Now with this patch state changing VC operations are supported on marked
> _files_ in dired.
TBH, I'm not sure this is a win (we have VC-Dir for a reason), but if
you really want to be able to do that in Dired, why not. Please feel
free to install this.
> However, the need for the OBSERVER arg still remains because this patch
> doesn't support state changing VC operations on marked _directories_ in dired.
> It raises the error in this case:
>
> State changing VC operations on directories not supported in `dired-mode'
>
> State changing VC operations could be supported on directories as well,
> but there are several possibilities to choose from, and I can't decide:
>
> 1. On a marked directory get a state from all its files
> (probably this variant makes no sense)
>
> 2. On a marked directory get only files with a "modified" state
> (i.e. edited/added/removed)
You can check out what diff-hl-dired does in this regard (and it does
use the dir-status-files command), though you would need to do something
else than its merging logic.
That still leaves the downside (compared to VC-Dir) of being unable to
select individual files in subdirectories, but that's not fixable, I guess.
> But the latter is not easy to implement because the needed functionality
> is missing in VC, because the only VC method that is suitable for this is
> 'dir-status-files' to get VC files from a directory but it's too tightly
> integrated with vc-dir and can't be easily separated, i.e. there is
> no easy way to do something like:
>
> (with-temp-buffer
> (vc-call-backend
> (vc-responsible-backend default-directory) 'dir-status-files default-directory nil
> (lambda (entries &optional more-to-come)
> (message "! %S" entries))))
I think the only possible problem here is that lambda is invoked
asynchronously. But we can sleep while waiting for it.
next prev parent reply other threads:[~2020-02-18 22:27 UTC|newest]
Thread overview: 69+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-22 17:50 bug#34949: 27.0.50; Docstring of `vc-deduce-fileset' incomplete Philipp Stephani
2019-10-09 22:40 ` Lars Ingebrigtsen
2019-12-24 19:53 ` Dmitry Gutov
2019-12-24 23:28 ` Juri Linkov
2020-02-17 23:42 ` Juri Linkov
2020-02-18 22:27 ` Dmitry Gutov [this message]
2020-02-18 23:36 ` Juri Linkov
2020-02-20 23:14 ` Juri Linkov
2020-02-21 0:22 ` Dmitry Gutov
2020-02-23 0:04 ` Juri Linkov
2020-02-23 9:01 ` Dmitry Gutov
2020-02-23 23:25 ` Juri Linkov
2020-02-24 0:17 ` Dmitry Gutov
2020-02-25 0:12 ` Juri Linkov
2020-02-25 10:32 ` Dmitry Gutov
2020-02-25 21:23 ` Juri Linkov
2020-02-26 22:49 ` Dmitry Gutov
2020-02-26 23:46 ` Juri Linkov
2020-02-27 7:28 ` Dmitry Gutov
2020-02-27 23:15 ` Juri Linkov
2020-02-28 19:22 ` Dmitry Gutov
2020-02-29 21:25 ` Juri Linkov
2020-02-29 22:25 ` Dmitry Gutov
2020-03-09 22:55 ` Juri Linkov
2020-03-12 0:08 ` Dmitry Gutov
2020-03-12 0:41 ` Juri Linkov
2020-03-12 22:43 ` Juri Linkov
2020-03-13 12:11 ` Dmitry Gutov
2020-03-14 23:31 ` Juri Linkov
2020-03-15 21:54 ` Dmitry Gutov
2020-03-15 23:58 ` Juri Linkov
2020-03-16 20:17 ` Dmitry Gutov
2020-03-24 22:16 ` Juri Linkov
2020-03-25 20:47 ` Juri Linkov
2020-03-25 21:32 ` Dmitry Gutov
2020-03-29 22:35 ` Juri Linkov
2020-03-30 19:53 ` Dmitry Gutov
2020-03-24 22:36 ` Juri Linkov
2020-03-25 20:59 ` Juri Linkov
2020-03-25 21:15 ` Drew Adams
2020-03-25 21:50 ` Juri Linkov
2020-03-25 22:04 ` Drew Adams
2020-03-26 23:18 ` Juri Linkov
2020-03-27 16:11 ` Drew Adams
2020-03-27 22:41 ` Dmitry Gutov
2020-03-28 23:54 ` Juri Linkov
2020-03-29 18:41 ` Dmitry Gutov
2020-03-29 22:27 ` Juri Linkov
2020-03-30 20:01 ` Dmitry Gutov
2020-03-30 22:40 ` Juri Linkov
2020-03-30 23:22 ` Dmitry Gutov
2020-03-31 1:02 ` Drew Adams
2020-04-02 22:08 ` Juri Linkov
2020-04-03 0:21 ` Dmitry Gutov
2020-04-03 20:08 ` Philipp Stephani
2020-04-04 23:37 ` Juri Linkov
2020-04-05 9:47 ` Philipp Stephani
2020-04-05 23:05 ` Juri Linkov
2020-04-09 8:41 ` Eli Zaretskii
2020-04-11 23:38 ` Juri Linkov
2020-04-12 6:33 ` Eli Zaretskii
2020-04-12 23:51 ` Juri Linkov
2020-04-13 4:31 ` Eli Zaretskii
2020-04-13 23:25 ` Juri Linkov
2020-03-25 21:59 ` Dmitry Gutov
2020-03-26 23:10 ` Juri Linkov
2020-03-26 23:51 ` Dmitry Gutov
2020-02-21 0:16 ` Dmitry Gutov
2019-12-25 21:45 ` Lars Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5d2163b9-4bf4-e072-ef9e-0fc1550a2108@yandex.ru \
--to=dgutov@yandex.ru \
--cc=34949@debbugs.gnu.org \
--cc=juri@linkov.net \
--cc=larsi@gnus.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.