all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Daniel Mendler via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Dmitry Gutov <dmitry@gutov.dev>
Cc: 74631-done@debbugs.gnu.org, Juri Linkov <juri@linkov.net>
Subject: bug#74631: 30.0.92; [PATCH] autoload project-recompile and set default-directory
Date: Tue, 10 Dec 2024 16:38:21 +0100	[thread overview]
Message-ID: <87frmvh7ki.fsf@daniel-mendler.de> (raw)
In-Reply-To: <02c71b77-433c-4dae-baa0-13376dee75f2@gutov.dev> (Dmitry Gutov's message of "Tue, 10 Dec 2024 04:10:08 +0200")

Dmitry Gutov <dmitry@gutov.dev> writes:

> Hi Daniel,
>
> On 01/12/2024 12:46, Daniel Mendler wrote:
>> In order to make `project-recompile' symmetric to `recompile' it should
>> be autoloaded and it should run in the project root. This makes it
>> possible to call `project-recompile' directly without calling `compile'
>> first.
>>      ;;;###autoload
>>      (defun project-recompile (&optional edit-command)
>>        "Run `recompile' with appropriate buffer."
>>        (declare (interactive-only recompile))
>>        (interactive "P")
>>        (let ((default-directory (project-root (project-current t)))
>>              (compilation-buffer-name-function
>>               (or project-compilation-buffer-name-function
>>                   compilation-buffer-name-function)))
>>          (recompile edit-command)))
>> This change also resolves the comment in project-recompile:
>>      ;; Should we error instead?  When there's no
>>      ;; project-specific naming, there is no point in using
>>      ;; this command.
>
> Thanks, I've pushed this to master.
>
> The comment is related to the previous thread (bug#68570), and it's still
> unresolved, but IIUC this doesn't make things worse, at least.
>
> Cc'ing Juri just in case.

Thanks for installing the patch! I just saw that the docstring should
probably also updated accordingly. Maybe like this:

"Run `recompile' in the project root with an appropriate buffer."

Daniel





  parent reply	other threads:[~2024-12-10 15:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-01 10:46 bug#74631: 30.0.92; [PATCH] autoload project-recompile and set default-directory Daniel Mendler via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-10  2:10 ` Dmitry Gutov
2024-12-10  7:40   ` Juri Linkov
2024-12-10 23:27     ` Dmitry Gutov
2024-12-18 17:12       ` Juri Linkov
2024-12-10 15:38   ` Daniel Mendler via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2024-12-10 23:29     ` 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=87frmvh7ki.fsf@daniel-mendler.de \
    --to=bug-gnu-emacs@gnu.org \
    --cc=74631-done@debbugs.gnu.org \
    --cc=dmitry@gutov.dev \
    --cc=juri@linkov.net \
    --cc=mail@daniel-mendler.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.