2

In few weeks I'll be on a competition for website development.

I can use Emacs from a usb stick. I can't write to system drives anything so all Emacs configs and plugins are needed to be loaded from the usb stick. These are rules so I would rather not break them.

So I think this can be done with setting load-path or recompiling emacs to look config files from the usb but I no idea how this would be done in practice.

TacticalCoder
  • 6,275
  • 3
  • 31
  • 39
tommis
  • 65
  • 5

1 Answers1

6

GNU provides compiled binary releases of Emacs for Windows. They require no installation or compilation.

  1. Download the version you want (the latest at the time of writing is emacs-24.3-bin-i386.zip).
  2. Optionally, verify its signature with GnuPG.
  3. Extract it to your flash drive.

If a %HOME% environment variable exists, Emacs will use this as your home directory. Setting %HOME% to D:\ will cause Emacs to read its configuration from D:\.emacs or D:\.emacs.d\init.el. It will also cause package.el to install packages to D:\.emacs.d\elpa\.

If you are permitted to modify environment variables for your user, go to Computer ⟶ Properties ⟶ Advanced system settings, click the Environment Variables button, and add or modify HOME, setting it whatever drive letter your flash drive gets assigned. You will need to reboot (or at least log out and back in) before this variable takes effect.

If you are not allowed to modify this variable, you can use set HOME=D:\ in cmd.exe, then execute Emacs from that shell. You may want to write a short batch script to do this and add it to your flash drive.

To run Emacs, use bin\runemacs.exe.

ChrisGPT was on strike
  • 127,765
  • 105
  • 273
  • 257