(Go Lang) Go by Example Notes (GBEN) Emacs Setup

Goal

Go by Example is Mark McGranaghan‘s “hands-on introduction to Go using annotated example programs”. Under the license I’m going to

  • Convert all of the examples to Org-Mode Literate Programming documents
  • Add, remove and modify them making it my personal notebook
  • Add the tag GBEN to track them
  • Refer to this post to provide attribution

Configuration

ID: org_gcr_2017-08-08_mara:C327B697-D6B7-42BA-B0D3-0C8613CBB58E

Continue reading “(Go Lang) Go by Example Notes (GBEN) Emacs Setup”

Leave ~C-M-s~ Bindings For The Operating System

macOS used Meta and Super for a lot of it’s own bindings. That ties up valuable Emacs key-space. Tonight I moved all of those meddling bindings into C-M-s. macOS get that all to itself making it happy. And it made me happy. Maybe it will make you happy.

Org2Blog: Access Post Metadata After Publishing

Via here:

Now your post or page exists both in your Org-Mode file on your computer, and also in WordPress itself. That page or post inside of WordPress contains a lot of metadata and you might be interested in some of it. Here is documentation covering all of the fields. You can easily access that data using a hook function.

Continue reading “Org2Blog: Access Post Metadata After Publishing”

Doing What Matters Most To You (Getting Things Done)

When you keep desperately and constantly failing to complete a task:

  • And you have freed the most possible time
  • And you have attained the greatest mastery for that task
  • And you have received the most help you could possibly receive
  • And you have prioritized everything and this remains

Then do less of everything else.

Eventually you’ll be left with a list of what matters most to you. And it will be smaller than when you had started so it might be easier to finish.

How Fast Can You Tangle In Org-Mode?

Last year I converted my Emacs Literate Configuration File from a complicated document full of out-of-order noweb objects to a simple sequential document that took the tangle times down from 3-10 minutes (because of how I set up my document not because of Org-Mode itself!!!) down to 30-90 seconds. But who doesn’t want more speed? I didn’t at least until I read this article which led me to reading this article and this page on garbage collection.

I tangle my config files what feels like every few minutes at least when I am playing around with stuff. So here is some code to effectively avoid garbage collection when tangling. It speeds up tangling on my computer when I tangle the same document in a row five or ten times so I’m happy but that clearly isn’t a detailed analysis.

Here is the code:

(setq help/default-gc-cons-threshold gc-cons-threshold)
(defun help/set-gc-cons-threshold (&optional multiplier notify)
  "Set `gc-cons-threshold' either to its default value or a
   `multiplier' thereof."
  (let* ((new-multiplier (or multiplier 1))
         (new-threshold (* help/default-gc-cons-threshold
                           new-multiplier)))
    (setq gc-cons-threshold new-threshold)
    (when notify (message "Setting `gc-cons-threshold' to %s"
                          new-threshold))))
(defun help/double-gc-cons-threshold () "Double `gc-cons-threshold'." (help/set-gc-cons-threshold 2))
(add-hook 'org-babel-pre-tangle-hook #'help/double-gc-cons-threshold)
(add-hook 'org-babel-post-tangle-hook #'help/set-gc-cons-threshold)

The Opposite of Forget Is Mindful Not Remember

When you forget a «person/place/thing/idea/though/memory», that which previously sat in your cognitive field is there no longer. When you become mindful of that «person/place/thing/idea/though/memory» again, it returns to your cognitive field. We call this “forgetting and remembering” something. But remember is the wrong word.

Continue reading “The Opposite of Forget Is Mindful Not Remember”