GNU bug report logs - #68570
29.1; recompile might not re-use project-compile's buffer

Previous Next

Package: emacs;

Reported by: Jörg Bornemann <foss <at> jbornemann.de>

Date: Thu, 18 Jan 2024 16:58:01 UTC

Severity: normal

Found in version 29.1

Full log


Message #74 received at 68570 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Dmitry Gutov <dmitry <at> gutov.dev>
Cc: 68570 <at> debbugs.gnu.org
Subject: Re: bug#68570: 29.1; recompile might not re-use project-compile's
 buffer
Date: Thu, 02 May 2024 09:16:40 +0300
>>> We could make a new option in compile.el which would determine whether to
>>> do this in general: when non-nil, 'compilation-start' would save the
>>> current dynamic value of 'compilation-buffer-name-function', and
>>> 'recompile' would call it again.
>> A new option would be nice, but it's so broken that I don't know
>> if it helps.  For example, 'M-x compile RET' in a compilation buffer
>> doesn't prefill the minibuffer with the current compilation command,
>> but uses the default command that makes no sense.
>
> If it did so (pre-filled the command), perhaps you would just use 'M-x
> compile', in cases when you do want the new buffer to be created?
>
> But it seems to work fine to me, including in 'emacs -Q':
>
> * 'M-x compile', input 'ls', RET.
> * *compilation* buffer create.
> * 'M-x compile' again, in any window (old or new) - 'ls' is pre-filled as
>  the input.

Sorry for the delay, I tried to fix it, but it's too much broken.
Here is the test case for 'emacs -Q':
1. add such line to .dir-locals.el:
  ((nil . ((compile-command . "ls -la"))))
2. M-x compile
3. confirm that it's "ls -la" indeed
4. edit the minibuffer, replace "ls -la" with e.g. "ls" and type RET
5. in *compilation* buffer again type: M-x compile
6. the minibuffer contains "make -k "

PS: I realized now this is related to bug#70136
where Augusto posted the patch that fixes this bug.




This bug report was last modified 99 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.