Quit using goto-line
and isearch
to navigate in your Org-Mode document. I didn’t want to use Helm or Imenu to do it and Org-Mode has a built in solution with org-goto
. Be sure to bind the “pop” key very close-by to make it symmetrical and fast.
(define-key org-mode-map (kbd "s-u") #'org-goto)
(define-key org-mode-map (kbd "s-U") #'org-mark-ring-goto)
Tag: Babel
Vintage Computer Programming Book Market About To Explode!
Last week I was day-dreaming about Forth and vintage computers again. Same old day-dreams. The TI-99/4A with TurboForth seems like the perfect place to start learning about both. TurboForth has lots of features and it runs in emulators and “on the metal”. Cool.
The best way to learn Forth is interactively. How do you do it with Org Mode, though? Can we have the same features you would expect with any other programming language even though it is running inside of an emulator? There must be an easy way to run at the command line, redirect input and output, or maybe telnet into the machine.
V9t9 is a Java-based and open-sourced emulator there on GitHub. If it doesn’t have telnet into it, then it can be added. That got me thinking (daydreaming?) again about the fun of simple computers. Whatever approach you use to access them, using Org seems like a great way to write new books about them.
They are simpler. They are a great place to start. There is tons of great literature out there already. Now add Emacs and Org-Mode to the mix to practice Literate Programming.
It seems like there is a huge opportunity for great new books about old computers and programming languages. Export to LaTeX and publish, and there you go. Very fun and very cool.
Emacs, Calendars, Google, and Org Mode
This post has a few nice links. emacs-calfw is calendar framework for Emacs. google-maps displays Google Maps directly inside Emacs. org-gcal.el synchronizes org-mode with Google Calendar.
Nice HTML Slide Export in Org-Mode with org-ioslide
Org HTML Themes
org-html-themes provides very nice HTML export themes for your org documents.
How to Correctly Enable Flycheck in Babel Source Blocks
If you already have Flycheck turned on then you already have it running your babel source block buffers, but, it isn’t working how you expect it. That buffer hasn’t got a file name. Flycheck can’t be smart about helping you out here. Via this post, the solution follows.
(defadvice org-edit-src-code (around set-buffer-file-name activate compile)
(let ((file-name (buffer-file-name))) ;; (1)
ad-do-it ;; (2)
(setq buffer-file-name file-name))) ;; (3)
This is one of those things that if you had though about it for a few minutes, you would have turned it on yourself. It reveals how easy it is to return to the mode of “application user” from “application designer”, of Emacs. That is the source of most of my dumb “misses” regarding workflow optimizations in Emacs.
How to Handle and Large Slow Org Files
When some of us open large Org mode files, Emacs becomes nearly unresponsive, and nearly unusable. My stock advice has always been to call #+STARTUP: showeverything
or do a binary search more or less to figure out which package is stomping Emacs. In this post, though, Puneeth explains that the issue may go away entirely for some of us.
Easily set column width in org tables
Org tables are great. Most of the time I rely on the column width auto-resizing feature. Perhaps you want to do force a smaller width though for example. Just specify the width, in its own empty row inside of angled parentheses. Default justification is right. Prefix the number with a l or c to do left or center.
Here is the page. Thanks Tory!
|---+------------------------------| |---+--------|
| | | | | <6> |
| 1 | one | | 1 | one |
| 2 | two | ----\ | 2 | two |
| 3 | This is a long chunk of text | ----/ | 3 | This=> |
| 4 | four | | 4 | four |
|---+------------------------------| |---+--------|
org-table-edit-field (C-c `) lets you easily edit the entire field and the org super key (C-c C-c) saves it.
A reference card for code execution in org 8
refcard-org-babel “contains the reference documentation that describes how to perform code execution within Org mode documents using Org Babel 8”.
Look forward to referencing this when I read about other’s personal org workflows, and, document down my own.
How to handle the enter key while inside of comment blocks
This post reveals a nice function comment-indent-new-line
which gives you the
right kind of indentation for block comments. That got me wondering if my
enter
key-binding should do different things depending upon whether or not the
cursor is inside of a comment block or not. Specifically, if it is, then call
the aforementioned function, else call the normal binding. This seems that it
might be an improvement
This post explains how to check if the cursor is inside of a comment block:
(nth 4 (syntax-ppss))
It is not nil when the point (cursor) is inside of a comment block.
Great to know.
I decided not to make this change yet, but, I wanted to capture how, here.