Posts Tagged ‘command line’

Command Line vs the Editor

May 10, 2015

Which Editor matters, in this case it’s Emacs.

Because emacs has a different view of the world.  The editor is not yet-another-command-line tool. No, the editor is the environment. The past year has been real growth for my editing, command tool writing.   Shell Functions has been out there for a few years now, and upgrading it, rather how, which way to go is my current challenge. But that’s another story.

My current challenge: do I work principally from the command line vs inside an editor.   The standard answer:  “It depends”.

But now the answer is taking shape.   When editing text, this blog being an exception, the answer is “in the editor”.  The routine tasks are, the diary, the analemma project, the software diary, my story, quotes from diogenes small, etc..  I break out to the command line when I’m doing “my business”:  my expense tracking, my stock-watching, my shell-curating…

Most recently, however, I’ve moved my expense tracking back online.   I’d used gnucash a few years ago.  With a new iMac, I figured it time to take another look.  Sorry gnu-bies.   The online connection is still as confusing as it was in ’13.   So, that cuts into the tool development.  Another bit of the toolshed is closing:  my “MarkApp”.  I’d developed a Markdown wrapper to add “include file” and “table of contents” features.   Time to trash that as well.   The surviving local tool work is now based around /rdb, “the Unix Relational Database Management” brought to us by Manis, Schaefer, and Jorgenson near 30 yrs ago.  But that’s another story.   What’s happened with Markdown?

I was introduced to Markdown while writing the book.  It’s a clean way to produce HTML documents, from a simple, almost syntax-free editor.   The core idea from markdown is “you should be able to use a readable text document to produce a nicely formatted (in this case HTML) document”.  Standard things like section headers, lists are easy.  Importantly hypertext links have as low a learning curve as necessary, with convenient features to produce references.  This served me well for the few years since writing the book.   As a matter of fact it got me to eschew my original idea, “THT” Tcl HyperText.   So, time to take these two down from GIthub:  Tht and MarkApp.    But, lurking in the background, I’d had an experience with OrgMode,  mostly as t GTD (Getting Things Done) tool.    Not that I’d ever been a great “todo” user.   But occasionally thumbing thru the OrgMode manuals, _and_ importantly keeping a up-to-date copy of emacs handy, I was challenged to see more of what’s there.

OrgMode is doing itself a favor by moving away from the GTD focus and aim for the note-taking focus.   it’s TODO idea follows, rather than precedes note-taking.   Approached that way, it is much more widely useful.  And with that, is Markdown’ denouement.   For me, now,  OrgMode’s most important feature is its “export” feature.   Foremost is the HTML export, since that avoids the need to use Markdown.  But, it also has a Markdown feature, which I’ll use when it’s time to work on the book.  There are a handful of others, interestingly LaTex, PDF, ODF, but that’s another story.   The real reason it captured my attention is it’s ability to open and close on an outline.   For example, here’s the current section of my diary:

* 2015
** July 2015...
** June 2015...
** May 2015...
| sun | mon | tue | wed | thu | fri | sat |
|-----+-----+-----+-----+-----+-----+-----|
|     |     |     |     |     |   1 |   2 |
|   3 |   4 |   5 |   6 |   7 |   8 |   9 |
|  10 |  11 |  12 |  13 |  14 |  15 |  16 |
|  17 |  18 |  19 |  20 |  21 |  22 |  23 |
|  24 |  25 |  26 |  27 |  28 |  29 |  30 |
|  31 |     |     |     |     |     |     |
     
*** Nextday
*** Saturday, 9th :chip:katie:

Today we go to Chip's to see Reese play baseball and _maybe_ bbq

A number of feauturea are evident:

  • The outline with leading *s allows TABbing in to show the contents of the current level, and
  • The trailing … in each headline indicates there is hidden hidden content below, which a TAB exposes
  • Self-formatting tables allow easy creation of calendars, for example.
  • Tags are appended to “headline”s (with *s) between “:”s, e.g. the two tags in the example are “chip” and “katie”, two of our three children.

Another reason the text editor is a big deal for me: the editor in this and most media sites I’m familiar with has gratuitous behaviors. In this case, it insisted in placing either the closing CODE or PRE tags on the first blank line after the opening tag.

So, this will be an occasional stop for me.  My blogging will take place in a much friendlier editor