[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[emacs-wiki-discuss] Re: Mac OS X Services Menu and Remember
From: |
Sven Kloppenburg |
Subject: |
[emacs-wiki-discuss] Re: Mac OS X Services Menu and Remember |
Date: |
Mon, 27 Feb 2006 15:08:56 +0100 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (darwin) |
Hi Bruce,
Bruce Durling <address@hidden> writes:
> I noticed on my Services menu today that I have a Emacs section with the
> following selections:
>
> New Buffer From Selection
> Open Selected File
> Send Selection
> Send To
>
> Does anyone know enough mac mojo to know how to add remember selection to
> this list? I'll keep hunting around myself. Searching for mac osx services on
> google is giving me a metric ton of results and almost all of them don't have
> anything to do with the services menu.
You got me hacking:
add the following to your .emacs:
(defun mac-services-remember ()
"Remember the selection value for Services."
(interactive)
(kill-new (x-selection-value mac-services-selection))
(remember-clipboard))
(define-key mac-apple-event-map [services perform remember]
'mac-services-remember)
and add the following to /Application/Emacs.app/Contents/Info.plist:
(Put it near the end of the file between a pair of </dict>\n<dict>)
<dict>
<key>NSKeyEquivalent</key>
<dict/>
<key>NSMenuItem</key>
<dict>
<key>default</key>
<string>Emacs/Remember</string>
</dict>
<key>NSMessage</key>
<string>remember</string>
<key>NSPortName</key>
<string>Emacs</string>
<key>NSReturnTypes</key>
<array/>
<key>NSSendTypes</key>
<array>
<string>NSStringPboardType</string>
</array>
</dict>
oh, and be careful to have ONLY ONE Info.plist corresponding to an Emacs.app
that you started. Otherwise, the Services menu might overwrite the one you
changed with the one you left as it were.
Otherwise, you can use Servicescrubber
http://www.petermaurer.de/nasi.php?section=servicescrubber
to disable the unwanted Service menu entries.
--
bye,
sven
- [emacs-wiki-discuss] Re: Mac OS X Services Menu and Remember,
Sven Kloppenburg <=