[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#74631: 30.0.92; [PATCH] autoload project-recompile and set default-d
From: |
Juri Linkov |
Subject: |
bug#74631: 30.0.92; [PATCH] autoload project-recompile and set default-directory |
Date: |
Tue, 10 Dec 2024 09:40:33 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu) |
>> 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?