Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have been using vim for years, and I don't really like it.

I'd like to try emacs for a while, but it's not installed on any of the linux servers I use regularly. I don't have root so apt-get install isn't an option (nor can I ask the sysadmin for permission, he would definitely say no).

Is there a binary version of emacs I can install in my home directory? Most of the servers are running CentOS.

share|improve this question
    
Do you have compilation tools? Can't be too hard to compile it with the right flags see this question for pointers and run it directly off your home folder. –  Journeyman Geek Aug 29 '13 at 0:53
    
@JourneymanGeek yes, gcc appears to be available to my user on at least some of the servers. I've never tested it. I'm a bit nervous about running make install incase it does something the sysadmin would get pissed off about... I work with production servers every day, and I'm not the one who has to wake up at 2am if something goes wrong. –  Abhi Beckert Aug 29 '13 at 1:04
    
Upvoted purely for being concerned that your sysadmin gets a good night's sleep; having spent several years in that role among others, I could wish more of my users had entertained the same concern. –  Aaron Miller Aug 30 '13 at 0:44

2 Answers 2

up vote 11 down vote accepted

If you can compile code, then just download a source distribution of emacs.

Instead of starting with ./configure, use the configure options to tell the build system where you want the files to end up. For example:

./configure --prefix=/home/abhi/emacs --bindir=/home/abhi/bin

will install all of emacs' support files under /home/abhi/emacs, and the emacs executables in /home/abhi/bin. If the latter is in your $PATH, which it usually is, then things should Just Work(sm).

After that you can

make && make install

without worrying about the installation putting files other than in your home directory.

(This is all based on your home directory being /home/abhi, of course. Edit as necessary.)

share|improve this answer
2  
Just to toss in my two bits here: I don't have root on my desktop machine at work, and this is exactly how I built and installed Emacs, with the slight difference that my configure command was ./configure --prefix=~/installs and my $PATH includes ~/installs/bin -- Emacs isn't the only thing I've built and installed for myself, and I find it preferable to keep everything under a single directory so's not to clutter up $HOME too much, but I suppose that's more a matter of taste than anything. –  Aaron Miller Aug 30 '13 at 0:43
    
FWIW, for emacs 24.3: $ ./configure --prefix=~/software --bindir=~/bin yields configure: error: expected an absolute directory name for --prefix: ~/software. So maybe use $HOME instead. –  user100464 Mar 28 at 15:24

Don't install emacs onto the servers - there is no reason to force yourself to use the interface through network latency. Instead, install emacs onto your workstation, and let it fetch the files from the servers using its TRAMP mode. Alternatively, you can use Filezilla, it will download the file for you and automatically upload them after you save.

share|improve this answer
    
I have less than 1ms of latency to some of the servers, and very good latency to the others. We use a nearby data centre. Latency is not an issue for any other editor and I want to use it as my $EDITOR for things like typing in commit messages for version control. I'm never doing serious programming on a remote server, I use my local workstation which already has emacs installed. –  Abhi Beckert Aug 29 '13 at 2:07
1  
@AbhiBeckert Well, in that case maybe you do want to go through the pain of trying to install it. I wouldn't be afraid of doing a make install, as long as you aren't root it can't do anything outside your home directory. Also, you might want to see if nano is installed, if you prefer modeless editing. –  wingedsubmariner Aug 29 '13 at 2:47

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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