GNU bug report logs -
#68570
29.1; recompile might not re-use project-compile's buffer
Previous Next
Full log
Message #23 received at 68570 <at> debbugs.gnu.org (full text, mbox):
>>>> 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.
This bug report was last modified 99 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.