ICeCoffEE 1.5b5
24 February 2009

Open URLs and email addresses in Cocoa applications by ⌘-clicking. Access Services from contextual menus or the menu bar.

Written by Nicholas Riley <mailto:icecoffee@sabi.net>.
Obtain updates from <http://web.sabi.net/nriley/software/>.

Installation

Follow the instructions in the installer. If an earlier version of ICeCoffEE is installed, the installer will move it to the Trash.

Removal

To temporarily disable ICeCoffEE, use the Application Enhancer System Preferences pane (see the “Configuration” section below). To remove ICeCoffEE completely, use the “–” button in the Application Enhancer System Preferences pane or the “Uninstall” button in the installer.

Usage

To test ICeCoffEE:

	1.	If TextEdit is open and was open when you installed ICeCoffEE, quit TextEdit. ICeCoffEE is only available in applications you open after installing it. If you want to be sure ICeCoffEE is active when installing it for the first time, restart.
	2.	Open TextEdit (normally in the Applications folder).
	3.	Type an Internet location (URL), for example http://www.google.com/.
	4.	Hold down the Command (⌘) key and click anywhere inside the address. Your preferred Web browser will open and display Google’s Web site, assuming your Internet connection is otherwise functioning.

To use ICeCoffEE:

⌘-click on a URL or email address in a Cocoa application’s text area. Some Cocoa applications that come with Mac OS X include Stickies, TextEdit and Network Utility. In addition, ⌘-clicking works in Terminal windows, and on text in Safari browser windows and Mail messages.

⌥⌘-click to select from a menu of applications which can open the location, similar to the “Open With” submenu in the Finder, or copy the location to the clipboard as a link. Add the Shift (⇧) key to a ⌘-click or ⌥⌘-click to open the location in the background.

Like ICeTEe 2, ICeCoffEE 1.3 and later can work with a bookmark manager such as Alco Blom’s URL Manager Pro. ICeCoffEE uses the helper application defined for the “bookmark” protocol. For more information, see:

	<http://web.sabi.net/nriley/software/icecoffee-bookmark/>

Control (⌃)-click (or if you have a multi-button mouse, click with the right button) on text in a Cocoa application to find a “Services” submenu at the bottom. This menu works the same way as the Services submenu of the application menu.

ICeCoffEE also adds the Services menu to the contextual menus of Terminal windows, Xcode source windows, Web pages viewed with Safari and Camino and certain PDF viewers including Preview.

Services which are not available (for example, because they operate on selected text and no text is selected) are hidden in contextual menus, instead of being disabled as they are in the menu bar Services menus.

Configuration

To change ICeCoffEE’s settings, open System Preferences (in the  menu). Click “Application Enhancer,” then select ICeCoffEE from the module list.

The Settings tab allows you to turn on and off various features of ICeCoffEE. Your changes take effect immediately for all applications in which the current version of ICeCoffEE is active.

If ICeCoffEE is interfering with the normal behavior of an application, use the Applications tab to stop ICeCoffEE from doing anything in that application. If the application is currently open, you must quit and reopen it before your changes take effect. Also, please report the abnormal behavior to me so I can address it in a future version of ICeCoffEE.

Where else does this work?

Some applications which provided ICeTEe-like behavior under Mac OS 9 continue to do so in Mac OS X. A few I am aware of are:

BBEdit 	<http://www.barebones.com/products/bbedit/>
MT-NewsWatcher	<http://www.smfr.org/mtnw/>

Apple has provided ⌘-click URL opening in Mac OS X 10.2 and later in two places.

•	Apple’s Multilingual Text Editor (MLTE) lets you ⌘-click URLs to open them. You can identify MLTE text areas by the insertion point: it will be two pixels wide and gray, instead of one pixel wide and black. (Finder and iTunes are two common applications which use MLTE.)

•	Terminal lets you use ⌘-double-click (in Leopard, ⇧⌘-double-click) URLs to open them. ICeCoffEE preempts this mechanism in Mac OS X 10.4 by acting on a single ⌘-click; in Mac OS X 10.5 you can still ⇧⌘-double-click with ICeCoffEE installed.

Cocoa text views in Mac OS X 10.4 and later include a contextual “Open URL” item; unfortunately URLs are less accurately recognized in Mac OS X 10.5.

None of these Apple-provided URL opening mechanisms work as well as ICeCoffEE. They appear to be independently written.

Frequently asked questions

Q. Why does ICeCoffEE pause before opening a location?

A. ICeCoffEE is waiting to make sure you aren’t trying to ⌘-double-click, in applications where ⌘-double-clicking extends a discontiguous selection by word, or does something else special (as in Xcode). ICeCoffEE 1.5 and later no longer pauses on a ⌥⌘-click, since ⌥⌘-double-click doesn’t do anything special. To reduce this delay, adjust the Double-Click Speed in the Keyboard & Mouse System Preferences pane.

Q. Do I still need ICeTEe?

A. If you use ICeTEe in Classic, keep it installed. Unfortunately, no information is shared between Internet Config in Classic and Mac OS X, so you will have to configure your helper information twice.

Q. Why doesn’t ICeCoffEE support my favorite app?

A. Please send me suggestions. At this point ICeCoffEE works everywhere I want it to work. You can also request that your favorite application support ⌘-clicking of URLs directly, as several applications on Mac OS X already do.

Q. What does ICeCoffEE stand for?

A. Internet Config Cocoa Editing Extension. Or something like that.

Q. My question isn’t answered here.

A. That’s not a question. But if you have a question about ICeCoffEE, a suggestion or a bug to report, please email it to me at <icecoffee@sabi.net>. See the known issue list in the version history below so you don’t report a bug I already know about. I’ll get back to you as soon as my schedule will allow. Thanks!

Version history

1.5 / unreleased
•	Updated to Application Enhancer (APE) 2.5, Unsanity Installer 3.7.1 and Smart Crash Reports 1.5
•	Compatible with Mac OS X 10.5 Leopard, Xcode 3.0/3.1, Safari 3 and 4 Beta
•	Display service and application icons in Services contextual menus and System Preferences
•	Fixed several cosmetic issues with “Select Services” sheet in System Preferences
•	Display customized keyboard shortcuts and shortcut conflicts in “Select Services” sheet in System Preferences
•	Rewrote URL parser to support many more URL styles
•	Open a selected URL or email address by ⌘-clicking inside it
•	No longer require text selection in WebKit (Mail, Safari, iChat, etc.) before ⌘-clicking
•	Operate on the URL, rather than the text, of hyperlinks (only for editable areas in WebKit, e.g. Mail composition)
•	Remove delay before displaying ⌥⌘-click menu (there’s no need to disambiguate a double-click)
•	Add “Copy Link” to copy to clipboard from ⌥⌘-click menu
•	Added Services to contextual menus of PDFs in Preview and Safari/WebKit’s built-in viewerc
•	Removed customized keyboard shortcuts from contextual Services menu in Mac OS X 10.4
•	Fixed URL flashing behavior in text views and WebKit
•	Don’t display error instead of ⌥⌘-click menu when helper applications are deleted or otherwise unavailable
•	Add bookmark helper icon to Add Bookmark dialog box
•	Bring application to the foreground where needed to display errors
•	Correctly display setting “Require ⌥ to drop text in same window”
•	Don’t display “out of range” exception when clicking after the end of a non-empty Mac OS X 10.5 text view
•	Don’t signal an error when ⌘-clicking in WebKit doesn’t find any text
•	Upgraded project to Xcode 2.4 format
•	Requires Mac OS X 10.4.11 or later

Known issues:
•	Service disabling may not work when the service names are localized
•	Some remaining WebKit bugs (e.g. 18794) may cause selection to be offset
•	Discontiguous and rectangular selections are not yet supported; ICeCoffEE uses the first selected block or line
•	⌘-clicking wrapped URLs in Mac OS X 10.4 Terminal may select too many lines of text
•	<>-delimited URLs split over 3 or more lines (with whitespace inside the URL) are not correctly processed if you ⌘-click on a line other than the first or last line
• ICeCoffEE (and, more generally, Application Enhancer) does not yet work in 64-bit applications

1.4.4 / 14 August 2007
•	Updated to Application Enhancer (APE) 2.0.3
•	Restored service keyboard shortcuts in “Select Services” sheet in System Preferences
•	Fixed ⌘-click incompatibility with Safari 3 Beta and development WebKit versions

1.4.3 / 24 July 2006
•	Updated to Application Enhancer (APE) 2.0.1 and Unsanity Installer 3.6.1
•	Now a Universal Binary, compatible with Intel Macs [Sven-S. Porst]
•	Uses Smart Crash Reports if installed
•	Removed TEClick support, since Apple has deprecated TextEdit and QuickDraw
•	Added standard APE icon
•	Restored Services in recent Camino versions’ contextual menus
•	Fixed Terminal crash when clicking disabled minimize or close controls in Open dialog
•	Strips whitespace from URLs
•	Corrected ⌘-clicking behavior in development WebKit versions
•	Upgraded project to Xcode 2.3; various packaging improvements; eliminated pesky warnings from release build

1.4.2 / 16 May 2005
•	Updated to Application Enhancer (APE) 1.5: “APE Manager” System Preferences pane is now “Application Enhancer”, among other changes
•	Updated to fancy new Unsanity Installer 3.5
•	Improved URL parsing (for example, now require the first character of a URL to be alphanumeric)
•	Revised documentation to reflect supported Mac OS X versions and bug fixes
•	Restored selectable contextual menu and menu bar Services in Mac OS X 10.4
•	Resolved incompatibility with Cocoa text discontiguous selection in Mac OS X 10.4: URL launching is slightly delayed to ensure your ⌘-click is not followed by another click
•	Removed keyboard shortcuts from contextual Services menu (that they’re present in Terminal is a violation of Apple Human Interface Guidelines)
•	Eliminated unsightly “*** Assertion failure in ICCF_LaunchURL()” console message when no item is chosen from the ⌥⌘-click menu
•	Fixed missing URL highlight while the ⌥⌘-click menu is displayed in Safari
•	Restored French localization (missing in 1.4.1)
•	Requires Mac OS X 10.3.9 or later

1.4.1 / 18 April 2005
•	Updated to Application Enhancer (APE) 1.4.6: improves APE Manager exclusion management, other stuff
•	Updated to Unsanity Installer 3.3
•	Fixed ⌘-click incompatibility with Safari 1.3 as included in Mac OS X 10.3.9
•	Upgraded project to Xcode 1.5 (native targets, etc.)
•	Requires Mac OS X 10.2.8 or later

1.4 / 26 October 2003
•	Updated to Application Enhancer (APE) 1.4.1: improves application launch times
•	Modified ⌥-drag copy into same Terminal window is now an option in APE Manager
•	Services displayed in contextual menus can be selectively disabled in APE Manager
•	Added Services to contextual menus of Xcode and Camino
•	Fixed cosmetic problems in APE Manager under Mac OS X 10.3
•	Restored Safari support, which now applies to any application using WebKit (e.g. Mac OS X 10.3’s Help Viewer, NetNewsWire) and honors URL blinking preferences in Mac OS X 10.3

1.3.3 / 31 May 2003
•	No longer accidentally display debug message “range of string {x, y}” in Console when opening URLs in Terminal
•	Non-ASCII characters act as URL boundaries instead of yielding confusing “conversion to cString failed” error
•	Respond to ⌘-click in non-ASCII text with “no URL was selected” instead of “conversion to cString failed”
•	Fixed small memory leak in contextual Services menu [Sven-S. Porst]
•	Remove disabled items and collapse single-item submenus in Services contextual menus [Sven-S. Porst]
•	Enable service keyboard shortcuts at application launch time [Sven-S. Porst]
•	Fixes text dragging behavior in Terminal: now ⌥-drag to copy within the same window, and ⌥ doesn’t function as a toggle elsewhere
•	Added German localization [Sven-S. Porst]

1.3.2 / 13 March 2003
•	Fixed small memory leak in bookmark addition
•	Fixed appearance of ⌥⌘-click menu on non-Roman systems
•	⇧⌘-click or ⌥⇧⌘-click to open URLs in the background [Paul Kafasis]
•	Temporarily disabled Safari support, because of bugs in recent Safari betas
•	Added Japanese localization [Shike, Satoshi]

1.3.1 / 9 February 2003
•	Sort helper application names in ⌥⌘-click menu
•	No longer activate in background-only (NS/LSUIElement, NS/LSBackgroundOnly), command-line or full-screen applications: fixes missing speech feedback window, conflict with Disk Copy and Xounds [Because of limitations in APE Manager, these applications still appear in the Enhanced list]
•	Fixed small memory leak in APE Manager preferences plugin

1.3 / 3 February 2003
•	Work around CFLog message appearing in Console when bookmark dialog box is shown

1.3b3 / 2 February 2003
•	Show default protocol handler in menu even if it doesn’t claim to handle it
•	Added “Add Bookmark” to ⌥⌘-click menu
•	Updated to APE 1.2.1 final and new Unsanity Installer: should fix problem where ICeCoffEE Installer is not updating APE where necessary, and ICeCoffEE doesn’t activate at all
•	Fixed “slack” URL opening problems with OmniWeb and iCab (ICeCoffEE was generating an invalid URL) [John Marriott]
•	Fixed ⌥⌘-click text highlighting in SimpleText

1.3b2 / 29 January 2003
•	Beginnings of Carbon support: implemented TEClick patch, based upon ICeTEe 2.0; enabled in SimpleText only.
•	Fixed incorrect version number in uninstallation, again (oops)
•	Normalized error processing in Terminal
•	Fixed text blinking to work like ICeTEe (especially noticeable in Terminal)
•	Handle “slack” URLs (e.g. web.sabi.net/nriley)
•	Fixed small memory leak when parsing invalid URLs
•	Added ⌥⌘-click “Open Location With” menu
•	Prepared all text in the APE for localization

1.3b1 / 26 January 2003
•	Implemented Mac OS X 10.2 Terminal support
•	Fixed URL parsing issues

1.3d3 / 22 January 2003
•	Uninstall input manager version of ICeCoffEE if found as part of installation
•	Fixed incorrect version number "1.5a3" displayed in installer (only if you try to uninstall this or a later version)
•	Restored exclude list functionality to APE Manager preferences (oops)
•	Automatically migrate exclude list from ICeCoffEE 1.0–1.2 format
•	ICeCoffEE-specific settings in APE Manager

1.3d2 / 20 January 2003
•	Added support for contextual menus in Safari’s browser window, and partial ⌘-click launching (select text first)
•	Fixed regression in Project Builder support, no longer reacts on ⌘-click (oops)
•	Use localized text for “Services” title
•	Added Services in the menu bar [Ben Hines]

1.3d1 / 19 January 2003
•	Now an Application Enhancer (APE) module instead of an input manager
•	Uses Unsanity Installer
•	Uses APE Manager for configuration
•	Converted Read Me to RTFD format from plain text
•	Removed Mac OS X 10.1 Terminal support
•	Fixed Services in contextual menu for Project Builder 2.0 and Mac OS X 10.2 Terminal

1.2b2 / 20 April 2002
•	Fixed “dead text fields” in tab views [Dr. Suksiri Grams]

1.2b1 / 10 February 2002
•	Be more lenient about the ends of a URL, so >http://... is correctly interpreted
•	Fixed memory leak in Terminal launching

1.2a2 / 10 February 2002
•	Fixed bug when ⌘-clicking in Terminal when text already selected
•	Fixed crashing bug when ⌘-clicking on the last line in Terminal
•	Filter punctuation surrounding URLs (correctly except parentheses, which technically violates RFC 2396 §2.3) [Chris Behm]
•	Support lines which wrap courtesy of Terminal
•	Factored a bunch of code; fixed the URL length checking bug everywhere, not just in one place.

1.2a1 / 8 February 2002
•	Rewrote attributedSubstringFromRange: to only grab complete lines; many hours of pain and suffering for padding lines
•	Fixed off-by-one error in URL length checking

1.2d5 / 7 February 2002
•	Implemented minimal NSTextInput for Terminal.app since it doesn’t do so itself (buggy, crashes when trying to access beyond end of line)
•	Reduced memory consumption in NSTextInput URL launching code

1.2d4 / 30 January 2002
•	Fixed crashing bug when ICeCoffEE couldn’t get the selection and tried to call ICStop without ICStart
•	Intercept ⌘-click in Terminal.app (but can’t do anything with it yet)
•	Version of URL launching code that only requires NSTextInput, not NSTextView (uses too much memory)

1.2d3 / 30 January 2002
•	Pass mailto hint (⌘-click email addresses)

1.2d2 / 29 January 2002
•	Adds contextual menu to Terminal windows

1.2d1 / 28 January 2002
•	Proof of feasibility for Terminal.app

1.1 / 28 January 2002 / installer 1.0.2
•	minor tweaks to Read Me file
•	really handle drawers this time
•	fixed crashing bug in installer after remove/install (moral: always use accessors for setting object-valued instance variables)
•	no longer exclude applications which have no CFBundleID
•	properly handle toolbar item views which are nil
•	better error handling during patching

1.1d2 / 27 January 2002 / installer 1.0.1
•	Installer works around suid root bug (should no longer crash NetInfo Manager and Disk Utility on startup) [Peter Miller]
•	Better preference file handling
•	Fixed installer bug where ICeCoffEE couldn’t be removed if the folder in which it was installed was inaccessible
•	No longer disable Services contextual menu in excluded apps
•	Fixed “dead text fields” in toolbars and drawers [ZnU]. Note: to ⌘-click a text field in a toolbar, click then ⌘-click immediately afterwards, otherwise you’ll move the toolbar item instead.

1.1d1 / 25 January 2002
Added Services item to contextual menu

1.0 / 25 January 2002
Minor tweaks to Read Me file

1.0a6 / 25 January 2002
Added exclusion, no UI yet (edit the plist if you need to)—defaults to exclude PBX. Added Remove function to the installer

1.0a5 / 24 January 2002
Fixed “dead text fields” bug, I think...

1.0a4 / 23 January 2002
Test version with installer

1.0a3 / 22 January 2002
Only activate on ⌘-left mouse button

1.0a2 / 21 January 2002
Removed debugging messages; reports errors in a dialog box rather than Console; flash URL; fixes errors clicking on <>; temporary disable function; read me

1.0d1 / 20 January 2002
Proof of feasibility.

Acknowledgments

John Marriott, for inspiration and testing
Michael Dinsmore, John Hayes, Ben Hines, Philippe Martin, Raphaël Szwarc and Peter Hosey, for testing and suggestions
Slava Karpenko and Rosyna Keller at Unsanity, for their incredible software and generosity
Evan Gross, for help with WebKit
Quinn and Michael Schürig, for ICeTEe
everyone who worked on Internet Config

This product uses Application Enhancer system
 Copyright ©2002–2008, Unsanity LLC
http://www.haxies.com/ape/