all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Is it possible to bind "C-)" in emacs23?
@ 2009-10-01 19:06 quodlibetor
  2009-10-01 19:48 ` Pascal J. Bourguignon
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: quodlibetor @ 2009-10-01 19:06 UTC (permalink / raw)
  To: help-gnu-emacs

I would really like to bind C-).

I've tried: (all of the following with both local- and global- set
key)

(local-set-key "\C-)" 'foo) ;error, invalid modifier in string
"\C-\S-0"    ;same
[C-)]          ;unbalanced parenthesis.
[C-S-0]      ; no error, but doesn't work
[C-(kbd (self-insert-command ")")]    ;totally borked
[C-(kbd ")")]     ; doesn't error, but really weird result

etc, i can't remember.

I tried entering into edmacro-mode to figure it out, and it hasn't
helped me.

Any tips seriously welcome.


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

* Re: Is it possible to bind "C-)" in emacs23?
  2009-10-01 19:06 Is it possible to bind "C-)" in emacs23? quodlibetor
@ 2009-10-01 19:48 ` Pascal J. Bourguignon
  2009-10-01 19:52 ` Peter Dyballa
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Pascal J. Bourguignon @ 2009-10-01 19:48 UTC (permalink / raw)
  To: help-gnu-emacs

quodlibetor <quodlibetor@gmail.com> writes:

> I would really like to bind C-).
>
> I've tried: (all of the following with both local- and global- set
> key)
>
> (local-set-key "\C-)" 'foo) ;error, invalid modifier in string
> "\C-\S-0"    ;same
> [C-)]          ;unbalanced parenthesis.
> [C-S-0]      ; no error, but doesn't work
> [C-(kbd (self-insert-command ")")]    ;totally borked
> [C-(kbd ")")]     ; doesn't error, but really weird result
>
> etc, i can't remember.
>
> I tried entering into edmacro-mode to figure it out, and it hasn't
> helped me.
>
> Any tips seriously welcome.

This question doesn't depend on emacs, but on what lies between your
keyboard and emacs.

Basically, if you are in a windowing environment, emacs will be able
to discriminate C-) and you will be able to bind it to your command.

On the other hand if you are with a terminal, then there is no control
character corresponding to C-), so it's won't be possible.

-- 
__Pascal Bourguignon__


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

* Re: Is it possible to bind "C-)" in emacs23?
  2009-10-01 19:06 Is it possible to bind "C-)" in emacs23? quodlibetor
  2009-10-01 19:48 ` Pascal J. Bourguignon
@ 2009-10-01 19:52 ` Peter Dyballa
  2009-10-01 20:08 ` Tassilo Horn
       [not found] ` <mailman.7876.1254427735.2239.help-gnu-emacs@gnu.org>
  3 siblings, 0 replies; 5+ messages in thread
From: Peter Dyballa @ 2009-10-01 19:52 UTC (permalink / raw)
  To: quodlibetor; +Cc: help-gnu-emacs


Am 01.10.2009 um 21:06 schrieb quodlibetor:

> I would really like to bind C-).

Try it interactively. After pressing the final <return> type:

	C-x <escape> <escape> C-a C-k C-g C-x C-f ~/.emacs C-y C-x C-s

which is: repetition of last command in mini-buffer, cursor goes to  
beginning of line, the whole line is killed, the invoked command is  
interrupted, your init file is opened, the killed line is inserted,  
and the changed init file is saved.

The key binding will only work in a windowing environment.

--
Greetings

   Pete       (:
         _    / __    -    -
       _/ \__/_/        -     -
      (´`)      (´`)   -    -
       `´        `´







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

* Re: Is it possible to bind "C-)" in emacs23?
  2009-10-01 19:06 Is it possible to bind "C-)" in emacs23? quodlibetor
  2009-10-01 19:48 ` Pascal J. Bourguignon
  2009-10-01 19:52 ` Peter Dyballa
@ 2009-10-01 20:08 ` Tassilo Horn
       [not found] ` <mailman.7876.1254427735.2239.help-gnu-emacs@gnu.org>
  3 siblings, 0 replies; 5+ messages in thread
From: Tassilo Horn @ 2009-10-01 20:08 UTC (permalink / raw)
  To: help-gnu-emacs

quodlibetor <quodlibetor@gmail.com> writes:

> I would really like to bind C-).
>
> I've tried: (all of the following with both local- and global- set
> key)
>
> (local-set-key "\C-)" 'foo) ;error, invalid modifier in string
> "\C-\S-0"    ;same
> [C-)]          ;unbalanced parenthesis.
> [C-S-0]      ; no error, but doesn't work
> [C-(kbd (self-insert-command ")")]    ;totally borked
> [C-(kbd ")")]     ; doesn't error, but really weird result

That's the right syntax:

  (local-set-key (kbd "C-)") 'foo)

Bye,
Tassilo





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

* Re: Is it possible to bind "C-)" in emacs23?
       [not found] ` <mailman.7876.1254427735.2239.help-gnu-emacs@gnu.org>
@ 2009-10-01 21:22   ` quodlibetor
  0 siblings, 0 replies; 5+ messages in thread
From: quodlibetor @ 2009-10-01 21:22 UTC (permalink / raw)
  To: help-gnu-emacs

> That's the right syntax:
>
>   (local-set-key (kbd "C-)") 'foo)
>
> Bye,
> Tassilo

Ohhh. Thanks Tassilo, that worked. I think I finally understand what
the heck is going on with the *-set-key commands, now.

Thanks also to everybody else!

I normally work from within X, although I do sometimes ssh into
things, so thanks for the warnings that it won't work sometimes.

The C-x ESC ESC thing doesn't work, though, because emacs says that
"there is no complex command to repeat", which I guess means that if
it can't do anything, it doesn't record it?

Thanks again for the fast responses!


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

end of thread, other threads:[~2009-10-01 21:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-01 19:06 Is it possible to bind "C-)" in emacs23? quodlibetor
2009-10-01 19:48 ` Pascal J. Bourguignon
2009-10-01 19:52 ` Peter Dyballa
2009-10-01 20:08 ` Tassilo Horn
     [not found] ` <mailman.7876.1254427735.2239.help-gnu-emacs@gnu.org>
2009-10-01 21:22   ` quodlibetor

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.