(Emacs+Org-Mode) Two Ways To Reload File Variables Using A Hydra

It is works anywhere but it is easier to remember if you add it to an existing Hydra.

Here is the code.

("H" (lambda () (interactive) (hack-local-variables) (message "Local variables hacked")))
("N" normal-mode)

Here is the documentation.

_H_ hack-local-variables (see also normal-mode)
_N_ normal-mode (see also hack-local-variables)

(Emacs+Org-Mode) If You Go Insane Trying To Deal With Lisp Code Squashed Into One Line Then Read On To See The Fix

There are two situations where I end up with really important Lisp code that is squashed up into one un-readable and consequently painful line:

  • Reading Backtrace when toggle-debug-on-error is true
  • Using Lisp in a YAS template like this for example

The thing is that those lines are really important to me. I need to get them readable.

My solution had always been to manually re-indent them. Uggh. But after doing this way too many times, I ran into an issue tonight that demanded my full attention. Fortunately there is a really simple solution.

Continue reading “(Emacs+Org-Mode) If You Go Insane Trying To Deal With Lisp Code Squashed Into One Line Then Read On To See The Fix”

(Emacs+Org-Mode) If You Enjoy Writing Even A Little Bit With Emacs Then Add This Em-Dash Code Now

The EM-DASH provokes mixed feelings mostly in writers, and maybe readers if they notice it (probably the writers are the ones noticing it while reading). But the EM-DASH is a really nice way to break up a sentence when a COMMA or a SEMI-COLON or a COLON just won’t do it.

Continue reading “(Emacs+Org-Mode) If You Enjoy Writing Even A Little Bit With Emacs Then Add This Em-Dash Code Now”

(Bash) You Are Using rsync Incorrectly And You Will Lose Everything Unless You Read This Now!

rsync is generous in its functionality and flexible in how you use it. The only bad things it can do are what you tell it. The most important thing that you need to know immediately about rsync is that you can get a preview of what you are telling it to do before it actually does it. Here is how

Continue reading “(Bash) You Are Using rsync Incorrectly And You Will Lose Everything Unless You Read This Now!”

(Emacs+Org-Mode) Emacs 💘, A Great Place To Write A Program

As they say on the radio:

Emacs, you may not be perfect, but you are perfect for me 💘.

It is satisfying to perfectly configure a program for me to write any other kind of program.

Emacs is a great place to read man pages and write shell scripts. It gets simpler but not by much.


(Emacs+Org-Mode) How To Detect Duplicate Hydra Heads: I’ve Got Way Too Many And I’m Losing Track

abo-abo’s Hydra functionality makes it easy to build great GUIs. I like the head feature. The problem I’m running into is that I keep stomping on my head definitions. For example I define one Hydra as _R_esolve and then somehow I overlook the fact and I create another another as _R_emember, forgetting about the first one.

How do you make sure not to stomp on other Hydra heads when you forget?

(Emacs+Org-Mode) abo-abo’s Hydra Makes You A Lightweight-Literate Programmer Hyper Boosting Your Productivity With About Ten Of Minutes Effort For Learning It

abo-abo’s Hydra functionality has changed both my learning and Emacs workflow. If you give it a chance with my workflow below you will get even more power-user type stuff out of it.

The Emacs workflow part is easy: it introduces a new logical namespace for function calls and brings a nice GUI along for the ride.

The learning workflow is that while I am learning a new package (or anything) I can stick everything that seems important into a Hydra for that mode. Instead of writing notes or worrying about settings keybindings for things that I may or may not use I just put it in the Hydra and keep reading along. The Hydra becomes the notebook. It is like super lightweight literate programming because it becomes executable documentation.

(Emacs+Org-Mode) Is There A Single Person Out There Who Can Remember All Of The Features They Have Configured In Their Emacs?

Is there a single person out there who can remember all of the features they have configured in their Emacs?

I sure can’t 😄(Joy)😮(Surprise)😢(Sadness).

Am I the only one?

(Emacs+Org-Mode) Emacs: Our Home For Creativity, Learning, Fellowship, And Fun

My Emacs is like a kitchen that I’ve perfected over the years to prepare just about every kind of meal.

The meals are configurations for example of the Go language, SML, OCaml, APL, IRC, and writing LaTeX, Pandoc, or Org-Mode. Some of the meals have been around and will stay around for a long time. Some of the meals are short lived, and welcome to come back. Either way I’m glad to be able to cook in such a great kitchen.

There are always improvements to the kitchen. They are welcome because it can always get better. At this point there aren’t going to be any major changes to the kitchen itself unless I have some major changes in the way that I think. It works how I like to work. Everything is where I like it to be. It is easy for me to add new things and remove them in a pleasant manner. Most importantly it is a reflection of my cognitive landscape, so I am happy there.

Once you are at home in Emacs you will welcome new meals and say farewell to some, but you will always have a kitchen that you love. That is why the “Perfect Emacs Configuration” is never to be found and never will be: we are all unique and see the world with with a curiosity that is all our own.

Fortunately we have a lot of similarities so good ideas spread fast and they bring great ease. Of even greater fortune we have a lot of differences so we can grow and learn from perspectives and preferences so totally different from our own. It is delightful and refreshing to see a cognitive landscape different from our own. That is where the fun is: going to new lands and being welcomed to learn about how people see the world. Our Emacs configurations are a sweet reminder of the joy and creativity that comes with computing. Emacs is the selfless and benevolent home where that kitchen lives.

Long live Emacs—our eternal home of the joy and creativity of computing, shared learning, and flat out fun.

(Happiness) Old Fashioned Himalayan Style Chai Recipe

Chai—One Pot Method (makes two cups)

This recipe (modified by me) comes right out of The Happiness Revolution which is available free here. Totally worth reading now.

  • Ingredients
    • 1 cup of cow milk
    • 1 cup of water
    • ½ inch fresh ginger root
      • More or less to taste
      • More concerned with juice then mass, that is where the flavor is)
    • 1 pinch powdered saffron
      • More or less to taste
    • 6 whole pods of cardamom
      • Green
      • More or less to taste
    • 2 tablespoons sugar
      • More or less to taste
    • 1 tablespoon black tea
      • Black tea as the benefit of caffeine to which you don’t develop a tolerance. It works the same every time.
      • I like Wagh Bakri
    • 3 grinder turns of black pepper
      • Usually only during winter
      • More or less to taste
  • Tools
    • Pot big enough to hold the ingredients
    • Vessel big enough to hold the the number of cups of water and milk that you are using
    • Ginger Grater: extracts the ginger juice quickly and extracts every drop of juice
    • Coffee Grinder: for the cardamom
      • only hold the cup over the pot instead of the grinder when you dump in the seeds otherwise the steam will get inside the grinder and make it unhappy
    • Tea Spoon: to peel the ginger
      • Or paring knife if you are a ninja
  • Steps
    • Place pot on counter-top. Add pepper, black tea, saffron, and cardamom.
    • Add water to vessel. Peel and grate ginger. Grab ginger fiber and place in pot. Use water to rinse grater into pot. Add all of remaining water to pot.
    • Bring pot to a boil. Fill vessel with milk.
    • When water reaches a boil, pour in milk.
    • Allow chai to come to a boil, then quickly remove from the heat. Stare at pot the entire time otherwise it will boil over. Maitain focus without distraction here. Do this two more times.
    • Strain through a fine strainer so as to filter out tea and herbs.
    • Either add sugar to individual servings so everyone can sweeten to their taste or add it to pot.
    • Serve. The chai party begins.