[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Apple event handling (Carbon port)
From: |
YAMAMOTO Mitsuharu |
Subject: |
Re: Apple event handling (Carbon port) |
Date: |
Thu, 05 Jan 2006 17:23:36 +0900 |
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) |
>>>>> On Mon, 2 Jan 2006 13:02:25 +0000, David Reitter <address@hidden> 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
address@hidden