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.

MathJax Support In Org2Blog

Use MathJax with Org2Blog.

Thank you Jon for showing how to set this up in this post and this post and this post.

The only addition is that these instructions uses a more actively maintained plugin.

  • Test it out using these (and more) examples
    • The word LaTeX in Math Mode (notice the italics)
      • \(\LaTeX\)
    • The word LaTeX in Text Mode (notice the lack of italics)
      • \(\mathrm{\LaTeX}\)
    • Inline
      • \(\sum_{i=0}^n i^2 = \frac{(n^2+n)(2n+1)}{6}\)
    • Equation
      • \[\sum_{i=0}^n i^2 = \frac{(n^2+n)(2n+1)}{6}\]

(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”

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)

Yet Another Ag Hydra

(defhydra help/hydra/ag (:color blue
                                :hint nil)
  "
`ag', The Silver Searcher:
  Present in window:
    Search in folder:
      _j_ limit search by file type _k_ search in everything
    Search in project:
      _l_ limit search by file type _;_ search in everything
  Present in dired:
    Search in folder:
      _u_ limit search by file type _i_ search in everything
    Search in project:
      _o_ limit search by file type _p_ search in everything
  Other:
    _n_ close every other buffer _m_ close every buffer _q_ quit
"
  ("u" ag-dired-regexp)
  ("i" ag-dired)
  ("o" ag-project-dired-regexp)
  ("p" ag-project-dired)
  ("j" ag-files)
  ("k" ag)
  ("l" ag-project-files)
  (";" ag-project)
  ("n" ag-kill-other-buffers)
  ("m" ag-kill-buffers)
  ("q" nil))

Org-Mode Documents Can Generate PDFs Which Include Any Data Including Themselves

This Org-Mode document

#+LATEX_HEADER: \usepackage{attachfile}
Jon this is an Org-Mode file which generated a PDF which contains itself.
@@latex:\attachfile{orginorg.org}@@

Generates this pdf that contains itself. Open it with Adobe Acrobat (or some other tool that can handle embedded files).

You can include any data you want inside a PDF using attachfile and it is easy to extract that data.

It is a toy example but you can script everything to work with embedded data in PDF.

Continue reading “Org-Mode Documents Can Generate PDFs Which Include Any Data Including Themselves”

Consider C-s Or M-s For Key Bindings Because There Is A Lot Of Space In There

As key-binding name-spaces start to run out due to the massive expansion of packages out there today consider the C-s and the M-s name-spaces. Clicking around on my keyboard they don’t seem to be used much if at all. There is probably a reason for that and I’m going to ignore it because I want more name-space free for key-bindings.