GNU bug report logs - #74631
30.0.92; [PATCH] autoload project-recompile and set default-directory

Previous Next

Package: emacs;

Reported by: Daniel Mendler <mail <at> daniel-mendler.de>

Date: Sun, 1 Dec 2024 10:49:02 UTC

Severity: normal

Tags: patch

Found in version 30.0.92

Done: Dmitry Gutov <dmitry <at> gutov.dev>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Daniel Mendler <mail <at> daniel-mendler.de>
To: Dmitry Gutov <dmitry <at> gutov.dev>
Cc: 74631-done <at> debbugs.gnu.org, Juri Linkov <juri <at> linkov.net>
Subject: bug#74631: 30.0.92; [PATCH] autoload project-recompile and set default-directory
Date: Tue, 10 Dec 2024 16:38:21 +0100
Dmitry Gutov <dmitry <at> gutov.dev> writes:

> 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.

Thanks for installing the patch! I just saw that the docstring should
probably also updated accordingly. Maybe like this:

"Run `recompile' in the project root with an appropriate buffer."

Daniel




This bug report was last modified 206 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.