From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stig Brautaset Subject: [ANN] ob-applescript Date: Fri, 16 Sep 2016 10:36:12 +0100 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42732) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bkpZj-0007Fn-IE for emacs-orgmode@gnu.org; Fri, 16 Sep 2016 05:36:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bkpZf-0003DM-S3 for emacs-orgmode@gnu.org; Fri, 16 Sep 2016 05:36:50 -0400 Received: from [195.159.176.226] (port=55949 helo=blaine.gmane.org) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bkpZf-0003CE-L2 for emacs-orgmode@gnu.org; Fri, 16 Sep 2016 05:36:47 -0400 Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1bkpZK-0002tV-QZ for emacs-orgmode@gnu.org; Fri, 16 Sep 2016 11:36:26 +0200 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" To: emacs-orgmode@gnu.org I've just made `ob-applescript', a backend to execute AppleScript from Org Babel source code blocks available on Melpa. It's my first attempt at making a babel backend, so any comments and criticism welcome. Here are some things it does support though: - No arguments, no code – just return a string. #+BEGIN_SRC applescript "Hello World" #+END_SRC #+RESULTS: : Hello World - You can pass variable to a block: #+BEGIN_SRC applescript :var subject="World" "Hello " & subject #+END_SRC #+RESULTS: : Hello World - You can use either apples or applescript as the language designation, to cater for two competing major modes. This example also shows you can do interactive stuff. #+BEGIN_SRC apples display alert "Danger! The WHAM is overheating!" #+END_SRC #+RESULTS: : button returned:OK - If the result of the evaluation looks like a table, it’ll become a table: #+BEGIN_SRC apples "fi fo 1 2 3 4" #+END_SRC #+RESULTS: | fi | fo | | 1 | 2 | | 3 | 4 | Hope this is useful to someone! Stig