Add support to Dired #6

Closed
semente opened this Issue Mar 19, 2013 · 16 comments

Projects

None yet

2 participants

@semente
semente commented Mar 19, 2013

When you are in a dired buffer, show on fringe that this file (or directory) have changes.

Owner
dgutov commented Mar 19, 2013

Hmm, that might be nice to have. I'll get around to this sometime.

Meanwhile, you're aware of vc-dir (C-x v d), right? I'm asking because some long-time vc users apparently still don't know about it.

semente commented Mar 20, 2013

Yeah, I'm aware of vc-dir! By the way, it should be more like dired, I don't like it so much. :-)

About my suggestion, it is just a quickly way to show a user VC status information when browsing directories. I use to go to vc-dir when I guess that might have some change.

Thanks!

Owner
dgutov commented Sep 4, 2013

I've pushed an initial implementation, feel free to check it out.

Unfortunately, it doesn't work too well (yet), for reasons beyond my understanding. I'll keep you updated.

@dgutov dgutov added a commit that closed this issue Sep 5, 2013
@dgutov * Use one diff-hl-dired-process-buffer per dired buffer.
* Use `vc-responsible-backend', remove `diff-hl-dired-files'.
* Highlight subdirectories depending on files they contain.

Closes #6
7587748
@dgutov dgutov closed this in 7587748 Sep 5, 2013
Owner
dgutov commented Sep 5, 2013

Seems to work well enough now. Comments welcome.

One major difference from vc-dir is that file statuses don't update automatically as they're saved or commited (you have to press g), but I figured that's in line with Dired behavior, generally.

semente commented Sep 5, 2013

Hello Dmistry, thank you very much! Gonna try it soon... I give you a feedback asap. Thanks!!

semente commented Sep 10, 2013

Hey @dgutov, how are you?

Sorry for the long delay in giving you a feedback. I've just updated diff-hl from MELPA and it is working nicely! Thanks a lot!

I've noticed that I had to load the package diff-hl-dired.el by hand to be able to use this feature. I suppose it is the desired behavior. Anyway, ust to let you know. Thanks!

Owner
dgutov commented Sep 10, 2013

No problem, thanks for the idea. It's a nifty feature, I ended up using it myself, too.

I suppose it is the desired behavior.

Not at all. diff-hl-dired-mode has an ;;;###autoload cookie, so the function should be autoloaded, if you have the latest version (the autoload form should be added to diff-hl-autoloads.el during the installation).
So the only thing you should have to do is add the add-hook form to your init file, as indicated in the Commentary.

semente commented Sep 10, 2013

Strange, I verified the autoloads files and I do have the
dired-hl-dired-mode there... I remember that I had the same problem
with another package some days ago.

On Mon, Sep 9, 2013 at 9:51 PM, Dmitry Gutov notifications@github.comwrote:

No problem, thanks for the idea. It's a nifty feature, I ended up using it
myself, too.

I suppose it is the desired behavior.

Not at all. diff-hl-dired-mode has an ;;;###autoload cookie, so the
function should be autoloaded, if you have the latest version (the autoload
form should be added to diff-hl-autoloads.el during the installation).
So the only thing you should have to do is add the add-hook form to your
init file, as indicated in the Commentary.


Reply to this email directly or view it on GitHubhttps://github.com/dgutov/diff-hl/issues/6#issuecomment-24126513
.

Owner
dgutov commented Sep 10, 2013

I guess it depends on how you're trying to use it. By default, packages are initialized only after the init file has loaded, so make sure you're not trying to call the function before that. There's no reason to do that anyway.

semente commented Sep 10, 2013

I might found the problem. Only when a I open a file using the dired buffer
diff-hl-dired-mode is activated. Maybe we must use another hook. I tried
dired-load-hook but didn't work...Looks like dired-mode-hook still is the
best option.

On Mon, Sep 9, 2013 at 10:12 PM, Dmitry Gutov notifications@github.comwrote:

I guess it depends on how you're trying to use it. By default, packages
are initialized only after the init file has loaded, so make sure you're
not trying to call the function before that. There's no reason to do that
anyway.


Reply to this email directly or view it on GitHubhttps://github.com/dgutov/diff-hl/issues/6#issuecomment-24127232
.

Owner
dgutov commented Sep 10, 2013

I don't understand. Are you saying that when you open a Dired buffer (with, say, M-x dired), diff-hl-dired-mode is not active there? And only becomes active if you open a file from that Dired buffer?

Owner
dgutov commented Sep 10, 2013

Ah, true. It does behave differently if no files have yet been open. I'll see what I can do.

Usually, I open Dired with C-x C-j (dired-jump from the dired-x package), so I haven't noticed.

semente commented Sep 10, 2013

Yep, but before open the file I can see diff-hl-dired-mode becoming activated. It looks like this hook run before leaving the buffer.

semente commented Sep 10, 2013

I was also using C-x C-j... but just after opening Emacs to test diff-hl-dired-mode. Usually we first open a file with C-x C-f and after go to its directory.

@dgutov dgutov added a commit that referenced this issue Sep 10, 2013
@dgutov * diff-hl-mode: Extract diff-hl-maybe-define-bitmaps.
* diff-hl-dired-mode: Use it.

#6
cc09724
Owner
dgutov commented Sep 10, 2013

Eh. 😬

The problem was than until we opened at least one file in diff-hl-mode, the fringe bitmaps were not defined.
Should be fixed now.

semente commented Sep 10, 2013

Great! :)

@dgutov dgutov added a commit that referenced this issue Jan 14, 2014
@dgutov Fix #6
Same problem and solution as in joaotavora/yasnippet#296.
9218392
@dgutov dgutov pushed a commit that referenced this issue Jan 14, 2014
@leoliu leoliu Fix #6: do not override split-window-preferred-function
Use new user variable ggtags-split-window-function instead for
customised behaviour.
8774bc9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment