unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Miles Bader <miles@gnu.org>
Subject: dired-jump
Date: Sat, 08 Jul 2006 10:11:47 +0900	[thread overview]
Message-ID: <87d5cghpd8.fsf@catnip.gol.com> (raw)

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_.

             reply	other threads:[~2006-07-08  1:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-08  1:11 Miles Bader [this message]
2006-07-08  2:16 ` dired-jump Leon
2006-07-08  3:41 ` dired-jump Drew Adams
2006-07-08  8:29 ` dired-jump David Kastrup
2006-07-08  8:57 ` dired-jump Romain Francoise
2006-07-08 20:57   ` dired-jump Richard Stallman
2006-07-08 15:31 ` dired-jump Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87d5cghpd8.fsf@catnip.gol.com \
    --to=miles@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).