Saturday, April 09, 2005

Escape Meta Alt Control Shift (Command Option)

I'm now playing with copy and paste in the Carbon version of Emacs. Sean Luke's page has some useful functions to get normal Mac copy and paste working—and which are making me lean towards having Alt map to Emacs Meta.

(Of course, this stops alt-3 working as the hash key, but a quick

  (defun mac-insert-hash () 
    "Insert a hash / octothorp character"
    (insert-char ?# 1))
  (define-key global-map "\M-3" 'mac-insert-hash)
sorts that out.)

Of course, this doesn't work with the arcane (insane?) complexities of X11 selections/clipboards/cut buffers/whatever. Once upon a time I even had to understand all the nonsense in the ICCCM and get it to work with the rest of the known universe, but thankfully all of that has since faded from my brain.

I also figured out the problem with emacsclient—my default path was picking up the version that matched the pre-installed terminal-only Emacs, not the full Mac OS X build. Changing my edit script to use

  /Applications/ --no-wait $*
sorts that out. I got a bit confused in the process of sorting this out, because it looks like the emacsserver stuff doesn't run as a separate process (at least, nothing other than the main Emacs program shows up in ps).


Post a Comment

<< Home