Summary: github.io link
> * http://mlf176f2.github.io/EmacsPortable.App/
Everything below here refers to one particular implementation.
EmacsPortable.App attempts to make a portable version of Emacs that runs off a USB drive under either Windows, Linux, or Mac OSX.
The features of this distribution:
In windows, this distribution also allows concurrent versions of emacs to be run, with different startup options.
The following downloads are available:
Under windows, you can do a net-install by using EmacsOptions. This net install can be performed in two ways:
EmacsPortable.App handles file associations in the following ways:
When changing associations under windows, the Mac Info.plist xml file is also updated.
In addition to regular extensions, EmacsPortable.App can be registered to extensionless files. Currently this is unsupported through liberkey. Therefore, this is only in effect when EmacsPortableApp is running or installed locally.
This allows proxy settings to be dynamically determined based on your location. Your password is encrypted based on the location as well. This works on windows only.
EmacsPortable.App will setup the HTTPS_PROXY, HTTP_PROXY and FTP_PROXY based on the connection specific setup. To use a proxy, set it up with EmacsOptions.exe.
This is sufficient for some packages, but not for gnus.
The information is stored by the blowfish encryption algorithm. However the HTTP_PROXY environment variable will contain the password in clear text.
When Putty Key is specified in this dialog, the putty key is loaded and Putty local or portable is started (depending on the options selected).
Under windows, launching options may be changed by running EmacsOptions.exe. Otherwise, ini files can be edited on Mac OSX.
This selects the version of Emacs that EmacsPortable.App will be running. This is useful if you run different versions of Emacs to test lisp code on multiple emacs versions.
Emacs allows you to select popular startup scripts for emacs startup. Once downloaded, you can use:
You can also create you own. Just place an init.el or .emacs in a directory under Datastartup
The Pseudo-Daemon Start-up script among other things:
This allows you to “close” out of Emacs while maintaining a running Emacs.
The startup script also sets the environment variable EMACS_SERVER_FILE to the temporary directory
Subsequent calls to emacsclient.exe specify this server location. Therefore an emacs server can be run for each distinct emacs version
More information about the startup is found in site-start.org
Create a new emacs “frame” on opening a new file.
Under windows, debug mode starts gdb if found. Additionally, if App/gdbinit is found, gdb sources this before running emacs. You can download an appropriate gdbinit for emacs here.
This is equivalent to using EmacsDebug.exe
Emacs binaries can be zipped to save space. This requires that the emacs binaries are extracted to the temporary directory before running. I have found that running emacs in this manner is faster than running it on the USB stick alone. If not selected the binaries will run from the usb drive. If you are running EmacsPortable.App locally
When running portably, the unzipped binaries are stored in the temporary directory. To save time on startup, if the bare binaries needed to run emacs are still present, the launcher uses these files in the temporary directory.
When the clean residual files option is selected, these binaries are removed after emacs stops, otherwise they are retained to improve startup time.
The HOME Directory is where Emacs stores the .emacs file; Other emacs programs also store information here. EmacsPortable.App has a few options for home directories
If the DatainiEmacsPortableApp.ini file contains an ini Home Entry
The EXEDIR directory is changed for the base directory that EmacsPortable.App is run from.
The advantage to this methodology is that you can drag and drop Emacs and all your customizations will be dragged with it.
If the DatainiEmacsPortableApp.ini file contains an ini Home Entry
USB represents the USB directory. This setting uses the PortableApps Documents Directory as the home-directory.
The USB directory is determined as follows:
The advantage of this methodology is that under windows, Emacs can be copied to the hard-drive to speed up the run-time, and the initialization from the hard drive.
If the DatainiEmacsPortableApp.ini file contains a full path, then the home is set when that file exists. For example:
will set the home directory to c:\ on Windows computers. Currently, this is supported only on windows.
If the DatainiEmacsPortableApp.ini file contains an ini Home Entry that doesn’t start with either EXEDIR:/ or USB:/, and doesn’t exist then the original home directory is maintained.
[EmacsPortableApp] Home=Set as original
When using EmacsOptions.exe, you do not have to worry about selecting which type of file is used. If you select a directory on the USB drive, the EmacsPortableApp is updated accordingly. If you select location within the portable app directory, the EXEDIR is replaced. Note that any where else may change depending on the computer you use.
This allows a right click to produce a “Edit with EmacsPortable.App”
This registers Org-protocol and also associates org-protocol actions with adobe acrobat/adobe acrobat reader.
EmacsPortable.App will add LiberKey File associations when it locates LiberKey, and the LiberKey support is checked. Note that you should restart LiberKey and make sure that the associations actually installed correctly.
This allows the initial font/color and gemoetry options to be specified so that emacs will startup with these options enabled.
These are called from the command line and do not affect the registry.
In addition this tries to set an option to maximize new frames.
EmacsPortable.App can download and run the versions of Emacs from the mac repository and windows repository and package them so they work with the EmacsPortable.App launcher.
If the EmacsOptions list of emacs versions is out of date, it can be updated by the following procedure:
The EmacsOptions.exe allows you to set Emacs startup options via a GUI. This is mirrored in the DatainiEmacsPortable.ini file.
By creating or editing an environment ini file at Data/ini/Environment.ini, startup environmental variables may be set. For example, if you use the colemak keyboard with the ergoemacs package, the following ini-file will set the ERGOEMACS_KEYBOARD_LAYOUT to the proper value
Load Path for source directory is in Data/src.
When using EmacsPortable.App’s startup mechanism, t
Since EmacsPortable.App tries to run portably, there are a few things that are changed from a standard emacs distribution:
Emacs has a list of “home” directory aliases. The absolute directories are:
|Alias||True Directory||Directory Purpose|
|~ahk/||Other/source/ahk||AHK Sources Directory|
|~app/||App/||EmacsPortable.App Application Files|
|~doc/||USB Drive Documents||Documents Directory|
|~h/||System Home Directory||System Home Directory|
|~ini/||Data/ini||EmacsPortable.App ini files|
|~nsi/||Other/source/nsi||NSIS Sources Directory|
|~pa/||USB Drive:/PortableApps||Portable Apps|
|~site-lisp/||App/site-lisp||Site Lisp Directory|
|~src/||Data/src||EmacsPortable.App lisp source files|
|~usb/||USB Drive||USB Drive|
Other aliases are added ~el-get/package/elpa is changed to ~elpa, as if it were a symbolic link. Since symbolic links are not supported in windows, this is handled by emacs only. This was implemented to allow files to remain the same between file systems. ~usb/ will be the same on every system.
In addition to these aliases, the following aliases are also defined:
Custom aliases may be added by customizing EmacsPortable-aliases.
Will install specific fonts, if needed.
You can update the current list of supported emacs versions by running emacs-portable-update-offical-emacs-releases.
Under windows the fonts in the Appfonts directory are temporarily installed/registered. Once Emacs Exits, the fonts are unregistered.
Copies fonts in the Appfonts directory to ~/LibraryFonts
The dos version starts up emacs in a dos command prompt window. When trying to do anything with the EmacsPortableDOS command, it will attempt to do that command in the initial DOS box. This is just a test environment, and is likely not very reasonable to use.
Icons came from various places:
EmacsPortable.App is built with NSIS with the following options:
You can build an installer with the command build-nsi inside emacs.
This was generated with OrgReadme. On updating the library, this page is likely to be replaced with updated content.