reddit / emacs

FYI: I installed emacs29 with native compilation on android

[deleted] · 2022-05-02 19:22
I just post here some information I would have like to have a couple of weeks ago. I bought a boox note air 2 eink tablet and I hoped to be able to have the same workflow for emacs as with some laptops of mine. For those that also want this I can post - I installed nix-on-droid https://github.com/t184256/nix-on-droid - I could manage to install the emacs overlay https://github.com/nix-community/emacs-overlay - intsall xserver with xsdl https://play.google.com/store/apps/details?id=x.org.server&gl=US - latex preview and everything works with tectonic (so that you don't have to download gb and gb of data for latex distribution) and it freaking works!! and it works well, the emacs version I tested is GNU Emacs 29.0.50 (build 1. aarch64-unkown-linux-gnu, GTK+ Version 3.24.30, cairo version 1.16.0) If many people are insterested I can write a blog post about it too. It would ahve greatly helped me as I have not seen it anywhere.
spcbfr · 2022-05-02 19:37
This is soo fricking cool, but why would anyone install emacs on a phone tho, none of the keybindings will work which is the reason why people use emacs (if you are installing it just for the fun of it then fair enough)
[deleted] · 2022-05-02 19:50
it is not a phone, it's an eink tablet, and I intend to write big parts of my thesis on under the sun. I just attach a keyboard to the tablet, pick a nice table in a sunny park, and I can tank some sun ;)
7890yuiop · 2022-05-02 20:47
I was going to say "as long as the screen is in the shade", but then I noticed "eink" in the name, so I guess that's not going to be a concern*. That sounds rather interesting. (*) so do use sunscreen.
vifon · 2022-05-02 20:48
Personally I use `M-x calc` as my mobile calculator. It's great! When you run it as `emacs -f full-calc` it even exits when you close the calc window.
ArchAuthor · 2022-05-02 20:48
I know very very little about android, but is this a Terminal instance or full X Window (I might be using that term wrong). If I can get my full config running on my phone, and find a keyboard that lets me input some chords that would be a game changer. I wonder if it would be enough to remove the need for an org app like orgzly. I'm also a doom emacs user so with space as my leader key I might be able to get decently far with this... curious.
adisbladis · 2022-05-02 21:05
Cool! Which tablet are you having? I'm using Emacs quite a lot on an eink monitor too, albeit connected to my HDMI port. It's truly fantastic.
[deleted] · 2022-05-02 21:53
It is a boox note air 2 I bought this week and here is a picture of the thing https://imgur.com/a/5O4Z31T I'm quite happy with it, although I'll replace gladly with the pinenote as soon as it is ready
[deleted] · 2022-05-02 22:02
I also know very little about android and I use it only because I kind of have to. In the beginning I used termux and the xsdl application (see above) that implements some of the X functionality. So what you do is you start the X server and then go to the termux application and export the DISPLAYvariable in your shell, depending on your setup it might be ``` export DISPLAY=:0 # or export DISPLAY=localhost:0 # or export DISPLAY=your.local.ip:0 ``` and then it basically works. You can even start a window manager and Ihave found it to work. However I think that the function `(toggle-full-screen)` in emacs is your friend to simply maximize the emacs client. Up to now this seems to work without problems. The thing I discovered now buying this tablet is that nix-on-droid worked out of the box, and being a nixos user I really rejoyced being able to use the exact same emacs version (through this thing called nix overlay) in my laptop, desktop and now tablet(s). In principle AFAIK the nix-on-droid is basically a fork of termux already packing a nixos distribution in it, but then you have access to more packages as simply in termux, and everything I have tested up to know simply installs well as in x86, so that is really great.
Imaproshaman · 2022-05-02 22:12
Wow, that's really cool for a tablet! Nice job.
phalp · 2022-05-02 22:27
There are plenty of keyboards with modifier keys. Is Emacs better on a phone than a desktop? No. Is it better than everything else you might do on a phone? Pretty much!
chris_thoughtcatch · 2022-05-02 23:20
I use emacs in termux on my phone with 'hacker's keyboard' and all my key bindings work. I can write a decent amount of code with that setup while being free to lay back on the couch. Takes some getting used to.
_o_d_ · 2022-05-03 00:15
That's exactly what I wanted to do! I'm starting with emacs set up on a rpi minicomputer I built but wanted to switch to an eink tablet later. How's the refresh rate?
meta-meta-meta · 2022-05-03 01:17
I'm interested in a blog post. I've also installed Emacs on my Boox Note Air2 recently via Termux and it's great but just the terminal interface. What I really want to do with it is Clojure development either on the tablet itself if such a thing is possible or with X forwarding with a raspberry pi.
meta-meta-meta · 2022-05-03 01:21
It's actually a nice experience when you have a bluetooth keyboard. I made a little phone "laptop" with an ergonomic keyboard and android phone that works really well for things like dream journaling in the middle of the night.
[deleted] · 2022-05-03 08:09
For emacs it's absolutely usable for me and for all my work colleagues I've asked. If you can wait I'd wait for the pinenote, which I suspect will be a similar rate.
[deleted] · 2022-05-03 08:11
I'll see if I can manage this month. I am writing some small project in common lisp in device and sofar is working fine. Termux has only emacs27 though, which is also ok
trenchgun · 2022-05-03 08:12
Seconded about the blog post!
MmmCurry · 2022-05-03 08:31
PSA: Onyx, the maker of Boox ereaders, has a bad history with open source and free software. At present they appear to be violating the GPL by [not releasing their modifications to the linux kernel](http://bbs.onyx-international.com/t/install-linux-or-alternate-os-and-gpl2-kernel-source/698). "However, kernel source code of Android could not be open for now." Kudos to OP for the hacking work, but I recommend avoiding Boox products if you want to support free software.
[deleted] · 2022-05-03 08:35
I know and I agree, I needed an eink for org mode NOW, so that is why I went with this I stead of waiting for the pinenote.
radarsat1 · 2022-05-03 08:36
Very cool, I've wanted a basic emacs on an e-ink tablet for quite a while. I have a reMarkable that I was hoping eventually this might be possible on, even if it's just via some kind of vnc, but haven't really taken the time to get into hacking it. (Actually just using it to read pdfs is fantastic so I haven't felt the need..)
[deleted] · 2022-05-03 08:38
If you manage tell me, I was also wondering about remarkable but apparently I read that it was not able to drive a keyboard attached to it, is this true?
[deleted] · 2022-05-03 08:45
[deleted]
radarsat1 · 2022-05-03 08:46
Not sure to be honest as i have not tried, but the USB port does seem to allow some communication. I think it acts as a device rather than a host, so might not work with a keyboard. Usually I upload pdfs by its cloud-based interface which it supports very naturally by simple file sync. However I did try uploading a pdf over the USB directly and it works, so it is hackable. The software is limited but the manufacturers seem to be quite open to hacking, there are quite a few projects out there, which I haven't gotten around to trying as i don't want to mess too much with it just yet. But what I haven't managed yet and would really like is something that allows me to share it as a screen from my Ubuntu laptop, I think that would be ideal, if I could set up an X11 screen on it, then I could easily just use it with emacs running on my laptop, with a bluetooth keyboard running through the laptop. However, it doesn't support anything like this out of the box. It does support some kind of screen sharing in the opposite direction where you can display what you are drawing on it in real-time on the computer, i think it is meant for using it as a drawing pad during video conferencing. I'd also be perfectly happy with some kind of terminal interface, again just as an output from my computer, which manages the keyboard, would be fine for me. But anyways like i said i am a bit lazy about these things and haven't spent time on hacking it.
lappie75 · 2022-05-03 09:42
With obligatory custom corne, of course, should've expected that 🤣
organic-bookworm · 2022-05-03 13:15
>Termux has only emacs27 There's [Emacs 28.1](https://github.com/termux/termux-packages/commit/974635c74e083fdb7e8cde0382a5e52423c3b6f1) now in the repo. Didn't try it, though.
[deleted] · 2022-05-03 14:20
true, I meant that, sorry, I tested it also, and it worked perfectly fine
bloodqc · 2022-05-03 14:24
Hey, fellow nix-on-droid user. If you are interested, here's my nix config https://github.com/bbigras/nix-config/blob/0cd62099f3b7cd85aeb918b20dd905fd551425b4/hosts/pixel6/default.nix . Basically, I'm building my config with GitHub actions (and qemu for aarch64), I'm sharing nix files for my phone and other computers and I'm pushing it with deploy-rs from my desktop to my phone with ssh (so I don't have to build anything on the phone). I'll try emacs with xserver with xsdl next.
JohnDoe365 · 2022-05-03 15:22
If you just spend a second to let this fully sink: We are using the calculator of a full-blown editor which 15 years ago was perceived as the front-end to an operating system ... on a smart phone. Apparently Moore went a long way.
vifon · 2022-05-03 15:28
More like 30+ years ago. 15 years ago would be 2007. Otherwise fully agreed, it's ridiculous in a fun way.
[deleted] · 2022-05-03 16:47
whoa! that is a very nice configuration, for the moment mine is quite simple, setting the emacs overlay worked also very nicely. I think I'll learn a lot looking at your config. Thank you for sharing!
bloodqc · 2022-05-03 16:57
it's a bit hackish the way I added my pixel6 to my config (both in `nix/deploy.nix` and `nix/host-drvs.nix` while it was only in 1 file recently) because my nix-config is basically stolen from https://github.com/lovesegfault/nix-config . I basically copy it and add my own stuff on top. another thing that you might like is the emacs-init package for home-manager. I'm using it in my config. the module: https://gitlab.com/rycee/nur-expressions/blob/master/hm-modules/emacs-init.nix usage: https://gitlab.com/rycee/configurations/-/commits/master/user/emacs.nix > I'll learn a lot looking at your config. I learned so much by ~~stealing~~ reading other people's nix-config. It's awesome how much stuff we can handle with nix.
kpmgeek · 2022-05-03 19:32
Running terminal emacs on a Onyx device with termux and it's been a dream. Definitely going to try this.