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 mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/emacs-wiki-discuss