emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: proced.el -- operate on processes like dired


From: Mathias Dahl
Subject: Re: proced.el -- operate on processes like dired
Date: Mon, 31 Mar 2008 09:40:07 +0200

>  This is easy to put in .emacs something like this:
[snip]
>  However, we should find more convenient key bindings.

Did you check out dired-sort-map.el? It has good bindings, IMHO. It
does not have all those that you propose but I am sure we can think of
good letters for those extra bindings as well. Here is the guts from
the above mentioned package:

(defvar dired-sort-map (make-sparse-keymap))

(add-hook 'dired-mode-hook '(lambda () (define-key dired-mode-map "s"
dired-sort-map)))
(add-hook 'dired-mode-hook '(lambda () (define-key dired-sort-map "s"
'(lambda () "sort by Size" (interactive) (dired-sort-other (concat
dired-listing-switches "S"))))))
(add-hook 'dired-mode-hook '(lambda () (define-key dired-sort-map "x"
'(lambda () "sort by eXtension" (interactive) (dired-sort-other
(concat dired-listing-switches "X"))))))
(add-hook 'dired-mode-hook '(lambda () (define-key dired-sort-map "t"
'(lambda () "sort by Time" (interactive) (dired-sort-other (concat
dired-listing-switches "t"))))))
(add-hook 'dired-mode-hook '(lambda () (define-key dired-sort-map "n"
'(lambda () "sort by Name" (interactive) (dired-sort-other (concat
dired-listing-switches ""))))))

/Mathias




reply via email to

[Prev in Thread] Current Thread [Next in Thread]