[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
dired-jump
From: |
Miles Bader |
Subject: |
dired-jump |
Date: |
Sat, 08 Jul 2006 10:11:47 +0900 |
I just found out about a very very handy binding (thanks to David
Kastrup's comment on another mailing list): C-x C-j -- dired-jump
(which when given in a file buffer, pops up a dired buffer on its
directory with point positioned over the entry for that file).
Unfortunately this only gets bound if you load dired-x.el.
This seems so handy that I think it really ought to be bound by default
(`dired-jump' is already autoloaded from dired-x.el) -- having global
non-mode-specific bindings take effect only when you load a particular
lisp file seems most peculiar when that file is part of the standard
lisp distribution.
The code which binds dired-jump to `C-x C-j' is conditional upon the
variable `dired-bind-jump' -- if that variable is nil, then the binding
is not done.
We could simply continue honoring `dired-bind-jump', but move the
binding code from dired-x.el to bindings.el (and maybe add a bit of
customize magic to make changes to `dired-bind-jump' do something
intelligent). [If bindings.el is executed before dumping, perhaps this
code would need to be put somewhere that happens after loading the
user's init file...]
Here's the code from dired-x.el:
;;; GLOBAL BINDING.
(if dired-bind-jump
(progn
(define-key global-map "\C-x\C-j" 'dired-jump)
(define-key global-map "\C-x4\C-j" 'dired-jump-other-window)))
What do people think?
-Miles
--
o The existentialist, not having a pillow, goes everywhere with the book by
Sullivan, _I am going to spit on your graves_.
- dired-jump,
Miles Bader <=
- Re: dired-jump, Leon, 2006/07/07
- RE: dired-jump, Drew Adams, 2006/07/07
- Re: dired-jump, David Kastrup, 2006/07/08
- Re: dired-jump, Romain Francoise, 2006/07/08
- Re: dired-jump, Richard Stallman, 2006/07/08