Hi, I'm Peter Prevos, and I'll be talking about Emacs
Writing Studio. I'm a water engineer, a social scientist,
and I dabble in theatrical magic. For each of those
endeavors, I do a lot of writing. I take notes, I write
reports, articles, books, and websites. I use Emacs for all
my research, my writing, and my publishing. Emacs Writing
Studio is an opinionated starter kit for authors who write
for humans, not for programmers who write for computers.
It consists of a configuration, some bespoke
functions, but are not yet a package, a website, and a book.
The book is completely written with EWS itself. The target
audience are authors who are frustrated with using
commercial software and hopping from application to
application to achieve an objective. These are people
without any Emacs experience or coding skills.
The objective is to teach these people how to use Emacs,
not how to configure Emacs to manage a complete writing project.
So why did I write a book about Emacs when the documentation is
already so extensive? Most Emacs documentation focuses on
configuration, burying potential new users with choices.
It forces people to work on Emacs instead of with Emacs,
and it quickly can become a productivity sink. Emacs is the
ultimate free software platform, but with this freedom
also comes a price. Barry Schwartz wrote about the
paradox of choice, which is about the dramatic explosion in
choices in the modern world. Just think about the amount of
effort it can take to decide what cereal to buy in a
supermarket that you haven't been before. So many
different choices. Paradoxically, that's become a
problem instead of a solution. Emacs can perhaps suffer
from the same issue. Another objective, using a COVID-19
trope: EWS is about flattening the curve--that is, the
learning curve--by making these choices
for the new Emacs user and avoiding the paradox.
What about this EWS configuration?
I decided to stay as close as humanly
bearable to vanilla Emacs. I say that tongue-in-cheek,
but also with some realism, centered around Org mode
and Denote for note tagging, and citar for accessing
bibliographies, and other convenience packages such as
vertico for minibuffer completion. There's a
dictionary, a thesaurus, and some other packages that are of
interest to authors. EWS uses the standard keyboard
shortcuts. Writing is much more about thinking than about
maximizing the amount of words per minute. Just think
about that the most used function for authors is
self-insert. There's no need to use fancy keyboard
shortcut systems when you write prose.
How did I go about developing Emacs? I declared Emacs bankruptcy,
like we all have every now and then.
I decided to write this book with
vanilla Emacs and only configure the system as was
required. The first thing I did, I hooked visual-line-mode
to text-mode and off I went. The configuration grew as the
need arose. I was actually surprised with how far you can
get with just using Vanilla Emacs. I also developed two
packages to enhance how I can use Denote.
Well, let's get to a demo.
EWS is based on a typical research and writing workflow.
First step is you need to get some inspiration.
Usually we do that by reading, by watching, by
listening. Then the next step is ideation. You develop your
ideas, summarize ideas from other people, write down your
own ideas. For that, you need a note-taking system. EWS
also talks about managing bibliographies. The third step
is production. This is the actual writing process where, in
this case, the EWS book. Once that is finished, we
convert this Org mode file into something that can be
published. That might be an e-book in an EPUB format, or a
PDF for the interior of a a paperback book or perhaps as an
e-book as well. There's also configuration in Emacs to
produce MS Word documents if you need to collaborate with
other people. Let's jump in to Emacs and walk through this
workflow, give you a very quick demonstration of what's in
the box.
So the first step in the EWS workflow is inspiration. We all
stand on the shoulders of each other. Some giants; most of
them are normal people. We get inspiration by reading,
listening, and watching, and Emacs can help you access
text, sound, and video. It depends on external software.
Emacs acts as a beautiful interface, and EWS helps you
with the configuration. But we also need a tool to manage our
electronic library, and BibTeX
and citar package by Bruce D'Arcus
provides a perfect interface to manage this
literature. If I open my bibliography here, you see that
I've got 1864 references in my BibTeX files. There's a
whole bunch of stuff about, I guess, the weird things that I
read. Let's look for Emacs, right, because that's a joint
interest that we have. Let's open here this paper by
Marcus Birkenkrahe, who did some research using Emacs to teach
data science. Data science is my day job, so that had my
interest. We have here a Denote file, which I'll talk
about in a second. There's a library file, which is a PDF, but
it could be a whole collection of different files in
different formats, even video or sound. We can create a new
Denote file, or there's a link to the document object
identifier. Let's go to the PDF. Here we can now do our
reading. We can get our inspiration by what Marcus has
written here about teaching data science with literary
programming tools.
Next step is ideation. Taking notes is
the core of all creativity. When I read that paper, I might
want to copy some ideas, I might get some of my own ideas, and I
need to write that down. I basically write everything in a
paper notebook, but then I transfer the things that are
worth keeping to the Denote note-taking system. Now, there
are many systems that exist out there that promise you
note-taking heaven when you just follow a certain process.
My advice: don't worry about Zettelkasten, PARA, or
whatever is out there. Just write your notes and worry about
structure and all that later. Even Niklas Luhmann, the
inventor of Zettelkasten, called his system a septic tank
of ideas. I call my collection of notes a primordial soup
from which my books emerge. Now, Denote by Prot Stavrou is a
flexible note-taking system that can implement any of the
popular methods. I transferred thousands of files to
this format, so all my information is at my fingertips. We
can jump to the Denote directory. In my case, that's
~/documents/notes. We see here the marvel that is Denote,
which is its ingenious file naming convention that has a
timestamp, a title, and some (what do we call them) tags or
categories, whatever you please. This is a very quick way
to find things. Then there is an ews-dired-narrow function.
For example, I can find anything,
_ews means anything that has the EWS tag, and
there we go, it's narrowed down in my EWS notes.
Now, this is all very well, but I also decided to
write a package called denote-explore,
which helps us sort of explore these collections of notes.
One of the fancy things we can do is
do some visualization.
Let's go to the network function and create a community of
notes. A community is a collection of notes that match a
regular expression, _ews. All the notes here
that are on this list, the ones with the EWS tag. In a second,
my browser pops up. I shall move that to my other window in a
second. There we go. denote-explore creates a SVG file and
it creates an arrow between all the nodes that are linked.
It puts a title up there when the node has more than two links
going in or out. We can also click on the note to read it in
the browser, if you choose. If you set up Firefox properly,
I'm sure it can also go into Emacs. This is the note tagging
that's available within EWS.
Now, we've taken all these notes. Now we need to
start writing stuff. Org mode, for me,
is the ideal tool. Org mode is what you see is what you
mean. The text and the syntax instruct the computer on how to
produce the final result. This means that one file can
become many different formats, an e-book, a printed book,
or a website. It doesn't matter. Now, a lot of people talk
about what you see, what you get, and that we should have a
what you see, what you get mode in Emacs. I think that's
irrelevant, because showing the final result while you're
writing is actually a distraction. Traditional writing,
producing the content, and designing the layout and
typesetting are separate processes done by different
professionals. In Emacs Writing Studio, the writing is
still done by a human. There are no provisions for large
language models in EWS. But layout and typesetting is done
by external software, be it CSS, LaTeX, or XML, all mediated
by Org mode.
EWS also has some other tools for case conversion,
thesaurus, a dictionary that I haven't got time to show,
but what I will show you is how the book functions,
and then how we create these publications.
Okay. Let's go to my project file.
So these are the EWS chapters,
and each chapter is an Org mode file.
Let's go into the main document, which is set up with
olivetti-mode just to make it easier to read. What we see
here is all the fluff from Org mode. These are all the
various bits of metadata that I used to create the final
result. Then for each chapter, I have an inclusion.
This references another file. I've got some properties.
In this case, the forward is unnumbered. There's some notes.
In this case, Prot actually wrote this for me. Then we
can jump into that text. Then what we see at the bottom
here is some inclusions for HTML. This is the EPUB version,
but it's different in LaTeX. Again, the same file can
serve different purposes.
So now let's, as the final part of this demonstration,
actually create the book, because the book's freely
available. You can download the source files from GitHub,
and you can roll your own. Let's open the dispatcher.
We'll export the LaTeX and we want to open the file.
Now this takes a minute because there's a lot happening within
all this code, so I'll shorten this video. I'll be silent now.
There we are. This is the Emacs Writing Studio PDF version,
which will eventually become the interior for the
paperback version.
So the EWS book is available in all major e-book shops.
I'm also working on a paperback, which I hope to finish when
Emacs 30 comes out. But the Org Mode files that I use to
produce the book, they're available in the GitHub
repository, so you can also roll your own, because the EWS
configuration is the one that I use to produce the book.
Now, some conclusions from this journey is that the best way to
learn is to teach. That was my personal objective. I
learned a lot from systematically working out how to
implement the EWS workflow. One of the surprising things
that I learned is to have reliance on external software
throughout the writing process. I spent a lot of time in
the book about explaining these connections that Emacs is
not just a text processor, it is also an interface with other
software. Now, future developments, as I mentioned,
there'll be a paperback version of the book when Emacs 30
comes out, and I might reconfigure things a little bit. I'm
only planning to update the configuration when packages
break or with another major Emacs release, because I want to
work with Emacs, not work on Emacs. A big thank you to
Prot Stavrou, who helped me with Denote packages, and he
also wrote the forward to the book. There's also several
test readers that I met through Mastodon that helped me out
quite a bit. Of course, all the Emacs and package
developers without which none of this would exist. Thank
you all for your attention, and I look forward to your
questions and suggestions.