I Stand Corrected...

Last Week I wrote that I’d finally gotten mu4e working and that after I moved to elfeed, I would have everything except browsing and iMessage running under Emacs. I remarked that I didn’t expect to have iMessage or a (full-featured) browser working under Emacs anytime soon so that once I got elfeed going, I would be as Emacs-centric as I was going to get.

It turns out that I was wrong about iMessage. On a whim, I asked DuckDuckGo if there were any packages for using iMessage from within Emacs and to my surprise there is one. Chad Sahlhoff has an iMessage for Emacs package available on GitHub. It’s not available in Elpa, which is probably why I missed it at first.

The package needs Helm, which I don’t use, so I haven’t installed it yet. After a quick look at the code, it doesn’t seem like it would be difficult to use Ivy or Ido instead. Maybe I’ll take a closer look as soon as I get time.

More generally, I’m really enjoying mu4e and it really does change the way you deal with email. The tight coupling with Org mode means that every email can be dealt with at the time you read it—even if “dealing with it” means putting it on a TODO list for later action—so my INBOX is always empty when I finish an email session. No more keeping an email around even for a couple of hours. And did I mention no mouse?

I now spend almost all my time in Emacs or Safari. There’s simply no reason to use other standalone applications except for occasional special tasks. For you dedicated Emacsers, I can’t recommend this way of life enough. It just makes your day a whole lot easier and pleasanter.

This entry was posted in General and tagged . Bookmark the permalink.
  • krisbrowne42

    Ow... Made the mistake of looking at the elisp, which is just a ton of wrappers around osascript. Gotta be a better way.

    • jcs

      You'd think but I don't know if the iMessage protocol is otherwise exposed and even if it is it's likely to be some ugly objectiveC interface. If Applescript allows us to import iMessage into Emacs, I can live with that.

      OTHO, I understand your angst and would like a better interface. If it exits, let's make a better iMessage mode for Emacs. If it doesn't, I can live with Apple script if it brings yet another application into Emacs.

  • JohnKitchin

    (defun ivy-imessage ()
    (interactive)
    (ivy-read "Buddy: " (imessage-get-buddies-names)
    :action '(1
    ("o" (lambda (candidate)
    (imessage-send-buddy-message
    (imessage-s-trim candidate)))))))

    • jcs

      Excellent. Are you actually using this (I know you're a Mac user at least part of the time)? If so, are you happy with it?

      Edit: By "this" I mean Sahlhoff's package.

      • JohnKitchin

        I used it a few times this morning after reading this ;) It is an ok package. It does what it says, and I don't mind how it does it (I also use applescript like that ;). It seems to only offer candidates to people in the iMessage history, not, e.g. to everyone in your contacts that could be messaged. It is not clear you can start a new conversation via applescript with this. I haven't tried it though.

        • jcs

          Thanks for the info. You've encouraged me to give it a try too.

          • JohnKitchin

            Its ok for one-off messages. It doesn't look like you can see a conversation or anything. I am probably more likely to use M-tab to switch from emacs to Messages than use this too often ;)

          • jcs

            That's a bit disappointing. M-tab is what I currently do too but just today I was reading emails with mu4e and occasionally following a link by calling Safari from mu4e when an iMessage came in. Now M-tab doesn't work as well because I end up going to Safari or Emacs instead of iMessage unless I tab multiple times and watch what I'm doing.

            I'll probably end up adding a hot key for iMessage. Everything else is pretty much Emacs and Safari and I already have hot keys for them.

          • JohnKitchin

            I meant command-tab! i.e. actually switching out of Emacs.

            or you could use this:

            (defun messages ()
            (interactive)
            (shell-command "open -b com.apple.iChat"))

          • jcs

            Heh! I knew what you meant and my mind automatically translated it to CMD-tab even to the extent of reproducing your typo in my reply. Since my previous reply, I've set (globally using Quicksilver) to go to Messages. Now no matter where I am I can quickly pop into Messages and then back to Emacs or Safari with the two other global hot keys I use.

  • Rodrigo Amestica

    just curious, what do you use for notifications (birthdays, meetings, appointments, etc.)? A good notifications integration is somethings that has eluded me for a long time.

    • jcs

      The answer will probably disappoint you but I rely on Apple apps for that. The main reason is that Apple takes care of syncing my calendar across all my Apple devices so I have access (for reading and entering) even from my phone when I'm on the go.

      If you're interested in specifics, I mainly use Fantastical 2 rather than than the calendar app because I like its easy entry and display. I keep thinking I should at least display my calendar in my Org Agenda since I'm always looking at it and it would save me switching to Fantastical to check an appointment time. Maybe I'll make that my next project: one less reason to leave Emacs.