|
| From: | Dmitry Gutov |
| Subject: | Re: project-compilation-buffer-name-function and recompile |
| Date: | Sun, 21 Jan 2024 07:06:16 +0200 |
| User-agent: | Mozilla Thunderbird |
On 19/01/2024 17:05, Jörg Bornemann wrote:
On 1/19/24 01:45, Dmitry Gutov wrote:Alternatively, you could add around-advice to recompile which would temporarily bind compilation-buffer-file-name-function.Nice, thanks for the suggestion!Although I'm thinking by now that it might be more consistent to have a separate project-recompile command in addition torecompile. What do you think?The command could look like this: (defun project-recompile (&optional edit-command) (interactive "P")(let ((compilation-buffer-name-function project-compilation-buffer-name-function ))(recompile edit-command)))It probably doesn't deserve a default key binding in project-prefix-map, but you could the same way to invoke it as you did with 'recompile'.FWIW, I've filed this - as suggested by Eli - as bug#68570.
All right, let's continue there.
I agree that project-recompile wouldn't deserve a default key binding since recompile doesn't have one.TBF, whenever I need to do a recompile-y action, I usually switch to the corresponding compilation buffer and press 'g'. That usually has the same effect and doesn't require remembering an extra command.That also works. It seems to be a common suggestion (for example [1]) though to key-bind recompile instead of switching to the compilation buffer first.
I suppose it's a valid preference (otherwise we wouldn't have that command, I guess).
Cheers, Joerg [1] https://www.masteringemacs.org/article/compiling-running-scripts-emacs
| [Prev in Thread] | Current Thread | [Next in Thread] |