all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* # in carbon emacs on OSX?
@ 2011-02-01  2:24 Matthew Vernon
  2011-02-01  8:10 ` Andrea Crotti
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Matthew Vernon @ 2011-02-01  2:24 UTC (permalink / raw)
  To: help-gnu-emacs

Hi,

I've installed the latest emacs release (23.2.1) on OSX. It generally
works a treat, but there's a problem with #s. In every other OSX app,
I can get # by hitting alt-3. But emacs is mapping that as M-3
instead. Similarly, cmd-3 comes through as S-3 (super-3). Is there a
standard work-around for this? Failing that, can I trivially re-map
M-3 to (insert-char ?# 1) or somesuch?

Thanks,

Matthew

-- 
Rapun.sel - outermost outpost of the Pick Empire
http://www.pick.ucam.org


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: # in carbon emacs on OSX?
  2011-02-01  2:24 # in carbon emacs on OSX? Matthew Vernon
@ 2011-02-01  8:10 ` Andrea Crotti
       [not found] ` <mailman.0.1296548115.22589.help-gnu-emacs@gnu.org>
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 7+ messages in thread
From: Andrea Crotti @ 2011-02-01  8:10 UTC (permalink / raw)
  To: help-gnu-emacs

Matthew Vernon <matthew@debian.org> writes:

> Hi,
>
> I've installed the latest emacs release (23.2.1) on OSX. It generally
> works a treat, but there's a problem with #s. In every other OSX app,
> I can get # by hitting alt-3. But emacs is mapping that as M-3
> instead. Similarly, cmd-3 comes through as S-3 (super-3). Is there a
> standard work-around for this? Failing that, can I trivially re-map
> M-3 to (insert-char ?# 1) or somesuch?
>
> Thanks,
>
> Matthew

I use these settings for for cocoa emacs

--8<---------------cut here---------------start------------->8---
  (if mac
      (progn
        (add-to-list 'exec-path "/opt/local/bin")
        (setq ns-alternate-modifier (quote none))
        ;; open a new frame only unless it's the scratch buffer
        (setq ns-pop-up-frames 1)
        (setq ns-command-modifier (quote meta))))
--8<---------------cut here---------------end--------------->8---
hope it's useful for you too




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: # in carbon emacs on OSX?
       [not found] ` <mailman.0.1296548115.22589.help-gnu-emacs@gnu.org>
@ 2011-02-01 13:22   ` Matthew Vernon
  0 siblings, 0 replies; 7+ messages in thread
From: Matthew Vernon @ 2011-02-01 13:22 UTC (permalink / raw)
  To: help-gnu-emacs

Hi,

[I should have mentioned that this is a UK keyboard, so shift-3
produces £]

Andrea Crotti <andrea.crotti.0@gmail.com> writes:

> I use these settings for for cocoa emacs
> 
> --8<---------------cut here---------------start------------->8---
>   (if mac

I get an error if I use this:

Symbol's value as variable is void: mac

Thanks,

Matthew

-- 
Rapun.sel - outermost outpost of the Pick Empire
http://www.pick.ucam.org


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: # in carbon emacs on OSX?
  2011-02-01  2:24 # in carbon emacs on OSX? Matthew Vernon
  2011-02-01  8:10 ` Andrea Crotti
       [not found] ` <mailman.0.1296548115.22589.help-gnu-emacs@gnu.org>
@ 2011-02-01 17:02 ` Peter Dyballa
  2011-02-01 18:07   ` Matthew Vernon
  2011-02-01 17:55 ` Harald Hanche-Olsen
  3 siblings, 1 reply; 7+ messages in thread
From: Peter Dyballa @ 2011-02-01 17:02 UTC (permalink / raw)
  To: Matthew Vernon; +Cc: help-gnu-emacs


Am 01.02.2011 um 03:24 schrieb Matthew Vernon:

> can I trivially re-map M-3 to (insert-char ?# 1) or somesuch?


Can you tell us what values the variables emacs-version and window- 
system have?

--
Greetings

   Pete

No man was ever taken to hell by a woman unless he already had a  
ticket in his pocket, or at least had been fooling around with  
timetables.
				– Archie Goodwin




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: # in carbon emacs on OSX?
  2011-02-01  2:24 # in carbon emacs on OSX? Matthew Vernon
                   ` (2 preceding siblings ...)
  2011-02-01 17:02 ` Peter Dyballa
@ 2011-02-01 17:55 ` Harald Hanche-Olsen
  3 siblings, 0 replies; 7+ messages in thread
From: Harald Hanche-Olsen @ 2011-02-01 17:55 UTC (permalink / raw)
  To: help-gnu-emacs

[Matthew Vernon <matthew@debian.org>]

> I've installed the latest emacs release (23.2.1) on OSX.

Possibly these might work:

(setf mac-command-modifier 'meta)
(setf mac-option-modifier nil)

If it does, the command key becomes meta and the option key is left to
do what the OS usually thinks it should. But this is highly dependent on
what emacs you have. Just 23.2.1 is insufficient information. Do you
really mean carbon emacs? I haven't used that in ages.

-- 
* Harald Hanche-Olsen     <URL:http://www.math.ntnu.no/~hanche/>
- It is undesirable to believe a proposition
  when there is no ground whatsoever for supposing it is true.
  -- Bertrand Russell


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: # in carbon emacs on OSX?
  2011-02-01 17:02 ` Peter Dyballa
@ 2011-02-01 18:07   ` Matthew Vernon
  2011-02-01 19:04     ` Peter Dyballa
  0 siblings, 1 reply; 7+ messages in thread
From: Matthew Vernon @ 2011-02-01 18:07 UTC (permalink / raw)
  To: Peter Dyballa; +Cc: help-gnu-emacs


On 1 Feb 2011, at 12:02, Peter Dyballa wrote:

> 
> Am 01.02.2011 um 03:24 schrieb Matthew Vernon:
> 
>> can I trivially re-map M-3 to (insert-char ?# 1) or somesuch?
> 
> 
> Can you tell us what values the variables emacs-version and window-system have?

emacs-version is 23.2.1 window-system is ns

Regards,

Matthew


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: # in carbon emacs on OSX?
  2011-02-01 18:07   ` Matthew Vernon
@ 2011-02-01 19:04     ` Peter Dyballa
  0 siblings, 0 replies; 7+ messages in thread
From: Peter Dyballa @ 2011-02-01 19:04 UTC (permalink / raw)
  To: Matthew Vernon; +Cc: help-gnu-emacs


Am 01.02.2011 um 19:07 schrieb Matthew Vernon:

> emacs-version is 23.2.1 window-system is ns


This "Cocoa" Emacs should know mac-function-modifier, mac-control- 
modifier, mac-command-modifier, and mac-option-modifier (plus mac- 
right-command-modifier, mac-right-control-modifier, mac-right-option- 
modifier). Their values can be (quoted) ctrl (or control?), alt, meta,  
super, hyper, or nil (unquoted). They're aliases of:

	ns-alternate-modifier
	   This variable describes the behavior of the alternate or option key.
	ns-command-modifier
	   This variable describes the behavior of the command key.
	ns-control-modifier
	   This variable describes the behavior of the control key.
	ns-function-modifier
	   This variable describes the behavior of the function key (on  
laptops).
	ns-option-modifier
	ns-right-alternate-modifier
	   This variable describes the behavior of the right alternate or  
option key.
	ns-right-command-modifier
	   This variable describes the behavior of the right command key.
	ns-right-control-modifier
	   This variable describes the behavior of the right control key.
	ns-right-option-modifier

Making any of them nil makes them available to Mac OS X, i.e., allows  
Mac OS X to choose the corresponding layer of the key definitions.  
Launch the "virtual keyboard" to see whether the keys still work in  
Mac OS X (when the text cursor is in Emacs).

To have an init file that works with Carbon (22.x) and NS or "Cocoa"  
Emacsen (20-24.x) and the AppKit Emacs (something like "Carbon Emacs"  
23.x) you can use the mac-*-modifier variables.

--
Greetings

   Pete

I love deadlines. I love the whooshing noise they make as they go by.
				– Douglas Adams




^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-02-01 19:04 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-01  2:24 # in carbon emacs on OSX? Matthew Vernon
2011-02-01  8:10 ` Andrea Crotti
     [not found] ` <mailman.0.1296548115.22589.help-gnu-emacs@gnu.org>
2011-02-01 13:22   ` Matthew Vernon
2011-02-01 17:02 ` Peter Dyballa
2011-02-01 18:07   ` Matthew Vernon
2011-02-01 19:04     ` Peter Dyballa
2011-02-01 17:55 ` Harald Hanche-Olsen

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.