Pre-order Tiger from Amazon: $95

Opening Files Together in a New BBEdit Text Window, Redux

Back in September, after BBEdit 8.0 shipped, I posted an AppleScript you could use to open a bunch of files together in a single new window, which was something you couldn’t do out-of-the-box with BBEdit’s new documents drawer. The choices in BBEdit 8.0 were to either open each document in its own window (i.e. the traditional multi-window behavior BBEdit has always offered), or you could always have documents open within the current frontmost window.

I use the script with Ranchero’s Big Cat Scripts plug-in, so that I can invoke it from the Finder’s contextual menu simply by Control-clicking on the files I wish to open together.

In my original script, I had to go through a few minor contortions to work around some of the limitations of BBEdit 8.0’s scripting support for the documents drawer. BBEdit 8.1 (released two days ago) makes this a lot easier, by adding an optional opening in parameter to the open command. Your choices for the opening in target are front_window, separate_windows, and the one we want: new_window.

Here’s the new version of the script:

on main(file_list)
   tell application "BBEdit"
      open file_list opening in new_window
      tell text window 1
         set show documents drawer to true
         set show navigation bar to true
         activate
      end tell
   end tell
end main

(The main handler is a Big Cat Scripts idiom; see the previous article for more details on using this with Big Cat.)

This script is not only more concise and intuitive than the version from September, but executes a bit quicker as well.

Update

Chris Nandor has updated his Perl version of the same script, and also offers a bunch of tips for making use of the bbedit command-line tool.


Pre-Order Tiger From Amazon

Amazon.com has Mac OS X 10.4 Tiger available for pre-order (sans release date), with a $35 rebate that brings the cost down to just $95. That’s a pretty good deal, so I’ve placed a link to the offer in this site’s banner. If you’re planning on upgrading to Tiger (and I’m guessing somewhere around 90 percent of you are), this is a good way to save yourself $35 and support Daring Fireball at the same time.

(Alas, as of this writing, this offer is only available at Amazon.com; neither Amazon.ca nor Amazon.co.uk have Tiger available for pre-order yet.)


Caching Out

A few brief updates on the Mac OS X 10.3 font cache bug:

  • After yesterday’s report, a few readers do report seeing bloated font cache files even though they don’t have any PostScript fonts installed. I still think PostScript fonts exacerbate the problem, but apparently they’re not the only cause.

  • Many readers have recommended Mark Douma’s Font Finagler, a $10 shareware utility that deletes your system’s font cache files for you. I personally can’t see spending $10 to delete a few files which are easily removed by hand (and, frankly, I feel more comfortable trashing them manually anyway), but at least a few dozen DF readers are happy Font Finagler users.

    A few other readers suggested OnyX, a freeware utility that presents a bunch of system maintenance tasks in a Mac-style user interface. Included amongst its features is the ability to delete font caches.

  • The cache bloating is somehow related to the fact that on login, ATSServer opens every font located in the system’s font folders:

    • /System/Library/Fonts/
    • /Library/Fonts/
    • ~/Library/Fonts/

    Thus, one way to avoid the bug is to use a third-party font manager, such as Suitcase, which stores your font files in any location other than the system’s font folders.

    Apple’s Font Book does not itself cause this problem (at least I don’t think it does), but it doesn’t avoid it, either, because when you use Font Book, it stores all of your fonts, including your disabled fonts, in the system’s font folders.

    The point here is not that you should buy Suitcase just to avoid this bug,1 but rather to explain why, if you’re already using Suitcase or a similar utility, you probably haven’t been affected by this bug, even if you’ve got the entire Adobe Type Library installed.


1 If for no other reason than that I expect this bug to be fixed in Mac OS X 10.3.9.