* Remove local key binding in Dired
@ 2009-07-02 6:54 Torben Knudsen
2009-07-02 7:06 ` Teemu Likonen
2009-07-02 13:34 ` Xah Lee
0 siblings, 2 replies; 7+ messages in thread
From: Torben Knudsen @ 2009-07-02 6:54 UTC (permalink / raw)
To: help-gnu-emacs
I have the following which I find conveinent
;;; Window spliting
(global-set-key (kbd "M-3") 'split-window-horizontally) ; was digit-argument
(global-set-key (kbd "M-2") 'split-window-vertically) ; was digit-argument
(global-set-key (kbd "M-1") 'delete-other-windows) ; was digit-argument
(global-set-key (kbd "M-0") 'delete-window) ; was digit-argument
(global-set-key (kbd "M-o") 'other-window) ; was prefix
However, in dired
M-o runs the command dired-omit-mode
I can remove this "manually" by
local-unset-key M-o
in a dired buffer
but how can I do this in my .emacs?
--
Associate Prof. Ph.D Torben Knudsen Mobile : (+45) 2787 9826
Section of Automation and Control, Direct : 6 8694
Department of Electronic Systems, Email : tk@es.aau.dk
Aalborg University
Fredrik Bajersvej 7
DK-9220 Aalborg Ø
Denmark
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Remove local key binding in Dired
2009-07-02 6:54 Remove local key binding in Dired Torben Knudsen
@ 2009-07-02 7:06 ` Teemu Likonen
2009-07-03 6:33 ` Torben Knudsen
2009-07-02 13:34 ` Xah Lee
1 sibling, 1 reply; 7+ messages in thread
From: Teemu Likonen @ 2009-07-02 7:06 UTC (permalink / raw)
To: help-gnu-emacs
On 2009-07-02 08:54 (+0200), Torben Knudsen wrote:
> However, in dired
>
> M-o runs the command dired-omit-mode
>
> I can remove this "manually" by
>
> local-unset-key M-o
>
> in a dired buffer
>
> but how can I do this in my .emacs?
Configure a Dired mode hook which sets M-o keybinding to nil in the
mode's local map:
(add-hook 'dired-mode-hook 'my-dired-mode-hook)
(defun my-dired-mode-hook ()
(define-key dired-mode-map (kbd "M-o") nil))
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Remove local key binding in Dired
2009-07-02 7:06 ` Teemu Likonen
@ 2009-07-03 6:33 ` Torben Knudsen
0 siblings, 0 replies; 7+ messages in thread
From: Torben Knudsen @ 2009-07-03 6:33 UTC (permalink / raw)
To: help-gnu-emacs
Thanks, this is exactly what I need. I have some small changes to
emacs key bindings. However I try to keep it at a minimum.
Teemu Likonen <tlikonen@iki.fi> writes:
> On 2009-07-02 08:54 (+0200), Torben Knudsen wrote:
>
>> However, in dired
>>
>> M-o runs the command dired-omit-mode
>>
>> I can remove this "manually" by
>>
>> local-unset-key M-o
>>
>> in a dired buffer
>>
>> but how can I do this in my .emacs?
>
> Configure a Dired mode hook which sets M-o keybinding to nil in the
> mode's local map:
>
> (add-hook 'dired-mode-hook 'my-dired-mode-hook)
>
> (defun my-dired-mode-hook ()
> (define-key dired-mode-map (kbd "M-o") nil))
--
Associate Prof. Ph.D Torben Knudsen Mobile : (+45) 2787 9826
Section of Automation and Control, Direct : 6 8694
Department of Electronic Systems, Email : tk@es.aau.dk
Aalborg University
Fredrik Bajersvej 7
DK-9220 Aalborg Ø
Denmark
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Remove local key binding in Dired
2009-07-02 6:54 Remove local key binding in Dired Torben Knudsen
2009-07-02 7:06 ` Teemu Likonen
@ 2009-07-02 13:34 ` Xah Lee
2009-07-02 15:41 ` Marc Tfardy
2009-07-03 6:36 ` Torben Knudsen
1 sibling, 2 replies; 7+ messages in thread
From: Xah Lee @ 2009-07-02 13:34 UTC (permalink / raw)
To: help-gnu-emacs
On Jul 1, 11:54 pm, Torben Knudsen <t...@es.aau.dk> wrote:
> I have the following which I find conveinent
>
> ;;; Window spliting
> (global-set-key (kbd "M-3") 'split-window-horizontally) ; was digit-argument
> (global-set-key (kbd "M-2") 'split-window-vertically) ; was digit-argument
> (global-set-key (kbd "M-1") 'delete-other-windows) ; was digit-argument
> (global-set-key (kbd "M-0") 'delete-window) ; was digit-argument
> (global-set-key (kbd "M-o") 'other-window) ; was prefix
>
> However, in dired
>
> M-o runs the command dired-omit-mode
>
> I can remove this "manually" by
>
> local-unset-key M-o
>
> in a dired buffer
>
> but how can I do this in my .emacs?
you might try the latest version of ergoemacs, which fixes this.
http://code.google.com/p/ergoemacs/
The code that fixes this is this:
(add-hook 'dired-mode-hook
(lambda ()
(define-key dired-mode-map (kbd "C-n") 'new-empty-buffer) ; was
dired-next-line
(define-key dired-mode-map (kbd "M-o") 'other-window) ; was dired-
omit-mode
(define-key dired-mode-map (kbd "M-s") 'isearch-forward) ; was
prefix in emacs 23.
))
some explanation here:
• How To Reclaim Keybindings In Emacs
http://xahlee.org/emacs/reclaim_keybindings.html
Xah
∑ http://xahlee.org/
☄
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Remove local key binding in Dired
2009-07-02 13:34 ` Xah Lee
@ 2009-07-02 15:41 ` Marc Tfardy
2009-07-02 22:00 ` Xah Lee
2009-07-03 6:36 ` Torben Knudsen
1 sibling, 1 reply; 7+ messages in thread
From: Marc Tfardy @ 2009-07-02 15:41 UTC (permalink / raw)
To: help-gnu-emacs
Xah Lee schrieb:
> you might try the latest version of ergoemacs
WTF is ergoemacs??? :-o
> http://code.google.com/p/ergoemacs/
http://ergoemacs.googlecode.com/files/ergonomic_keybinding_qwerty_4.3.6.el:
Who really need this? And what is better in you own key bindings
compared to standard emacs? (except for your private preferences of
course.)
BTW:
- bad parens
- poor indent
- too long comments lines
regards
Marc
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Remove local key binding in Dired
2009-07-02 13:34 ` Xah Lee
2009-07-02 15:41 ` Marc Tfardy
@ 2009-07-03 6:36 ` Torben Knudsen
1 sibling, 0 replies; 7+ messages in thread
From: Torben Knudsen @ 2009-07-03 6:36 UTC (permalink / raw)
To: help-gnu-emacs
Xah Lee <xahlee@gmail.com> writes:
> On Jul 1, 11:54 pm, Torben Knudsen <t...@es.aau.dk> wrote:
>> I have the following which I find conveinent
>>
>> ;;; Window spliting
>> (global-set-key (kbd "M-3") 'split-window-horizontally) ; was digit-argument
>> (global-set-key (kbd "M-2") 'split-window-vertically) ; was digit-argument
>> (global-set-key (kbd "M-1") 'delete-other-windows) ; was digit-argument
>> (global-set-key (kbd "M-0") 'delete-window) ; was digit-argument
>> (global-set-key (kbd "M-o") 'other-window) ; was prefix
>>
>> However, in dired
>>
>> M-o runs the command dired-omit-mode
>>
>> I can remove this "manually" by
>>
>> local-unset-key M-o
>>
>> in a dired buffer
>>
>> but how can I do this in my .emacs?
>
>
> you might try the latest version of ergoemacs, which fixes this.
> http://code.google.com/p/ergoemacs/
Thanks for the suggestion. I have some small changes to emacs key
bindings. However I try to keep it at a minimum.
--
Associate Prof. Ph.D Torben Knudsen Mobile : (+45) 2787 9826
Section of Automation and Control, Direct : 6 8694
Department of Electronic Systems, Email : tk@es.aau.dk
Aalborg University
Fredrik Bajersvej 7
DK-9220 Aalborg Ø
Denmark
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2009-07-03 6:36 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-02 6:54 Remove local key binding in Dired Torben Knudsen
2009-07-02 7:06 ` Teemu Likonen
2009-07-03 6:33 ` Torben Knudsen
2009-07-02 13:34 ` Xah Lee
2009-07-02 15:41 ` Marc Tfardy
2009-07-02 22:00 ` Xah Lee
2009-07-03 6:36 ` Torben Knudsen
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.