From: "Stephen J. Turnbull" <stephen@xemacs.org>
To: Ian Eure <ian@digg.com>
Cc: ams@gnu.org, emacs-devel@gnu.org, rms@gnu.org, cwulfman@Princeton.EDU
Subject: Re: Changes 2009-07-15/16 in branch?
Date: Sat, 01 Aug 2009 15:28:19 +0900 [thread overview]
Message-ID: <87r5vwcakc.fsf@uwakimon.sk.tsukuba.ac.jp> (raw)
In-Reply-To: <C9C3AB77-B5AB-40D5-B5E3-A4F12090B3C0@digg.com>
Ian Eure writes:
> I think it would be unfortunate if it were removed. As Emacs can be
> used to develop AppleScript (or other OSA supported languages) this
> feature would be needed to run them from within Emacs to test the
> code. Without it, you must rely on other tools outside of Emacs for
> this functionality.
Yeah, but as Harald pointed out, you only have to go as far as
osascript (part of Mac OS, or maybe Xcode) and .emacs:
;; Copyright 2009 Stephen J. Turnbull
;; this code and inlined documentation is licensed to you under the
;; GNU GPL, v2 or later at your option
;; tested in XEmacs 21.5.29, YMMV (see the NO WARRANTY clause of the license)
(defun osascript (script &rest args)
"Run string SCRIPT as an OSA script \(eg, Applescript), with arguments ARGS.
Each element of the list ARGS is added to the invocation of osascript(1)
formatted with \" %s\".
BUG: in interactive use, ARGS must be provided as a Lisp list."
;; A custom read-list could be provided to allow the following style
;; of interface. Example script from osascript(1).
;; Prompts abbreviated, user input only:
;; M-x osascript RET
;; SCRIPT: on run argv C-q C-j
;; return "hello, " & item 1 of argv & "." C-q C-j
;; end run C-q C-j RET
;; ARG: world RET
;; ARG: moon RET
;; ARG: RET
;; and the empty arg terminates the list and runs the command.
(interactive "sEnter the text of the script (use C-q C-j for newlines):
xScript arguments (as a Lisp list): ")
;; kludge to deal with `interactive's lack of awareness of &rest
(when (interactive-p)
(setq args (car args)))
(shell-command (concat (format "osascript -e '%s'" script)
(mapconcat (lambda (x) (format " %s" x)) args ""))))
next prev parent reply other threads:[~2009-08-01 6:28 UTC|newest]
Thread overview: 80+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-23 11:22 Changes 2009-07-15/16 in branch? Adrian Robert
2009-07-23 12:46 ` YAMAMOTO Mitsuharu
2009-07-23 15:30 ` Stefan Monnier
2009-07-24 0:23 ` YAMAMOTO Mitsuharu
2009-07-24 1:09 ` Stefan Monnier
2009-07-24 1:27 ` YAMAMOTO Mitsuharu
2009-07-24 1:37 ` Stefan Monnier
2009-07-24 2:20 ` YAMAMOTO Mitsuharu
2009-07-24 3:17 ` Stefan Monnier
2009-07-24 3:35 ` YAMAMOTO Mitsuharu
2009-07-24 3:44 ` Jason Rumney
2009-07-24 4:12 ` YAMAMOTO Mitsuharu
2009-07-25 2:13 ` YAMAMOTO Mitsuharu
2009-07-26 2:22 ` Richard Stallman
2009-07-26 2:35 ` YAMAMOTO Mitsuharu
2009-07-26 3:31 ` Miles Bader
2009-07-26 3:45 ` YAMAMOTO Mitsuharu
2009-07-27 2:44 ` Richard Stallman
2009-07-27 3:20 ` YAMAMOTO Mitsuharu
2009-07-27 17:41 ` Richard Stallman
2009-07-27 18:41 ` Clifford Wulfman
2009-07-28 4:37 ` Richard Stallman
2009-07-28 13:18 ` Clifford Wulfman
2009-07-28 17:14 ` Richard Stallman
2009-07-28 18:39 ` Alfred M. Szmidt
2009-07-28 20:31 ` Ian Eure
2009-08-01 3:21 ` Richard Stallman
2009-08-01 4:10 ` Ian Eure
2009-08-01 6:28 ` Stephen J. Turnbull [this message]
2009-08-02 4:44 ` Richard Stallman
2009-07-28 22:05 ` James Cloos
2009-07-29 20:13 ` Richard Stallman
2009-07-29 22:05 ` YAMAMOTO Mitsuharu
2009-07-30 7:53 ` YAMAMOTO Mitsuharu
2009-07-30 14:01 ` Chong Yidong
2009-07-31 1:56 ` YAMAMOTO Mitsuharu
2009-07-27 20:14 ` David De La Harpe Golden
2009-07-28 6:10 ` YAMAMOTO Mitsuharu
[not found] ` <EFBC3E4E-8739-4B16-8797-D9CA8BC290CD@gmail.com>
2009-07-28 20:33 ` David De La Harpe Golden
2009-07-28 0:53 ` YAMAMOTO Mitsuharu
2009-07-28 17:14 ` Richard Stallman
2009-07-24 19:25 ` Stefan Monnier
2009-07-29 0:22 ` YAMAMOTO Mitsuharu
2009-07-29 1:12 ` Chong Yidong
2009-07-29 1:18 ` YAMAMOTO Mitsuharu
2009-07-29 4:48 ` YAMAMOTO Mitsuharu
2009-07-29 1:29 ` YAMAMOTO Mitsuharu
2009-07-24 14:34 ` Adrian Robert
2009-07-25 1:15 ` YAMAMOTO Mitsuharu
2009-07-25 4:55 ` Richard Stallman
2009-07-25 16:59 ` Adrian Robert
2009-07-27 2:43 ` Richard Stallman
2009-07-27 3:22 ` Adrian Robert
[not found] ` <E1MW1sm-0000lL-4K@fencepost.gnu.org>
2009-07-29 14:08 ` Harald Hanche-Olsen
2009-07-29 17:18 ` Stefan Monnier
2009-07-30 7:35 ` David Kastrup
2009-07-30 13:31 ` Harald Hanche-Olsen
2009-07-28 18:25 ` Harald Hanche-Olsen
2009-07-29 2:34 ` Stephen J. Turnbull
2009-07-29 2:41 ` Lennart Borgman
2009-07-29 2:56 ` Harald Hanche-Olsen
2009-07-29 3:33 ` Stephen J. Turnbull
2009-07-29 20:14 ` Richard Stallman
2009-07-29 20:26 ` Chad Brown
2009-07-30 15:35 ` Richard Stallman
2009-07-30 16:37 ` Harald Hanche-Olsen
2009-07-29 20:31 ` Harald Hanche-Olsen
2009-07-30 15:35 ` Richard Stallman
2009-07-30 16:22 ` Harald Hanche-Olsen
2009-08-01 3:21 ` Richard Stallman
2009-08-01 7:45 ` CHENG Gao
2009-08-01 9:36 ` CHENG Gao
2009-08-02 4:43 ` Richard Stallman
2009-08-02 7:06 ` CHENG Gao
2009-08-03 16:17 ` Richard Stallman
2009-08-03 20:03 ` CHENG Gao
2009-07-29 14:12 ` Stefan Monnier
2009-07-27 0:35 ` YAMAMOTO Mitsuharu
2009-07-27 3:12 ` Adrian Robert
2009-07-29 3:23 ` Sean O'Rourke
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r5vwcakc.fsf@uwakimon.sk.tsukuba.ac.jp \
--to=stephen@xemacs.org \
--cc=ams@gnu.org \
--cc=cwulfman@Princeton.EDU \
--cc=emacs-devel@gnu.org \
--cc=ian@digg.com \
--cc=rms@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.