Emacs for Android
On the last day of 2022, Po Lu announced that a
preliminary Emacs port had been pushed to a
feature branch in the Emacs Git repository. It was "about 14,000
lines of stuff
" with basic functionality working; Lu asked for help
with some of the remaining issues. Lu came back in January
with more suggestions for projects that others could take on. In February,
the port was declared to be
"more or less feature complete
" and, at the beginning of March, Lu
requested that this
work be merged into the Emacs trunk "in the next couple of days
".
Emacs maintainer Eli Zaretskii proved reluctant at the
time and, as of this writing, that merge has not yet taken place.
There is a build
of the Android Emacs port in the F-Droid repository, but that build is
old and Lu does not
recommend it. There is also a
frequently updated set
of binary builds on SourceForge that seems to be the best option for
users who do not want to build their own.
That build seemingly works on your editor's Android systems, though it is
somewhat painful to use. The icons are too small to see or for the
fat-fingered among us to hit reliably. There must surely be a way to
obtain finger-twisting three-key chords like M-$ (which runs
ispell-word) with the Android keyboard, but it is not obvious and
is unlikely to be convenient for regular use. Anybody wanting to make
serious use of Emacs on this platform would be well advised to have an
external keyboard. Even then, the Android permissions scheme (described as
"fascist
" by Lu) makes it impossible to access files on the system
as a whole.
Still, there seems to be some interest in this port, and Lu is not the only one who would like to see it merged. Zaretskii, though, remains unconvinced; in mid-June, he started a conversation by saying that, while there would be advantages to merging the Android code, there would be a number of disadvantages as well. It would grow the Emacs distribution significantly, introduce Java code into Emacs, complicate a number of existing internal APIs, and, most significantly, would add a dependency on a single maintainer who understands the port and can keep it working. Given these problems, along with the fact that Android is a proprietary platform, he asked, might it not be better to keep Android support out of Emacs?
Lu responded that
this port runs on free versions of Android, such as Replicant, as well, while conceding that
"those systems are used so rarely that they should not be put into
consideration
". The NeXTSTEP/macOS port uses Objective-C, so there is a
precedent for bringing in a new language that a platform needs, and the
Android port has been carefully done to minimize the amount of Java code
needed. With regard to maintenance, Lu said that the changes needed are
not huge, that there are many free-software developers with Android
experience, and that he intends to stick around and keep things working in
any case.
The conversation went on at length, including a separate sub-thread on the challenges of contributing to Emacs in general that will not be covered here. Numerous participants said that they would like to have the Android port; Dr. Arne Babenhauserheide, for example, remarked that this would be the best way to make Org Mode available on Android devices. Zaretskii, though, was firm that any discussion of the advantages was off-topic:
I have no doubt whatsoever that having Emacs on Android will benefit Android users; my doubts are whether we as the project should and can take upon ourselves this additional maintenance burden, and promise the Android users that we will maintain, let alone develop, this port for the years to come.
The maintenance concern is not entirely unfounded. A look at the feature/android branch shows 620 commits, 619 of which were written by Lu (the other commit being a typo fix). Lu's requests for help earlier this year, in other words, did not result any other contributors working on the port. Emacs has a number of other ports that are not seen as being in great shape; that includes the macOS port, the maintainer of which left the community. Adding another poorly supported port would not improve the state of Emacs overall.
Lu is adamant that the Android port would be supported well, though. For
Richard Stallman, that is good
enough: "But if Po Lu says that he wants to keep working on it and
make it good enough to achieve popularity, I suggest that makes the effort
of installing it a good investment.
" Zaretskii, though, repeated his concerns,
saying that the Emacs project has been burned this way in the past and may
be repeating an old mistake. But he left the door open to merging the
Android support anyway:
But maybe I'm the only one who is bothered by the fact that we never, as a project, raise the head above the water level and look farther into the future than just tomorrow or the day after? In which case I'll stop talking about this and accept the fact the others aren't bothered. After all, I don't own this project, I'm just the steward; if the community decides to go with this, the community will bear the consequences, whether good or bad.
A reading of the conversation suggests that, indeed, few people other than
Zaretskii are bothered by the prospect of merging a port that subsequently
loses its sole maintainer. Perhaps that outcome reflects the fact that the
responses were mostly from users of Emacs, while other developers have
mostly kept their peace. Maintenance burdens are less daunting when they
are shouldered by somebody else, after all. There are risks involved in
accepting a large body of new code, but there are also risks inherent in
failing to support a popular platform and disappointing a prolific
contributor. Which risk the Emacs community will choose remains to be seen.
Posted Jun 29, 2023 15:00 UTC (Thu)
by wtarreau (subscriber, #51152)
[Link] (25 responses)
Posted Jun 29, 2023 15:52 UTC (Thu)
by jeckersb (subscriber, #47103)
[Link] (3 responses)
Posted Jun 29, 2023 18:14 UTC (Thu)
by pizza (subscriber, #46)
[Link]
[1] As others have pointed out, this is about more than "emacs the editor" -- consider emacs-the-platform, for org-mode and other useful/cool tools.
Posted Jun 30, 2023 6:12 UTC (Fri)
by jem (subscriber, #24231)
[Link]
Posted Jul 13, 2023 9:54 UTC (Thu)
by davidgerard (guest, #100304)
[Link]
How's this thing run on a Chromebook?
Posted Jun 29, 2023 21:42 UTC (Thu)
by khim (subscriber, #9252)
[Link] (11 responses)
One platform which, I hope, they tested this port is ChromeOS. ChromeOS laptops are popular enough, they support Android apps and while, technically, Emacs is already available there via Linux on ChromeOS route it's often is not available in corporate settings. Of course if it can be installed and started on ChromeOS but actual use is just not possible, then that's the whole different story.
Posted Jun 30, 2023 7:14 UTC (Fri)
by halla (subscriber, #14185)
[Link] (10 responses)
In our experience:
* just the changes from Android version to version need about a full-time developer to track. Especially when it comes to file handling.
This is not meant as a pro or con Emacs on Android argument, but just my personal experience from the past couple years of maintaining an Android/ChromeOS port of a big free software application.
Posted Jun 30, 2023 8:31 UTC (Fri)
by khim (subscriber, #9252)
[Link] (6 responses)
So nothing have changes with invention of Android and ChromeOS. Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. This was said 35 years ago and apparently is still true today.
Posted Jun 30, 2023 10:43 UTC (Fri)
by Wol (subscriber, #4433)
[Link] (3 responses)
I'm just reeling from a Slack update, where it's blatantly obvious they didn't think through the consequences of their actions ...
Cheers,
Posted Jun 30, 2023 17:37 UTC (Fri)
by mpr22 (subscriber, #60784)
[Link] (2 responses)
Physicians and surgeons are chosen from the slice of the general population who have achieved the degrees of Bachelor of Medicine and Bachelor of Surgery – which (among late-GenX-ers like me) is mostly selected from the slice of the general population who could get good A-level results in three STEM subjects (which criterion, whatever people may say about the standard of modern exams then or now, does exclude a very large portion of the general population).
That said, of course, being book smart opens up whole new vistas of folly that people who aren't have no access to.
Posted Jun 30, 2023 20:07 UTC (Fri)
by Wol (subscriber, #4433)
[Link] (1 responses)
> who could get good A-level results in three STEM subjects
As one of the last baby-boomers, who tried to get into medical school, back then your average trainee doctor was made a UCCA offer of "three passes". (Okay, most of them went on to get one grade higher across all three.) What annoyed me was that, of my friends who got in, only one of them iirc had better grades than me :-) It is what it is. (Gen-X? 20 years younger than me?)
> That said, of course, being book smart opens up whole new vistas of folly that people who aren't have no access to.
More and more as I get older, the importance of experience gets rammed home. You can be the smartest person in the world, and if you haven't met that situation before, you'll make the wrong call ... (As someone "on the spectrum", intuition often beats logic, and we don't have intuition. That said, we do have a sixth sense, which I regularly describe as "hang on, something here doesn't add up".)
Cheers,
Posted Jul 3, 2023 12:39 UTC (Mon)
by paulj (subscriber, #341)
[Link]
Fresh eyes reasoning from first principles may well be better then.
Non-expert intuition can be critical in recognising when experts have gone off their previously beaten tracks, and gotten lost in their own hubris.
Posted Jun 30, 2023 17:16 UTC (Fri)
by atai (subscriber, #10977)
[Link] (1 responses)
Posted Jun 30, 2023 20:11 UTC (Fri)
by Wol (subscriber, #4433)
[Link]
As your brain develops, you have to be about 14 before you can really indulge in abstract thought. And maybe half the population never actually reach that milestone.
If you can't think abstract, you're unlikely to make a good programmer, or emacs user :-)
Cheers,
Posted Jun 30, 2023 13:18 UTC (Fri)
by repetitivestrain (guest, #165872)
[Link]
The same copy of Emacs runs on all versions of Android from 2.2 onwards, so it doesn't seem like it will be an excessive amount of trouble for me to update Emacs to follow the requirements for targeting each new Android release.
Posted Jun 30, 2023 22:08 UTC (Fri)
by khim (subscriber, #9252)
[Link] (1 responses)
Unrelated to Emacs-on-Android discussion: And that's precisely why free software is dead on arrival: there is no money in it. Open Source software have very easy and well-working way out: build your piece of Open Source software as “base platform”. Something free which is not really usable by itself but which can be used by proprietary software competitors to build their products. Then you can get some money from these proprietary competitors funneled into “base platform”. Just make sure you are not building open core thingie which is actually usable without proprietary parts and you would have enough money to thrive. Free Software? No answer to this funding question at all. Free software rejects proprietary software which means there are no way to fund it's development.
Posted Jul 2, 2023 9:57 UTC (Sun)
by halla (subscriber, #14185)
[Link]
It's the Android Play Store that's a bad place to make money.
Posted Jun 30, 2023 4:50 UTC (Fri)
by rsidd (subscriber, #2582)
[Link]
It did need that bluetooth keyboard to be useful. It became less useful as my eyes got older (I still don't wear glasses for the most part but I no longer want to work on tiny screens.) But I can imagine some people would find native android emacs useful on phones.
On android tablets, yes for sure, if there are emacs android tablet users.
Posted Jun 30, 2023 8:43 UTC (Fri)
by mzamazal (subscriber, #126307)
[Link] (7 responses)
Posted Jun 30, 2023 13:13 UTC (Fri)
by repetitivestrain (guest, #165872)
[Link] (6 responses)
I've been using the Android port with such programs almost every day since it was first written. Unlike Termux, it fully supports the character and word composition interfaces that IMEs expect, providing input methods with complete read/write access to buffer text, as required for features such as auto-correct, text completion, and automatic punctuation. These interfaces are additionally a prerequisite for input methods that input non-alphabetic scripts (such as CJK scripts) to operate as expected, which are also not supported by Termux.
Posted Jun 30, 2023 16:45 UTC (Fri)
by mzamazal (subscriber, #126307)
[Link] (5 responses)
Posted Jul 1, 2023 0:27 UTC (Sat)
by repetitivestrain (guest, #165872)
[Link] (4 responses)
BTW, are you sure GBoard or AOSP Keyboard text suggestions work in Termux? They require access to text currently behind point, which a terminal emulator cannot provide.
Posted Jul 1, 2023 12:08 UTC (Sat)
by mzamazal (subscriber, #126307)
[Link] (3 responses)
I think it would help if there was a tutorial on the web for the Android Emacs port. The included Info documentation is hard to access initially because of the usage issues discussed.
Text input suggestions etc. can be used in Termux in the text input bar displayed after swiping the key bar to left.
Posted Jul 2, 2023 0:41 UTC (Sun)
by repetitivestrain (guest, #165872)
[Link] (2 responses)
I don't think it's Emacs's place to provide additional virtual input devices (such as modifier keys.) Such functionality belongs in the program providing the virtual keyboard.
As for the tool bar and menu bar, I think they're sufficiently large by default. However, you could adjust tool-bar-button-margin and the height of the menu-bar face you find their size insufficient.
> I think it would help if there was a tutorial on the web for the Android Emacs port. The included Info documentation is hard to access initially because of the usage issues discussed.
You could simply tap the ``read the Emacs manual'' link on the splash screen. I don't have the resources to write, translate, and update another tutorial or to run a website to publish it. Additionally, the Android documentation will be uploaded to gnu.org as part of the Emacs manual if the port is released.
> Text input suggestions etc. can be used in Termux in the text input bar displayed after swiping the key bar to left.
That's modal editing, not Emacs, and quite inconvenient to use :-)
Posted Jul 2, 2023 10:47 UTC (Sun)
by mzamazal (subscriber, #126307)
[Link] (1 responses)
Posted Jul 2, 2023 11:33 UTC (Sun)
by repetitivestrain (guest, #165872)
[Link]
If that isn't convenient for you, it would still be helpful if you could provide the output of the shell command `getprop' on your phone; it can be run from inside Emacs, a terminal emulator, or from your computer using `adb' if you enable USB debugging.
Thanks in advance.
Posted Jun 29, 2023 17:25 UTC (Thu)
by KJ7RRV (subscriber, #153595)
[Link] (6 responses)
The vast majority of Android phones have substantial proprietary code added to Android, but Android itself is open-source.
Posted Jun 30, 2023 4:07 UTC (Fri)
by Paf (subscriber, #91811)
[Link]
Posted Jun 30, 2023 4:44 UTC (Fri)
by rsidd (subscriber, #2582)
[Link] (4 responses)
Posted Jun 30, 2023 8:20 UTC (Fri)
by eru (subscriber, #2753)
[Link]
Posted Jun 30, 2023 13:09 UTC (Fri)
by corbet (editor, #1)
[Link] (2 responses)
The point that I think I failed to properly convey is that, while the Emacs developers have always been willing to support running on proprietary platforms, they do not feel obligated to do so and do not want to see that support make the editor worse on free platforms.
Posted Jul 1, 2023 12:29 UTC (Sat)
by rsidd (subscriber, #2582)
[Link] (1 responses)
Posted Jul 1, 2023 20:01 UTC (Sat)
by atai (subscriber, #10977)
[Link]
Posted Jun 29, 2023 18:22 UTC (Thu)
by flussence (guest, #85566)
[Link] (2 responses)
Posted Jun 29, 2023 20:49 UTC (Thu)
by james (subscriber, #1325)
[Link] (1 responses)
It doesn't support gesture typing, so it's not a great replacement for normal entry (try AnySoftKeyboard if you want that on an open source keyboard), but might be just what's wanted for interacting with Emacs.
Posted Jun 30, 2023 13:12 UTC (Fri)
by cwatson (guest, #94884)
[Link]
Posted Jun 29, 2023 20:54 UTC (Thu)
by mirabilos (subscriber, #84359)
[Link] (6 responses)
They rely on the ability to basically save a snapshot of the running program at build time and load that whenever it’s started, to save on initialisation, totally breaking ASLR, stack protection cookes, etc. and requiring proprietary patches to libc *just* to support GNU Emacs.
It’s a totally unportable PoS that relies on UB.
Posted Jun 29, 2023 21:36 UTC (Thu)
by corbet (editor, #1)
[Link]
Please take the name-calling to a more suitable venue.
Posted Jun 29, 2023 21:42 UTC (Thu)
by foom (subscriber, #14868)
[Link] (2 responses)
(Yes, it should've dropped it a few decades earlier, but better late than never.)
Posted Jun 29, 2023 22:45 UTC (Thu)
by mirabilos (subscriber, #84359)
[Link] (1 responses)
I seem to recall recently-ish (last 2–3 years?) reading about people complaining that they still need that hack.
But TIL it’s no longer needed, apparently. Good for them.
Posted Jun 30, 2023 9:43 UTC (Fri)
by rudi (subscriber, #4828)
[Link]
> ** Emacs now uses a "portable dumper" instead of unexec.
Posted Jun 30, 2023 13:13 UTC (Fri)
by repetitivestrain (guest, #165872)
[Link]
Neither pieces of system specific code have ever proven an obstacle to porting Emacs, which currently supports over 17 kinds of CPU on operating systems ranging from GNU and Unix to MS-DOS. In the past, Emacs also supported VMS on Alpha and the VAX. And evidently Emacs is not the only program that requires dumping code: Solaris systems even include an officially sanctioned implementation of unexec, dldump, which works precisely the way Emacs expects it to.
Posted Jul 4, 2023 7:08 UTC (Tue)
by flussence (guest, #85566)
[Link]
But to contribute a different point to the pile: I took a look at the unexec code myself and you know what I didn't find? Checksums. Hashes. The only integrity validation it does is that the dump file length matches the header.
I wish CRIU or something like it was a bit more popular. It'd be nice to have one reusable library for *correct* program startup caching instead of undump, the disk state in XUL-derived runtimes, android's zygote and KDE's equivalent, E17's scary compiled-UI mmap system, etc. All sufficiently complex software apparently eventually expands to the point where it contains a hibernate/resume system (and of course, a half-baked reimplementation of lisp and a mail reader).
Posted Jun 29, 2023 23:23 UTC (Thu)
by knuckolls (subscriber, #141896)
[Link] (1 responses)
Posted Jul 8, 2023 14:05 UTC (Sat)
by smitty_one_each (subscriber, #28989)
[Link]
Spacemacs makes the space bar an entry into mini-buffer menus. A double-tap is all it takes.
While the phone proper is perhaps too small for real work, this has tablet possibilities.
And the bluetooth keyboard note is well-taken, though Spacemacs would also be a win there.
Emacs for Android
Emacs for Android
Emacs for Android
It doesn't even have to be a bluetooth keyboard. You can plug in a simple ten dollar USB keyboard, too.
Emacs for Android
Emacs for Android
Emacs for Android
Emacs for Android
* Android users are... They don't consider the limitations of their platform and try to make huge animations on small phones. Additionally, high-school teachers are apparently telling students to install krita on their tablets/chromebooks to fill their class assignments -- which apparently are humongous big animations.
* Android is really good at crashing applications
* The money the port brings in through in-app donations couldn't even be classified as pin money.
* We now have about as many regular Android users as Windows users.
Emacs for Android
Emacs for Android
Wol
Emacs for Android
Emacs for Android
Wol
Emacs for Android
Emacs for Android
Emacs for Android
Wol
Emacs for Android
Emacs for Android
* We now have about as many regular Android users as Windows users.
Emacs for Android
I have actually installed a linux chroot and an i3 desktop on an old mobile phone. Here is a photo (from 2014), which also shows an emacs window.
Emacs for Android
Emacs for Android
Emacs for Android
Emacs for Android
Emacs for Android
Emacs for Android
Emacs for Android
Emacs for Android
Emacs for Android
Emacs for Android
Emacs for Android
Emacs for Android
Emacs for Android
Yes, I too used Emacs on VMS once upon a time.
Proprietary platforms
So I see this in the first email on the thread
Proprietary platforms
« However, Android is a proprietary platform, so it isn't one
of the systems that we are required to target. »
which is doubly confusing to me: (a) as pointed out by many above, Android is open source, with proprietary add-ons by vendors; (b) is emacs required to target any and all non-proprietary platforms? Or is there some list of "required" platforms that excludes proprietary platforms, but does not include every possible non-proprietary platform?
Proprietary platforms
Emacs for Android
The "Hacker's Keyboard" from F-Droid and the Play Store hasn't been updated in five years, but it offers a five-row keyboard with Ctrl, Alt, Escape, and arrow keys.
Emacs for Android
Emacs for Android
Emacs, portable?
Well, it has been said by people smarter than me that there is no portable software, just software that has been ported. Emacs has undeniably been widely ported.
Emacs, portable?
Emacs, portable?
Emacs, portable?
Emacs, portable?
> This improves compatibility with memory allocation on modern systems,
> and in particular better supports the Address Space Layout
> Randomization (ASLR) feature, a security technique used by most modern
> operating systems.
Emacs, portable?
Emacs, portable?
Emacs for Android
Emacs for Android