all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dmitry Gutov <dmitry@gutov.dev>
To: "Jörg Bornemann" <foss@jbornemann.de>, emacs-devel@gnu.org
Subject: Re: project-compilation-buffer-name-function and recompile
Date: Sun, 21 Jan 2024 07:06:16 +0200	[thread overview]
Message-ID: <61c7a411-e2c6-4a67-ada2-27688addea5d@gutov.dev> (raw)
In-Reply-To: <57166a9d-876a-4a01-b3eb-6c38227ee62e@jbornemann.de>

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 to
>>> recompile.  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




      reply	other threads:[~2024-01-21  5:06 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
2024-01-19  0:45 ` Dmitry Gutov
2024-01-19 15:05   ` Jörg Bornemann
2024-01-21  5:06     ` Dmitry Gutov [this message]

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=61c7a411-e2c6-4a67-ada2-27688addea5d@gutov.dev \
    --to=dmitry@gutov.dev \
    --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.