My ProgrammingLearning Org-ModeConfiguration Corner ] Toggle Dark Theme

Emacs is a notoriously very overbuilt text editor, but one i want to get comfortable in for access to org-mode, a system for using hierarchically structured text documents to organize your shit, as my shit is so very very disorganized. (Also, emacs seems to be the default interface for things like Idris which i want to investigate eventually, so knowing how to use it wouldn’t hurt.)

I’ve tried learning emacs before, and found the experience draining and unpleasant: it’s somehow a very passive aggressive piece of software, like if it could speak i’m sure it would sound like Dennis Nedry. It’s constantly telling you how helpful it is, yet then making control-keys switch the keyboard into a minefield of single letter invoked text-editing/UI-state-changing commands, some of which invoke different unlabled minefields you just have to memorize, with no obvious way to back out, and there are several ctrl-key summoned top-level minefields and their conventions are inconsistent (so far i’ve discovered: ctrl-x, ctrl-c, ctrl-h, alt-x). And giving you vital looking text prompts which disappear after 3 seconds, (or may not!), and you’re never sure if they’re still in effect.

So this page is a miniblog about that journey.


I managed to google up enough about emacs command-keystrokes and how to automatically tell config options to it on startup to replicate most of what i care about from Sublime Text ("save-on-focus-lost", open multiple files, splitting windows into panes (or "'frames' into 'windows'" in emacs' idiosyncratic terminology) and moving between them) already on day one, so am just going straight on into Org-mode.

First off, this printed manual i’ve got is for version 9, and the org-mode that came with my emacs is version 8.2 (from 2014?), so M-x package-install RET org RET was necessary (and the printed copy of the org mode manual sold on the website is for version 7 so um.. one general thing i’ve gathered about emacs is that whenever a design decision comes up to make a default setting change so things are easier for [potential] future users, or to keep things the way they were so as to not inconvenience current ones? they usually choose the latter, which has lead to ossification.*).

Also, ":DRAWERS:" (automatically hidden sections of text, ended by :END:, which are only ever shown if you press TAB while the cursor is on their line) work differently enough in version 9 from v8 that you will think you have misunderstood the manual repeatedly until you notice that it’s referring to a more recent version of the software than your yesterday-installed copy of emacs includes.


While trying to work out how to map my Home key to Ctrl-x (which starts most commands i’ve met so far; also i have a weird keyboard where Home is among a cluster of buttons under my left thumb) i found this page "Xah Fly Keys" where someone’s devised a Vi style keymap which replaces all emacs chord-key-sequences. You get into it by pressing Home, then your keyboard becomes like

or tap f to type, or space to go back the minefields again (but at least you never have to press Alt-x).


Randomly, someone i follow on tumblr posted a screenshot of their diary writing setup, which is coincidentally also in a modal-editing version of emacs! They use something called spacemacs, which uses vim keybindings, plus a much better menu system for all emacs' regular commands invoked by Alt-m.

The vim stuff is useless to me, since i type in Colemak layout (kinda like Dvorak, but designed to be easy to switch to for those who already touch-type Qwerty) which puts the HJKL movement keys all over the map, but spacemacs' "Mnemonic, Discoverable, Consistent" redesign of the minefield menus seems preferable to Xah’s efficient-finger-placement-at-all-costs design.

OTOH Spacemacs feels pretty complicated though, so i’ll probably just mine it for ideas while sticking to the regular version.


Discovered emacs contains a pdf viewer.

Am annoyed that it keeps opening org-mode hyperlinks to html files for editing, rather than in a browser.


Projectile-mode (the project management mode) has a function i’ve often wished for, projectile-find-other-file-other-window, great for switching between C files and their headers. It’s invoked by Ctrl-c p 4 a, typed in order, and is literally the only reason for me to use projectile mode.


The two big things i’m still missing from sublime text are:

I sort of stalled reading the Emacs Lisp introduction when it got to the two namespaces thing.

...

did just google er http://emacsrocks.com/e13.html and https://stackoverflow.com/questions/761706/in-emacs-edit-multiple-lines-at-once , shall check back later