The Omni Group Forums

The Omni Group Forums (http://forums.omnigroup.com/index.php)
-   OmniFocus 1 for Mac (http://forums.omnigroup.com/forumdisplay.php?f=38)
-   -   "Fixing" Mail clippings (http://forums.omnigroup.com/showthread.php?t=5584)

derPlau 2007-11-16 04:24 PM

"Fixing" Mail clippings
 
I haven't been able to use Mail Clippings reliably because it only works if you do all your mail reading from the Message Viewer -- that is, if you try to make a clipping from a separate message window, and the message(s) selected in the "main" (Message Viewer) window is a different message, then you'll wind up with selected text from one message and metadata (subject, message link, etc) from the other.

I've modified OmniFocus's built-in Clipping handlers to fix this behavior. Note that if you follow these directions, you do so at your own risk. Back up the original scripts, and don't be surprised when the daily updates break it. I admit, I'm posting this mainly to call attention to what I consider incorrect behavior of the Clipping scripts in the first place.

We're going to be modifying two scripts, which are wrapped up inside two packages within the OmniFocus application package. Start by quitting OmniFocus, then control- or right-clicking on the OmniFocus application and choosing "Show Package Contents" from the pop-up menu. Navigate to the Contents/Plugins folder inside the package, and ctrl-or-right-click again on the "BuiltInClippingHandlers.Plugin" icon. Make backup copies of "Mail-with-MailTags.applescript" and "Mail-Leopard.applescript", then open these scripts (the originals) in Script Editor (or just a text editor).

Near the top of each of these files (the third and fourth line of actual code) are the following lines:
[CODE]
tell front message viewer
set MyMessages to (selected messages)
[/CODE]
All you need to do is replace these two lines with a single line:
[CODE]
set MyMessages to selection
[/CODE]
Then remove one of the two lines reading:
[CODE]
end tell
[/CODE]
near the very bottom of the file (the second- and third-to-last lines of the file).

In my limited testing, this works as expected (by me, at least): if the Message Viewer window is frontmost, it takes both the selected text and the message metadata from the selected message. If an individual message window is frontmost, it takes the selected text and the metadata from that window.

Tim Wood 2007-11-16 06:17 PM

[QUOTE=derPlau;24827]if you try to make a clipping from a separate message window, and the message(s) selected in the "main" (Message Viewer) window is a different message, then you'll wind up with selected text from one message and metadata (subject, message link, etc) from the other.[/QUOTE]

Thanks! This was in our bug database as <bug://bugs/42335> (Clipping from an open mail message window (not a message viewer) confuses clipping handler) I'll roll your fix in and test it out a bit.

Tim Wood 2007-11-16 06:21 PM

Fix applied in 94771. Thanks!


All times are GMT -8. The time now is 02:53 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.