I am using Emacs 24.3.1. on Ubuntu.

I am trying use compile in emacs: (M-x compile), I choose my Makefile.

It answered me -*- mode: compilation; default-directory:"path" -*- Compilation started at Wed Nov 9 10:48:00. status is Compilation:run, I wait, wait and it will never say nothing more. To leave this process I must kill it.

My Process List: compilation run compilation /dev/pts/14 /bin/csh -c make -f ../Makefile

When I run it from terminal everything works.

I did one test more I run grep function (M-x) grep -nH all "main" ./* . It is the same problem. Grep:run Compiling but I don’t have any results and a grep process is running. To leave this window again I must kill it.

I sure that any packages don’t have impact.

Did someone have similar problem? Can you share how to repair it?

  • Welcome to mx.sx! Does the problem appear if you start emacs with emacs -Q? Does pressing C-g (or maybe spamming it a couple times) allow you to leave the windows without killing them?
    – T. Verron
    Commented Nov 9, 2016 at 10:56
  • Hello, thanks for your answer, I tried it and it doesn't help. I tried do it without my config (~/.emacs) files that why I know that any packages doesn't have impact. Commented Nov 9, 2016 at 13:11
  • By C-c you mean M-x? And what do you mean by "choose my Makefile"?
    – npostavs
    Commented Nov 9, 2016 at 13:29
  • Yes M-x, sorry I corrected it. I choose my Makefile mean: comment make -f ../Makefile (where ../Makefile is my path) Commented Nov 9, 2016 at 13:39
  • 1
    It could be csh startup related, Can you clarify in your grep case if you have both a /bin/csh -c grep ... and a grep process, or only the former? Can you move your ~/.cshrc to a different name and see if that makes and difference? If it does then put the ~/.cshrc back, run the grep again and run ps axjf in a different window and look to see what child processes of the csh are running. Welcome to emacs stackexchange.
    – icarus
    Commented Nov 9, 2016 at 15:14

1 Answer 1


Ok, I solve this problem. I will share the answer.

Before I had problem, I start my shell with csh but I would start in bash. So I added line with bash in my .cshrs to change it automatically each time.

There was big conflict, I don't understand why but I found it based on advice of @icarus. Thank you very much.

Finally I edit etc/passwd to change it using chsh , I found it as better solution. Compilation works right now, thanks. Good luck.

  • Glad it helped. It sounds as if you just had bash in your ~/.cshrc file. You needed a lot more to make this work correctly as you have found out -- set the SHELL environment variable, see if you are being run to start a program or interactively and so on. On stackexchange.com you should mark username like @icarus so the user gets notified.
    – icarus
    Commented Nov 10, 2016 at 14:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.