unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#17444: 24.3; cannot C-u M-x recompile (interactively) from outside *compilation* buffer.
@ 2014-05-09  4:39 B. L.
  2014-05-09  6:46 ` Glenn Morris
       [not found] ` <handler.17444.D17444.139961798613902.notifdone@debbugs.gnu.org>
  0 siblings, 2 replies; 7+ messages in thread
From: B. L. @ 2014-05-09  4:39 UTC (permalink / raw)
  To: 17444

[-- Attachment #1: Type: text/plain, Size: 322 bytes --]

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?

[-- Attachment #2: Type: text/html, Size: 541 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#17444: 24.3; cannot C-u M-x recompile (interactively) from outside *compilation* buffer.
  2014-05-09  4:39 bug#17444: 24.3; cannot C-u M-x recompile (interactively) from outside *compilation* buffer B. L.
@ 2014-05-09  6:46 ` Glenn Morris
       [not found] ` <handler.17444.D17444.139961798613902.notifdone@debbugs.gnu.org>
  1 sibling, 0 replies; 7+ messages in thread
From: Glenn Morris @ 2014-05-09  6:46 UTC (permalink / raw)
  To: 17444-done

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.





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#17444: closed (Re: bug#17444: 24.3; cannot C-u M-x recompile (interactively) from outside *compilation* buffer.)
       [not found] ` <handler.17444.D17444.139961798613902.notifdone@debbugs.gnu.org>
@ 2014-05-09 14:55   ` B. L.
  2014-05-09 16:11     ` Glenn Morris
  2020-09-25 14:27     ` bug#17444: closed (Re: " Lars Ingebrigtsen
  0 siblings, 2 replies; 7+ messages in thread
From: B. L. @ 2014-05-09 14:55 UTC (permalink / raw)
  To: 17444

[-- Attachment #1: Type: text/plain, Size: 3577 bytes --]

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@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@debbugs.gnu.org.
>
> --
> 17444: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=17444
> GNU Bug Tracking System
> Contact help-debbugs@gnu.org with problems
>
>
> ---------- Forwarded message ----------
> From: Glenn Morris <rgm@gnu.org>
> To: 17444-done@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@gmail.com>
> To: bug-gnu-emacs@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?
>
>

[-- Attachment #2: Type: text/html, Size: 4857 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#17444: closed (Re: bug#17444: 24.3; cannot C-u M-x recompile (interactively) from outside *compilation* buffer.)
  2014-05-09 14:55   ` bug#17444: closed (Re: bug#17444: 24.3; cannot C-u M-x recompile (interactively) from outside *compilation* buffer.) B. L.
@ 2014-05-09 16:11     ` Glenn Morris
  2014-05-09 16:45       ` B. L.
  2020-09-25 14:27     ` bug#17444: closed (Re: " Lars Ingebrigtsen
  1 sibling, 1 reply; 7+ messages in thread
From: Glenn Morris @ 2014-05-09 16:11 UTC (permalink / raw)
  To: B. L.; +Cc: 17444

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





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#17444: 24.3; cannot C-u M-x recompile (interactively) from outside *compilation* buffer.)
  2014-05-09 16:11     ` Glenn Morris
@ 2014-05-09 16:45       ` B. L.
  2014-05-09 19:45         ` Glenn Morris
  0 siblings, 1 reply; 7+ messages in thread
From: B. L. @ 2014-05-09 16:45 UTC (permalink / raw)
  To: Glenn Morris


[-- Attachment #1.1: Type: text/plain, Size: 1483 bytes --]

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

[-- Attachment #1.2: Type: text/html, Size: 1905 bytes --]

[-- Attachment #2: compile_comint.png --]
[-- Type: image/png, Size: 12421 bytes --]

[-- Attachment #3: recompile_no_comint.png --]
[-- Type: image/png, Size: 11859 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#17444: 24.3; cannot C-u M-x recompile (interactively) from outside *compilation* buffer.)
  2014-05-09 16:45       ` B. L.
@ 2014-05-09 19:45         ` Glenn Morris
  0 siblings, 0 replies; 7+ messages in thread
From: Glenn Morris @ 2014-05-09 19:45 UTC (permalink / raw)
  To: B. L.; +Cc: 17444


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





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#17444: closed (Re: bug#17444: 24.3; cannot C-u M-x recompile (interactively) from outside *compilation* buffer.)
  2014-05-09 14:55   ` bug#17444: closed (Re: bug#17444: 24.3; cannot C-u M-x recompile (interactively) from outside *compilation* buffer.) B. L.
  2014-05-09 16:11     ` Glenn Morris
@ 2020-09-25 14:27     ` Lars Ingebrigtsen
  1 sibling, 0 replies; 7+ messages in thread
From: Lars Ingebrigtsen @ 2020-09-25 14:27 UTC (permalink / raw)
  To: B. L.; +Cc: 17444

"B. L." <mrbean336@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





^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-09-25 14:27 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-09  4:39 bug#17444: 24.3; cannot C-u M-x recompile (interactively) from outside *compilation* buffer B. L.
2014-05-09  6:46 ` Glenn Morris
     [not found] ` <handler.17444.D17444.139961798613902.notifdone@debbugs.gnu.org>
2014-05-09 14:55   ` bug#17444: closed (Re: bug#17444: 24.3; cannot C-u M-x recompile (interactively) from outside *compilation* buffer.) B. L.
2014-05-09 16:11     ` Glenn Morris
2014-05-09 16:45       ` B. L.
2014-05-09 19:45         ` Glenn Morris
2020-09-25 14:27     ` bug#17444: closed (Re: " Lars Ingebrigtsen

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