Thoughtful, detailed coverage of the Mac, iPhone, and iPad, plus the best-selling Take Control ebooks.



Pick an apple! 
Avoid Naming Pear Note Files

If you create a lot of documents, coming up with a name for them can sometimes be a hassle. This is especially true now that search is becoming a more prevalent way to find documents. Pear Note provides a way to have the application automatically generate a filename so you can avoid this hassle. To use this:

  1. Open Saving under Pear Note's preferences.
  2. Select a default save location.
  3. Select a default save name template (Pear Note's help documents all the fields that can be automatically filled in).
  4. Check the box stating that Command-S saves without prompting.
  5. If you decide you want to name a particular note later, just use Save As... instead.

Visit Useful Fruit Software



Related Articles



The Natural Order of Things

Send Article to a Friend

Here's a silly question. Are the digits between one and nine represented by a single character, or by a string of characters? In other words, when you type the number one in a filename, do you always prefix it with a zero? In all likelihood, a number of people are nodding their heads and thinking, "But of course I do that, otherwise files with numbers in the names don't sort right."

We fought with this problem with TidBITS in our early years, because although I was clever enough to prefix my single digits with a zero to pad them into double-digit numbers, I never imagined that TidBITS would be around long enough to hit TidBITS-100, necessitating a mass renaming of the first 99 issues to include an additional leading zero to pad everything into triple-digit numbers. And even today, we can't imagine that we'll be doing TidBITS long enough to need to go to quadruple-digit numbers (although stranger things have happened).

In case you're still wondering what I'm blathering about, here's an example. Assume you keep your own collection of TidBITS around, but for some reason, you rename them with more natural names. You might have the following problem with the first 12 issues when viewing them in the Finder.


The trouble should be obvious - why do issues 10, 11, and 12 sort before issue 2? It's because the Macintosh System is messed up, that's why. Basically, way back when, someone at Apple decided to implement sorting the same way that Unix, DOS, and everything else does, by comparing one character at a time, instead of taking into account the fact that numbers don't sort in alphabetical order the way words do.

For years, the universal solution has been to prefix single-digit numbers with a zero, so they sort before double-digit numbers. As the number of digits increase, so must the number of padding zeroes. Computers should fit the way humans work and think. Instead, when it comes to sorting, humans must fit the way computers work.

No longer. Stuart Cheshire <>, author of the popular network tank game Bolo, has released a tiny freeware extension called Natural Order that overrides how the System sorts numeric parts of strings. I won't repeat the example list above, but once you install Natural Order (drop it in your Extensions folder and reboot), issues 10, 11, and 12 would sort properly to the bottom of the list.

Programs that benefit from Natural Order immediately include the Finder (for "View by Name" windows), Standard File Dialogs (in any application), and the Chooser (for sorting lists of zones, servers, and so on). However, Natural Order works by overriding the System's built-in string comparison routines and only benefits programs that call those routines. A number of programs implement their own sorting mechanisms, so those programs don't benefit from Natural Order. A few recent programs (including Anarchie 2.0 and Fetch 3.0.2 and later) include Natural Order's sorting routines internally so they sort sensibly even without Natural Order installed.

Stuart wants to hear about any programs that do not benefit from Natural Order's sorting routines, so he can try to convince the programmers of the benefit of making their programs call the System's built-in string comparison routines (and thus take advantage of Natural Order).

So, if you're bothered by the way the Mac sorts numeric strings, give Natural Order a try. You probably won't even notice it until you see a folder containing numbered files.

< order-11.hqx>
< NaturalOrder.html>


CrashPlan is easy, secure backup that works everywhere. Back up
to your own drives, friends, and online with unlimited storage.
With 30 days free, backing up is one resolution you can keep.
Your life is digital; back it up! <>