Privacy or Security

The government and others are fond of telling us that we must give up some privacy to ensure our security. Paul Downey reminds us of a truth worth remembering.

Posted in General | Tagged | Leave a comment

Limiting the Scope of ace-jump-mode

Over at elisp solves problems, Daniel Gempesaw tell us something I didn't know: it's possible to limit the scope of ace-jump-mode. By default ace-jump-mode will find the matching characters in all open windows and frames.

Gempesaw likes to keep related buffers in a frame and wants to limit ace-jump-mode to that single frame. Others want to limit it to the current window, and still others, I suppose, are happy to find all the matches as the default does.

If you'd like to limit its scope, it's merely a matter of setting an option. Head on over to elisp solves problems for the details.

Posted in General | Tagged | 2 Comments

Another Version of Hydra

Abo-abo has released another significant version of hydra. Hydra seems to be evolving into a strong AI.

Posted in General | Tagged | Leave a comment

Artist Mode

Artist mode is one of those things I learned from Bernt Hansen's excellent Organize Your Life In Plain Text! introduction to Org mode. I've used it in conjunction with ditaa to produce simple but finished block diagrams from ASCII diagrams.

I haven't used it for so long that I'd pretty much forgotten about it but then I came across this excellent video from Rob Rohan on using artist mode. It takes a bit of practice to get as fluid as Rohan is with it but it's not really hard.

A Rohan points out, artist mode is also useful for adding diagrams to your source code comments or other places where the ASCII art is good enough or even preferable. If you're like me, you probably won't use it all that often but sometimes it's exactly what you need. It's especially nice in conjunction with an Org mode code block where you can have it produce a nice diagram for your output while keeping all the source in your Org mode source file.

Posted in General | Tagged , | Leave a comment

Reverting All Buffers to Branch State


Posted in General | Tagged , | Leave a comment

Getting the Host Name of the Current Browser Page

A while ago I wrote about coding some Elisp to grab the URL of the current Web page and turn it into an Org link. It doesn't seem like it would reduce friction by that much but it really has made linking in my blog posts much more efficient. So much so that now I hate to make links to the site and then to a particular post like

abo abo over (or emacs has a nice video on using Hydra.

because now I have to switch focus to Safari to cut the site name of the blog and then paste it into a link just like I used to do for links to individual posts.

So I looked for some URL parsing functions in Emacs and found url-generic-parse-url that breaks a URL into its constituent parts. I used that to modify jcs-get-link to return a link to just the host name if it's called with the universal argument:

(defun jcs-get-link (hostp)
  "Retrieve URL from current Safari page and prompt for description.
With the universal argument, return a link to the host only.
Insert an Org link at point."
  (interactive "P")
  (let* ((link (read-from-minibuffer "Link Description: "))
         (result (shell-command-to-string
                  "osascript -e 'tell application \"Safari\" to return URL of document 1'"))
         (urlobj (url-generic-parse-url result))
         (host (concat (url-type urlobj) "://" (url-host urlobj))))
    (insert (format "[[%s][%s]]" (if hostp host (org-trim result)) link))))

It's a bit of a hack because the host name may not be the same as the site name so the new function may not give the right site link. Ironically, an example of this is Irreal. If you want the address for the blog itself, it's not as the above code returns.

Still, this problem isn't that common and even handling it as a special case is still less friction that changing focus to the browser.

Posted in Programming | Tagged | 2 Comments

Password Contains Invalid Characters (Again)

Devin Chalmers has some words of wisdom for startups:

Nick Selby already told them but apparently they didn't listen.

Posted in General | Tagged | Leave a comment

Searching Org Files and Buffers

Remember Karl Voit from the Sacha Chua chat that I wrote about previously? Voit collects data on just about every aspect of his life and stores it in an Org file. If you haven't watched the chat yet, be sure to take a look. You'll be amazed.

The other half of collecting all that data is being able to search it. Voit has lots of homegrown tools for that but he also makes use of the built-in Org tools:

His tweet points to this excellent Worg tutorial that describes how to extract data from Org files. The methods are surprisingly flexible, and although the syntax can be daunting they're well worth learning if you collect any data at all into Org files. It's worth reading through the tutorial if only to see what's available. You can always check back for the exact details when yo need them.

Voit is an expert on data collection and retrieval and it's worth studying his methods and software. You'll be a lot more proficient with data if you do.

Posted in General | Tagged , | Leave a comment

Making occur a Bit Smarter

Abo-abo is still blogging up a storm and giving us a daily dose of great Elisp. Someone looking to amass a first rate Emacs configuration could do worse than simply grab abo-abo's daily posts and integrate them into their .emacs file.

One very nice offering is this bit of Elisp that makes occur a little bit smarter. His code arranges to make any active region the default regular expression for occur unless there's no region, in which case the symbol at point is used.

He says that these two cases hit about 95% of his invocations of occur. Your mileage may vary, of course, but I'd guess most of us would have a similar success rate. At any rate, it's a nice optimization and just a few lines so head on over and take a look. I'm definitely going to integrate it into my configuration.

Posted in General | Tagged | Leave a comment

The NYT Workflow

Most of you have probably figured out that I'm a workflow geek. I love reading about people's workflow and how they optimize their daily tasks. Popular Mechanics has a great article on The New York Times workflow. Many people in many different jobs collaborate, often under rigorous time constraints, to get each day's paper into the hands of its readers.

The article starts out at 1:35 AM at the Times printing plant. Just getting the rolls of newsprint loaded for use by the presses is a major undertaking. They have a control room that the director of plant operations describes as an indoor traffic control tower. The facility is so large that the crew uses adult size tricycles and golf carts to get around.

The story moves on to 6:20 AM when one of the editors opens her eyes and starts checking on what happened overnight. The story continues through the day covering editorial meetings, dropping by the NYT R&D lab (yes really) and finally ends with the paper route couriers picking up and assembling the papers before delivering them to readers.

It's a machine with a huge number of moving parts. Not all of those parts are covered with glory but every one is a necessary cog needed to get the readers' daily papers to their doorsteps. Most people don't think about what it takes to deliver their everyday amenities so articles like this serve to remind us that even quotidian articles can require a complicated and sophisticated operation for their production.

If you like knowing how things work, you'll enjoy this article. It's a look at something most of us don't often think about.

Posted in General | Leave a comment