all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: David Kastrup <dak@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: dired-jump
Date: Sat, 08 Jul 2006 10:29:06 +0200	[thread overview]
Message-ID: <85u05s4i0d.fsf@lola.goethe.zz> (raw)
In-Reply-To: <87d5cghpd8.fsf@catnip.gol.com> (Miles Bader's message of "Sat, 08 Jul 2006 10:11:47 +0900")

Miles Bader <miles@gnu.org> writes:

> 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?

Personally, I find that dired-jump is so useful that it should be the
default (I actually forgot it wasn't).

The problem I see is that dired-x does a lot more, and just using a
particular keybinding should not change the behavior of dired.

The intro to dired states:

    File: dired-x,  Node: Features,  Next: Technical Details,  Up: Introduction

    1.1 Features
    ============

    Some features provided by Dired Extra

      1. Omitting uninteresting files from Dired listing.
              *Note Omitting Files in Dired::.

      2. Local variables for Dired directories.
              *Note Local Variables::.

      3. Guessing shell commands in Dired buffers.
              *Note Shell Command Guessing::.

      4. Running Dired command in non-Dired buffers.
              *Note Virtual Dired::.

      5. Finding a file mentioned in a buffer
              *Note Find File At Point::.

      6. Commands using file marking.
              *Note Advanced Mark Commands::.

    `dired-x.el' binds some functions to keys in Dired Mode (*note Key
    Index::) and also binds `C-x C-j' and `C-x 4 C-j' _globally_ to
    `dired-jump' (*note Miscellaneous Commands::).  It may also bind `C-x
    C-f' and `C-x 4 C-f' to `dired-x-find-file' and
    `dired-x-find-file-other-window', respectively (*note Find File At
    Point::).

Personally, I consider all of those useful, but that is not guaranteed
to be the opinion of everybody else.

So we should either make dired-x the default in toto, or we should
extract the code dealing with dired-jump (and maybe dired-x-find-file)
and move it into dired or a separate file, so that those bindings can
be made the default without getting the rest of dired-x.

But I don't think we should have dired-x's features turned on
depending on whether one has used a stock keybinding.  So either we
decouple the keybindings from dired-x, or make all of dired-x stock.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

  parent reply	other threads:[~2006-07-08  8:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-08  1:11 dired-jump Miles Bader
2006-07-08  2:16 ` dired-jump Leon
2006-07-08  3:41 ` dired-jump Drew Adams
2006-07-08  8:29 ` David Kastrup [this message]
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

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

  git send-email \
    --in-reply-to=85u05s4i0d.fsf@lola.goethe.zz \
    --to=dak@gnu.org \
    --cc=emacs-devel@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 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.