unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
Cc: John Owens <john_owens@yahoo.com>, emacs-devel@gnu.org
Subject: Re: OS X: using emacs as default mailer?
Date: Wed, 30 Nov 2005 18:54:13 +0900	[thread overview]
Message-ID: <wloe42sbp6.wl%mituharu@math.s.chiba-u.ac.jp> (raw)
In-Reply-To: <m2aclb1brj.fsf@80363334.dynamic.ucsd.edu>

[-- Attachment #1: Type: text/plain, Size: 1637 bytes --]

>>>>> On Mon, 27 Jun 2005 19:00:16 -0700, "Sean O'Rourke" <sorourke@cs.ucsd.edu> 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:mituharu@math.s.chiba-u.ac.jp?In-Reply-To=wl8y0tjuti.wl%25mituharu%40math.s.chiba-u.ac.jp&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
				mituharu@math.s.chiba-u.ac.jp

[-- Attachment #2: diff-apple-events.gz --]
[-- Type: application/octet-stream, Size: 7668 bytes --]

[-- Attachment #3: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

  parent reply	other threads:[~2005-11-30  9:54 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-28  0:30 OS X: using emacs as default mailer? John Owens
2005-06-28  2:00 ` Sean O'Rourke
2005-06-28  3:51   ` John Owens
2005-06-28  5:43     ` Sean O'Rourke
2005-06-28  5:47     ` Sean O'Rourke
2005-06-28  5:19   ` John Owens
2005-11-30  9:54   ` YAMAMOTO Mitsuharu [this message]
2005-06-29 10:55 ` YAMAMOTO Mitsuharu

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=wloe42sbp6.wl%mituharu@math.s.chiba-u.ac.jp \
    --to=mituharu@math.s.chiba-u.ac.jp \
    --cc=emacs-devel@gnu.org \
    --cc=john_owens@yahoo.com \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).