gretzuni
Search

A back-to-school/GTD Emacs journey

This post roughly compiles some of the Emacs resources I have been using to improve my academic workflow. They are mostly Org-mode and the post is written for beginners with a DIY-mindset; note there are other better resources, like methodically reading the manual.

Above all, I remain deeply grateful to the free software movement: Richard Stallman for his vision and the programmers and community who are making the promise of general computing a reality.



 Emacs as journey    top

Emacs for allows a wide range of possible learning paths and can be used by individuals – as often or seldom as they want to – to ‘re-presence’ not just thoughts but also digital environment needs, with no obligations (cf. Illich 1973: 2). People can use it on a needs-basis, by studying how others use it, or by reading the documentation. I have been thinking of Emacs as a journey recently – especially in terms of ‘leaving crumbs’ – as I have been following crumbs of those who have been creating with it before me. Because there are just so many use-cases and stories explaining them – which documentation could not hope to cover – I am beginning to wonder at the idea that ‘no use-case is too small’ (no bread crumbs shall go unfollowed – whether by person or AI is the question). This is antithetical to the programming tenet that considers that if enough people aren’t seeking a use-case, it isn’t worth building for.

Part of my thinking about this came from the excellent podcast Hope In Source; specifically, the interview with Shawn Wang, which discussed personalized documents and documentation levels. Shawn describes discovering a programming intersection that documentation did not, because it cannot cover. He also describes copy-pasting code blocks for his own use-cases that turned out to be useful to others. So, to return to ‘Emacs-as-journey’, sometimes we don’t know whether there are others on similar journeys to us until we start documenting and sharing. This further helps us orient ourselves through mapping out which journey, exactly, it is that we are on. It will evolve over time, as Shawn also notes. He says that visible noob status can help others help us where we are in our learning; once we reach some level of mastery, our trajectory can help with employment as people have seen how we work. Such transparency does not work in all professional situations for a variety of reasons, but from a pedagogical viewpoint, it has its place (Vygotsky 1979: 86).

On that note, what follows in the continuation of my beginner’s journey through Emacs. My first post is here. Thank you Emacs community!


 Beamer for slides and PDFs    top

Please note, I have not checked this section to make sure that these instructions are compatible with Emacs 27.1 +.
Earlier, I used org-reveal for my slides and enjoyed the aesthetic. Later, as I wanted to improve the quality of the PDF of the slides, I switched to Beamer. An excellent tutorial on coordinating teaching notes, slides, and handouts was written by Collin McLear. In fact, if I were you, I would stop reading this post and explore his tutorials instead.
I got started with Beamer thanks to the following resources: And comparing the above with A Beamer Example in the Orgmode Manual.
To get Beamer working on my computer (YMMV) I had to download DOT and add it to
org-babel-do-load-languages
.
Help with export can be found in the Beamer Export section of the Orgmode Manual.
Sacha Chua sparked my imagination by illustrating innovative use of Beamer in book publishing


 Mind map tools    top

Mind map tools are essential to teaching today. We live in an environment increasingly shaped by computational thinking and need the mental maps and metaphors to understand the mechanisms of geocratic approaches that short-circuit political analysis of the Anthropocene (cf. Stiegler 2016) .

1. Graphviz
First, I set up graphviz for use in Org-mode using the following:
A Graphviz primer (joy.pm), with org-mode instruction mid-way into the post
Drawing Graphs using Dot and Graphviz (Tony Ballantyne).
I also added the following to my init (note that last two lines, beginning with ‘add-hook’ belong on the same line):
 ;; display of graphviz dot
(defun my/fix-inline-images ()
(when org-inline-image-overlays
(org-redisplay-inline-images)))
(add-hook 'org-babel-after-execute-hook
'my/fix-inline-images)
I learned how to use graphviz by studying the examples on Bernt Hansen’s doc.norang site (archive.org link) and Tony Ballantyne’s graphviz page.

2. PlantUML
These graphs are amazing, and it is so easy to get it going – but note there is an update that may affect performance.
I followed Sacha’s instructions of what to add to my init – after adding it to babel languages to be loaded. However, I did not have plantuml.jar and had to get it. I chose to download because I wasn’t sure that apt-get would give me the latest version. I also had to create the
/usr/share/plantuml
folder and put it there. Some of the PlantUML instructions I found in some blog posts are obsolete: apparently a lot changed when babel supported plantuml. I especially love the use case diagram stick men! I am grateful to all the programmers, maintainers, and developers who have made using it possible.

3. Ditaa and Ascii-art-to-unicode.el
Ditaa is explained on Hansen’s page. Note that I have not tried this since I updated to Emacs 27.1. I didn’t like it because I found it to be inconvenient for complex diagrams.
There’s also ascii-art-to-unicode. It is a nifty hobby program Thien-Thi Nguyen shared that smooths out the lines. I had fun with it.


 Plug-and-play with org-capture    top

I initially wanted to use yasnippet to be able to copy-paste code blocks (like graphviz headers) but found out it can be buggy with org-mode.
So I looked into a temporary hack: using org-capture for this purpose. The post The Power of Org-mode Capture Templates by König von Haunstetten helped me. It explains very clearly how to add this type of org-capture use-case to your init.
CTRL+F
to “The customization code just looks like this”. Note that under
p
many other listings can be included. But I also had to read about template elements and capture elements in the manual to get a better understanding.
This was a temporary fix but now that I know how to use it, it is useful for all kinds of miscellaneous/evolving filing problems. More ideas of how to make use of org-capture in workflows can be got from Sacha.


 Fun with words (Dictionary)    top

Note: Emacs 28.1 and above has this dictionary built in! Once upon a time (via via), I came across this most excellent post: You’re probably using the wrong dictionary. It inspired me to download the Webster’s 1913 dictionary and use it in Emacs. All I had to do was to follow the instructions here (Marcin Borkowski) (nb. I’m linking to archive.org). Note that to follow those instructions, you have to access files with elevated privileges — “with great power comes great responsibility” — and add a few lines to your init.
Since updating to Emacs 27.1, the
sdcv.el
he suggests is buggy as it contains a package
.cl
which has been deprecated. So I am now using manateelazycat ‘s and have included the most minimal configuration to my init as I am currently only using one dictionary:
;;Loading stardict:
(require 'sdcv)
(setq sdcv-dictionary-data-dir "/LOAD_PATH/.stardict")
You can find instructions on adding more at the repo.

 Tables and export    top

The org-mode tables documentation is easy to follow. I needed advanced features (the references at the bottom are explained here, also in the manual) because I wanted Emacs to calculate student grades for me.
My tables contain hundreds of entries, so are both wide and multi-page. This made PDF export a challenge. So I came up with the following. Note: the cells with lines alignment –
|c|
– is because I want vertical lines between columns: include as many cells as you have columns in your table, and note this section can be all cells – not paras – if you do not need to include
{pixel width}
, which helps if you need to shrink the cells to fit the page:
#+LaTeX_HEADER: \usepackage{pdflscape}
#+OPTIONS: toc:nil
#+TITLE: (e.g. Grades X Semester X Year)
#+AUTHOR: (empty if you don't want it)
#+DATE: (empty if you don't want it) 
#+LaTeX: \begin{landscape}
#+ATTR_LaTeX: :environment longtable: align |p{0.5cm}|p{3cm}|p{3cm}|p{2cm}|p{6cm}|c|c|c|c|c|
[INSERT TABLE HERE]
#+LaTeX: \end{landscape}


 Some more stuff    top

1. Pandoc
Use Pandoc to help with LaTeX. Colin McLear has some posts giving examples of clear use-cases.
I think I need to admit that I love reading LaTeX documentation (e.g. this wikibooks manual, this not-so-short intro PDF, and this latex project manual). That said, reading use-cases is also fun and edifying, and I wish I had found Customizing org-mode LaTeX output by N. Walsh earlier.

2. Citations
I also found this really nice org-ref set up/configure post by Nick George, which I wish I had seen when I was starting out. Another great post is Citations in org-mode by Kristoffer Balintona.

3. PDF readers
If you do not read PDFs in Emacs, e.g. using pdf-tools, did you know of the FSF PDF reader resources?

4. Collaborative editing
I have not tried this out but wish more colleagues and institutions would support diversification of software used for collaboration.

5. Some basics – just in case

6. Read more
Former org-father Bastien Guerry’s Org-mode features you may not know. Also, the web-ring-feeds at Planet Emacs Life which includes Sacha’s weekly Emacs news. Also, Tony Aldon’s posts. If you want to iterate a tidy init, you can consider getting the gist of literate programming.

7. What I want
This section really gets to the heart of the tools I am still looking to best implement in my workflow. I am interested in low-bloat organization as a problem. I will be modifying the sites I made for my courses based on this. (The paper I wrote about the site design and the philosophy behind it can be found here.) I was really inspired by the Thought Streams app, particularly in terms of adapting some ideas there to a more simplistic set-up.

I love the workflow control and Choose Your Own Adventure options that Emacs affords. I hope to give back to the community.


 Additional references    top

Illich, I. (1973). Tools of conviviality. New York: Harper & Row.
Stiegler, B. (2016). Automatic Society. Cambridge: Polity Press.
Vygotsky, L. (1979). Mind in society: The development of higher psychological processes. Cambridge and London: Harvard University Press.

Page generated 01U02. Last updated 02Q03.


Posted By:

Related