From: Eli Zaretskii <eliz@gnu.org>
To: "Jörg Bornemann" <foss@jbornemann.de>
Cc: emacs-devel@gnu.org
Subject: Re: project-compilation-buffer-name-function and recompile
Date: Thu, 18 Jan 2024 07:30:17 +0200 [thread overview]
Message-ID: <83cytzb446.fsf@gnu.org> (raw)
In-Reply-To: <3474d4d5-5270-4cd4-94a2-efb9d24caa85@jbornemann.de> (message from Jörg Bornemann on Wed, 17 Jan 2024 21:54:53 +0100)
> Date: Wed, 17 Jan 2024 21:54:53 +0100
> From: Jörg Bornemann <foss@jbornemann.de>
>
> One can use project-compile to build a project and then call recompile
> to repeat the compilation. This reuses the buffer named
> "*compilation*".
>
> If I set project-compilation-buffer-name-function to
> #'project-prefixed-buffer-name, this creates a compilation buffer
> "*myproject-compilation*" when executing project-compile. Now,
> recompile won't re-use "*myproject-compilation*" but create a new
> buffer "*compilation*".
>
> To reproduce this behavior, it is enough to start Emacs like this:
> $ emacs -Q --eval "(setq project-compilation-buffer-name-function
> #'project-prefixed-buffer-name)"
>
> It would be nice if recompile could re-use project-compile's buffer
> name. I have fixed this locally by setting
> compilation-buffer-name-function like this:
>
> ---snip---
> (defun my-compilation-buffer-name (name-of-mode)
> (if (project-current)
> (apply project-compilation-buffer-name-function (list
> name-of-mode))
> (compilation--default-buffer-name name-of-mode)))
>
> (setq compilation-buffer-name-function #'my-compilation-buffer-name)
> ---snap---
>
> Although I'm thinking by now that it might be more consistent to have a
> separate project-recompile command in addition to
> recompile. What do you think?
Thanks, I think what you say makes a lot of sense. I suggest to
submit a feature-request bug report using "M-x report-emacs-bug" with
these details, so we could track this request. If you can suggest a
patch to implement these ideas, it would be even better.
next prev parent reply other threads:[~2024-01-18 5:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-17 20:54 project-compilation-buffer-name-function and recompile Jörg Bornemann
2024-01-18 5:30 ` Eli Zaretskii [this message]
2024-01-19 0:45 ` Dmitry Gutov
2024-01-19 15:05 ` Jörg Bornemann
2024-01-21 5:06 ` Dmitry Gutov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83cytzb446.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=foss@jbornemann.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.