[Top][All Lists]

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


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:

   (if dired-bind-jump
         (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?


o The existentialist, not having a pillow, goes everywhere with the book by
  Sullivan, _I am going to spit on your graves_.

reply via email to

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