From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#45765: [PATCH] 28.0.50; Change default-directory before prompting in project-compile Date: Mon, 11 Jan 2021 02:47:24 +0200 Message-ID: <03e46cb4-b81c-f369-b932-958f5707981a@yandex.ru> References: <87bldx2bmk.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40072"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 Cc: Juri Linkov To: =?UTF-8?Q?K=C3=A9vin?= Le Gouguec , 45765@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jan 11 01:48:09 2021 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 1kylNR-000AN4-PJ for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 11 Jan 2021 01:48:09 +0100 Original-Received: from localhost ([::1]:48094 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kylNQ-0006IN-Kt for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 10 Jan 2021 19:48:08 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59014) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kylNK-0006IF-MA for bug-gnu-emacs@gnu.org; Sun, 10 Jan 2021 19:48:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43706) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kylNK-00082G-Em for bug-gnu-emacs@gnu.org; Sun, 10 Jan 2021 19:48:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kylNK-0000Rt-CV for bug-gnu-emacs@gnu.org; Sun, 10 Jan 2021 19:48:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 11 Jan 2021 00:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45765 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 45765-submit@debbugs.gnu.org id=B45765.16103260561692 (code B ref 45765); Mon, 11 Jan 2021 00:48:02 +0000 Original-Received: (at 45765) by debbugs.gnu.org; 11 Jan 2021 00:47:36 +0000 Original-Received: from localhost ([127.0.0.1]:55252 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kylMu-0000RD-A8 for submit@debbugs.gnu.org; Sun, 10 Jan 2021 19:47:36 -0500 Original-Received: from mail-wr1-f47.google.com ([209.85.221.47]:45938) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kylMs-0000R0-Ip for 45765@debbugs.gnu.org; Sun, 10 Jan 2021 19:47:35 -0500 Original-Received: by mail-wr1-f47.google.com with SMTP id d26so14651268wrb.12 for <45765@debbugs.gnu.org>; Sun, 10 Jan 2021 16:47:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=oJgoqzmUXnReWzvj7ZmCtaQi04RaAGT1CPSIZQx7Evg=; b=lFCpj/BAvq1yP3QaMdz/5wfR0cAeq7h01TYADmSUDe/rU/d6hsX1WYuHYWqGsvPlrU 3G+jyBXKU0DNGq6jsp4B+Ii0+a/fqWjLmdriRCfppaJWCm+Xp+2+j1Ivh1yKiyUIzeNJ rKqPi6EUNhN/z846dEsClPRYjU42HO3WaXPX6sdlsA0Gc2Fu5ZK4700uRhiI7Esaslvv tZfyIqXCJGEMSNJUGwYxO614FrXzOTvyg3Gxdor2AFu0/+Q4ZouK+jBTAm6yNQV/oqcN S9njIpRLzYWADHBYQsiuuv6kCeWOacKV7ynON6/YihHQf1bWAVS1H4vXjHskzw66gEEo d8kw== 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:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=oJgoqzmUXnReWzvj7ZmCtaQi04RaAGT1CPSIZQx7Evg=; b=tCFRnFcZWEXSi5bXwPrsHCjI7UN8OuYR8Y2HEuTzzGDbPiJZ3xfltJTOhcfhmjTYu/ jenmil7aQKsdkkrBQhnsi0GMECQI/y3f1qH3GU3Xbhw4LSCAC1VyfYDyAR5ZKRu3pUgY mIM8HzUalNg4ipPomfSF7TWwQCIjMML3+tN+/qksCCJ/Jom1MZC4Be8Ep/fHcZY6jse2 IG3SQCSl+nyuh91orE3c+lFisbWZn0SHrSrxalbexoYeR79N6yYcU0ktL8DF8DOgc3dl VJzk0dZ7tSGVlKtXycxmzx3yO62Qhum7fEpadeKwgul+AwUNRfdcWNUZFthLQMUFSQKG LraQ== X-Gm-Message-State: AOAM532DCemuyHjJuMg2DAW+nw6zEOT9GpeNbWfWR79CQ35/2z6F1v7b nzMeFcLbsoL3xx8irmTKIxA= X-Google-Smtp-Source: ABdhPJyOTNDcNp46ISpb7g3xaln4tHuTfL5Zi/+DaoifdPOgsRA3Rvai1uOfaFGtx8NpvCTmnL3fAg== X-Received: by 2002:a5d:4ece:: with SMTP id s14mr13545279wrv.427.1610326048676; Sun, 10 Jan 2021 16:47:28 -0800 (PST) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id m21sm19765259wml.13.2021.01.10.16.47.27 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 10 Jan 2021 16:47:27 -0800 (PST) In-Reply-To: <87bldx2bmk.fsf@gmail.com> Content-Language: en-US X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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:197671 Archived-At: Hi Kevin, On 10.01.2021 14:57, Kévin Le Gouguec wrote: > Unlike project-shell-command, project-compile first prompts for a > command, then binds default-directory and calls compile. Binding > default-directory first makes completion work from the project root, > which is useful for completing on filenames relative to the root, on > targets from the toplevel Makefile, etc. Thanks for the report. > I see three ways to achieve this: > > (1) Rewrite project-compile with call-interactively, the way > project-shell-command is written (see patch #1). > > (2) Set COMMAND to nil in the interactive spec, then prompt for it after > binding default-directory (see patch #2). > > (3) Let-binding default-directory once in the interactive spec, and > again before calling compile. > I'm assuming (1) is out of the question, given 2020-06-02 > "* lisp/progmodes/project.el (project-vc-dir, project-shell): New > commands." (2c1e5b9e77). I'm CC'ing Juri to get his opinion though; > project-compile is new in Emacs 28.1, so its argument list is not yet > set in stone. I see no strong reason to avoid (1), this new command has never seen an Emacs release, so we're not bound by compatibility promise yet. Further, any code that would be calling project-compile in a program should inline its definition instead, in most of the cases. Let's see what people think, of course.