[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, 29 Jun 2005 19:55:53 +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 Tue, 28 Jun 2005 00:30:45 +0000 (UTC), John Owens <address@hidden>
>>>>> said:
> I'd like to use emacs as my default mailer in OS X. When I click on
> a mailto: link, I'd like gnuclient to call compose-mail.
Handling an apple event is already shown, so here's an alternative way
using the "Services" menu. Unfortunately it is not as easy as
clicking a mailto: link.
YAMAMOTO Mitsuharu
address@hidden
Index: lisp/term/mac-win.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/term/mac-win.el,v
retrieving revision 1.47
diff -c -r1.47 mac-win.el
*** lisp/term/mac-win.el 16 May 2005 11:27:56 -0000 1.47
--- lisp/term/mac-win.el 29 Jun 2005 10:36:09 -0000
***************
*** 1377,1382 ****
--- 1377,1393 ----
(save-buffer) ; It pops up the save dialog.
)
+ (defun mac-services-mail-selection ()
+ (interactive)
+ (compose-mail)
+ (rfc822-goto-eoh)
+ (forward-line 1)
+ (insert (x-selection-value mac-services-selection) "\n"))
+
+ (defun mac-services-mail-to ()
+ (interactive)
+ (compose-mail (x-selection-value mac-services-selection)))
+
(defun mac-services-insert-text ()
(interactive)
(let ((text (x-selection-value mac-services-selection)))
***************
*** 1393,1398 ****
--- 1404,1413 ----
'mac-services-open-file)
(define-key mac-application-menu-map [services perform open-selection]
'mac-services-open-selection)
+ (define-key mac-application-menu-map [services perform mail-selection]
+ 'mac-services-mail-selection)
+ (define-key mac-application-menu-map [services perform mail-to]
+ 'mac-services-mail-to)
(define-key mac-application-menu-map [services paste]
'mac-services-insert-text)
(define-key mac-application-menu-map [preferences] 'customize)
Index: mac/Emacs.app/Contents/Info.plist
===================================================================
RCS file: /cvsroot/emacs/emacs/mac/Emacs.app/Contents/Info.plist,v
retrieving revision 1.5
diff -c -r1.5 Info.plist
*** mac/Emacs.app/Contents/Info.plist 24 Apr 2005 06:00:57 -0000 1.5
--- mac/Emacs.app/Contents/Info.plist 29 Jun 2005 10:36:09 -0000
***************
*** 75,80 ****
--- 75,118 ----
<string>NSStringPboardType</string>
</array>
</dict>
+ <dict>
+ <key>NSKeyEquivalent</key>
+ <dict/>
+ <key>NSMenuItem</key>
+ <dict>
+ <key>default</key>
+ <string>Emacs/Send Selection</string>
+ </dict>
+ <key>NSMessage</key>
+ <string>mail-selection</string>
+ <key>NSPortName</key>
+ <string>Emacs</string>
+ <key>NSReturnTypes</key>
+ <array/>
+ <key>NSSendTypes</key>
+ <array>
+ <string>NSStringPboardType</string>
+ </array>
+ </dict>
+ <dict>
+ <key>NSKeyEquivalent</key>
+ <dict/>
+ <key>NSMenuItem</key>
+ <dict>
+ <key>default</key>
+ <string>Emacs/Send To</string>
+ </dict>
+ <key>NSMessage</key>
+ <string>mail-to</string>
+ <key>NSPortName</key>
+ <string>Emacs</string>
+ <key>NSReturnTypes</key>
+ <array/>
+ <key>NSSendTypes</key>
+ <array>
+ <string>NSStringPboardType</string>
+ </array>
+ </dict>
</array>
</dict>
</plist>