From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Reitter Newsgroups: gmane.emacs.devel Subject: Re: Executing Emacs Lisp through AppleScript on Mac OS X? Date: Sun, 8 Jan 2006 21:14:32 +0000 Message-ID: References: <43A40BED.4090303@student.lu.se> <93457ff00512170541h217a7d5ay3eb55bd6a3bd466d@mail.gmail.com> <42F2D88A-A20A-45ED-8193-1C97762076E1@gmail.com> <43C17518.9050003@student.lu.se> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 (Apple Message framework v746.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1136754895 19700 80.91.229.2 (8 Jan 2006 21:14:55 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 8 Jan 2006 21:14:55 +0000 (UTC) Cc: YAMAMOTO Mitsuharu , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jan 08 22:14:53 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EvhsK-0000pG-LR for ged-emacs-devel@m.gmane.org; Sun, 08 Jan 2006 22:14:53 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EvhuE-0004qa-6H for ged-emacs-devel@m.gmane.org; Sun, 08 Jan 2006 16:16:50 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Evhu3-0004qU-4j for emacs-devel@gnu.org; Sun, 08 Jan 2006 16:16:39 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Evhtz-0004qI-M5 for emacs-devel@gnu.org; Sun, 08 Jan 2006 16:16:38 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Evhtz-0004qF-F9 for emacs-devel@gnu.org; Sun, 08 Jan 2006 16:16:35 -0500 Original-Received: from [64.233.162.202] (helo=zproxy.gmail.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Evhw9-0004FC-J1 for emacs-devel@gnu.org; Sun, 08 Jan 2006 16:18:49 -0500 Original-Received: by zproxy.gmail.com with SMTP id z31so3552520nzd for ; Sun, 08 Jan 2006 13:14:36 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:in-reply-to:references:mime-version:content-type:message-id:cc:content-transfer-encoding:from:subject:date:to:x-mailer; b=dDAwXq3m64xh8hcpoyfu9GfsgeB7EgZvaruvGJT1TuiYH0fcNofLLsyFKKE0YeuQNXWo8L87Z93CWPc7YHo0v/vZy3nS1Ggb1QoZTlI6IhojPwP5OCw/sRixVP7YJqKf4pb5tAjT3z5f4diVFYhG8jc/nFX9mEP7GLiOq3wwpE0= Original-Received: by 10.65.61.19 with SMTP id o19mr2237435qbk; Sun, 08 Jan 2006 13:14:36 -0800 (PST) Original-Received: from ?10.0.0.100? ( [82.41.74.89]) by mx.gmail.com with ESMTP id q14sm4367341qbq.2006.01.08.13.14.35; Sun, 08 Jan 2006 13:14:36 -0800 (PST) In-Reply-To: <43C17518.9050003@student.lu.se> Original-To: Lennart Borgman X-Mailer: Apple Mail (2.746.2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:48852 Archived-At: On 8 Jan 2006, at 20:24, Lennart Borgman wrote: >> Because the system's "open" command cannot pass arbitrary >> parameters either, I don't see a way to get (a running) Emacs to >> find a file (as opposed to opening an existing one) from external. > > Does not emacsclient have a -eval parameter? Yes, but you need to manually M-x server-start beforehand. > Given that emacs isn't setuid anything, I'm having trouble imagining a > scenario on a Mac where your concern is actually a concern. Can you > provide an example? I run Emacs via sudo every now and then to edit system files. There's your example. Maybe I ought to use tramp mode instead. Executing AppleScripts is restricted to the console user and root - what about sending Apple events? > Keep in mine you can also send apple events to the terminal :) ... but Terminal will not execute those in the currently open shell, but open a new one. With UI scripting you can do pretty much all nasty things, but UI scripting is not on by default (probably for that reason).