Search code examples
macosemacsterminalmacos-high-sierra

How to run Emacs from terminal as nonlocking window on Mac?


I taped 'emacs' in the terminal on Mac (High Sierra) and pressed return. As a result, I have a new Emacs window. Everything okay, but I can't continue to use terminal because it looks like locked by this emacs window.

How can I use terminal and Emacs in parallel independently?


Solution

  • Do you want to start emacs from the terminal or run emacs within the terminal? The two are very different. To start emacs from the terminal, the conventional wisdom is to use emacsclient to send a GUI emacs instructions to open a given file.

    If you want to run emacs within a terminal while maintaining access to your terminal, you have a few options:

    • Use a multiplexer like tmux
    • Run a terminal emulator within emacs (I like plain ole' M-x term, but there are fancier ones)

    If you're just talking about throwing the process into the background, use C-z (i.e., M-x suspend-frame) from a running emacs. If you want to start emacs in the background, do it like any other job using &. I'll refer you to your shell's documentation for job management. (Here's one for Bash.)