unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@linkov.net>
To: Dmitry Gutov <dmitry@gutov.dev>
Cc: Daniel Mendler <mail@daniel-mendler.de>, 74631@debbugs.gnu.org
Subject: bug#74631: 30.0.92; [PATCH] autoload project-recompile and set default-directory
Date: Tue, 10 Dec 2024 09:40:33 +0200	[thread overview]
Message-ID: <87cyi0rola.fsf@mail.linkov.net> (raw)
In-Reply-To: <02c71b77-433c-4dae-baa0-13376dee75f2@gutov.dev> (Dmitry Gutov's message of "Tue, 10 Dec 2024 04:10:08 +0200")

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

Agreed, this is the right thing to do.

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

Isn't bug#68570 solved by bug#70136?





  reply	other threads:[~2024-12-10  7:40 UTC|newest]

Thread overview: 6+ 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 [this message]
2024-12-10 23:27     ` Dmitry Gutov
2024-12-10 15:38   ` Daniel Mendler via Bug reports for GNU Emacs, the Swiss army knife of text editors
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

  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=87cyi0rola.fsf@mail.linkov.net \
    --to=juri@linkov.net \
    --cc=74631@debbugs.gnu.org \
    --cc=dmitry@gutov.dev \
    --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 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).