From: "Jörg Bornemann" <foss@jbornemann.de>
To: 68570@debbugs.gnu.org
Subject: bug#68570: 29.1; recompile might not re-use project-compile's buffer
Date: Thu, 18 Jan 2024 17:17:07 +0100 [thread overview]
Message-ID: <920b0c20-c6ee-4b41-84ec-5adfa06c64a2@jbornemann.de> (raw)
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? On one hand is the above fix quite convenient but on
the other, compilation-buffer-name-function probably should not have
project.el-specific knowledge.
next reply other threads:[~2024-01-18 16:17 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-18 16:17 Jörg Bornemann [this message]
2024-01-19 20:19 ` bug#68570: 29.1; recompile might not re-use project-compile's buffer Pengji Zhang
2024-01-20 14:27 ` Dmitry Gutov
2024-01-21 5:09 ` Dmitry Gutov
2024-01-21 18:18 ` Juri Linkov
2024-01-21 18:33 ` Dmitry Gutov
2024-01-22 7:31 ` Juri Linkov
2024-01-22 8:42 ` Jörg Bornemann
2024-01-22 18:20 ` Dmitry Gutov
2024-01-23 7:09 ` Juri Linkov
2024-01-23 12:21 ` Dmitry Gutov
2024-01-23 13:15 ` Jörg Bornemann
2024-01-23 17:31 ` Dmitry Gutov
2024-01-24 7:46 ` Juri Linkov
2024-01-24 12:06 ` Dmitry Gutov
2024-01-24 17:11 ` Juri Linkov
2024-01-26 0:44 ` Dmitry Gutov
2024-01-27 17:53 ` Juri Linkov
2024-01-28 13:42 ` Dmitry Gutov
2024-02-06 17:39 ` Juri Linkov
2024-02-07 18:43 ` Dmitry Gutov
2024-05-02 6:16 ` Juri Linkov
2024-05-02 7:11 ` Eli Zaretskii
2024-01-22 8:39 ` Jörg Bornemann
2024-01-22 18:20 ` 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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=920b0c20-c6ee-4b41-84ec-5adfa06c64a2@jbornemann.de \
--to=foss@jbornemann.de \
--cc=68570@debbugs.gnu.org \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).