[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: OS X: using emacs as default mailer?
From: |
YAMAMOTO Mitsuharu |
Subject: |
Re: OS X: using emacs as default mailer? |
Date: |
Wed, 30 Nov 2005 18:54:13 +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, 27 Jun 2005 19:00:16 -0700, "Sean O'Rourke" <address@hidden> said:
> I've got Emacs directly accepting URLs locally, and I've been
> meaning to contribute it when I get some time (unless someone beats
> me to it). Unfortunately, it's tangled with my local drag-n-drop
> changes, which need some work to better cooperate with X DnD.
How about the attached patch? It enables us to register Apple event
handlers at the Lisp level as follows: (the code is included in the
patch)
(put 'internet-event 'mac-apple-event-class "GURL")
(put 'get-url 'mac-apple-event-id "GURL")
(defun mac-ae-get-url (event)
(interactive "e")
(let* ((ae (mac-event-ae event))
(parsed-url (url-generic-parse-url (mac-ae-text ae))))
(if (string= (url-type parsed-url) "mailto")
(url-mailto parsed-url)
(error "Unsupported URL scheme: %s" (url-type parsed-url)))))
(define-key mac-apple-event-map [internet-event get-url] 'mac-ae-get-url)
Then Emacs can receive kAEInternetEventClass/kAEGetURL Apple events as
in the following form, and it is handled by the command
`mac-ae-get-url' above.
(mac-apple-event [internet-event get-url] ("aevt" ("----" "TEXT" .
"mailto:address@hidden&Subject=Re%3A%20OS%20X%3A%20using%20emacs%20as%20default%20mailer%3F")))
The patch is also trying to avoid Lisp object allocations (with
respect to Apple events) during asynchronous input handling.
http://lists.gnu.org/archive/html/emacs-devel/2005-11/msg01457.html
YAMAMOTO Mitsuharu
address@hidden
diff-apple-events.gz
Description: Binary data
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: OS X: using emacs as default mailer?,
YAMAMOTO Mitsuharu <=