And you're ready to go. All right, perfect.
Hello, my name is Zachary Romero
and today I'll be giving a talk
on how I'm using Emacs for Android
to replace my fitness app I normally use.
So it goes without saying
that a lot of the mobile ecosystem these days
are pretty hostile to the interest of its users.
So there's privacy policies
that are constantly collecting your data and selling it.
without your consent, bombardment of ads.
And then there's a lot of features that are locked.
Sometimes features that the app gives you,
they're put behind paywalls.
And so a lot of the ecosystem
isn't in the best interest of users.
And obviously there are apps like on F-Droid
and the Android ecosystem that do try to address this,
but the solutions overall are lagging
behind maybe desktop computers.
One option that has come in the past few years
is Emacs on Android. It's just a normal Emacs build,
and so it can do everything, in theory, that Emacs can do.
And so I got to thinking how could I, how I could use Emacs
to replace some of the proprietary apps
that I use on a daily basis?
So I just went thinking about the apps,
the apps that Emacs can replace.
Some of them seem quite easy.
Some of them... maybe might take a little effort but seem doable.
And then obviously, there's a whole class of apps
that would be pretty impossible to emulate on Emacs.
So I mean besides like to-do lists, note taking, Org mode,
one thing that came to mind was my fitness tracking app.
This is an app I use pretty often
and in theory, Emacs should be quite usable for this case.
So weightlifting tracking is,
so it's normally used to record
what exercises you do at what intensity
in order to progress week by week.
So you might plan on like slowly increasing
the amount of effort you put into
your various workouts from week to week,
and then maybe you'll have put some rest weeks in there.
And so you want a detailed plan
and recording of what you do throughout the week.
And so I guess way back, normally
this would have been done on pen and paper.
So you would take your notebook
and just write down on paper what you did.
And this obviously works, and a lot of people do do this.
But these days, there are quite a few apps
that make this process quite seamless and effortless.
So just as an example, really fast.
So this is one of the popular apps out these days
that has such a feature.
So you can save all your workout routines
and this nice interface.
And so you click a button and then it starts,
you have the workout interface and then
You can kind of, you go through your workout
and then you can input,
you can input like what things you do.
And then it has this like fancy timer at the bottom.
So like, this is kind of like the,
kind of like what a lot of people use these days,
just for, just for, to make it as frictionless as possible.
So obviously you can do like this bare bone text editing in Emacs.
You just have to open up an Org mode file and just right away...
So, but there are a number of problems with this.
So like, especially on mobile,
character by character editing,
just like writing all these, this text out manually,
maybe some formatting, it can be pretty tedious
and not, maybe not something you want to, you want to have to do,
especially if you're like exhausted or tired.
So, I mean, there's also like the problem
of like remembering which, where in your workout you are,
like how many of these, these, like which,
which, like where are you, where you are,
like, um like which set number are you on,
are you on the first, second,
and then also, like, maybe you failed,
maybe you weren't able to perform this,
and maybe you have to make a note that...
so that's even more text editing you would have to do.
Also some things like unit conversions,
like you could use calc,
but then you'd have to open up the calc,
and then number, unit conversion, switch buffers.
So it's doable, but it takes a little effort.
And then also the rest timer.
So if you want to make sure you're resting
in between these exercises you do,
you'd have to maybe open up another app,
or maybe you'd have to bring your watch.
So that's another thing that
these apps normally would do for you.
So writing some Elisp, I created a package
to try to emulate that experience
I showed you on that other app.
So let me just demo this real fast.
So here, the package is called org-fit.
And so here, I'm going to start a new workout.
And then here, I'm prompted by a list of routines
that I have pre-written in Org mode.
So the header name is the routine name.
And so I can, out of all these routines I've written,
I can select one and then also I can have it populate.
So here it's populating preset weights I had for it.
So yeah, so basically this is my current attempt
to emulate that experience.
So here we can, so here like the arrows and the tabs,
they only go through like the, editable fields I can so
on the notes section you see you see here in the table
this is like the my plan for the day
so I can press space to easily
just fill out the data tab
go the next the next the next set
I can press quote to copy from above
There's also some interesting things with Android,
like you can bind the volume down key.
So here I have the volume down key
just like inputting the data automatically
and going to the next field.
So you see there it's quite seamless input of information.
Notice also when all the sets
of a single exercise are done,
it marks that heading as done.
Also, if you notice at the top, on the left,
you have the session time for the workout.
And then on here, we have the rest timer.
So the rest timer is actually just defined as an org mode property.
So here it's saying that, okay,
you should start the auto rest timer
for three minutes every time you do a set.
So here, let's fill it in, go to the next one.
And now the rest timer is set for three minutes.
And so here I have, I can just rest
I just have the information right here.
Also, you'll notice here we have
some calculations at the bottom.
This is something also that those apps provide,
like in order to make sure you're tracking
on certain levels of intensity.
Let's see, what else do we have?
We can add warmups, automatic warmup set inserting, unit conversions,
and then Something else to know
is that all of these actions I'm doing,
they're all bound to a single key
to make things as effortless as possible.
So yeah, that's the app in a nutshell.
And then, so how is this done?
So the philosophy behind this is to use Org mode as a base.
So all the functionality, the timer for the session,
that's just clock in or clock in.
The various, all the data you fill in,
the exercises, routines, those are just org headings,
like with nested entries.
So yeah, and then all the movement,
like a lot of the editing stuff
is just going off of the Org mode API.
So like here, my upper field, is actually just using the,
so it's using like the org-table-goto-line function.
Adding a note is org-table-put.
So like all of my functions I'm using,
they're just building off of the org mode API.
And I found that this pattern worked work pretty well.
So you get the benefits of Org mode
and then the ease of using it on mobile.
And so I guess in the last few minutes of this talk,
I'll just go over some quick things
about working with Android that might come up.
So the first thing is notifications.
This is actually an interesting feature.
So In the Android build for Emacs,
you have the function android-notifications-notify.
And so here, this is how you can send a notification.
So my rest timer, for example, utilizes this function
to let you know when your rest is over.
And the cool thing about this is that the build for Emacs
lets you, so here in the app settings, under notifications,
so here you can actually pick a notification group,
which is here set, which is, yeah, so it's set right here
and you can just customize it.
So like what sound do you want it to make?
Do you want it to vibrate?
Do you want to show on the screen?
And so this way, like you can easily,
so if you are resting, you will get a notification.
It will vibrate.
it might make a really loud noise if you want it to.
And so this is all customizable.
And the cool thing is that if you have other packages
that utilize these notifications,
all of the notification groups,
they're all customizable separately. So, and there we go.
So that notification you see on the top
is actually from the Emacs app.
So you notice here, we're not even running Emacs
and yet we got that rest timer is over.
So that's one thing. Next, keyboard.
So just when working with Emacs,
I found using the unexpected keyboard, in particular,
to be really helpful with all the keybinding.
So if you just want to try out Emacs
from F-Droid or something,
I would recommend using a keyboard like this
to let you use the meta keys and the control keys.
And then yeah, using this keyboard,
I haven't really noticed any problems
with Emacs key bindings.
And then lastly, just like my setup...
So Syncthing Fork is another app I rely on heavily.
So as I mentioned, all the, this is org-fit files,
they're all org-mode files.
So I use Syncthing Fork to synchronize them
between my laptop and my Android.
And then also like to get this package,
just syncing a list folder might be helpful
if you want to easily edit your init file
on Android on your machine.
So yeah, Syncthing Fork is another helpful thing
that you might wanna look into
if you're exploring Android, the Emacs build of Android.
So yeah, Emacs on Android does actually have the potential
to replace a decent number of common use cases.
And org mode can be a solid foundation
for any of these applications that you're thinking of.
And yeah, I highly recommend giving giving Emacs on Android a shot.
And that concludes this presentation.
Thank you so much, Zachary. That was an awesome talk,
and I appreciate your preparing it for us.
A couple questions on the pad, if anybody wants to jump in
and throw in your questions or comments.
Of course, happy to read them out on screen here.
I think when we were talking backstage before,
you had asked me to kind of read them out,
but feel free to jump in and kind of
take over at any point.
This is the You Show. I'm kind of...
So the first question we had was a comment.
This is very cool.
It would be nice to build up some
org rep max calculation formula into calc.
Is that something that you've thought about?
Um, well, I mean, um, one rep max. Yeah.
I mean, not in honesty,
I'm not sure about
extending calc itself.
Like if there's...
what are the ways of extending calc itself,
but this package org-fit,
I mean, it does have the one rep max.
I had to dig into that...
I can find the code, but yeah, I mean, it does,
I mean, you know, so this is specifically this package,
but yeah, you can use the various one rep max formulas for this.
Extend this clock report. Yes, yeah, exactly.
Graphical reports. These are all something that,
It currently doesn't have, and these nice apps do have.
They have charts of all kinds.
You can see your progress from week to week
on various exercise.
They have charts galore, all these fancy apps.
And in theory, it wouldn't be hard at all to like,
'cause like, you know, there's gnuplot.
There's those, and then they have like
very good packages on any of them.
So, I mean, I assume integration would be pretty seamless.
So yes, that is definitely on the list
of things I want to do.
Have you ever wanted to modify
the functionality of your mobile device
while working out any good
or challenging experiences or tips with that?
Yeah, that's actually funny.
There was a time where, yeah, I mean, like debugging,
there was like some bug I was having with my code.
And so I have, in the middle of a workout,
yeah, start, like, open up the debugger and kind of,
and the cool thing is that, I mean,
the biggest thing, like, the biggest thing by far
is unexpected keyboard.
Like, I can't state how,
I don't know how much Unexpected Keyboard is,
because, like, with Unexpected, with the Unexpected,
with that keyboard, you can literally just, like,
it's, it's not hard at all to, like,
you can do M-x or C-M-x
or you know C-u C-M-x
to debug, like, you can do all the key bindings
with unexpected keyboard. There's no problem
whatsoever with that part.
The only part is muscle memory.
It's because you get the muscle memory
of the emacs key binding
and so you have to kind of like yeah...
I mean that translation is actually kind of
you have to think about it like, like, okay,
what was that key binding again?
And you have to kind of like do it with your fingers.
And it was like doing it on the, on Android is,
I mean, it takes a little longer
and it's just a different, yeah,
different set of different muscle memory.
Gotcha. Sorry, if you've covered this,
does the rest timer end with an audible notification?
That's the cool thing.
So with the Emacs, with the Android notification settings,
you can, I can show that again in more detail.
So bonus settings, apps, pick the app, notifications.
And then here we get that org-fit-rest-over.
And so here you can set, for example,
whether it's a silent notification.
And so this won't, this won't make it make noise. You can do...
or like make it have a noise,
and so you can have it make sure
it's popped on the screen
and then you can just pick whatever ringtone you want,
and you can make it look like yeah.
Then obviously you have the whole volume setting,
so you can, when you're working
you can just set the volume pretty high,
so if you do happen
to set your phone kind of away, you set the volume high,
maybe make a really annoying sound,
a loud sound you won't miss. And then, yeah, you'll be set.
So that works.
That was actually one of the biggest surprises.
I wasn't expecting that to work so nice.
One of the next question relates to the Unexpected Keyboard.
Question is, have you tried other keyboards,
such as Hacker's Keyboard?
Not recently. I haven't, so I couldn't compare them.
Fair enough. Another keyboard question.
Have you tried Flickboard on F-Droid?
The commenter says, this is the craziest keyboard.
You use one thumb. Oh, that is interesting. Let me see.
Flickboard. Flickboard. Yeah, I'll have to try that.
I'm curious to get the key bindings done.
I wonder if the key bindings and all that work.
I hope that's interesting. I'll definitely look into that.
So I'll hold on just a moment
as people are typing in more questions.
A good moment to just thank you for the talk.
It's personally, it's one of my favorite things
to see at EmacsConf is, you know, a glimpse into a world
that kind of isn't mine, right?
but it shows how, you know, Emacs is sort of
the bazaar in the cathedral and bazaar sense of
we're all just here
sort of hauling our bags of toys
into the center square and, you know, making a,
you know, I don't know if it's a house of cards
or what exactly it is,
but it, you know, it's managing to keep me afloat personally.
And I just appreciate your, you know,
kind of expanding my world.
It's pretty cool. Yeah, definitely. Yeah, I mean, I agree.
There's a lot of different, yeah. So, next commenter.
I'm curious, oh, sorry, I skipped one here.
This user interface is simplified,
but still keyboard based.
Have you thought about ways to make it more touch-based?
Good question. Yeah, yeah, yeah.
So the only thing currently, I think,
of specific touch-based functionality I have,
which, so this is like, so let's see,
it's C-x C-+,
That key binding wrong, what was it? Okay, whatever.
Yeah, so in terms of touch commands,
so pressing on a headline will actually unfold it
and move your cursor to the next field that you,
yeah, so like, yeah, at the beginning of the table.
So like, there's that, yeah, and so.
It sounds like that is something you're thinking about.
Yeah, exactly.
Like, you know, maybe like a little thing at the bottom,
like, so this thing has the, this app has this,
if you notice, like, if you do something,
it has this rest timer at the bottom.
So I mean, it wouldn't be,
it wouldn't be pretty, it wouldn't be,
it seems quite doable to just have like,
maybe something at the bottom,
like for a timer,
and then you can just like plus 15 seconds or cancel it
or, you know, just,
and then those could all be just like touch based.
And so, yeah. And then obviously just like,
just like classic Emacs, the Emacs,
like clicking actions, they just, yeah,
they work just fine.
Like, so there's no like weird Android touch thing
you have to worry about.
So let me ask a question of my own here.
Just thinking about that myself, how would you, you know,
ideally approach that as that you'd most prefer
to sort of dive into yourself?
Or would you think about factoring that out into
like some kind of org touch higher level API or?
Oh, I mean, personally, personally, I mean, I mean,
I think just like the clicking
and just like adding a lambda to it. That works.
I mean, that feels like it works just fine.
And you can add the code, like the command right there.
So it's all like, yeah, it's all, I mean,
and that's kind of a nice thing is like having everything like close,
just like not having those, a lot of layers of abstraction.
It's just like, you have a lambda to the click and then just do...
Yeah, just do.
[Corwin]: That was my experience too.
This is a few years ago now, but when I was starting on
the Dungeon Mode project
that a friend and I presented several years ago
at Emacs Conference,
we were shocked to learn just how usable,
this is echoing a comment I see from ElephantErgo on IRC,
who says, touch seems so wildly usable nowadays,
that's so awesome.
And that was really my experience too with Dungeon.
We were just working on it, we got the fog of war going,
and then just took it onto a touchscreen laptop at the time,
and we're just shocked to learn,
you know, everything just worked. Yeah.
[Zachary]: Maybe like the hardest thing
is actually just the default font size.
You know, you have to like, you can't,
you can't have your font too small or you'll,
you'll like, you'll touch, you'll,
you'll miss touch things a lot. Yeah.
[Corwin]: Well, there's no font size
large enough to make me, you know,
to make me comfortable on a smart device, unfortunately.
But, but that, I think it may be a me problem.
I think this question we might've missed. So the file sync.
Yeah, so the file sync in terms of what's worked for me,
I did have to play around with this a lot.
Let me go ahead and read it out.
You mentioned file sync, what have you found works well for you?
Sorry. Yeah, yeah, yeah.
So in terms of what, yeah, I did have to play around with this a lot,
but Syncthing Fork is what I eventually settled on.
I mean, this is another thing that, I mean, I don't,
it wouldn't nearly be as usable,
like Emacs wouldn't be nearly usable without it.
So Syncthing Fork essentially, okay.
And then I also have like a droplet on DigitalOcean,
just like, so that's kind of like the whole,
that's kind of like what bridges it together.
So like, so my Emacs can sync to that,
and then my machine also syncs to that.
And so I don't have to have them
both on the same time. It's just there, that copy.
And so that works pretty well.
I also found that editing code in general,
I think this also goes
with the development experience question.
So I'm curious about the development experience.
Do you do everything on the phone? And that's the thing.
None of my development in general is done on the phone.
just because, for one, my muscle memory isn't there,
and two, just in general, typing on a virtual keyboard on the phone,
it's just really slow.
So yeah, all the development is done on my machine,
but then there's the problem of you have to have an init.l in your Android,
and so you're going to have to write, you know,
I found like you'd have to like,
when you first get Emacs set up,
you might have to like write some, I don't know,
like you'll kind of have to like get into your init file
and then just like,
maybe just like start to put things together.
But the cool thing is with Syncthing Fork,
I'm syncing my, I'm setting it to load off of a sync directory.
Like this, this init file,
my Android file is synced with my machine.
So if I wanted to, I could just edit it on my machine
and just have that synced automatically.
So that makes like the whole, like in it,
cause like it's, it's such a, like, that is one of the,
it's just like get in,
sit writing your init.el in Emacs on Android
is just kind of a...
[Corwin]: We do have one more question.
I can't help but throw in a comment there.
I think that's like.
That's an extremely good tip, right?
That if we're, as we're exploring Android,
we want to think about that as
adding support for another port of Emacs.
So the whole dance of, oh, I took, you know,
I took, you know, I took my init
and I wanted to use it on BSD
after mostly using GNU Linux.
Now we're going in and we're looking at our Emacs.
all of our Emacs and it stuff
and thinking about compatibility,
turning features on and off
based on the OS that we're running underneath and so on.
I think that's pretty heads up advice.
Let me read out this other question.
Have you thought about integrating cardio tracking
like time runs, bike rides, and so on?
[Zachary]: Yes, I definitely thought about that.
And that might be another thing
where a touch interface might be helpful.
I don't know if I can easily pull it up,
but the app itself, oh yeah, here it is.
So you can see kind of how they have,
and you can kind of see how this fits.
This is like an org, you can see
that these are just tables, right?
This is just like this whole interface in general,
just like kind of screams like an org mode,
file with you have you have your different headings
like here's a warm-up heading
and then you have the tables
and you know you could just like envision
how you could have a org table
with one of the columns called time
and then you could just imagine like there'd be a button there
and you can just have it click,
and then you'd have a timer in the background
that would update this timer.
It's so, I mean, conceptually, there's nothing really,
it conceptually maps really well to this.
So yeah, I mean, that's definitely something.
[Corwin]: That's awesome. Great answer.
So I think we're just at about 90 seconds left.
Perfect amount of time, I think, to just wrap up.
Closing thoughts. I'll share mine first.
Really appreciate you, Zach.
Thank you for putting this talk together.
I think this is the type of talk
that's really going to tie the room together
for people that may be, you know, not sure how they can take
although they've been interested in that,
this can be a really good way to kind of open up the world.
Thank you. Thank you for putting it together.
[Zachary]: Yeah, I would just say
like definitely just try things out.
Like if you think, you know,
they're just like random ideas,
like a book tracking app or like a recipe app,
like, you know, there's a lot of things
that you do on your mobile device
that aren't like banking apps that you could easily,
that seem like they could be done in Emacs.
So yeah, just try different things out
and I would love to hear what other people do. Bravo.
[Corwin]: I appreciate it once again, you're coming together
and especially you're doing it live.
I know that as a conference, we have a lot of preference
for those recorded talks
and getting the captioning together,
but I just have a special place in my heart
for the energy that comes with a live talk
and I appreciate you doing it. Thanks for putting this on.