emacs-wiki-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [emacs-wiki-discuss] Re: Mac OS X Services Menu and Remember


From: Bruce Durling
Subject: Re: [emacs-wiki-discuss] Re: Mac OS X Services Menu and Remember
Date: Sun, 5 Mar 2006 19:34:01 -0500

Sven,

Thanks for the suggestions. I've been buried with work lately and I haven't been able to properly investigate it. I've had a quick go and it isn't working for me yet. You've given me a great start though, so I'll keep plugging away. When I find out what has gone wrong I'll post back to the list.

cheers,
Bruce

On Feb 27, 2006, at 9:08 AM, Sven Kloppenburg wrote:

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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]