From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: A project-files implementation for Git projects Date: Fri, 4 Oct 2019 16:16:38 +0300 Message-ID: References: <8736h9rdc4.fsf@gnu.org> <87a7ba8uvx.fsf@gnu.org> <87pnk2zvvy.fsf@gnu.org> <87sgows6wy.fsf@gnu.org> <87ef0dy18z.fsf@gnu.org> <87impk675h.fsf@gnu.org> <874l13h30l.fsf@gnu.org> <7386ef98-c151-e1ce-23fa-11470a16f0d3@yandex.ru> <87h84x1zoa.fsf@gnu.org> <4be972f9-45a3-f2aa-f532-d7b8fbe054fd@yandex.ru> <17994e8f-9940-2da5-216e-20a5d3842822@yandex.ru> <87r23u9qjc.fsf@gnu.org> <1ffb046d-f2de-b1d5-d6a9-a6059616cc08@yandex.ru> <87imp5kax0.fsf@gnu.org> <1a9a7f78-fbef-176d-9189-7007046d3fb1@yandex.ru> <875zl5hrzh.fsf@gnu.org> <871rvthrge.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="120136"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Oct 04 15:20:28 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 1iGNVT-000TH7-Po for ged-emacs-devel@m.gmane.org; Fri, 04 Oct 2019 15:20:27 +0200 Original-Received: from localhost ([::1]:48642 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iGNTz-00041I-9y for ged-emacs-devel@m.gmane.org; Fri, 04 Oct 2019 09:18:55 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43193) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iGNRs-0003yE-Oe for emacs-devel@gnu.org; Fri, 04 Oct 2019 09:16:45 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iGNRr-0000PZ-Ki for emacs-devel@gnu.org; Fri, 04 Oct 2019 09:16:44 -0400 Original-Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]:36704) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iGNRr-0000MW-Ez for emacs-devel@gnu.org; Fri, 04 Oct 2019 09:16:43 -0400 Original-Received: by mail-wm1-x342.google.com with SMTP id m18so5821324wmc.1 for ; Fri, 04 Oct 2019 06:16:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=mXPeMU9L1V4Om8gJiV5rc+eBAhIWT9cxSdoKucHPXBM=; b=nqaSyByULByP5HW265YrUCIhoSVLp4MjE/wTr4wVjJsCSyVdMxqpvgexjb1HKQCOrj 1jmkuM5d8HY0eCj2OMQ166IdTWWHQXMEfQVtI0HfkN8uiCqSGLHn/a0DSs1ShEKHufvv JCyJK9xfGJDoB6XaOFQmsN96mbzqq4m7m4yWtyB0CUCTYlDWyswTzsjXyGnI7Rs9GF1X vfbcQx58Ix/YCdAJlokTDPd/PFZXukaABjUeFrr/I+hJ+E39DFzrZ1FfalRH1R4k5iDa n1IVabu8e51Z8CdyPRgXzZaE19jK/Sbqp5boxVJp13n0WtcR+Hdpjk83dyttfIqa3itb foZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=mXPeMU9L1V4Om8gJiV5rc+eBAhIWT9cxSdoKucHPXBM=; b=E38REPM8m1iIkMZguvKTFgPM5UPfh8lrUQLQCH5vtu+qw4tawS6Rw1YGTdG+br+cEf /vHsNF9nP8ILmdfsQZnY6fxUXsowSn48TG4MOq0+3+2iWAoDMruADBBej981EZKJl+iB 2U29ufULqs6inEEGf6BHM0DguNVGzky55CESDZE1io6Qa49RtywwiE3asq/vIelzhfTu lxLnQrwHTKItZW/4SguIZaPOVYvNpNqSI5MIdz5Noxr+BfXUqZAZKJ7q6m/azydh3FFM Dzmh3uVolF9ej8sTTCfmE6ID3dHQLr+QkZYvAH1L1I9A2a7oWR70LjVE40W19c10NbiM trnA== X-Gm-Message-State: APjAAAUpG15C8Zb0drzpoEqaWDz62EZ0UaTR5uWW955WY2eEhYCAVxD6 JDfO8g1GS8tX5IczIk6D7tSkwWk8sl0= X-Google-Smtp-Source: APXvYqyUSwDSvPrIr+1ZvH1cMQqqf12GudmqJ1JHmLI1cTAOu0vyKqRmPDxLgr6W1jd8FFQzsCvdIg== X-Received: by 2002:a1c:4485:: with SMTP id r127mr10320790wma.59.1570195001326; Fri, 04 Oct 2019 06:16:41 -0700 (PDT) Original-Received: from [192.168.0.133] ([109.110.245.170]) by smtp.googlemail.com with ESMTPSA id 63sm3178187wri.25.2019.10.04.06.16.39 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 04 Oct 2019 06:16:40 -0700 (PDT) In-Reply-To: <871rvthrge.fsf@gnu.org> Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::342 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:240569 Archived-At: On 04.10.2019 10:58, Tassilo Horn wrote: > Oh wait, forget that. What I really would like to have is a way to get > *all* project files but relative to the given directory. Right now, if > I specify a project subdirectory, I only get the files in there which is > sensible, of course. So I have to call `project-files' for the project > given that "git ls-files " only returns the files in > and then call `file-relative-name' on the results. That's, um... we don't actually guarantee that project-files will work when passed anything other than one of the project roots. But as long as it works for you, good. In any case, your suggested return format is probably a no-go. The DIRS argument is to specify the set of files to be returned, we really can't interpret it in a conflicting way. The good news is that you still can use file-relative-name even if the first argument is relative already (but to default-directory): > (file-relative-name "foo/bar" "/tmp") => "../home/dgutov/vc/emacs-master/lisp/progmodes/foo/bar" But alas, file-relative-name is not free.