There's a bug in slime, it binds HOME to slime-repl-bol, and does it so that it's very hard to rebind it to the normal beginning-of-buffer.
I tried to override slime-repl-bol, but of course, then C-a doesn't work as beginning-of-line anymore.
Please, don't bind HOME!
pjb@informatimago.com (Pascal J. Bourguignon) writes:
There's a bug in slime, it binds HOME to slime-repl-bol, and does it so that it's very hard to rebind it to the normal beginning-of-buffer.
It's not a bug, the default binding of home is `move-beginning-of-line'. What's the problem with rebinding it? (define-key slime-repl-mode-map [home] 'beginning-of-buffer) works fine.
On Mon, 30 Aug 2010 04:10:39 +0400 Stas Boukarev stassats@gmail.com wrote:
pjb@informatimago.com (Pascal J. Bourguignon) writes:
There's a bug in slime, it binds HOME to slime-repl-bol, and does it so that it's very hard to rebind it to the normal beginning-of-buffer.
It's not a bug, the default binding of home is `move-beginning-of-line'. What's the problem with rebinding it? (define-key slime-repl-mode-map [home] 'beginning-of-buffer) works fine.
I admit still considering myself new to emacs, as I only use it with Slime for Lisp (using Vim since many years for other languages I have to deal with), but I noticed that although ctrl-a indeed moves the cursor at the first column on the current line, the actual [home] key (although not being one of the recommended emacs editing keys) moves it at the top of the document as for alt-<. Is this expected behaviour or am I missing something in my configuration? The [end] key behaves fine as ctrl-e. This is using GNU Emacs in urxvt.
Thank you,
* Matthew Mondor [2010-08-30 08:20] writes:
I admit still considering myself new to emacs, as I only use it with Slime for Lisp (using Vim since many years for other languages I have to deal with), but I noticed that although ctrl-a indeed moves the cursor at the first column on the current line, the actual [home] key (although not being one of the recommended emacs editing keys) moves it at the top of the document as for alt-<. Is this expected behaviour or am I missing something in my configuration? The [end] key behaves fine as ctrl-e. This is using GNU Emacs in urxvt.
I think that changed in Emacs 21 or 22, previously HOME was for beginning-of-buffer and and now it's beginning-of-line. See bindings.el:
;; natural bindings for terminal keycaps --- defined in X keysym order (define-key global-map [C-S-backspace] 'kill-whole-line) (define-key global-map [home] 'move-beginning-of-line) (define-key global-map [C-home] 'beginning-of-buffer) (define-key global-map [M-home] 'beginning-of-buffer-other-window) (define-key esc-map [home] 'beginning-of-buffer-other-window)
There may also be differences in the way escape sequences of urxvt are translated to Emacs' notion of function key.
Helmut
* Helmut Eller [2010-08-30 15:38] writes:
I think that changed in Emacs 21 or 22, previously HOME was for beginning-of-buffer and and now it's beginning-of-line. See bindings.el:
;; natural bindings for terminal keycaps --- defined in X keysym order (define-key global-map [C-S-backspace] 'kill-whole-line) (define-key global-map [home] 'move-beginning-of-line) (define-key global-map [C-home] 'beginning-of-buffer) (define-key global-map [M-home] 'beginning-of-buffer-other-window) (define-key esc-map [home] 'beginning-of-buffer-other-window)
And further down there are bindings for the [begin] key (5 on the numpad):
(define-key global-map [end] 'move-end-of-line) (define-key global-map [C-end] 'end-of-buffer) (define-key global-map [M-end] 'end-of-buffer-other-window) (define-key esc-map [end] 'end-of-buffer-other-window) (define-key global-map [begin] 'beginning-of-buffer) (define-key global-map [M-begin] 'beginning-of-buffer-other-window) (define-key esc-map [begin] 'beginning-of-buffer-other-window)
Helmut
+ Helmut Eller heller@common-lisp.net:
I think that changed in Emacs 21 or 22, previously HOME was for beginning-of-buffer and and now it's beginning-of-line. See bindings.el:
But term/ns-win.el overrides these bindings. This is what mac users see, if they use cocoa emacs:
(define-key global-map [home] 'beginning-of-buffer) (define-key global-map [end] 'end-of-buffer) (define-key global-map [kp-home] 'beginning-of-buffer) (define-key global-map [kp-end] 'end-of-buffer)
That's a bit confusing. Maybe it should be reported as a bug.
- Harald