Quantcast
Channel: Paper Jammed » Windows
Viewing all articles
Browse latest Browse all 8

Why must basic copy/paste operations always result in “Ransom Note” text?

$
0
0

I estimate that in any given day I must use clipboard copy and paste operations a few dozen times—and if I’m working with multiple documents, such as when transcribing information from a spreadsheet to a Word document, that figure becomes more like a few hundred times a day.

But in all of those times, I almost never want my computer to paste “ransom note” text. Ninety nine times out of a hundred, I want clean text to be pasted, neatly blending with its surroundings. In other words, paste it as if I were typing it at the keyboard.

So why does Apple think we always want to paste styled text? And why does Microsoft think we always want our spreadsheet to suddenly be filled with somebody else’s 24 point Comic Sans letters instead of a nice unformatted date and time?

Here are my workarounds for this problem. Maybe someone can offer a few other workarounds.

Windows

The easiest way to pasting unformatted content in Windows is to use a free program called Pure Text by a gentleman named Steve Miller. Download PureText 2.0 for all modern versions of Windows.

This app doesn’t have an installer; it runs from wherever it is. However, since it does provide  the ability to launch when Windows starts, I recommend you first drag the small executable file to a nice permanent home somewhere on your hard drive (I usually create a C:\Program Files\PureText folder).

Now launch the app. You will see a small PT icon in your system tray.

All you need to do for an unformatted non-ransom-note paste action is to hit Windows+V. In other words, instead of Control+V, hit the Microsoft flag key and V. You will hear a short cowbell sound as the paste action is performed.

Macintosh

Amazingly, there doesn’t seem to be such a free simple little tool available for Macintosh.

In some applications, such as Pages, the four-key combination of Option+Shift+Command+V will perform an unformatted Paste operation.

If you don’t mind spending a bit of money, programs such as Clean Text for Mac and SmartWrap 2 provide this functionality at a price: both are about twenty bucks. Fortunately, both products provide much more functionality than just stripping formatting from the clipboard.

If you want to roll your own, the best I could come up with is to use a keyboard macro application to assign a tiny script to the desired keys—this option works fine if you already happen to have a keyboard macro application installed. I use Keyboard Maestro, though this method should work just as well with other macro tools.

The essence of the “strip formatting” operation lies in this very short shell script:

1
2
#!/bin/sh
pbpaste | pbcopy

What this does is it simply pipes the output of a command-line “read clipboard” action into a command-line “copy” action. This is a text-level operation, so no funky formatting makes it through. Now, the clipboard contains only pure unformatted text.

The trick is to make your keyboard macro program execute this when you hit the key combination of your choice. Maybe I’ll find inspiration some day to learn how to make a small application like PureText for the Mac. When I do, I’ll post it here.

There are other options available for Macintosh. If you are ambitious, you can turn the problem around and Create a ‘copy as plain text’ service.

Why do computers do this?

When you copy text, the computer puts it on the clipboard in many different styles, referred to as flavors. Typical flavors might be “Rich Text”, “Unformatted Text” or “Image Data”. When you then perform a paste operation somewhere else, the receiving application sifts through the available flavors of your clipboard data and selects the one it likes the most. The application will usually pick the fanciest usable flavor available.

Usually, this process works fairly well. When you copy a selection of cells in an Excel spreadsheet, it might paste into a Word document as a proper Word table, but if you paste into an email application, you might get an image of the cells, and if you paste into a text editor such as Notepad, you will see just the numbers and words.

Likewise, a copied Visio diagram might paste into Word as an embedded editable Visio object, while a paste into Photoshop would result in a flat image, like a screenshot.

Final Thoughts

People have been swearing at the clipboard for years. The typical lowest common denominator is to paste the text into Notepad and the copy from Notepad. Even for this, Mac comes up short: the standard text editor, TextEdit, simply pastes in your ransom note text with formatting and all.

If you use Windows, go right ahead and install PureText. You won’t regret it.

If you use Macintosh, make it easy on yourself and invest in one of the payware applications. Think of how many times you have wanted to paste clean text, as if you had typed it in from the keyboard.


Viewing all articles
Browse latest Browse all 8

Latest Images

Trending Articles





Latest Images