Wednesday, June 25, 2008

Extending cut-and-paste: example two of motivation for mult-item clipboard

My last post looked at a case where it is useful to have multiple clipboard items. Here's another.

There are multiple terms the user wants to search for within a number of documents, and the editor / word processor only allows them to search for one item at a time.

To make it easier for themselves (and avoid typing errors), the user wants to cut and paste the search terms into the Find dialog box. Within a document they need to individually search for each item, and then they need to repeat this process for each of the other documents.

With a single-item clipboard, each time they wanted to paste an item again (for searching the next document), they'd have to recopy it into the clipboard.

If there were 3 search terms and 5 documents, then you'd have to add each term to the clipboard 5 times. That is, make 5 copy operations. In total, for all 3 terms, you'd have 15 copy operations for loading them into the clipboard. And remember that each of those 15 copy operations would involve finding an existing copy of that term that you'd stored somewhere already.

With a mult-item clipboard, you'd only need to perform 3 copy operations - that's 12 fewer copy operations and 12 fewer times having to find an existing copy of that term to copy.

In my previous example, I considered the case where a person wants to paste a particular phrase a number of times during the course of writing a document, and they need to perform other cut and paste operations in between each of these. In the present example, you want a multi-item clipboard for essentially the same reason - because you're interleaving other cut and pastes between the pastes of a particular item.

It's just that in this case, all of the items are like this - things that you want to paste multiple times over a period of time, with other cut and paste operations interleaved.




In UNIX, you could perform all of those Finds with a single grep command. Sometimes, though, you want to search the document in a more interactive manner in the editor. It depends on why you want to search for that item - you might want to look for an item then edit it or something surrounding it, for example.

Here's another reason for potentially wanting to search within the editor windows themselves. If you've got those documents all already open, you can directly search within their window. If they were stored in different directories, and you wanted to grep them, you'd have to spell out those directories in the grep command.

No comments:

Post a Comment