0

How do I get Emacs to always remember the last compile-command? My compile-command (cc) in Emacs 24 settings is pure vanilla, no bells and whistles. I only changed the cc string itself ("python build.py"), and I sometimes type a different cc by hand and run it. But then Emacs tries to be helpful and remember a cc based on different buffers, it seems quite randomly. For example I change directory in dired and I get a compile command that is completely unrelated to what I am trying to do. Is there a way to disable compile-command helpfulness feature so it only remembers the last one? BTW, I usually get the last cc, but sometimes the feature freaks out.

  • I haven't used M-x compile. But doesn't M-x compile followed by M-p show you the last command you used there? – Kaushal Modi Sep 14 '15 at 15:29
  • I can scroll through commands fine, using M-p, after M-x compile. My issue is I'd like M-x compile to always show me the last command. It usually does this, but sometimes it freaks out. – BBDynSys Sep 14 '15 at 15:34
  • I use compile a lot,and never observed this (which might not be surprising since my setup is heavily customized as far as compile is concerned). Do you have reproducible steps that lead to the problem? Or is it completely random? – ffevotte Sep 14 '15 at 18:52
  • Also, I don't really understand what you mean by "remember a cc based on different buffers"? Which buffers are you talking about? You do have only one compilation buffer, right? – ffevotte Sep 14 '15 at 18:54
  • One compilation buffer yes, I am talking about the buffer I am on at the moment when I issue M-x compile. Emacs tries to come up with the "right" cc for that buffer.. or so it seems to me. I will try to replicate it, if I can. – BBDynSys Sep 15 '15 at 7:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.