unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* C-delete in Emacs 23.1
@ 2009-01-19  8:16 cmr.Pent
  2009-01-19  9:30 ` Xah Lee
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: cmr.Pent @ 2009-01-19  8:16 UTC (permalink / raw)
  To: help-gnu-emacs

In new Emacs the keybinding C-delete is assigned to kill-visual-line
command, while it used to be assigned to kill-word-backward. My
attempt to override the binding using global-set-key failed. How do I
revert the C-delete behavior?

I'm ready to provide any additional info,
Andrey


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

* Re: C-delete in Emacs 23.1
  2009-01-19  8:16 C-delete in Emacs 23.1 cmr.Pent
@ 2009-01-19  9:30 ` Xah Lee
  2009-01-19  9:44 ` Katsumi Yamaoka
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Xah Lee @ 2009-01-19  9:30 UTC (permalink / raw)
  To: help-gnu-emacs

On Jan 19, 12:16 am, "cmr.P...@gmail.com" <cmr.P...@gmail.com> wrote:
> In new Emacs the keybinding C-delete is assigned to kill-visual-line
> command, while it used to be assigned to kill-word-backward. My
> attempt to override the binding using global-set-key failed. How do I
> revert the C-delete behavior?

See:

• How To Reclaim Keybindings In Emacs
  http://xahlee.org/emacs/ergonomic_emacs_keybinding_minibuffer.html

• How to Define Keyboard Shortcuts in Emacs
  http://xahlee.org/emacs/keyboard_shortcuts.html

i'd recommend remap the keys so that

E R       I
D F     J K L

where the I J K L is cursor moving keys with Alt down. And
E R is deleting word left/right,
D F is deleting char left/right.

For the elisp code, see:

http://code.google.com/p/ergoemacs/wiki/adoption

  Xah
∑ http://xahlee.org/^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: C-delete in Emacs 23.1
  2009-01-19  8:16 C-delete in Emacs 23.1 cmr.Pent
  2009-01-19  9:30 ` Xah Lee
@ 2009-01-19  9:44 ` Katsumi Yamaoka
  2009-01-19 11:31 ` Tassilo Horn
       [not found] ` <mailman.5229.1232364715.26697.help-gnu-emacs@gnu.org>
  3 siblings, 0 replies; 5+ messages in thread
From: Katsumi Yamaoka @ 2009-01-19  9:44 UTC (permalink / raw)
  To: help-gnu-emacs

>>>>> "cmr.Pent@gmail.com" <cmr.Pent@gmail.com> wrote:

> In new Emacs the keybinding C-delete is assigned to kill-visual-line
> command, while it used to be assigned to kill-word-backward. My
> attempt to override the binding using global-set-key failed. How do I
> revert the C-delete behavior?

> I'm ready to provide any additional info,

I don't know how it happens, but guess you bind <C-delete> to
`kill-line' and turn `visual-line-mode' on.  Anyway what binds
a key to `kill-visual-line' seems to be `visual-line-mode-map'
only, so this will do the trick:

(define-key visual-line-mode-map [(control delete)] 'backward-kill-word)


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

* Re: C-delete in Emacs 23.1
  2009-01-19  8:16 C-delete in Emacs 23.1 cmr.Pent
  2009-01-19  9:30 ` Xah Lee
  2009-01-19  9:44 ` Katsumi Yamaoka
@ 2009-01-19 11:31 ` Tassilo Horn
       [not found] ` <mailman.5229.1232364715.26697.help-gnu-emacs@gnu.org>
  3 siblings, 0 replies; 5+ messages in thread
From: Tassilo Horn @ 2009-01-19 11:31 UTC (permalink / raw)
  To: help-gnu-emacs

"cmr.Pent@gmail.com" <cmr.Pent@gmail.com> writes:

Hi Andrey,

> In new Emacs the keybinding C-delete is assigned to kill-visual-line
> command, while it used to be assigned to kill-word-backward.

No, `C-<delete>' is normally bound to `kill-word' while `M-<delete>' is
bound to `backward-kill-word'.  `kill-visual-line' is bound to `C-k' and
`<deleteline>' if `visual-line-mode' is activated.  If it's not active,
`kill-visual-line' isn't bound to any key.

Is it really different at you?  Please check with "emacs -Q".

> My attempt to override the binding using global-set-key failed.

That's because major and minor mode bindings override global bindings.
And `kill-visual-line' is bound in `visual-line-mode-map'.

> How do I revert the C-delete behavior?

I think the thing that you don't like is `visual-line-mode', so I'd
suggest to switch that off.

Bye,
Tassilo
-- 
Chuck Norris once roundhouse-kicked a ten dollar bill into 200 nickels. 





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

* Re: C-delete in Emacs 23.1
       [not found] ` <mailman.5229.1232364715.26697.help-gnu-emacs@gnu.org>
@ 2009-01-19 22:10   ` cmr.Pent
  0 siblings, 0 replies; 5+ messages in thread
From: cmr.Pent @ 2009-01-19 22:10 UTC (permalink / raw)
  To: help-gnu-emacs

Thanks for your suggestions!

Unfortunately, neither helped. But I was able to track down the
problem ;-) It turns out that the problem only reveals itself in
emacsclient. I filed a bug report (http://emacsbugs.donarmstrong.com/
cgi-bin/bugreport.cgi?bug=1960).

Just for the record, that's what C-h k C-backspace outputs on my
system:

emacs 22.2 -Q, emacs 22.2:

<C-backspace> runs the command backward-kill-word
  which is an interactive compiled Lisp function in `simple.el'.
It is bound to <C-backspace>, M-DEL.
(backward-kill-word arg)

Kill characters backward until encountering the beginning of a word.
With argument, do this that many times.

emacs 23.1 -Q, emacs 23.1:

<C-backspace> runs the command backward-kill-word, which is an
interactive compiled Lisp function.

It is bound to <C-backspace>, M-DEL.

(backward-kill-word arg)

Kill characters backward until encountering the beginning of a word.
With argument arg, do this that many times.

emacs 23.1 --daemon  +  emacsclient -c:

<C-backspace> runs the command kill-visual-line, which is an
interactive compiled Lisp function.

It is bound to <deleteline>, <C-backspace>, C-k.

(kill-visual-line &optional arg)

Kill the rest of the visual line.
If there are only whitespace characters there, kill through the
newline as well.

...

Good luck,
Andrey


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

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

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-19  8:16 C-delete in Emacs 23.1 cmr.Pent
2009-01-19  9:30 ` Xah Lee
2009-01-19  9:44 ` Katsumi Yamaoka
2009-01-19 11:31 ` Tassilo Horn
     [not found] ` <mailman.5229.1232364715.26697.help-gnu-emacs@gnu.org>
2009-01-19 22:10   ` cmr.Pent

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).