I want to open emacs + an emacs file directly in the terminal, the file in question, how should I go about it?


Since you are using putty I assume you want a non-X version of Emacs:

emacs -nw test.txt

will open test.txt in a non-window version of Emacs.

If you need to open test.txt on a particular line and column use:

emacs -nw +5:8 test.txt

This will set your cursor to column 8 on line 5 (or at the end of that line if it is not long enough).

  • 1
    I would perhaps add that in some distros, there's a package called emacs-nox. If you install it, then you can just type emacs-nox file or are even able switch permanently to non-X version via alternatives --config emacs. Or perhaps update-alternatives, that really depends. – Miroslav Franc Nov 4 '14 at 2:16
  • @MiroslavFranc You are right, and that is the case on my system (Ubuntu 12.04). At this point I was (am) however not even sure this answers the OPs questio. – Anthon Nov 4 '14 at 4:28

Your Answer

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

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