Skip to content

Indenting new curly bracket blocks with smartparens for R

Emacs speaks statistics handle indentation for curly bracket blocks quite well. My preference was to have, after inserting matching opening and closing curly brackets, a newline with the cursor indented one block in. This post in particular describes the solution; it worked fine as of today.

Addendum: 2014-04-17

Here is the code snippet from the above link:

(sp-local-pair 'c++-mode "{" nil :post-handlers '((my-create-newline-and-enter-sexp "RET")))
(defun my-create-newline-and-enter-sexp (&rest _ignored)
  "Open a new brace or bracket expression, with relevant newlines and indent. "
  (forward-line -1)

On doing things

Learn how to be happy, and then how to do things (take action).

Failure and success, hard work and vacation, and life suddenly begin to take on a different role.


A mistake that I made too often in life was to focus too much on the specific implementation or realization of a thing instead of learning about the valuable generalizations and abstractions that may be learned from it and applied elsewhere. That was then, this is now.

imenu is actually a nice feature for Emacs. When I learned about it way back when, having quit using the menu bar, I dismissed it as not-helpful. That was a stupid thing for me to do because there ought to be a way to use it with the keyboard. Of course there is.

Thank you vitoshka, for imenu-anywhere.


Recently learned about Polymode from the ESS user manual.

It looks like a nice option for working with code that didn’t start out in org-mode; which is likely pretty common.

Starving juice with dead food

Who calls a diet Pepsi with some kimchi a “starving juice and dead food”?!

Glass of water

A good game is to keep a clear drinking glass near you at all times during the day; the challenge is to keep filling it and drinking all of the water in it.

Addicted to because

Addiction is the continued repetition of a behavior despite adverse consequences…


Pick two:

I am [happy/sad] because of [person/place/thing].

Is it possible to live contently without bondage to “because”?

How to act

The questions about how to fix oneself are limitless and the answers range from dissatisfying to non-existent.

The answer is simple:

Act with love, respect, devotion, honor, and service.

The Yoga Sutras of Patanjali

The version that we’ll study with:

Commentary on the Raja Yoga Sutras by Sri Swami Satchidananda

Practicing the soroban

It looks like about an hour a day for a year or two for the first certification. The to-do list follows.