GNU bug report logs - #17444
24.3; cannot C-u M-x recompile (interactively) from outside *compilation* buffer.

Previous Next

Package: emacs;

Reported by: "B. L." <mrbean336 <at> gmail.com>

Date: Fri, 9 May 2014 04:56:02 UTC

Severity: wishlist

Tags: wontfix

Found in version 24.3

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 17444 in the body.
You can then email your comments to 17444 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#17444; Package emacs. (Fri, 09 May 2014 04:56:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to "B. L." <mrbean336 <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 09 May 2014 04:56:02 GMT) Full text and rfc822 format available.

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

From: "B. L." <mrbean336 <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.3; cannot C-u M-x recompile (interactively) from outside
 *compilation* buffer.
Date: Thu, 8 May 2014 23:39:09 -0500
[Message part 1 (text/plain, inline)]
Running C-u M-x recompile outside of the *compilation* buffer produces
error:
call-interactively: Wrong type argument: consp, nil

See thread on stackoverflow for more details if necessary.
http://stackoverflow.com/questions/23556169/c-u-m-x-recompile-error-wrong-type-argument-consp-nil/23556323#23556323

Is this a bug?
[Message part 2 (text/html, inline)]

Reply sent to Glenn Morris <rgm <at> gnu.org>:
You have taken responsibility. (Fri, 09 May 2014 06:47:02 GMT) Full text and rfc822 format available.

Notification sent to "B. L." <mrbean336 <at> gmail.com>:
bug acknowledged by developer. (Fri, 09 May 2014 06:47:03 GMT) Full text and rfc822 format available.

Message #10 received at 17444-done <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: 17444-done <at> debbugs.gnu.org
Subject: Re: bug#17444: 24.3;
 cannot C-u M-x recompile (interactively) from outside *compilation*
 buffer.
Date: Fri, 09 May 2014 02:46:21 -0400
Version: 24.3.91

"B. L." wrote:

> Running C-u M-x recompile outside of the *compilation* buffer produces
> error:
> call-interactively: Wrong type argument: consp, nil

AFAICS, it doesn't make any sense to use `C-u M-x recompile' outside of a
compilation buffer, because it's the same as running `M-x compile'.
But I applied the following:

--- a/lisp/progmodes/compile.el	2014-02-10 01:34:22 +0000
+++ b/lisp/progmodes/compile.el	2014-05-09 06:42:39 +0000
@@ -1469,12 +1469,13 @@
   (interactive "P")
   (save-some-buffers (not compilation-ask-about-save)
                      compilation-save-buffers-predicate)
-  (let ((default-directory (or compilation-directory default-directory)))
+  (let ((default-directory (or compilation-directory default-directory))
+	(command (eval compile-command)))
     (when edit-command
-      (setcar compilation-arguments
-              (compilation-read-command (car compilation-arguments))))
-    (apply 'compilation-start (or compilation-arguments
-				  `(,(eval compile-command))))))
+      (setq command (compilation-read-command (or (car compilation-arguments)
+						  command)))
+      (if compilation-arguments (setcar compilation-arguments command)))
+    (apply 'compilation-start (or compilation-arguments (list command)))))
 
 (defcustom compilation-scroll-output nil
   "Non-nil to scroll the *compilation* buffer window as output appears.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17444; Package emacs. (Fri, 09 May 2014 14:56:02 GMT) Full text and rfc822 format available.

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

From: "B. L." <mrbean336 <at> gmail.com>
To: 17444 <at> debbugs.gnu.org
Subject: Re: bug#17444: closed (Re: bug#17444: 24.3; cannot C-u M-x recompile
 (interactively) from outside *compilation* buffer.)
Date: Fri, 9 May 2014 09:55:08 -0500
[Message part 1 (text/plain, inline)]
Hi, thanks for the quick reply.  It could be that I am misunderstanding the
use of recompile, but I have a quick follow-up question.  I have noticed
that if I compile interactively (through C-u M-x compile), I receive an
interactive *compilation* buffer that is in comint mode.  If I perform M-x
recompile in the original source buffer, where I performed the compile, the
code is recompiled but the *compilation* buffer is no longer in comint
mode.  So in short the only way I can get comint mode to stay enabled
during M-x recompile is to perform it in the *compilation* buffer only.  Is
this correct functionality?

Many thanks!


On Fri, May 9, 2014 at 1:47 AM, GNU bug Tracking System <
help-debbugs <at> gnu.org> wrote:

> Your bug report
>
> #17444: 24.3; cannot C-u M-x recompile (interactively) from outside
> *compilation* buffer.
>
> which was filed against the emacs package, has been closed.
>
> The explanation is attached below, along with your original report.
> If you require more details, please reply to 17444 <at> debbugs.gnu.org.
>
> --
> 17444: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=17444
> GNU Bug Tracking System
> Contact help-debbugs <at> gnu.org with problems
>
>
> ---------- Forwarded message ----------
> From: Glenn Morris <rgm <at> gnu.org>
> To: 17444-done <at> debbugs.gnu.org
> Cc:
> Date: Fri, 09 May 2014 02:46:21 -0400
> Subject: Re: bug#17444: 24.3; cannot C-u M-x recompile (interactively)
> from outside *compilation* buffer.
> Version: 24.3.91
>
> "B. L." wrote:
>
> > Running C-u M-x recompile outside of the *compilation* buffer produces
> > error:
> > call-interactively: Wrong type argument: consp, nil
>
> AFAICS, it doesn't make any sense to use `C-u M-x recompile' outside of a
> compilation buffer, because it's the same as running `M-x compile'.
> But I applied the following:
>
> --- a/lisp/progmodes/compile.el 2014-02-10 01:34:22 +0000
> +++ b/lisp/progmodes/compile.el 2014-05-09 06:42:39 +0000
> @@ -1469,12 +1469,13 @@
>    (interactive "P")
>    (save-some-buffers (not compilation-ask-about-save)
>                       compilation-save-buffers-predicate)
> -  (let ((default-directory (or compilation-directory default-directory)))
> +  (let ((default-directory (or compilation-directory default-directory))
> +       (command (eval compile-command)))
>      (when edit-command
> -      (setcar compilation-arguments
> -              (compilation-read-command (car compilation-arguments))))
> -    (apply 'compilation-start (or compilation-arguments
> -                                 `(,(eval compile-command))))))
> +      (setq command (compilation-read-command (or (car
> compilation-arguments)
> +                                                 command)))
> +      (if compilation-arguments (setcar compilation-arguments command)))
> +    (apply 'compilation-start (or compilation-arguments (list command)))))
>
>  (defcustom compilation-scroll-output nil
>    "Non-nil to scroll the *compilation* buffer window as output appears.
>
>
>
> ---------- Forwarded message ----------
> From: "B. L." <mrbean336 <at> gmail.com>
> To: bug-gnu-emacs <at> gnu.org
> Cc:
> Date: Thu, 8 May 2014 23:39:09 -0500
> Subject: 24.3; cannot C-u M-x recompile (interactively) from outside
> *compilation* buffer.
> Running C-u M-x recompile outside of the *compilation* buffer produces
> error:
> call-interactively: Wrong type argument: consp, nil
>
> See thread on stackoverflow for more details if necessary.
>
> http://stackoverflow.com/questions/23556169/c-u-m-x-recompile-error-wrong-type-argument-consp-nil/23556323#23556323
>
> Is this a bug?
>
>
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17444; Package emacs. (Fri, 09 May 2014 16:12:01 GMT) Full text and rfc822 format available.

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

From: Glenn Morris <rgm <at> gnu.org>
To: "B. L." <mrbean336 <at> gmail.com>
Cc: 17444 <at> debbugs.gnu.org
Subject: Re: bug#17444: closed (Re: bug#17444: 24.3;
 cannot C-u M-x recompile (interactively) from outside *compilation*
 buffer.)
Date: Fri, 09 May 2014 12:11:40 -0400
"B. L." wrote:

> use of recompile, but I have a quick follow-up question.  I have noticed
> that if I compile interactively (through C-u M-x compile), I receive an
> interactive *compilation* buffer that is in comint mode.  If I perform M-x
> recompile in the original source buffer, where I performed the compile, the
> code is recompiled but the *compilation* buffer is no longer in comint
> mode. 

I can't reproduce that. My compilation buffers are always in
compilation-mode.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17444; Package emacs. (Fri, 09 May 2014 19:32:01 GMT) Full text and rfc822 format available.

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

From: "B. L." <mrbean336 <at> gmail.com>
To: Glenn Morris <rgm <at> gnu.org>
Subject: Re: bug#17444: 24.3;
 cannot C-u M-x recompile (interactively) from outside *compilation*
 buffer.)
Date: Fri, 9 May 2014 11:45:35 -0500
[Message part 1 (text/plain, inline)]
Hi Glenn,

I've attached a couple screenshots showing the issue.  The compile_comint
attachment is after a C-u M-x compile performed in my source code buffer.
 It's in interactive comint mode and I can interact with the console of the
tool I am using.  When I M-x recompile from the original source code buffer
I lose interactive comint functionality and can no longer interact with the
console.  The buffer is then read-only and I manually have to kill the
process/*compilation* buffer.  Which is a minor inconvenience.  I was
hoping for M-x recompile to simply recompile using the original compile
command in the original directory in any buffer of my choosing.  It seems
I'm restricted to only performing this action with the cursor in the
*compilation* buffer only.  And with the point/cursor in any other buffer
it will recompile but I lose comint functionality.  Hope this clears things
up!  Thanks.


On Fri, May 9, 2014 at 11:11 AM, Glenn Morris <rgm <at> gnu.org> wrote:

> "B. L." wrote:
>
> > use of recompile, but I have a quick follow-up question.  I have noticed
> > that if I compile interactively (through C-u M-x compile), I receive an
> > interactive *compilation* buffer that is in comint mode.  If I perform
> M-x
> > recompile in the original source buffer, where I performed the compile,
> the
> > code is recompiled but the *compilation* buffer is no longer in comint
> > mode.
>
> I can't reproduce that. My compilation buffers are always in
> compilation-mode.
>
[Message part 2 (text/html, inline)]
[compile_comint.png (image/png, attachment)]
[recompile_no_comint.png (image/png, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17444; Package emacs. (Fri, 09 May 2014 19:46:01 GMT) Full text and rfc822 format available.

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

From: Glenn Morris <rgm <at> gnu.org>
To: "B. L." <mrbean336 <at> gmail.com>
Cc: 17444 <at> debbugs.gnu.org
Subject: Re: bug#17444: 24.3;
 cannot C-u M-x recompile (interactively) from outside *compilation*
 buffer.)
Date: Fri, 09 May 2014 15:45:50 -0400
(Please keep the debbugs address cc'd)

Oh right, I see now.
C-u M-x compile gives a comint-mode buffer;
M-x recompile from another buffer loses that.

It seems M-x recompile isn't really designed to be used from a
non-compilation buffer, but it may be possible to improve it.




bug No longer marked as fixed in versions 24.3.91 and reopened. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 09 May 2014 19:47:02 GMT) Full text and rfc822 format available.

Severity set to 'wishlist' from 'minor' Request was from Stefan Kangas <stefan <at> marxist.se> to control <at> debbugs.gnu.org. (Mon, 30 Sep 2019 03:41:03 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17444; Package emacs. (Fri, 25 Sep 2020 14:28:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: "B. L." <mrbean336 <at> gmail.com>
Cc: 17444 <at> debbugs.gnu.org
Subject: Re: bug#17444: closed (Re: bug#17444: 24.3; cannot C-u M-x
 recompile (interactively) from outside *compilation* buffer.)
Date: Fri, 25 Sep 2020 16:27:03 +0200
"B. L." <mrbean336 <at> gmail.com> writes:

> Hi, thanks for the quick reply.  It could be that I am
> misunderstanding the use of recompile, but I have a quick follow-up
> question.  I have noticed that if I compile interactively (through C-u
> M-x compile), I receive an interactive *compilation* buffer that is in
> comint mode.  If I perform M-x recompile in the original source
> buffer, where I performed the compile, the code is recompiled but the
> *compilation* buffer is no longer in comint mode.  So in short the
> only way I can get comint mode to stay enabled during M-x recompile is
> to perform it in the *compilation* buffer only.  Is this correct
> functionality?

This was six years ago...

But looking at the code here, I think this is working as designed,
really -- M-x recompile isn't really designed for doing this, and the
prefix command is already taken.  So I don't think this is something
that sounds like we should be fixing, and I'm closing this bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) wontfix. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Fri, 25 Sep 2020 14:28:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 17444 <at> debbugs.gnu.org and "B. L." <mrbean336 <at> gmail.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Fri, 25 Sep 2020 14:28:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 24 Oct 2020 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 177 days ago.

Previous Next


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