HELP: Yet Another Literate Emacs Configuration!

HELP is the culmination of everything that I’ve learned about literate programming (LP) in Org-Mode—written with the intent to share it with others in total and complete respect and consideration of you and the value of your time. No platitude here: time is precious.

With that in mind here is a breakdown of the sections you might be interested in (and should ignore):

Continue reading “HELP: Yet Another Literate Emacs Configuration!”

(Emacs+Org-Mode) Share Links To Emacs Initialization Files With Minimal Effort!

I love reading all kinds of Emacs configuration files ranging for super refined to just starting out. For example caisah has a list of loads of stellar examples. However the only way to get added to that list is for your configuration to be notable. That is a pretty high bar for people just starting out. New people also usually have the freshest ideas though and they challenge the status quo of what we currently consider “the best”. All of those perspectives are valuable so I wanted to create a simple list that can include all of them.

Continue reading “(Emacs+Org-Mode) Share Links To Emacs Initialization Files With Minimal Effort!”

(Happiness) A Steadfast Will To Fail Can Always Be Counted On To Ensure Insurmountable Obstacles

A steadfast will to fail can always be counted on to ensure insurmountable obstacles.

So no matter how much despair your feel, even with the most meager feeling inside you saying “Hey, I can do this” know that you have just made the impossible—possible!

And if you can not then know that if at first you don’t succeed then redefine success.

How To Choose The Perfect Emoticon

Emoticons are pretty fun to use but they are hard to choose because there are so many!

Here is how to make it easy: go over this list and then use search to find the noun or verb that you are looking for like “triumph” or “savouring” or “unamused”

Even if you don’t have anything to search for, it is still in alphabetical order and it is pretty fun to see all eighty faces out there available right now!

Continue reading “How To Choose The Perfect Emoticon”

(Emacs+Org-Mode) Choosing The Best Writing And Publishing Software

In regards to writing and publishing literature (mostly articles, books, essays, and dissertations) there is a lot of discussion about choosing the right (software) tools for the job. And for good reason—literary endeavors are mentally laborious difficult work. As anybody would expect the software should help you a lot. At best you only want to worry about choosing the right software to help you write.

Yet the sad and all too common reality is that you are really worried about choosing the software that is the least-worst painful impediment to your creative process. Discussions that praise particular tools are pretty difficult to take any value from until you’ve suffered greatly at the hands of the tools deemed inferior by them. When people are suffering that is the worst time to get their feedback. First get them better, then find out what works and what doesn’t.

This post is what I’ve got to share with you, when I am feeling pretty great about life, and have something good to share about the topic, in regards to \(\LaTeX\) and Org-Mode.

If you are considering using \(\LaTeX\) and Org-Mode for some reason then please read on:

Continue reading “(Emacs+Org-Mode) Choosing The Best Writing And Publishing Software”

(AppleScript+macOS) Maybe The Only Working Applescript For Toggling Grayscale And Inverting Colors On macOS Sierra In The World

2021-04-16: Here is one in JavaScript.

THANK YOU SILESKY

Toggle Grayscale

tell application "System Preferences"
  activate
  set the current pane to pane id "com.apple.preference.universalaccess"
  delay 1 # needs time to open universal access
  tell application "System Events" to tell process "System Preferences" to tell window "Accessibility"
    tell scroll area 2 to tell table 1 to tell row 6 #open display preferences
      select
    end tell
    click checkbox "Use grayscale"
  end tell
end tell

tell application "System Preferences" to quit

# Sierra: System Preferences -> Accessibility -> Display -> Use grayscale

Invert Colors

tell application "System Preferences"
  activate
  set the current pane to pane id "com.apple.preference.universalaccess"
  delay 1 # needs time to open universal access
  tell application "System Events" to tell process "System Preferences" to tell window "Accessibility"
    tell scroll area 2 to tell table 1 to tell row 6 #open display preferences
      select
    end tell
    click checkbox "Invert colors"
  end tell
end tell

tell application "System Preferences" to quit

# Sierra: System Preferences -> Accessibility -> Display -> Invert colors

Aliases

Run them from the command line. Maybe make your screen black and white at night or invert colors for screencasts or working in sunligh.

alias togglegrayscale=’osascript /Users/gcr/util/sspadtogglegrayscale.scpt’
alias invertcolors=’osascript /Users/gcr/util/sspadtogglecolors.scpt’

(Emacs+Org-Mode) Close Magit-Process Related Buffers When They Become Obselete

My old Magit setup left a bunch of buffers around that I didn’t need anymore. Here is the posted solution to close them automatically:

(defun help/magit-kill-buffers ()
  "Restore window configuration and kill all Magit buffers.
Attribution: URL `https://manuel-uberti.github.io/emacs/2018/02/17/magit-bury-buffer/'"
  (interactive)
  (let ((buffers (magit-mode-get-buffers)))
    (magit-restore-window-configuration)
    (mapc #'kill-buffer buffers)))
(bind-key "q" #'help/magit-kill-buffers magit-status-mode-map)

(Emacs+Org-Mode) A Literate LS

I can never remember what parameters I want for ls so I made an alias for it. I still couldn’t remember them so I copy and pasted the documentation into a literate document and tangle that into a function to do what I want:

Continue reading “(Emacs+Org-Mode) A Literate LS”

(Emacs+Org-Mode) Quickly Figure Out How To Write A Function By Decompiling A Macro Using It

When I can’t figure out how to write a function to do what I want then I record a macro of what I want to do and then “decompile” it to Elisp using elmacro. This is a super-power package if you want to figure out how something works.