ICeCoffEE 1.5d1
unreleased

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/>.

What is it?

Perhaps you’re a Mac user used to the behavior of ICeTEe in Mac OS 9.

Or maybe you’re a new Mac OS X user looking for a faster way to open and bookmark URLs and email addresses in text documents, Stickies, source code, and more.

Either way, ICeCoffEE is for you!

Installation

Follow the instructions in the installer. If an earlier version of ICeCoffEE is installed, it will be moved 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 “Uninstall” button in the installer, or drag “ICeCoffEE.ape” to the Trash.

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, log out and log back in.
	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, Mail, iChat and Network Utility. In addition, ⌘-clicking works in Terminal and SimpleText windows, and on text in a Safari browser window if you select the URL or email address first.

⌥⌘-click to select from a menu of applications which can open the location, similar to the “Open With” submenu in the Finder.

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 instructions, 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’s text area, and notice 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, and Web pages viewed with Safari and Camino.

Services which are not available (for example, because they operate on selected text and no text are 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 Carbon 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/>
Tex-Edit Plus	<http://www.tex-edit.com/>

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

Apple’s Multilingual Text Editor (MLTE) service lets you ⌘-click URLs to open them. Apple’s FileMaker Pro 7 is an example of an application which uses MLTE.

Terminal lets you use ⌘-double-click URLs to open them. (ICeCoffEE preempts this mechanism by acting on a single ⌘-click.)

Neither of these Apple-provided URL opening mechanisms work as well as ICeCoffEE. They appear to be independently written. A future version of ICeCoffEE may intervene in MLTE as a replacement.

Frequently asked questions

Q. Why isn’t ICeCoffEE a service?

A. I think services are a good idea. But in my opinion, services are poorly implemented in Mac OS X. Compare:

•	⌘-click with insertion point or selection anywhere in URL

with:

•	carefully select text of URL
•	go to application menu
•	find “Services” item (it isn’t in the same place each time)
•	(possibly) find hierarchical menu item for the application you want to launch the URL with
•	select service item

Which one would you rather use? Which one does Apple provide systemwide? To improve the situation, unavailable services could be hidden, and the Services menu could be promoted to a top-level menu (as it was in NeXT OSes and Mac OS X Server 1.x) or made available as a contextual menu. ICeCoffEE 1.1 and later support services in contextual menus, 1.3 and later support services in the menu bar, and 1.3.3 and later hide unavailable services.

Q. What about assigning keyboard equivalents to services?  Then you’d only have two steps above.

A. There’s no set of service keyboard equivalents that does not overlap with some application or other.  This is especially true when Apple reserves more ⌘ keys than ever for its own use in OS X. It's unlikely that I could pick a key combination that was memorable and easy to press, yet didn't conflict with any application.

Also, the current implementation of services returns only the selection, not any context surrounding the selection.  This is an essential feature for programs such as ICeCoffEE to work seamlessly.

Finally, the implementation of services in Mac OS X versions prior to 10.4 (Tiger) requires that the Services menu be pulled down in an application before the service keyboard equivalents can be used, making them almost useless. ICeCoffEE 1.3.3 and later work around this issue.

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, with the exception of MLTE text areas which already support rudimentary URL launching.

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 Carbon/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 bug 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
•	Display service and application icons in Services contextual menus and System Preferences
•	Restored service keyboard equivalents and fixed several cosmetic issues with “Select Services” sheet in System Preferences
•	Handle some URLs containing parentheses, while still maintaining support for parentheses surrounding URLs

Known issues:
•	⌘-clicking wrapped URLs in Terminal may select too many lines of text
•	<>-delimited URLs split over multiple lines (with whitespace inside the URL) are not correctly processed

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 equivalents 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 Mac-arena the Bored Zo, for testing and suggestions
Slava Karpenko and Rosyna Keller at Unsanity, for their incredible software and generosity
Quinn and Michael Schürig, for ICeTEe
everyone who worked on Internet Config

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