unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* dired-jump
@ 2006-07-08  1:11 Miles Bader
  2006-07-08  2:16 ` dired-jump Leon
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Miles Bader @ 2006-07-08  1:11 UTC (permalink / 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_.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: dired-jump
  2006-07-08  1:11 dired-jump Miles Bader
@ 2006-07-08  2:16 ` Leon
  2006-07-08  3:41 ` dired-jump Drew Adams
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Leon @ 2006-07-08  2:16 UTC (permalink / raw)


Miles Bader <miles@gnu.org> writes:
>
> 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

I found it very useful too.

-- 
Leon

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: dired-jump
  2006-07-08  1:11 dired-jump Miles Bader
  2006-07-08  2:16 ` dired-jump Leon
@ 2006-07-08  3:41 ` Drew Adams
  2006-07-08  8:29 ` dired-jump David Kastrup
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Drew Adams @ 2006-07-08  3:41 UTC (permalink / raw)


    What do people think?
    
You've got my vote. I'd say put all of dired-x in - it's all good.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: dired-jump
  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
  2006-07-08  8:57 ` dired-jump Romain Francoise
  2006-07-08 15:31 ` dired-jump Richard Stallman
  4 siblings, 0 replies; 7+ messages in thread
From: David Kastrup @ 2006-07-08  8:29 UTC (permalink / raw)
  Cc: emacs-devel

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: dired-jump
  2006-07-08  1:11 dired-jump Miles Bader
                   ` (2 preceding siblings ...)
  2006-07-08  8:29 ` dired-jump David Kastrup
@ 2006-07-08  8:57 ` Romain Francoise
  2006-07-08 20:57   ` dired-jump Richard Stallman
  2006-07-08 15:31 ` dired-jump Richard Stallman
  4 siblings, 1 reply; 7+ messages in thread
From: Romain Francoise @ 2006-07-08  8:57 UTC (permalink / raw)
  Cc: emacs-devel

Miles Bader <miles@gnu.org> writes:

> What do people think?

My plan is to move dired-jump to dired itself after the release, if
Richard agrees.  It's not as simple as it seems, because it uses dired-x
features directly (omit mode).

That being said, I'm all for binding it by default now, before the
release.

(I'm the dired-x.el maintainer.)

-- 
Romain Francoise <romain@orebokech.com> | The sea! the sea! the open
it's a miracle -- http://orebokech.com/ | sea! The blue, the fresh, the
                                        | ever free! --Bryan W. Procter

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: dired-jump
  2006-07-08  1:11 dired-jump Miles Bader
                   ` (3 preceding siblings ...)
  2006-07-08  8:57 ` dired-jump Romain Francoise
@ 2006-07-08 15:31 ` Richard Stallman
  4 siblings, 0 replies; 7+ messages in thread
From: Richard Stallman @ 2006-07-08 15:31 UTC (permalink / raw)
  Cc: emacs-devel

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

Nothing in dired-x should have a standard key-binding.  dired-x is the
file where people put extensions to Dired without having to get them
judged for inclusion in Dired itself.

We could consider the command dired-jump for inclusion in Dired,
if you want.  (After the release.)

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: dired-jump
  2006-07-08  8:57 ` dired-jump Romain Francoise
@ 2006-07-08 20:57   ` Richard Stallman
  0 siblings, 0 replies; 7+ messages in thread
From: Richard Stallman @ 2006-07-08 20:57 UTC (permalink / raw)
  Cc: emacs-devel, miles

    That being said, I'm all for binding it by default now, before the
    release.

No, that is not ok.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2006-07-08 20:57 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` 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

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