From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: YAMAMOTO Mitsuharu Newsgroups: gmane.emacs.devel Subject: Re: Apple event handling (Carbon port) Date: Thu, 05 Jan 2006 17:23:36 +0900 Organization: Faculty of Science, Chiba University Message-ID: References: <344D2F09-F99B-45CF-BDEB-E853A519EAC1@gmail.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Trace: sea.gmane.org 1136451310 4828 80.91.229.2 (5 Jan 2006 08:55:10 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 5 Jan 2006 08:55:10 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jan 05 09:55:09 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 1EuQtm-0003l6-8j for ged-emacs-devel@m.gmane.org; Thu, 05 Jan 2006 09:55:06 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EuQqk-0007pc-2t for ged-emacs-devel@m.gmane.org; Thu, 05 Jan 2006 03:52:01 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EuQRA-00084L-7S for emacs-devel@gnu.org; Thu, 05 Jan 2006 03:25:32 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EuQR4-00082z-F3 for emacs-devel@gnu.org; Thu, 05 Jan 2006 03:25:30 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EuQR3-00082m-F2 for emacs-devel@gnu.org; Thu, 05 Jan 2006 03:25:25 -0500 Original-Received: from [133.82.132.2] (helo=mathmail.math.s.chiba-u.ac.jp) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EuQSa-0003NP-MC for emacs-devel@gnu.org; Thu, 05 Jan 2006 03:27:01 -0500 Original-Received: from church.math.s.chiba-u.ac.jp (church [133.82.132.36]) by mathmail.math.s.chiba-u.ac.jp (Postfix) with ESMTP id CC9B02CB1; Thu, 5 Jan 2006 17:23:36 +0900 (JST) Original-To: David Reitter In-Reply-To: <344D2F09-F99B-45CF-BDEB-E853A519EAC1@gmail.com> User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.6 (Marutamachi) APEL/10.6 Emacs/22.0.50 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI) 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:48746 Archived-At: >>>>> On Mon, 2 Jan 2006 13:02:25 +0000, David Reitter said: > Emacs should understand the "open document" Apple event, as far as > the code goes. > However, this little AppleScript > tell application "Emacs" > activate > open (file "Lucy:private:tmp:hello.txt") > end tell > just leads to the following error: Coercion to AEList seems to be needed in this case. I installed the following change: Index: lisp/term/mac-win.el =================================================================== RCS file: /cvsroot/emacs/emacs/lisp/term/mac-win.el,v retrieving revision 1.60 diff -c -r1.60 mac-win.el *** lisp/term/mac-win.el 19 Dec 2005 08:29:06 -0000 1.60 --- lisp/term/mac-win.el 5 Jan 2006 05:07:53 -0000 *************** *** 1409,1422 **** (error "Not an Apple event: %S" ae) (let ((type-data (cdr (assoc keyword (cdr ae)))) data) ! (when (and type type-data) (setq data (mac-coerce-ae-data (car type-data) (cdr type-data) type)) (setq type-data (if data (cons type data) nil))) type-data))) (defun mac-ae-list (ae &optional keyword type) (or keyword (setq keyword "----")) ;; Direct object. ! (let ((desc (mac-ae-parameter ae keyword))) (cond ((null desc) nil) ((not (equal (car desc) "list")) --- 1409,1422 ---- (error "Not an Apple event: %S" ae) (let ((type-data (cdr (assoc keyword (cdr ae)))) data) ! (when (and type type-data (not (equal type (car type-data)))) (setq data (mac-coerce-ae-data (car type-data) (cdr type-data) type)) (setq type-data (if data (cons type data) nil))) type-data))) (defun mac-ae-list (ae &optional keyword type) (or keyword (setq keyword "----")) ;; Direct object. ! (let ((desc (mac-ae-parameter ae keyword "list"))) (cond ((null desc) nil) ((not (equal (car desc) "list")) YAMAMOTO Mitsuharu mituharu@math.s.chiba-u.ac.jp