28

Q: can Emacs be installed/used on a tablet with a minimum number of tears?

I had been under the assumption that Emacs ran on basically everything. However, after some poking around, it looks like running Emacs on a tablet could be an enormous headache. But what do I know? Hence, the question.

I don't have a tablet so my terminology will probably be grandma-level out-of-touch. My limited understanding is that Apple won't let Emacs into the Appstore, but there's possibly a jailbroken version that exists in the ether. There was a time when one could get it in the Google Play store for Android, but it's old, broken, and requires some non-trivial fiddling. I find it hard to believe that the only viable option is to use Emacs on a Windows tablet, perhaps because the irony is just too great.

I'm mostly interested in whether we can do this on an Apple or Android tablet, not out of rapturous love for either platform, but simply because they're so ubiquitous and yet seemingly unsupported. So:

  • can we get a fully (or even mostly) functional Emacs running, preferably one that is not a one-shot deal, but rather updated with new releases?
  • install it with a minimum of tears, meaning without jailbreaking a device or spending an inordinate amount of time on a Rube Goldberg-esque installation?
4
  • 1
    BTW, "ubiquitous" heavily depends on where you live. Here in Poland a lot of people own Android devices (phones and tablets) and rather few own iOS ones.
    – mbork
    Commented Oct 30, 2014 at 19:01
  • 2
    "I find it hard to believe that the only viable option is to use Emacs on a Windows tablet, perhaps because the irony is just too great." For me, the irony only makes it more believable. :-)
    – Malabarba
    Commented Oct 30, 2014 at 19:13
  • Of course, if you have remote access to a machine, you could use an SSH client to run Emacs remotely. If you run tmux on the remote machine, you are also immune against temporary dropouts. Commented Jun 28, 2015 at 6:25
  • I know you are asking specifically about Android tablets and iPads, but there are other OSes for tablets: Emacs 25.2 runs perfectly fine on my Windows 10 tablet. (I definitely recommend also having a blue tooth keyboard: using the on screen one for Emacs is super-frustrating.)
    – Omar
    Commented Jun 29, 2017 at 19:46

9 Answers 9

14

I use Linux Deploy to run Debian in a chroot environment on my Nexus 7 tablet. With that, I can do whatever I want, including running Emacs. It's fully functional, complete with all the latest updates and packages.

If you choose to go with an Android device and don't use a bluetooth keyboard, I'd recommend looking into the Hacker's Keyboard.

If you absolutely don't want to root your device (which is trivial for most devices), you can try GNURoot, though I haven't tested that myself.

I guess to make my process a little more clear, here it is:

  1. Install Linux Deploy on tablet
  2. Use Linux Deploy to install a Debian, or Arch, or Ubuntu environment
  3. Start the environment in Linux Deploy
  4. SSH into the environment using the SSH application of your choice (mine is JuiceSSH)
  5. You are now basically using a Linux device. Use whatever package manager you choose to install whatever packages you choose.
9

A note about iOS.

Apple will certainly never let Emacs on the App Store, as it runs against everything Apple stands for. Here are some reasons:

  1. Apple does not allow users to run downloaded code (see this).

This would kill all usage of package.el which would be pretty bad, IMHO. Given that Emacs is basically a lisp VM, the chances of you running downloaded code is practically 100%.

  1. Apple does not allow apps to modify arbitrary files.

You would need to create a little walled off garden for Emacs to play in, because it can't stray out of its sandbox.

  1. Apple lacks an environment for Emacs to run in.

By this, I mean the coreutils, compilers, interpreters, etc.. Emacs only gets really good when it has access to programs that understand the languages it supports. Say goodbye to syntax checkers, linters, spellcheckers, smart completion engines, and just about anything that exists outside of Emacs. In theory you could port these as well, but that's really not feasible without root, for a lot of reasons.

The truth is that Emacs is just too powerful for Apple to condone. To do so would be to go against their philosophy.

All of this changes with root. Jailbroken, we no longer have to listen to what Apple says, and unsurprisingly a Cydia Emacs does exist (although I can say little more about it).


On Android, point 3. still stands, but not very well because root is easy to get. The best way is to just install Linux in a chroot (which is super easy, and detailed in another answer) and go on your merry way. That said there's no technical reason why a clever developer can't just build Emacs for Android again and put it on the app store, its just that nobody has.

I suppose this is simply because few people are eager to use an entirely keyboard driven program that uses a ton of modifier keys on tablets with questionably high quality text input.

2
  • Wrong way round - The Emacs authors are the ones who will not allow it as Apple;s licencing requirements do not meet the GPL - now what emacs does would mean Apple would not allow it.
    – mmmmmm
    Commented Jun 7, 2019 at 18:06
  • I installed iSH on my ipad mini 5th gen and then executed apk add emacs, after that executing emacs gives me something the really looks like emacs. Right now I'm trying to figure out if I can make touch input work. I'm pretty new to emacs Commented Jun 15, 2021 at 18:16
6

The Termux package from the play store includes apt packages, including a recent emacs. It is character mode, not GUI, but it is quite functional.

4

Concise instructions for access with root are also found here http://www.reddit.com/r/emacs/comments/2adkvc/how_to_get_emacs_to_run_on_android_painlessly/. Note the link http://emacs.zielm.com/data/ seems broken. However, I tried to find a way to do this without root, and here are some results.

I tried following the GNURoot option offered in a couple of places (in addition to the current answer, http://www.linuxuser.co.uk/features/run-linux-on-android-part-1, http://www.emacswiki.org/emacs/EmacsOnAndroid), and since it was took moderate searching for someone with little Linux experience, this may be useful for others.

GNURoot lets you create a Linux build inside your Android. The 'wheezy' it offers by default is 'debian'. You can select a different build if you want to create it. Once you have created it, run it with fakeroot option ticked, you will then see console of your superuser.

A guide on installing Emacs on various builds exists here: http://wikemacs.org/wiki/Installing_Emacs_on_GNU/Linux

Emacs 23

Running Emacs 23 turned out to be quite easy. You just type in apt-get install emacs in the console, answer yes on the checks, and you are able to run emacs by typing emacs.

Emacs 24

I couldn't get Emacs 24 running, but perhaps someone may be able to pick up from this and find a way quicker. If anyone is able to make it work, perhaps you can follow up, or update this post.

Emacs 24 seems much more tricky, as it is not well maintained on some builds (perhaps someone understands the situation better). This is available under 'emacs-snapshot' which can be found via the series of links http://emacs.naquadah.org/ -> https://launchpad.net/~cassou/+archive/ubuntu/emacs -> https://launchpad.net/~ubuntu-elisp/+archive/ubuntu/ppa, which should be the working version.

Combining the results from the second of the link sequence, you would need to type the following. You don't have to type sudo if you tick the fake root box on startup.

Note: You won't have to purge if you haven't got any version of emacs installed.

Note2: To gain the function add-apt-repository, you'll have to install an extension beforehand, as said here https://askubuntu.com/questions/38021/how-to-add-a-ppa-on-a-server.

For my version this command worked to add 'add-apt-repository'.
$ sudo apt-get install python-software-properties

$ sudo apt-get update
$ sudo apt-get install
$ sudo apt-get purge emacs emacs-snapshot-common emacs-snapshot-bin-common emacs-snapshot emacs-snapshot-el emacs-snapshot-gtk emacs23 emacs23-bin-common emacs23-common emacs23-el emacs23-nox emacs23-lucid auctex apel emacs24 emacs24-bin-common emacs24-common emacs24-common-non-dfsg emacs24-el

To add this PPA:
$ sudo add-apt-repository ppa:cassou/emacs
Or the one he refers to:
$ sudo add-apt-repository ppa:ubuntu-elisp/ppa 
$ sudo apt-get update

Then, you should be able to type for emacs-snapshot:
$ sudo apt-get install emacs-snapshot-el emacs-snapshot-gtk emacs-snapshot

*Or*, for emacs24:
$ sudo apt-get install emacs24 emacs24-el emacs24-common-non-dfsg

Unfortunately, neither of the ppa's offered in these links seem to be working at the moment, or I have missed a step in adding them. GNURoot does not seem an easy option to use. Perhaps someone is able to complete the sequence. I guess these kind of instructions should eventually be made into a community wiki.

More info could be potentially found here: http://www.emacswiki.org/emacs/EmacsSnapshotAndDebian.

Another useful option may be to instally the wheezyx option instead of wheezy to begin with, as it may offer a type of a mouse support via the touch interface.

1

I'm running GNU Emacs on an iPad in iSH - a relatively new developer app that is essentially an Alpine Linux container. iSH allows you to install Emacs using the apk package manager. Here's how to install it:

1. Install [TestFlight] from the App Store.
2. Open a web browser on the iOS device and click here [https://testflight.apple.com/join/97i7KM8O] to review/accept the terms and start testing iSH using TestFlight.
3. Click "Install" to install the iSH Shell application onto the iOS device.
4. You will now have the iSH app on your iOS device. Open this app to run the Alpine Linux shell. 
5. Install Emacs with apk by entering the command "apk add emacs". After Emacs installs, enter the command "emacs" on the command line to run it. 

As an alternative to TestFlight, iSH can be side loaded directly onto an iPad with the Xcode application on a Mac.

It doesn't run as fast as something that would be running natively on an iPad but it's fast enough for a lot of purposes.

0

I am running Emacs on Android 4.2.2. Starting it from within Terminal IDE, everything loads fine. I have not stress tested it however.

4
  • 1
    How did you install it? Commented Mar 16, 2015 at 21:35
  • I happen not to remember, it was right after I got the tablet (almost a year ago) in the fever of trying out apps. I`ll take a look and try to give a reasonably accurate answer a bit later.
    – user6638
    Commented Mar 16, 2015 at 22:41
  • Ok, here it is, installed it following this: quoderat.megginson.com/2014/02/17/…
    – user6638
    Commented Mar 16, 2015 at 22:50
  • 1
    Not a practical solution though, more of an emergency/backup thingy. Useless with touchscreen (almost), and my external Bluetooth keyboard behaves erratically, got fed up with bugs and inconsistencies related to it.
    – user6638
    Commented Mar 16, 2015 at 22:56
0

Although I got Emacs to work with some of the options here, I wasn't happy as the implementations were partly borked, just enough to be annoying.

I installed the zshaolin app from Google Play. It's not free (a few dollars) but it does have an Emacs that seems fully usable, with keys working correctly and all the commands I've tried so far. It's an older Emacs, 24.1, and zshaolin just repackages a lot of things like Terminal IDE and others, but at least it works right. There are also a lot of other things like vi and Perl and so on.

0

If I really need to get to Emacs on my iPad, I do it via SSH using Serverauditor. It's monochrome and the keyboard interface is tedious. A specially-designed Emacs client for the iPad could probably resolve these issues. (EDIT: This assumes you have access to an a server with Emacs, of course.)

EDIT: I've also recently discovered Cloud9, which allows me to access emacs via Safari. Keybindings remain this biggest problem, even on Windows, and the fact that the general iOS keyboard has no Ctrl or Alt makes it much worse.

0

GNU Emacs for Android can be installed from the F-Droid app catalogue.

At the time of writing, the Android port of Emacs is unfinished, so this is not yet a stable release.

You'll want to attach either a physical Bluetooth/USB keyboard, or use a non-default on-screen keyboard that provides keys such as Ctrl.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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