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#74631: 30.0.92; [PATCH] autoload project-recompile and set default-directory Date: Tue, 10 Dec 2024 04:10:08 +0200 Message-ID: <02c71b77-433c-4dae-baa0-13376dee75f2@gutov.dev> References: <87zflffzp5.fsf@daniel-mendler.de> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14099"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird To: Daniel Mendler , 74631-done@debbugs.gnu.org, Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Dec 10 03:11:35 2024 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 1tKpio-0003Rl-Fm for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 10 Dec 2024 03:11:35 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tKpiM-0003WY-K1; Mon, 09 Dec 2024 21:11:06 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tKpiK-0003WD-5M for bug-gnu-emacs@gnu.org; Mon, 09 Dec 2024 21:11:04 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tKpiJ-00054o-J1 for bug-gnu-emacs@gnu.org; Mon, 09 Dec 2024 21:11:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=In-Reply-To:From:References:MIME-Version:Date:To:Subject; bh=9r9m1OmPtwhwL8mD77iTE5ZBIojtchg+sSjPveWAfc8=; b=GHZqjeulPKMaJWSRTAtUO79roeZjDdMRi3uPvmU+D2Zo9pGyE9IhXbvYCJUa1HKN/7QUMQLhuc+Hy/9bvZU8q6CFRUSjnJz+vwkCiP2z+28rAy6MP5SD7CnhyH+v3TNnjRt4vsflg8i5+DKNRGBRX9g1sIFvZ6yAjoF8+IzoKbrIvp6FRfDS/jFVDeOTpSA92WlQW/PmcBbTIj+rYe+aESPbZilrExqFIhGbWmdXtUlwIGHQons/1mlfOZ6HR9GxMZtF1vCQzcmXYIn98PAdJrk91eIde8iDCBBR48yQtXxf8uRa3a77x/pgYO+lajFpDOEAxflbHq5IX3zBnEACRQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tKpiJ-0004vG-4B for bug-gnu-emacs@gnu.org; Mon, 09 Dec 2024 21:11:03 -0500 Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Tue, 10 Dec 2024 02:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 74631 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Mail-Followup-To: 74631@debbugs.gnu.org, dmitry@gutov.dev, mail@daniel-mendler.de Original-Received: via spool by 74631-done@debbugs.gnu.org id=D74631.173379662018674 (code D ref 74631); Tue, 10 Dec 2024 02:11:02 +0000 Original-Received: (at 74631-done) by debbugs.gnu.org; 10 Dec 2024 02:10:20 +0000 Original-Received: from localhost ([127.0.0.1]:56354 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tKphc-0004r6-DZ for submit@debbugs.gnu.org; Mon, 09 Dec 2024 21:10:20 -0500 Original-Received: from fout-a8-smtp.messagingengine.com ([103.168.172.151]:45777) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tKphY-0004qN-Mz for 74631-done@debbugs.gnu.org; Mon, 09 Dec 2024 21:10:18 -0500 Original-Received: from phl-compute-03.internal (phl-compute-03.phl.internal [10.202.2.43]) by mailfout.phl.internal (Postfix) with ESMTP id 4FAA41383EA1; Mon, 9 Dec 2024 21:10:11 -0500 (EST) Original-Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-03.internal (MEProxy); Mon, 09 Dec 2024 21:10:11 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1733796611; x=1733883011; bh=9r9m1OmPtwhwL8mD77iTE5ZBIojtchg+sSjPveWAfc8=; b= b4mAGZ5ZFzzSc7010o/sLrqBCCBizF5BEo1rxASQv6jm8WP/WeRlGsrLpS8RsENH 4ohUoWf81Ha8ZOGZgMhjv3NkGmDKw5BBfhuu8SQV7imUcvPYccruSqcC0DvLM3MI Vh4erLW5Yl6ZdvUtSxjAZla+RiHA4NW0szgt8B+shJYbimGh93W5kZ/Qkq39qirr fv3SzNmk1XPwaPIzfhAOC+jwiyWZkPX77eu5amlYaG07AjRCZaKoVKUj7p6ObkQ+ yEw9qNoKskevv+T3up8v40avItWHQezejFeFfNYqv3rXvwAQkAmjd4ZO/Hj28Kt/ 7JEFir7Le7uS2qrKILm3Rg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; t=1733796611; x=1733883011; bh=9 r9m1OmPtwhwL8mD77iTE5ZBIojtchg+sSjPveWAfc8=; b=CTEyjwB/zO3Vvxo1r xh1gBlxQDGpRh5sM+Ib5h7aGZxOKJffByZ573DCVLsxT1jiFbW4I5TxnODxSVkfq 2jgpOG6ERIiXK7Odl/SCG8Z/v3eMk/dMCt7U4EjsUCI0XYKbLo6CXikndn6lBR7K aVq1eDcwRPyI5xUOdlmn5BNpe4RVF2EKOMirLewLpM5/D3u0ZtIKuiXAMP1oqJAz wrAI/VfLrp1g4tF6KnEmIM7PcjLvEDXKe2LqxhWGwWom+ev1JMbV5a5CfZkYJGzA F8qEvp9xY/uC7L6LTmonu5FL5FHTFni6IGlzNL+EMej+8LacsGafspsBr4g9eJC/ OOndw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrjeejgdegfecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdpuffr tefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnth hsucdlqddutddtmdenucfjughrpefkffggfgfuvfhfhfgjtgfgsehtjeertddtvdejnecu hfhrohhmpeffmhhithhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvh eqnecuggftrfgrthhtvghrnheptdfhuedvtdevleegueelvedvjeevheffveevhedvueff tdefhfdvueeggfetgfdtnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrg hilhhfrhhomhepughmihhtrhihsehguhhtohhvrdguvghvpdhnsggprhgtphhtthhopeef pdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehmrghilhesuggrnhhivghlqdhmvg hnughlvghrrdguvgdprhgtphhtthhopeejgeeifeduqdguohhnvgesuggvsggsuhhgshdr ghhnuhdrohhrghdprhgtphhtthhopehjuhhriheslhhinhhkohhvrdhnvght X-ME-Proxy: Feedback-ID: i07de48aa:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 9 Dec 2024 21:10:09 -0500 (EST) Content-Language: en-US In-Reply-To: <87zflffzp5.fsf@daniel-mendler.de> 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:296729 Archived-At: Hi Daniel, On 01/12/2024 12:46, Daniel Mendler wrote: > In order to make `project-recompile' symmetric to `recompile' it should > be autoloaded and it should run in the project root. This makes it > possible to call `project-recompile' directly without calling `compile' > first. > > ;;;###autoload > (defun project-recompile (&optional edit-command) > "Run `recompile' with appropriate buffer." > (declare (interactive-only recompile)) > (interactive "P") > (let ((default-directory (project-root (project-current t))) > (compilation-buffer-name-function > (or project-compilation-buffer-name-function > compilation-buffer-name-function))) > (recompile edit-command))) > > This change also resolves the comment in project-recompile: > > ;; Should we error instead? When there's no > ;; project-specific naming, there is no point in using > ;; this command. Thanks, I've pushed this to master. The comment is related to the previous thread (bug#68570), and it's still unresolved, but IIUC this doesn't make things worse, at least. Cc'ing Juri just in case.