Well, thank you everyone. My name is Amy Grin, and I'd like to talk today about ordmode witchcraft
at Spritley. So Spritley Institute, I just want to talk a little bit about them first.
I'm obviously a part of the Spritley Institute. I am the technical administrator. Spritley
is working on the next generation of decentralized technology. That includes like peer-to-peer communication
that is done securely using object capability security, which is not a new concept, but we
feel that's probably that it's an underutilized concept. So that is something that we're
passionate about, and we believe that it is going to enable secured collaboration
between between a lot of different people. So actually Spritley is actually running a donor
campaign right now. If you have any time, please visit Spritley.institute-donate, and you
can see exactly what we're offering and how to support us. And this is really important.
So please, if you have time, please visit that. And also, we're giving more talks than
just this one. So this QR code will take you to a blog post, what that I've written, that
shows you all of the different talks that Spritley is going to be doing. There are five
more talks besides this one, and they're all worth your time. So please join them. I will
be there, and they will be a lot of fun. They will be more time for this. Leave it up for a few
seconds. Okay. So what you're looking at right here is a boxy diagram. Is this something
that I wrote a couple of years ago? It's a way to view hierarchical data. And in this instance,
we're looking at a different view of an org mode file. An org mode file is a hierarchical
data structure. And all of these boxes represent different headings in the org mode file.
So let me just talk a little bit about myself and all the other packages that I've written.
So as I've mentioned, I am an EMAX package author, EMAX contributor, org mode contributor.
If you want, you can see all of my packages at packages.amigrant.com.
Here's what it looks like. And these are all the packages that I've written. You can see
that the boxy ones. There's a lot of boxy packages. And you can install all of these through
the normal EMAX process of use package or package list packages and these things. So if you
just install my package archive, you can have these things. But some of these are available on
Elpa. So you don't even need to do anything. You just package install boxy headings and you'll have
this interface. So yeah, so that is a big part of my life. I really love EMAX. As you can tell,
I've made a hat. Yeah, I've made the EMAX hat. And it's a little too small in the end. But it
is really knitting is another thing that I'm very passionate about. So I like to combine my
passions. And I think you can tell further on this talk that combined my passion for EMAX
with Spritly. Another one of my passions is raising my beautiful dog. This is my dog Leo.
He is very, very cute and very, very cuddly. And just love him to death. So I wanted to show him
off to everyone because you all deserve Leo in your life. And as I mentioned and shown, I do
like knitting quite a lot. I'm working on a couple different projects right now. And if anybody
wants to talk to me about that, that is something that I would love to discuss as well. Yeah,
anything, yeah. Okay. But today, I'm going to be talking more about my work. So as I said,
it doesn't on the technical administrator. That includes a lot of different roles. Fun raising.
I help write grants. I help do the donor campaign. I help take care of the public documents,
like the the white papers and the documentation. And that's the point of this room. So I'm
going to try to focus on that a lot. I'm also a web developer. So I'm helping develop the website.
If you've seen our website, I made the the bar, the fundraising bar that fills up over time.
And also, I help with administrative tests as technical administrator implies,
just organizing and calendars and all these things. And the technical part of my job title
is, you know, part of the website development and these things. But also, I do like working with
our other technologies like hoot. And everybody's heard of who is our scheme to web assembly
compiler. It is really fun to work with. And I'm writing a game. I'm helping write a game with hoot
in order to show us some of the features and also test it. Push it to its limits. So that is the
basic functions that I do throughout the day. But on top of all this is Emx in order to get it
on top. So I stay in Emx basically all day. Except for video chats, you can't really do video chats
in Emx, but there's a yet, exactly. Everything's possible in Emx. So there's four main topics that I
wanted to discuss today about Emx in order mode. There's using E-list in a make file and a
new make file. There is the language picker with order mode so that your documents can have multiple
languages and the users can switch between them. And there is a way to share links with
org mode on your phone. So this is something that I've developed that is really useful when I'm on
the go. I can just save a link to my org mode files and retrieve them later. And finally, I am
working, this is a work in progress, but I am working on plain text accounting for organization.
And I'm going to try to demo some of the bean count integrations that I've done on the plain text
accounting side of things. So I'll jump into the E-list make file. So make files, I don't know if
everybody knows this, but you can change the shell. So if you just say shell equals Emx, it's not
going to do exactly what you want. It's going to open Emx every single time that you have a target.
But if you add these shell flags, dash Q means to not, it's quiet load, it means to not load any
user settings so you can get builds. Well, pretty reproducible, it's not perfect, but if you do batch
eval, then you can use E-list in a make file instead of a shell command. So let me show you how this
works in practice. So this is just my environment. And these are the papers that we move right
the white papers that are part of our organization's core, core, you know, identity. And that doesn't
do much right there, but if I clean, you can see that it's running an E-list script. It's running
delete directory instead of RM, RM dash RF. And I can make. So this, what this is doing is taking
our org files, which is where we've written our documentation and our white papers, and it's converting
them to OTT, HTML, and PDF. And it's also doing something else that is really unique to org mode,
and that is called literate programming. And so it's taking all these code blocks, all these
examples that are inside org mode, and stitching them together into one program. So let me show you
what that looks like. Here's the actual build folder, and you can see that each file has four
different formats, HTML, OTT, PDF, and what's the other one, org. And if you look at the
org file, you can see, oops. Let's look at the source.
Okay, along more. So you can see that this is going to tangle to taste of goblin's.sem. So this is just
the imports of the taste of goblin's.sem. There's more to it, and we didn't want to just go
sweat and give you all the code at once. So when you're reading the documentation, you can split
up the code blocks, and then when you're building, when you're making the script, you can
let's go to taste of goblin's.sem. It builds them, and it puts them all together. So you just saw the
first bit at the top, but there's plenty of other source blocks that all get stitched together
into one working program. So let me show you the make file here. As you can see, we've got the
shell equals e-max, we've got the shell flags. Additionally, here we're loading a set of e-max.pl script.
That is just a global setting up some variables and things. Well, it's important to note here is
this is not ideal for most situations, but we were already using e-list as part of our build process.
The only difference was that we were using bash, or s-h to run e-max, and then e-max runs these scripts.
So it was one additional step, and also these files were kind of spread out over the project.
So if you were looking at a single target, you wouldn't exactly know what was going on,
unless you could look up that file. So it was a little bit cumbersome, and so I decided to
write the whole make file in e-max. So you can see the clean that we already looked at the delete
directory. Here's a more interesting one. So this target has multiple lines to it,
which is tricky in make files because each line in a target is a separate shell.
So you have to add this one shell line right here, the pseudo target, and that will make the entire
target into a single shell, a single script, and a single S expression.
One other cool thing about this technique is that you can switch the major mode of the
of the make files. So right now we're in make file mode. So you can see that the syntax highlighting
is for make files. But if I change to list interaction mode, now the make file text is white.
It doesn't really mean anything anymore, and the e-list is highlighted. And I have, you know,
these things, and at the bottom it tells me where it just gives me all the developer tools that
we use to the completion and the type and everything of these functions.
And we can switch back to make file mode. So that is basically the gist of how to write e-max in a make file.
Okay. So now that you know how to build our docs, how do we integrate the language picker?
And the first thing I want to show you is the language picker in action. So right now we've got
two surface syntaxes to to to to to tutorialize our our our technology.
Yeah, absolutely.
Is that good? Yeah. Okay. So you can see in the top right corner of all these code blocks,
these are the same things that we were looking at before in the work mode file that they've been
exported to HTML. And we can switch between these two surface syntaxes. It looks very similar.
Whisp is maybe feels a little more familiar to people that are are used to Python scripts.
There's not as many parentheses and it's it's a little bit more white space oriented.
I definitely prefer scheme. And when I first started at the organization, all the documents were
in and whisp. And I found that a little bit hard to follow along with. So I was already converting
these to scheme before I came up with the language picker. And I decided that other people would
probably want this ability to. So let me now that you've seen it in action, let me show you how it works.
So at the very top level, we've got this the body tag which covers the entire web page.
It's got this data-lang attribute of scheme right now. And if I change it to whisp,
the data-lang changes to whisp. So this is this is pretty simple. This is a JavaScript thing.
And the reason that it has to be JavaScript is that we want all of these code blocks to be
in sync. We want, we don't want one to be whisp in the next one to be scheme. We want either
all of the code blocks to be whisp or all of them to be scheme. So that JavaScript changes it for
the entire web page, not just a single thing. So here's the setup file for this.
Can everybody see it? Okay. So right here, we've got a selector. So let me back up a little bit.
This is an org file, but it begins with began export HTML, which means that when this file is
exported HTML, this HTML code will be directly inserted into the final document.
So this is actually a style tag within an HTML within an org. It's getting pretty meta.
Here is the rules. So we're looking at the data-lang attribute of the body tag.
Okay. Let me start over here. The whole block. This whole rule is to disable things,
to not show them, to not display them, and to not interact with them. It's important to
not display them, and not interact with them, because some screen readers will still be able to
interact with non-displayed elements. It's not as common anymore, but it's still a good practice.
So we got to think about this a little bit backwards. When data-lang equals scheme,
you want to hide the source whisp. So it's a little bit unintuitive, but this makes sense when
you think about it a little bit more. And when the data-lang equals whisp, you want to hide the
scheme blocks. There's one more. These last two lines are for when JavaScript is disabled.
Not everyone has JavaScript, especially at tour users. A lot of them don't have JavaScript
enabled. And the trick that I used here is that the data-lang attribute does not have a default
value. It's only set the a JavaScript. So if the data-lang attribute does not exist,
then we have to choose a default language, we chose scheme. So we're hiding the whisp blocks.
But we're also hiding the length select buttons themselves. So let me show you what this looks like.
I can turn off JavaScript, and now you can see the buttons are gone.
All right. So I've got about 12 minutes left, and I've got about two more things that I want to get through.
Yeah, we'll start with share with org. I think this is really cool. I think that if you're using
org mode, it is actually easier than you think to install it on your Android phone.
You can use termux to do this. Emax, the development team at Emax is actively working on
Android application. Termux is a little bit easier in my opinion right now, but that is very promising.
So this is great now. It uses termux as a terminal emulator within Android.
And let me show you exactly how this works. So you can see that I'm browsing my projects.
I can see all my e-lifts packages here, and I'm just browsing the internet, and I find a project that I
like. Chive. It's an alternative archive style for org mode. So I'm going to share it.
And you can share it. If you've ever shared a link with friends or anything, you just click share,
and then you click the right app. In this case, you're clicking org mode as the app that you're sharing with.
You can add notes to it, like I just did there, and then you can capture it.
And you can see that my intray has now the link and the date and time and the notes.
And let me just play that one more time. So it's not just links, right? You can share text.
If you just highlight text, there's actually a share button. So it's really, really flexible.
And you can have different capture templates. So the template that I use has the timestamp
automatically attached. There's other metadata that you could attach to. And the possibilities are just
when it was here. So let me show you the setup script for that, too. So this is all you have to do.
You just have to install termux, install e-max. There's pretty simple instructions. If you have
any questions about this, if you have any trouble with this, please reach out to me and let me know.
And also another thing about my blog is that it has my better verse profile.
If you want to follow me, I would love that. And yeah. So that is the share with org
part of my tooling that I use. And lastly, I'm going to talk about bean count, which is a
plain text accounting tool. It's kind of a successor to ledger if you've ever heard of that.
So I don't want to show you our internal ledger. So this is a very, very simple
American-themed ledger. And I was showing you a boxy implementation before that
that read an org file and it created a boxy diagram out of the headings. Here we can use
boxy bean count to look at the different accounts, a tree structure of the accounts. So we
can see that within expenses is travel and food. And we can see within liabilities is reimbursed
me. And if you press the O button while you're over one of these boxes, it will take you to the
first instance. You press O again and it will keep cycling through these instances.
If you want to see all of the instances of a particular account, you can use all to enter.
And it will split your buffer and it will use a different cursor position in each buffer
so that you can easily see all of the times that me has been used.
So one other thing that I really like doing is writing transient interfaces. And if anybody
who here is used magic before? Lots of magic users. Great. So magic uses a transient interface.
Magic actually the developer of magic developed the transient interface and now is a part of E-max.
So I made a transient interface for bean count. I made it trans bean.
And this is what it looks like. You can edit the transaction, it pulls in all the data from the
parses of the transaction and you can edit it using similar tools that would be similar to
magic users or be prepared familiar to magic users. So I can change the date and it will pull
up a calendar like that and I can change it to 1111. I can change the flag on this.
So if I change the flag to an exclamation point, it changes the color there.
The other cool thing about the flag though is that it has to follow strict rules for bean count
in order to be parsed correctly. So if I type in like an invalid flag, it's going to tell me
the rejects that I have to follow and it's going to give me another chance.
Bean count transactions are made up of postings. So of course you can edit the postings.
I'm going to go ahead and edit the liabilities and I can change the account to Christine.
So this is not quite finished yet. As you can tell there's more things to the posting than just
the account name. And also I'd like to integrate these two things. The boxy diagram and the
edit account page so that you can select a new account using the tree structure.
Yeah, that's about all that I had planned. I'd like to open it up to questions now.
I really appreciate everyone coming out. This is a very full room.
And yeah, I just I love e-mix.
There's a lot of different ways to do that. There's tramper for instance.
Oh, yeah, so how do you do that?
Thank you. So how do you get the data from your phone to your laptop or your desktop?
Once you've shared with org mode, once you've shared with termux, there's a lot of different ways
to do this. If you're phone and your laptop are connected via SSH, you can you can use a
tramp file location as the capture location. So inside your capture template, you get to choose
which file you use. And if you choose a SSH file, then you can save it remotely.
There's another way, this is the way I use it. I use Sync thing. Sync thing is a really, really,
really cool product. And I use that to sync my all my org files across all my devices.
So there's a lot of different ways to handle that. I didn't specify any in the instructions,
but there's plenty of ways to do that.
I'm sorry, I don't quite, I don't understand.
You know, let's talk afterwards. Yeah, yeah, I'm sorry. I'm not quite following right now,
but yeah, sounds like a good question. Christine?
Is there any particular reason that you might want to do the literate programming thing
in a thing like part of spray liege, doctor note, like, would it be possibly useful for anything
to be able to refine the color or anything like that? Yeah, that's right. Yeah, absolutely. So the
question was, why do we use literate programming? And obviously a big reason for that is that we
can split up the source file. And another reason is that we can, we can test automatically,
test the file once we've tangled it out of the, of the org file, and we can run unit test
on to make sure that it is correct.
Yeah, so org mode has a variety of tools for this. You can, you can embed images and videos
within an org file. They're not actually the files don't exist within the org file, the org
files plain text. But if you have them in the same folder or if you serve them over the web
in the same directory, then you can include them in whichever export format. As you can see,
I did include some images. I did include some images inside the org mode itself. There are
inline images, but it's really easy to customize that and to have it in multiple formats.
All right, thank you so much, everyone.