GNU bug report logs - #34949
27.0.50; Docstring of `vc-deduce-fileset' incomplete

Previous Next

Package: emacs;

Reported by: Philipp Stephani <p.stephani2 <at> gmail.com>

Date: Fri, 22 Mar 2019 18:04:02 UTC

Severity: minor

Tags: confirmed, fixed

Found in version 27.0.50

Fixed in version 28.0.50

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Juri Linkov <juri <at> linkov.net>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: Lars Ingebrigtsen <larsi <at> gnus.org>, 34949 <at> debbugs.gnu.org
Subject: bug#34949: 27.0.50; Docstring of `vc-deduce-fileset' incomplete
Date: Thu, 12 Mar 2020 02:41:25 +0200
>>> Anyway, please go ahead and try it for yourself.
>> I finished implementing this, and now it works surprisingly well -
>> typing 'C-x v v' on Dired directories puts marks on them in*vc-dir*  buffer:
>
> I'm happy it's working well for you.
>
> There are some things we could probably improve in the implementation.

This patch provides the minimal non-intrusive solution.
Trying to change it according to your comments will require
redesigning the whole vc-deduce and vc-dir interactions.
I don't say it's a bad thing, just will make the patch 10 times longer.

> First of all, I wonder if we could do without the new global var. The
> purpose of vc-dir-mark-files is not strictly apparent from 
> vc-dir-refresh's code (e.g. where this value comes from). It would be
> better if the command which calls vc-dir itself finished setting the marks.

Without a global var means adding more arguments to the whole chain of
function calls.

> I think the (cl-some #'file-directory-p files) check should be done in the
> caller of this function, and if true, the called would delegate to
> VC-Dir. Maybe this would necessitate a change in this function's 
> signature (e.g. in order not to call dired-get-marked-files twice).

The caller of vc-deduce-fileset is vc-next-action.
Do you think it would be the right separation of concerns
to check dired-get-marked-files in vc-next-action
instead of vc-dired-deduce-fileset?

> As per above, I'd rather see this somewhere in the code related to
> vc-dired-deduce-fileset rather than here.

Actually this code is not related to vc-dired-deduce-fileset,
but rather it's related to vc-next-action.  Do you think
vc-next-action should call this code when the current buffer is
Dired with marked directories?




This bug report was last modified 5 years and 37 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.