(Emacs+Org-Mode) Try Naming Your Emacs Configuration And Instance

For the fun of it try naming your Emacs configuration and instance.

For example my configuration is named HELP, HELP Enables Literate Programming. This is the collection of everything I find helpful for Literate Org Mode. Its also the collection of every single bit of code that people shared to help me out. It helps a lot. But that is not what I called my editor.

I call my editor instance PIE, PIE Interactive Editor. It is fun calling it a name that I like instead of Emacs. Emacs means so many things to all of us. Even Spacemacs names it especially for them. What is PIE? The PIE Interactive Editor? But what is PIE? PIE Isn’t Emacs 😄(Joy)😮(Surprise).

@@@@@@@@@@@@@@@......@@@@@@@@@@
@@@@@@@@.....@@.........@@@@@@@
@@@@#........@@...........@@@@@
@@(..........@@............@@@@
@............@@.............@@@
PIE..........@@.............(@@
Interactive..@@..............@@
Editor..PIE..@@@@@@@@@@@@@@@@@@
Is Easy..PIE.#@@@.............@
Isn't Emacs..#@@@............@@
@..............#@@@..........@@
@@..................#@@@....@@@
@@@...................#@@@@@@@@
@@@@@@...............@@@@@@@@@@
@@@@@@@@@@@#..#@@@@@@@@@@@@@@@@

Have fun with it.

Anybody Miss The Kill-Ring When They Use Their Host OS

Here “Host OS” means the operating system on which you run Emacs.

When I use my host OS by muscle memory I try to use the Kill Ring just like I do in Emacs and then I get a painful surprise: I have to copy everything that I need somewhere else and then copy it back. Yuck. Can you recommend a solution for this on macOS?

browse-kill-ring makes the kill ring really easy to use.

If You Have An Org-Mode Problem Then You've Probably Got It Installed Twice

If you have an org-mode problem then you’ve probably got it installed twice. Here are two examples where I always get into trouble:

  • I run from source, this is impossible
    • It is possible because some package listed Org-Mode as a dependency
  • I run only from the Org-Mode package
    • It is possible because some other package listed Org-Mode as a dependency
  • Sometimes a reference to org-plus-contrib can shake things up because it “works fine for a while… and then doesn’t”

The errors are usually cryptic, to the lazy like me, and not worth investigating because they are fake errors.

Exporting Tables With Borders

This page explains how to configure exported tables borders either with the variable org-html-table-default-attributes, which is ignored with HTML5 export, or properties.

The default table export doesn’t include borders and it is difficult to read.

Continue reading “Exporting Tables With Borders”

Never Too Late To Learn `multi-occur-in-matching-buffers'

Ever wanted to search all of your buffers limited by their backing file type? Surprisingly I never did very much. ag and grep worked fine for me. Then I started leaving buffers open, with everything that I cared about, all the time. Then I joined the “Emacs 100+ Buffer Club”.

multi-occur-in-matching-buffers is helpful when you watch to use occur in some of those buffers.

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”

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)