From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: A project-files implementation for Git projects Date: Fri, 06 Sep 2019 08:52:50 -0400 Message-ID: References: <8736h9rdc4.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="136360"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Sep 06 14:53:14 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1i6Djl-000ZLb-4Q for ged-emacs-devel@m.gmane.org; Fri, 06 Sep 2019 14:53:13 +0200 Original-Received: from localhost ([::1]:55954 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i6Djj-0004ZM-Fq for ged-emacs-devel@m.gmane.org; Fri, 06 Sep 2019 08:53:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56611) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i6DjT-0004OZ-CT for emacs-devel@gnu.org; Fri, 06 Sep 2019 08:52:56 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i6DjS-0001e6-9t for emacs-devel@gnu.org; Fri, 06 Sep 2019 08:52:55 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:23286) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1i6DjS-0001dg-5s for emacs-devel@gnu.org; Fri, 06 Sep 2019 08:52:54 -0400 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 13701100ECA; Fri, 6 Sep 2019 08:52:53 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id CD398100EA2; Fri, 6 Sep 2019 08:52:51 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1567774371; bh=BCZVDgbtW440nYo94GlUN/Ly9vVAP3A6IudRsKTQC9I=; h=From:To:Subject:References:Date:In-Reply-To:From; b=JFdsrpyfiMTPVUOjHERGRCeYkJbLoT9Xg8MsPbVLpELE5So8atf1LpPaVUldPRHnO jnAlZ7ZBiIXUM/yFPMfcAhkFRwC0dPTjJeQuP/XGkVDD4yVFE7Ur8hCnMacNOvalZq D/9ctB/PjhY/e/WAlt2Fg+PBVZ04p2LkwaVFuxHF6LyDUaVbd1H8WpI8h/5pJKZmAG a9yEi9x9FuzZb4pcSBu5nhUxaHsP4ZdD/jU31G9t9ChMv1dRsZ0weA1IDA2uxaALIA bFkQr1CMvNzUn6bR2Me9g8bQwF3aToJWwFCfTyLPEF1xxlnTuXpXr/G+GBVjBal4W5 ETZfiwY8QVlww== Original-Received: from pastel (unknown [108.175.227.36]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id A161E120397; Fri, 6 Sep 2019 08:52:51 -0400 (EDT) In-Reply-To: <8736h9rdc4.fsf@gnu.org> (Tassilo Horn's message of "Fri, 06 Sep 2019 11:19:55 +0200") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 132.204.25.50 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:239899 Archived-At: > (cl-defmethod project-files ((project (head vc)) &optional dirs) > "Implementation of `project-files' for Git projects." > (cl-mapcan > (lambda (dir) > (if-let ((git (and (file-exists-p > (expand-file-name ".git/config" dir)) > (executable-find "git")))) Since it's a handler for `vc` it should handle all VC backends. To do that, it can simply use the `vc-call-backend` mechanism, so the Git-specific code can be put inside vc-git and you can have a generic implementation that does just the `cl-call-next-method`. Stefan