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

(Emacs+Org-Mode) Why Not Bind `delete-forward-char'?

Thank you Greg for the big correction here <2018-01-12 Fri>

The documentation for delete-char suggests that delete-forward-char ought to be used for interactive use instead of delete-char

(global-set-key (kbd "C-d") #'delete-forward-char)

(Emacs+Org-Mode) Make Eval Expression A Little Easier

Once you’ve been using Emacs for a while you end up using eval-expression a lot. 99% of the time I use it to make function calls. I never noticed before that it is kind of tedious to reach for S-M-; and then () despite using it so much. Here is a binding and a function definition that make it easier to use binding it close to home and inserting the round parentheses.

(global-set-key (kbd "M-;") #'my-eval-expression)
(define-key org-mode-map (kbd "M-;") nil)
(progn
  (defvar my-read-expression-map
    (let ((map (make-sparse-keymap)))
      (set-keymap-parent map read-expression-map)
      (define-key map [(control ?g)] #'minibuffer-keyboard-quit)
      (define-key map [up]   nil)
      (define-key map [down] nil)
      map))
  (defun my-read--expression (prompt &optional initial-contents)
    (let ((minibuffer-completing-symbol t))
      (minibuffer-with-setup-hook
          (lambda ()
            (emacs-lisp-mode)
            (use-local-map my-read-expression-map)
            (setq font-lock-mode t)
            (funcall font-lock-function 1)
            (insert "()")
            (backward-char))
        (read-from-minibuffer prompt initial-contents
                              my-read-expression-map nil
                              'read-expression-history))))
  (defun my-eval-expression (expression &optional arg)
    "Attribution: URL `https://lists.gnu.org/archive/html/help-gnu-emacs/2014-07/msg00135.html'."
    (interactive (list (read (my-read--expression ""))
                       current-prefix-arg))
    (if arg
        (insert (pp-to-string (eval expression lexical-binding)))
      (pp-display-expression (eval expression lexical-binding)
                             "*Pp Eval Output*"))))

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

(macOS) Manage Multiple Snippets Of Copied Text With Your Clipboard With Flycut

After using it for a few days I already love it.

Personal examples:

  • I have a document open, and I want copy a few parts from it, into an email. But I don’t want to have to command-tab between the document and the email. So I just comand-c… and then go to my email. I do that all the time.
  • When I care about something that I am reading, a phrase, a word, and I want to remember it… maybe. So, the copy buffer is persistent, and I can go back anytime and look up what I may wanted to use.

Flycut: It’ll Remember It For You (but not Wholesale ).

If you are an Emacser you’ll instantly know and love this as a macOS Kill Ring.

Security concern: persisting sensitive information in your clipboard like this, it is easy to forget about it. Fortunately Flycut doesn’t copy values from password fields. Additionally it keeps it’s data local to your computer never sharing it between your other computers or devices. However, it is just like any other security concern so be careful what you keep in there.

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.