From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#34949: 27.0.50; Docstring of `vc-deduce-fileset' incomplete Date: Thu, 12 Mar 2020 02:41:25 +0200 Organization: LINKOV.NET Message-ID: <87mu8mieve.fsf@mail.linkov.net> References: <5d2163b9-4bf4-e072-ef9e-0fc1550a2108@yandex.ru> <87imk35uy6.fsf@mail.linkov.net> <87v9o0kg1f.fsf@mail.linkov.net> <32b1f22f-1ac9-7fd2-0377-4c2d7ae43afd@yandex.ru> <87sgj2np8k.fsf@mail.linkov.net> <8736b06f60.fsf@mail.linkov.net> <87sgizy16y.fsf@mail.linkov.net> <1f31a329-eaee-f704-9a58-1b048a6ee636@yandex.ru> <87fteyl64x.fsf@mail.linkov.net> <47fcc86a-a884-0658-d1cb-8666704924e8@yandex.ru> <87o8tkgbe2.fsf@mail.linkov.net> <8736avy640.fsf@mail.linkov.net> <76e52ade-bb44-427a-0910-3fe3cf65bf6d@yandex.ru> <87a751uonw.fsf@mail.linkov.net> <9bab3a53-ec31-3300-132f-dc1e17ee0c53@yandex.ru> <875zfd9lzm.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="19876"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) Cc: Lars Ingebrigtsen , 34949@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Mar 12 02:03:17 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jCCFo-00055y-GG for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 12 Mar 2020 02:03:16 +0100 Original-Received: from localhost ([::1]:60182 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jCCFm-0003LR-Vs for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 11 Mar 2020 21:03:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58915) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jCCFc-0003JC-J1 for bug-gnu-emacs@gnu.org; Wed, 11 Mar 2020 21:03:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jCCFa-0003y8-FI for bug-gnu-emacs@gnu.org; Wed, 11 Mar 2020 21:03:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49757) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jCCFa-0003xW-6o for bug-gnu-emacs@gnu.org; Wed, 11 Mar 2020 21:03:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jCCFa-0003Ay-0z for bug-gnu-emacs@gnu.org; Wed, 11 Mar 2020 21:03:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 12 Mar 2020 01:03:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34949 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed Original-Received: via spool by 34949-submit@debbugs.gnu.org id=B34949.158397496212165 (code B ref 34949); Thu, 12 Mar 2020 01:03:01 +0000 Original-Received: (at 34949) by debbugs.gnu.org; 12 Mar 2020 01:02:42 +0000 Original-Received: from localhost ([127.0.0.1]:55727 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jCCFG-0003A8-8Z for submit@debbugs.gnu.org; Wed, 11 Mar 2020 21:02:42 -0400 Original-Received: from brown.elm.relay.mailchannels.net ([23.83.212.23]:23597) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jCCFE-00039y-4E for 34949@debbugs.gnu.org; Wed, 11 Mar 2020 21:02:40 -0400 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 9F5E4401082; Thu, 12 Mar 2020 01:02:38 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a72.g.dreamhost.com (100-96-1-27.trex.outbound.svc.cluster.local [100.96.1.27]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 07CF940113E; Thu, 12 Mar 2020 01:02:38 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from pdx1-sub0-mail-a72.g.dreamhost.com ([TEMPUNAVAIL]. [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.18.5); Thu, 12 Mar 2020 01:02:38 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Callous-Battle: 7a60917f22c0dd2a_1583974958322_2221810941 X-MC-Loop-Signature: 1583974958322:1057993675 X-MC-Ingress-Time: 1583974958321 Original-Received: from pdx1-sub0-mail-a72.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a72.g.dreamhost.com (Postfix) with ESMTP id B34E384244; Wed, 11 Mar 2020 18:02:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=linkov.net; bh=qSAVdlDYOc9vCTPQHkEk7G6nx/U=; b= U90+QX8nEEXnkIgEFy8s5bhT/cV7nzHKFxQfzX5igzkwkrIIBkS9OGHuaf1wCX6w MBASn2sZgr2z0EInYrHXFn3KxmWZTaB7SqcxOpQJji444/6TxPc+DFtKhqAMv2e0 IkuA1ZJ7S9SziWusqmsfNvxsh0e7Kkrwbfk9VJM/WdA= Original-Received: from mail.jurta.org (m91-129-107-65.cust.tele2.ee [91.129.107.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by pdx1-sub0-mail-a72.g.dreamhost.com (Postfix) with ESMTPSA id 7DB9A84237; Wed, 11 Mar 2020 18:02:30 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a72 In-Reply-To: (Dmitry Gutov's message of "Thu, 12 Mar 2020 02:08:14 +0200") X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedugedruddvgedggeduucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdejrdeiheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddtjedrieehpdhrvghtuhhrnhdqphgrthhhpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhhrtghpthhtohepughguhhtohhvseihrghnuggvgidrrhhu X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:177207 Archived-At: >>> 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?