[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#68570: 29.1; recompile might not re-use project-compile's buffer
From: |
Juri Linkov |
Subject: |
bug#68570: 29.1; recompile might not re-use project-compile's buffer |
Date: |
Mon, 22 Jan 2024 09:31:22 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) |
>>>> Although I'm thinking by now that it might be more consistent to have
>>>> a separate project-recompile command in addition to
>>>> recompile.
>>> I've pushed to master a new command called that (commit 0a07603ae8d), like
>>> discussed on the mailing list.
>> Shouldn't now 'g' in project buffers use 'project-recompile'?
>
> I don't know if it should - AFAICS 'M-x recompile' doesn't rename the
> current buffer, so it seems like the current behavior is already correct.
This patch would allow 'recompile' to use the renamed project compilation
buffer:
diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
index ab4504fa027..58bf2401dac 100644
--- a/lisp/progmodes/project.el
+++ b/lisp/progmodes/project.el
@@ -1395,7 +1395,10 @@ project-compile
(compilation-buffer-name-function
(or project-compilation-buffer-name-function
compilation-buffer-name-function)))
- (call-interactively #'compile)))
+ (with-current-buffer (call-interactively #'compile)
+ (when project-compilation-buffer-name-function
+ (setq-local compilation-buffer-name-function
+ project-compilation-buffer-name-function)))))
(defun project-recompile (&optional edit-command)
"Run `recompile' with appropriate buffer."
Then 'project-recompile' won't be needed anymore.
- bug#68570: 29.1; recompile might not re-use project-compile's buffer, Jörg Bornemann, 2024/01/18
- bug#68570: 29.1; recompile might not re-use project-compile's buffer, Pengji Zhang, 2024/01/19
- bug#68570: 29.1; recompile might not re-use project-compile's buffer, Dmitry Gutov, 2024/01/21
- bug#68570: 29.1; recompile might not re-use project-compile's buffer, Juri Linkov, 2024/01/21
- bug#68570: 29.1; recompile might not re-use project-compile's buffer, Dmitry Gutov, 2024/01/21
- bug#68570: 29.1; recompile might not re-use project-compile's buffer,
Juri Linkov <=
- bug#68570: 29.1; recompile might not re-use project-compile's buffer, Jörg Bornemann, 2024/01/22
- bug#68570: 29.1; recompile might not re-use project-compile's buffer, Dmitry Gutov, 2024/01/22
- bug#68570: 29.1; recompile might not re-use project-compile's buffer, Juri Linkov, 2024/01/23
- bug#68570: 29.1; recompile might not re-use project-compile's buffer, Dmitry Gutov, 2024/01/23
- bug#68570: 29.1; recompile might not re-use project-compile's buffer, Jörg Bornemann, 2024/01/23
- bug#68570: 29.1; recompile might not re-use project-compile's buffer, Dmitry Gutov, 2024/01/23
- bug#68570: 29.1; recompile might not re-use project-compile's buffer, Juri Linkov, 2024/01/24
- bug#68570: 29.1; recompile might not re-use project-compile's buffer, Dmitry Gutov, 2024/01/24
- bug#68570: 29.1; recompile might not re-use project-compile's buffer, Juri Linkov, 2024/01/24
- bug#68570: 29.1; recompile might not re-use project-compile's buffer, Dmitry Gutov, 2024/01/25