My emacs window this morning

This is my emacs window this morning. On the right is my “diary.” It includes all my TODOs, essay ideas, notes, news, anything that comes to my attention during the day. This one is quite old (started on the twelfth). I’m going to retire it by moving the top (aktuel) part to a new file and leaving completed tasks and unneeded notes in this file. If I need something from it later, I can grep it out. I label stuff in capital letters, like ESSAY, so I can find an essay even if I forget the title or keywords.

A calendar agenda is created from all dated entries. Entries may be tagged in order to create category-specific agendas.

The lines ending in ellipses are the headers of a collapsed hierarchy. Hit tab to expand. Headers, and their contents, may be moved up with ALT .

Emacs is designed to use mouse-free. There are shortcuts to navigate by character, word, sentence, and paragraph.

On the right window frame are internet links that I use most often. When I click on an underlined word, the corresponding page opens in firefox. If you have a URL in your copy buffer, you create such a link with CTRL-cly.

When I am working on a long text, I use the left window to index its sections so I can jump around the text quickly. Emacs windows can be split horizontally also, and each subwindow may also be recursively split, up to the limit of practicality.

Spreadsheets

It is possible to add spreadsheets directly inside text documents! The beauty is that your calculations stay with your notes, and the formulae used are obvious. Text shall never be deprecated.

| Student  | Maths | Physics | Mean |
|----------+-------+---------+------|
| Bertrand |    13 |      09 |      |
| Henri    |    15 |      14 |      |
| Arnold   |    17 |      13 |      |
|----------+-------+---------+------|

In the example above, taken from the org-mode manual, student scores are entered in columns 2 and 3. Spacing is automatic. Horizontal separators are created with CNTL-c ENTER

Traverse the cells horizontally with TAB, vertically with ENTER. Use arrow keys to traverse spaces. Move rows up with ALT ↑. Add columns with SHIFT ALT →. There are shortcuts for most table operations.

| Student  | Maths | Physics | Mean |
|----------+-------+---------+------|
| Bertrand |    13 |      09 |   11 |
| Henri    |    15 |      14 | 14.5 |
| Arnold   |    17 |      13 |   15 |
|----------+-------+---------+------|
#+TBLFM: $4=vmean($2..$3)

Averages for each student are added with a formula: Column 4 is the (vector) mean of columns 2 through 3

| Student  | Maths | Physics | Mean |
|----------+-------+---------+------|
| Bertrand | 13 | 09 | 11 |
| Henri | 15 | 14 | 14.5 |
| Arnold | 17 | 13 | 15 |
|----------+-------+---------+------|
| Means | | | 13.5 |
#+TBLFM: $4=vmean($2..$3)::@>$>=vmean(@2$>..@-1$>)


Now we add a global average to the last row of the last column (@>$>) by computing the mean of the last column, other than the first and last row.

The table adjusts spacing whenever you interact with the table, like using TAB to traverse a cell. There is a magic key-binding (shortcut) in emacs, which is CNTRL-cc, and it means, do whatever is most obviously meant in the current situation. One of the effects is to readjust the table and another is to recalculate the formulae, depending on where the cursor is.

The symbols of the formulae are unusual, but ChatGPT knows them. The tables may be exported to CSV, latex and to html.

Leave a Reply

Your email address will not be published. Required fields are marked *