From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#74631: 30.0.92; [PATCH] autoload project-recompile and set default-directory Date: Tue, 10 Dec 2024 09:40:33 +0200 Organization: LINKOV.NET Message-ID: <87cyi0rola.fsf@mail.linkov.net> References: <87zflffzp5.fsf@daniel-mendler.de> <02c71b77-433c-4dae-baa0-13376dee75f2@gutov.dev> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6246"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu) Cc: Daniel Mendler , 74631@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Dec 10 08:50:40 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 1tKv0y-0001UT-1C for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 10 Dec 2024 08:50:40 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tKv0U-00073F-QZ; Tue, 10 Dec 2024 02:50:10 -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 1tKv0N-00072h-Ua for bug-gnu-emacs@gnu.org; Tue, 10 Dec 2024 02:50: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 1tKv0N-0005zC-M2 for bug-gnu-emacs@gnu.org; Tue, 10 Dec 2024 02:50:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=ICWL8sQUS4U7iU8w0V8jVavdLeCU9x9TSTx8wk1GZMw=; b=DyGcvJoyQwicqqLOZmdEGB8stPJLtxU0wNPN8jh0ov+YMe4laEsm/EqXNE85c/hevsedJpuYSXWtzqFdDTjV1d2yLuu8HOrZXoL4LCkiG/4DNn8EoYEPC4OCwcn0xHn3BikU0zfLQCSORiCDkaV4GoUB96tX+eIAFX1fllgZ//h7L1kf4m3gUMBluwBKhYuwb3m1yH2a3ayuWb6/Y+I5ss7MUNerlyZQx0kSHQRHT62RWIIZQRIqQdAbD7rCA1BKjph/OqjKqc59K69aMor+JIIPcPGdJ3LewxGaH/BSC0nYLe08yy3IeiM+r7t3pLEootpjSQOuAznmsTx3yTlZHw==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tKv0N-0000ng-Fn for bug-gnu-emacs@gnu.org; Tue, 10 Dec 2024 02:50:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 10 Dec 2024 07:50:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74631 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 74631-submit@debbugs.gnu.org id=B74631.17338169903010 (code B ref 74631); Tue, 10 Dec 2024 07:50:03 +0000 Original-Received: (at 74631) by debbugs.gnu.org; 10 Dec 2024 07:49:50 +0000 Original-Received: from localhost ([127.0.0.1]:56801 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tKv0A-0000mU-Bw for submit@debbugs.gnu.org; Tue, 10 Dec 2024 02:49:50 -0500 Original-Received: from relay4-d.mail.gandi.net ([217.70.183.196]:38889) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tKv08-0000m7-Dc for 74631@debbugs.gnu.org; Tue, 10 Dec 2024 02:49:49 -0500 Original-Received: by mail.gandi.net (Postfix) with ESMTPSA id 835F8E000E; Tue, 10 Dec 2024 07:49:38 +0000 (UTC) In-Reply-To: <02c71b77-433c-4dae-baa0-13376dee75f2@gutov.dev> (Dmitry Gutov's message of "Tue, 10 Dec 2024 04:10:08 +0200") X-GND-Sasl: juri@linkov.net 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:296737 Archived-At: >> 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. Agreed, this is the right thing to do. > 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. Isn't bug#68570 solved by bug#70136?