From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ken Mankoff Subject: Re: babel completion notification Date: Mon, 17 Mar 2014 17:39:09 -0400 Message-ID: References: <87iorcwn6g.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:44843) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WPfFh-0007Pi-Fr for emacs-orgmode@gnu.org; Mon, 17 Mar 2014 17:39:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WPfFZ-0005wW-27 for emacs-orgmode@gnu.org; Mon, 17 Mar 2014 17:39:21 -0400 Received: from mail-qg0-x22b.google.com ([2607:f8b0:400d:c04::22b]:34937) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WPfFY-0005wG-Ri for emacs-orgmode@gnu.org; Mon, 17 Mar 2014 17:39:12 -0400 Received: by mail-qg0-f43.google.com with SMTP id f51so18485284qge.2 for ; Mon, 17 Mar 2014 14:39:12 -0700 (PDT) In-reply-to: <87iorcwn6g.fsf@gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Eric Schulte Cc: Org-mode mailing list Hi Eric, On 2014-03-17 at 17:05, Eric Schulte wrote: > Ken Mankoff writes: > >> Until asynchronous babel exists, it would be nice to at least be >> notified when long-running tasks complete. Does anyone have advice >> how to set up a hook on babel completion so that growl or some >> other system notification alerts, perhaps only if the execution >> took more than x seconds? > > You can use the org-babel-after-execute-hook to run any action after a > code block finishes executing. Yes, and your reply makes me recall that :post works too, so I can call a shell command "notifier" (or Growl) like this: #+BEGIN_SRC python -n :results output :post (shell-command-to-string "notifier 'babel done'") print "hello, world" #+END_SRC #+RESULTS: Thanks, -k.