Allen, great job (as usual), I'm sure I'll be using this quite often.
It would be great to add some of this to the language grammar so context-sensitive commands could be developed, and it could be pretty- ed up.
I would imagine that the existing support for the headers; to, cc, bcc, reply to, and subject; would be adequate, although I am curious if there are others that people would want to use (or could use). I also wonder if it might be beneficial to quote the values, just to make sure nothing goes haywire. But I can see that not really being necessary.
Something really interesting would be a way to lookup email addresses in the users' address book, though I have no idea if this is even possible.
--oliver
P.S. Yes, I used the command to compose this message. And it was great.
Oliver Taylor oliver@ollieman.net wrote:
P.S. Yes, I used the command to compose this message. And it was great.
Great. Would you please post or show a working example (or an "howto" for dummies)? This is a feature I was expecting for a long time.
Thanks,
On Nov 7, 2006, at 2:36 AM, José Campos wrote:
Great. Would you please post or show a working example (or an
"howto" for dummies)? This is a feature I was expecting for a long time.
To: someone@somewhere.com From: me@here.com Subject: Test Email
This is a test email message. ⌃⌘D
-- Steve stephen@exitwound.org
Am 7. Nov 2006 um 09:04 schrieb Oliver Taylor:
Something really interesting would be a way to lookup email addresses in the users' address book, though I have no idea if this is even possible.
Open Addressbook.app with ScriptEditor… you will see many ways of accessing its content!
Dan
* Oliver Taylor oliver@ollieman.net [2006-11-07 01:04]:
Something really interesting would be a way to lookup email addresses in the users' address book, though I have no idea if this is even possible.
That's a good idea. I made a simple version using contacts[1], which doesn't require Address Book to be open. I put it in the Text bundle because it seems applicable everywhere. Typing ctrl-shift-cmd-a (what's the easiest way of typing those key glyphs?) will replace the current selection or word with a name and email address returned by contacts.
TODO:
* pop up a list for multiple matches, instead of just using the first one * use osascript as a backup * wrap name in quotation marks if necessary * don't return error message on failure
This still requires contacts, but cleans up the process and adds a menu...
Brett
On Nov 7, 2006, at 2:02 PM, Grant Hollingworth wrote:
- Oliver Taylor oliver@ollieman.net [2006-11-07 01:04]:
Something really interesting would be a way to lookup email addresses in the users' address book, though I have no idea if this is even possible.
That's a good idea. I made a simple version using contacts[1], which doesn't require Address Book to be open. I put it in the Text bundle because it seems applicable everywhere. Typing ctrl- shift-cmd-a (what's the easiest way of typing those key glyphs?) will replace the current selection or word with a name and email address returned by contacts.
TODO:
- pop up a list for multiple matches, instead of just using the
first one
- use osascript as a backup
- wrap name in quotation marks if necessary
- don't return error message on failure
[1] http://gnufoo.org/contacts/
<Find Email Address in Address Book.tmCommand>
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
On Nov 7, 2006, at 4:50 PM, Brett Terpstra wrote:
This still requires contacts, but cleans up the process and adds a menu...
I've attached a universal build of contacts as the website only has a PPC version. Hopefully not too big for the MLM. Make sure you click on the contacts1.1u.pkg therein.
j.
And I've attached an osascript version that's not dependent on contacts. I think it might be the better way to go... albeit more code. Thoughts? I left the original code in place so that it could easily be forked, but the applescript turned out to be very effective, IMO.
On Nov 7, 2006, at 7:48 PM, Jay Soffian wrote:
On Nov 7, 2006, at 4:50 PM, Brett Terpstra wrote:
This still requires contacts, but cleans up the process and adds a menu...
I've attached a universal build of contacts as the website only has a PPC version. Hopefully not too big for the MLM. Make sure you click on the contacts1.1u.pkg therein.
j.
<contacts1.1.dmg.zip>
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
Brett Terpstra : Art Director Circle Six Design, Inc. 111 Riverfront Dr, Suite 204 .................................................. p: 507.459.4398 877.858.4332 f: 1.866.540.3063 e: brett@circlesixdesign.com http://www.circlesixdesign.com ..................................................
On Nov 7, 2006, at 8:45 PM, Brett Terpstra wrote:
And I've attached an osascript version that's not dependent on contacts. I think it might be the better way to go... albeit more code. Thoughts? I left the original code in place so that it could easily be forked, but the applescript turned out to be very effective, IMO.
Here's my results:
FirstName LastName - no matches found LastName FirstName - no matches found LastName, FirstName - LastName FirstName email@here.com, FirstName
I haven't had time to review the code yet for potential corrections.
-- Steve stephen@exitwound.org
It's not currently set up to match a full name, just a first, last, or partial. I could change the algorithm to do a full match, but it wasn't intuitive to the way I was thinking this would be used. What were your thoughts?
Brett
On Nov 7, 2006, at 8:53 PM, Stephen Hargrove wrote:
On Nov 7, 2006, at 8:45 PM, Brett Terpstra wrote:
And I've attached an osascript version that's not dependent on contacts. I think it might be the better way to go... albeit more code. Thoughts? I left the original code in place so that it could easily be forked, but the applescript turned out to be very effective, IMO.
Here's my results:
FirstName LastName - no matches found LastName FirstName - no matches found LastName, FirstName - LastName FirstName email@here.com, FirstName
I haven't had time to review the code yet for potential corrections.
-- Steve stephen@exitwound.org
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
Brett Terpstra : Art Director Circle Six Design, Inc. 111 Riverfront Dr, Suite 204 .................................................. p: 507.459.4398 877.858.4332 f: 1.866.540.3063 e: brett@circlesixdesign.com http://www.circlesixdesign.com ..................................................
* Brett Terpstra brett@circlesixdesign.com [2006-11-07 20:24]:
It's not currently set up to match a full name, just a first, last, or partial. I could change the algorithm to do a full match, but it wasn't intuitive to the way I was thinking this would be used. What were your thoughts?
I've attached yet another version of this. It now uses lbdb if found, else contacts, else osascript. lbdb can also search Mutt alias files, LDAP, and much more. Both lbdb and contacts can handle a full name, if you select it first.
I'm grabbing the path from bash_init.sh, which isn't the fastest method (starting a whole shell just to get a variable)... but it works.
I like it, but I get this when I search for a full name. I have contacts but not lbdb.
error < no one found>
instead of a tooltip. The text replaces the search text.
Brett
On Nov 7, 2006, at 9:53 PM, Grant Hollingworth wrote:
- Brett Terpstra brett@circlesixdesign.com [2006-11-07 20:24]:
It's not currently set up to match a full name, just a first, last, or partial. I could change the algorithm to do a full match, but it wasn't intuitive to the way I was thinking this would be used. What were your thoughts?
I've attached yet another version of this. It now uses lbdb if found, else contacts, else osascript. lbdb can also search Mutt alias files, LDAP, and much more. Both lbdb and contacts can handle a full name, if you select it first.
I'm grabbing the path from bash_init.sh, which isn't the fastest method (starting a whole shell just to get a variable)... but it works.
<Find Email Address in Address Book.tmCommand>
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
Brett Terpstra : Art Director Circle Six Design, Inc. 111 Riverfront Dr, Suite 204 .................................................. p: 507.459.4398 877.858.4332 f: 1.866.540.3063 e: brett@circlesixdesign.com http://www.circlesixdesign.com ..................................................
* Brett Terpstra brett@circlesixdesign.com [2006-11-07 21:22]:
I like it, but I get this when I search for a full name. I have contacts but not lbdb.
error < no one found>
Fixed. I hate it when programs print errors on stdout.
It seems that "Find EMail Address in Address Book" works only with plain-ASCII and not extended. I can't find names with umlauts (the vowels with the dots above - äöü ÄÖÜ) in their name, like mine "Kobschätzki".
Thx for the command anyway :)
Niels
* Niels Kobschätzki n.kobschaetzki@googlemail.com [2006-11-07 23:34]:
It seems that "Find EMail Address in Address Book" works only with plain-ASCII and not extended. I can't find names with umlauts (the vowels with the dots above - äöü ÄÖÜ) in their name, like mine "Kobschätzki".
It seems to be a limitation of lbdbq and contacts... which is odd, since lbdb was written by a couple of Germans. I also couldn't get osascript to work, but the same script in Script Editor returns results.
* Niels Kobschätzki n.kobschaetzki@googlemail.com [2006-11-07 23:34]:
It seems that "Find EMail Address in Address Book" works only with plain-ASCII and not extended. I can't find names with umlauts (the vowels with the dots above - äöü ÄÖÜ) in their name, like mine "Kobschätzki".
I worked out a fix for this. If you encode the search text as Mac Roman instead of UTF-8, lbdb and contacts will find it. I changed the command to translate for contacts. The fix for lbdb is a bit more involved, because lbdb is broken into modules and only the Address Book module needs help.
These directions assume you installed lbdb with MacPorts.
1. mkdir ~/.lbdb 2. save the attached m_osx_addressbook in ~/.lbdb 3. add the following to ~/.lbdbrc: MODULES_PATH="$HOME/.lbdb /opt/local/lib/lbdb"
Note that these commands assume your TextMate text is in UTF-8.
On Nov 7, 2006, at 9:24 PM, Brett Terpstra wrote:
It's not currently set up to match a full name, just a first, last, or partial. I could change the algorithm to do a full match, but it wasn't intuitive to the way I was thinking this would be used. What were your thoughts?
I started writing the code to split the name apart, but it's difficult to know. I can see how you were using it, because by only using one name I was able to get a menu of potential matches. There really are too many possibilities to consider:
LastName, FirstName FirstName LastName FirstName LastName With Spaces (i.e., Van Burren)
And the list goes on. Odds are, your implementation is best. It's clean and uncomplicated. -- Steve stephen@exitwound.org
I'm sure everyone has their preference on how this should work, but I just wanted to point out that there's existing functionality in Quicksilver that could be used here (and it would be available system wide, not just in TextMate). With Quicksilver you could:
* Select your message text (in any application) ⌘⎋ ⇥ Compose (Email To…) ⇥ Type part of a recipient's name ↩
Or, if you were trying to populate a header line, like "To: ", you could:
* Invoke Quicksilver Search for a contact → Choose the right e-mail address ⇥ Paste ↩
I'm not sure if I'm making it sound complicated or not, but the process is pretty fast in practice.
Rob
Yeah, I had considered that, but there was no challenge there ;-). What I ended up wanting to do with Oliver's idea was to create an integrated command that every TextMate user could run regardless of what 3rd party apps they had installed. That's why I put the time into the Applescript, with the assumption of course, that the user was using or at least syncing with Address Book. I like the versions with contacts and lbdb, too. I think the functionality should be available to people who aren't using Quicksilver (do those people exist?). Thanks for pointing it out, though, and it may end up being the better solution for some.
There have been a few commands, like this one, that I've put some effort in to without any real intention of making daily use of them. I think turning TM into a fully functioning mail application is a pretty obscure project, but probably no more so than creating a blogging app, which I find *extremely* interesting and useful. What I would like to work on is creating HTML emails from HTML documents with text alternatives. I am required by some clients to create newsletters... well, I won't go into it, but it would be a nice feature.
Brett
On Nov 8, 2006, at 8:08 AM, Rob McBroom wrote:
I'm sure everyone has their preference on how this should work, but I just wanted to point out that there's existing functionality in Quicksilver that could be used here (and it would be available system wide, not just in TextMate). With Quicksilver you could:
- Select your message text (in any application) ⌘⎋ ⇥ Compose (Email To…) ⇥ Type part of a recipient's name ↩
Or, if you were trying to populate a header line, like "To: ", you could:
- Invoke Quicksilver Search for a contact → Choose the right e-mail address ⇥ Paste ↩
I'm not sure if I'm making it sound complicated or not, but the process is pretty fast in practice.
Rob
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
On 8. Nov 2006, at 15:25, Brett Terpstra wrote:
[...] What I would like to work on is creating HTML emails from HTML documents with text alternatives. I am required by some clients to create newsletters... well, I won't go into it, but it would be a nice feature.
I know you don’t do Markdown (yet) but have a look at this: http:// www.hawkwings.net/2006/05/11/more-textmate-goodness-html-emails/
Actually, upon your suggestion I've been working on learning Markdown and it is, to my surprise, rather pleasurable ;-). Thanks for the link, that is *exactly* what I was looking for. I need to remember the MIME syntax for the text alternate now, but I'll find it.
Brett
On Nov 8, 2006, at 8:43 AM, Allan Odgaard wrote:
On 8. Nov 2006, at 15:25, Brett Terpstra wrote:
[...] What I would like to work on is creating HTML emails from HTML documents with text alternatives. I am required by some clients to create newsletters... well, I won't go into it, but it would be a nice feature.
I know you don’t do Markdown (yet) but have a look at this: http:// www.hawkwings.net/2006/05/11/more-textmate-goodness-html-emails/
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
On Nov 8, 2006, at 9:25 AM, Brett Terpstra wrote:
I think the functionality should be available to people who aren't using Quicksilver (do those people exist?).
They do, and I can't understand why anyone would choose to live that way.
Rob
* Rob McBroom textmate@skurfer.com [2006-11-08 07:08]:
I'm sure everyone has their preference on how this should work, but I just wanted to point out that there's existing functionality in Quicksilver that could be used here (and it would be available system wide, not just in TextMate).
It doesn't hurt to have both ways, right? Besides, writing a command for TextMate seems a lot easier than writing a plugin for Quicksilver. Also, when you copy an email address to the clipboard from Quicksilver, it doesn't include the full name.
It would be cool if after selected multiple addresses in Quicksilver, the copy to clipboard command joined them with commas.
* Grant Hollingworth grant@antiflux.org [2006-11-07 13:03]:
Typing ctrl-shift-cmd-a (what's the easiest way of typing those key glyphs?)
Answering my own question... you add them to your key bindings.
http://macromates.com/blog/archives/2006/07/10/multi-stroke-key-bindings/
⌃⇧⌘a!