Like this:

This time we’ll dive into using Emacs effectively with buffers.Watch the video and then make a real effort to use buffers over the next few emacs sessions. Before you know it, they’ll be a natural part of your work flow.

Here’s a Bash function for searching all text files in the current directory for a pattern, then listing the files containing matches in ascending order by number of matches. It’s mostly a proof of concept, but a useful companion to a basic grep search.

Google Chrome version 50 was released to the browser’s stable channel yesterday, and in addition to a handful of new features and security fixes, the update also ends support for a wide range of operating systems that have been supported since Chrome launched on those platforms. Windows XP, Windows Vista, OS X 10.6, OS X 10.7, and OS X 10.8 are no longer supported.

This shouldn’t come as much of a surprise, since Google promised last November to end support for these older OS versions in April of 2016. Old versions of Chrome installed on these OSes won’t stop working (for now), but they’ll no longer receive updates and there’s no guarantee that things like Google account sign-in and data syncing will continue to work.

I’m an unabashed fan of Mozilla Firefox. Upcoming changes to the browser will trigger my move to alternate options, mostly because Firefox will lose the flexibility of their existing XUL engine making Firefox just like every other browser.

Perhaps ironically, those changes may move me to the default browser options of Safari on OS X and Edge on Windows 10 (note: nothing will move me to Internet Explorer as my daily driver). Gnu/Linux & BSD, depending on the desktop environment, may similarly dictate the browser I use.

Until Windows 10 (I think) Microsoft didn’t include a way to view PDFs. Adobe Acrobat Reader was the standard choice, though other options – leaner, faster, and maybe more secure – exist. Microsoft Edge in Windows 10 as well as other apps can read PDFs. I’d rather open them with an application not deeply ingrained in the operating system.

As for Adobe Flash, I refuse to install it on any of my systems as of two years ago. Fewer and fewer sites rely on Flash, which is great. Yet every so often there’s some Internet real estate built on the weak Flash foundation I must visit. Chrome fills the need, again without opening up my OS any more than necessary.

I would be remiss if I failed to applaud Google in keeping these add-ins up-to-date and arguably more secure than Adobe.

Solution: Create tasks in place of startup files & registry entries, augmented by a script or two.

An ounce of prevention = a pound of cure. Which means this process sucks. Ideally, for each startup process you will only need to do this once.

This all kicked off when I read Delay Dropbox Startup in Windows. I knew on-line services like DropBox, Box, OneDrive, and Google Drive ate up battery and bandwidth. They also delayed startup.

Here’s the thing: while I rely on these services I don’t need them right away. In many cases I need to authenticate to a WiFi access point and establish a VPN connection before these services can even begin to help me.

Digging deeper, I found other programs keeping me from a working system and potentially draining my battery. Here’s what I’ve done:

Prerequisites:

CCleaner

Steps:

Launch Task Scheduler

Launch Windows Task Manager.

Go to the Startup tab.

Sort by Startup Impact, then sort by Status. Focus on the items Enabled and High.

Launch CCleaner. Go to Tools – Startup.

For each item discovered in Task Manager above:

In Task Scheduler:

Create a new basic task

Name it “My x”, where x is the name of the program. Click Next.

Under Action, select “Start a Program”

In CCleaner:

Find the startup entry and right click on it, selecting “Open in RegEdit”

Double click on the Name and copy the command line

In Task Scheduler:

Paste the command in the field

When you get to the last tab, make sure “Open the Properties dialog for this task when I click Finish” is selected

Click the Triggers tab and click Edit

Check “Delay task for:” and enter the number of minutes you want it delayed. I recommend staggering OneDrive, Dropbox, Google Drive, and Box by a minute each.

Click the conditions tab and select “Start the task only if the computer is on AC power”, “Stop if the computer switches to battery power”, and (if applicable) “Start only if the following network connection is available” with “Any connection” the option. NOTE: if you have a service you want running no matter the power or network, deselect all of these options.

Select the Settings tab. Select “Run task as soon as possible after a scheduled start is missed”. Deselect “Stop the task if it runs for more than:” if a cloud service or something that you expect always running.

In CCleaner:

Disable the entry you just recreated as a task

Reboot.

Test.

Tweak.

Toggle power.

Toggle network.

Once things work as expected, modify the following script for your needs:

Save it to a file name you’ll remember (like ac.ps1) and place it in your path. This script is meant for triggering normal status when the device gets AC power restored. The three “where” statements above are for processes I don’t need to restart as they should remain running.

I expect to update this with refinements and improvements, so this is very much a work in progress. As always, Your Mileage May Vary. Proceed With Caution. While nothing here is destructive (enabling disabled startup entries in CCleaner and disabling the new task entries should restore things) make backups before you proceed.

Comments, questions, and such are welcome. Let me know how this works for you.

One of the revelations I came to after a while of using emacs is that you can use searching (or swiping) to efficiently move to another place in the visible buffer. In other words, you can see the place that you want the cursor to be so you do a search for a word close to that position to move the cursor there – not because you want to find that word.

The package avy gives an even more efficient way to do this. There are a few options, but with the configuration below, I look at the place I want the cursor to be, hit M-s and type the first character of a word close to that position, and then the short string that appears in order to select the word that I want and the cursor jumps there. Once you get used to it, it almost feels like you can move the cursor just by looking where you want it to go!

The recent directories include parent directories of opened files in Emacs and the directories accessed in Bash shell. I used fasd to get the list of directories in shell. Fasd “offers quick access to files and directories for POSIX shells”.

It’s easy to lose track of your mouse pointer in a large multiple display setup or when there’s no contrast between the screen background and the mouse pointer. It’s also a bit of a challenge if you use the wonderful Synergy project to share your keyboard and mouse between multiple computers. Here are some tips for enabling a way to find your mouse pointer.