Emacs as 21stC interdisciplinary tool
Once upon a time, I dealt with losing work on the book I am still writing that was written in Scrivener that was lost, as incompatible, when I switched to a LinuxOS. In researching what other tools were available, I found Emacs and fell in love with it immediately because its “swiss army knife” capabilities match what I expect in a dream tool. This is a general post explaining how Emacs is a great tool to extend learning, why it is that I prefer mostly to explore what Emacs has within it before using apps, and link to a really great online book about Emacs. Note: This post is being filed as In progress.
Emacs as extensible learning top
This section gives a process-based account of how I discovered Emacs potential as a tool to extend learning. I fell in love with Emacs’ built-in range of capabilities, like how Org-mode allowed me to at once keep an outline and unfoldable full text of my book, make tables that would calculate student grades, and even generate mind maps. The possibility to personalize Emacs through the initialization file means that one is almost immediately exposed to seeing Emacs Lisp, or ELisp. Emacs does not hide the code from users/co-creators.I still don’t know how to write ELisp myself, but I can assemble snippets. Additionally, using Emacs reveals to the user the “Emacs philosophy” which promotes the specialization, customization, extension, and reuse of patterns, which I discussed in my EmacsConf 2021 talk.
What I like about Emacs is that it prepares the user for all kind of further learning. Backwards compatibility is one cornerstone. Shriram Krishnamurthi’s Papers We Love talk brought together in my mind recursion and lambda calculus. A very rough draft of this discovery is in this other post. Krishnamurthi is a member of the Programming By Design team who are trying to make programming concepts part of the Liberal Arts education. They use Racket, a Lisp language, to do this. Another resource I enjoyed was Dana Scott’s “then and now” overview of lambda calculus.
Emacs’ built-in potential top
We have seen above that Emacs can handle all kinds of code. It can do so much without added applications through the built-in features of hyperlinks, tags, and bookmarks. Emacs can also handle SQL.I had a long-offline .sql file which I am writing like that because I wasn’t sure if it was MySQL or MariaDB, or something else. I tried to convert it to Sqlite, but the conversion did not work. It could be that the file is corrupt. I reached out for help, and Alex recommended that I either create a separate file containing only CREATE TABLE statements and pare them down until .table would list them, or just look at the INSERT statements and write a new CREATE TABLE so that l I could just run a SQL file containing all the INSERT statements. This help worked like magic to get me out of the mindset that I needed to continue to work with the file in sql-mode: since Emacs can do all kinds of things, and since I am using the data in the file to contribute to a totally new file (my book), I could take a different approach. So I copy-pasted the text into an org file, and cleaned it up a little. I am now tweaking the workflow, experimenting with icicles, grep, and bookmark tags – because the file is enormous, and I don’t want all of it, but a selection of the best parts of it. In exploring how Emacs can help me, I am using the built-in manual, at M-x info RET.
There is also a philosophical reason for even professional programmers to be exploring what in-built Emacs features. I found the following quote in the book I will write about below:
One of the gravest problems I see for the future of Emacs development is that we slowly but steadily lose old-timers who know a lot about the Emacs internals and have lots of experience hacking them, whereas the (welcome) newcomers mostly prefer working on application-level code in Lisp. If this tendency continues, we will soon lose the ability to make deep infrastructure changes, i.e. will be unable to add new features that need non-trivial changes on the C level. — Eli Zaretskii in Re: [PATCH] Add prettify symbols to python-mode (2015)
Some of the resources I consulted include: this really helpful basic intro to sql-mode with screenshots; examples of how to incorporate this functionality with a literate programming workflow: on Emacs as literate database, on using Emacs as database client; a charming account of using this mode in a bakery that you may remember as it went viral; posts on tweaking the init to better accommodate a Sqlmode workflow: Emacs redux also addressing Emacs as database client, John Coder on using Emacs with Postgres; other posts on relevant workflows: SQL in org-mode, Mastering Emacs on multiple major modes and using sql python in one buffer, experience with emacs as sql client. I do have one question, though, does the Emacs Wiki SQL page need updating?
Link to an Emacs book top
That Emacs is a philosophy or a mindset that promotes not just the specialization, customization, extension, and reuse of patterns within it but also extending these patterns beyond it for an inquisitive, dialogic experience of life can be demonstrated by Murilo Pereira’s digital book (I call it a book for its suggestiveness; it currently fits on a single web page), How To Open A File In Emacs. I trust that sentence, in the context of this post, is enough to recommend it!It is amazing to be part of this community.
Special thanks to Sacha Chua, Amin Bandali, Alex Schroeder, Andrea, and Emacs’ developers, maintainers, contributors, and community.
Keywords
- In progress