zenitani / elisp

15 stars 10 forks source link

feature request: do not repeat-ask for compile command #1

Closed r2evans closed 9 years ago

r2evans commented 9 years ago

Thanks for maintaining smart-compile!

Before I found this, I found this (under Recompile) which asks for the compile command the first time but remembers it for subsequent compiles. Is it possible to do something similar for smart-compile? Though it's only one extra keypress, it'd be nice to "just remember and do it."

Thanks again!

zenitani commented 9 years ago

Hi,

(setq compilation-read-command nil)

Seiji

2015/01/12 15:15, r2evans notifications@github.com wrote:

Thanks for maintaining smart-compile!

Before I found this, I found this (under Recompile) which asks for the compile command the first time but remembers it for subsequent compiles. Is it possible to do something similar for smart-compile? Though it's only one extra keypress, it'd be nice to "just remember and do it."

Thanks again!

— Reply to this email directly or view it on GitHub.

r2evans commented 9 years ago

I tried that, but when I open a different file (and have not closed the previous compilation buffer) and try it again, it does the wrong (re)compilation. Is this a limitation of emacs in that compilation-last-buffer is always global, and cannot be conditionally ignored? (such as when we are visiting a different source file)

(I also tried to do something similar using local variables thinking that I could do what I wanted by limiting scope, but was unable to get it to work correctly.)

Thanks, Seiji!

zenitani commented 9 years ago

I got it... C-u M-x smart-compile will regenerate the buffer-local compile-command in any case.

At this point, I have no idea how to do better. Thanks for the feedback!

Seiji

2015/01/12 15:43, r2evans notifications@github.com wrote:

I tried that, but when I open a different file (and have not closed the previous compilation buffer) and try it again, it does the wrong (re)compilation. Is this a limitation of emacs in that compilation-last-buffer is always global, and cannot be conditionally ignored? (such as when we are visiting a different source file)

(I also tried to do something similar using local variables thinking that I could do what I wanted by limiting scope, but was unable to get it to work correctly.)

Thanks, Seiji!

— Reply to this email directly or view it on GitHub.

r2evans commented 9 years ago

Thanks, I appreciate the discussion.