4

Windows 10, Emacs 25.1, Dired+.

I copy file from one folder to another. Here screens:

Screen_1

After copy I get the next result:

Second

As you can see the bottom buffer is not refresh. So I need to go to bottom buffer and press g for refresh.

Third

The question is: Is it possible Emacs/Dired+ to autorefresh buffer after copy file?

Drew
  • 75,699
  • 9
  • 109
  • 225
Alex
  • 781
  • 2
  • 7
  • 18

1 Answers1

1

Hm. I don't see that behavior. What I see is that the file that was copied shows up immediately in the Dired listing of the directory where it was copied.

Did you try with emacs -Q and then just loading dired+.el?


If you do need to force reverting for some reason, and you don't want to use g, you can also try periodic auto-reverting.

The Emacs manual, node Reverting tells you:

You can also tell Emacs to revert buffers periodically. To do this for a specific buffer, enable the minor mode Auto-Revert mode by typing M-x auto-revert-mode. This automatically reverts the current buffer every five seconds; you can change the interval through the variable auto-revert-interval.


But again, you should not have the behavior you are seeing. The copied file should show up in the target directory listing.

Drew
  • 75,699
  • 9
  • 109
  • 225
  • With minimal configuration. Only dired+ it' success autorefresh. – Alex Oct 12 '17 at 16:11
  • Dunno what to say. It works for me, in all Emacs releases. And I too am on MS Windows. I start Emacs with `emacs -Q`, load `dired+.el`, visit a directory and one of its subdirectories (two windows), and copy (`C`) a file from the parent directory to the subdirectory. The copied file shows up in the subdir Dired buffer, with mark `C` in the left column and with the entire line highlighted, to show that it was created by copying. – Drew Oct 12 '17 at 16:12
  • FWIW, your screenshots indicate that you also are using Helm, yas, and Async. – Drew Oct 12 '17 at 16:12
  • 1
    Ah, I see you changed your comment to indicate that it **does** work OK with just Dired+. So you need to bisect your init file to find out which other code is interfering with the proper behavior. (Perhaps "Async?") – Drew Oct 12 '17 at 16:14
  • I found the problem. In my init.el I has `(dired-async-mode t)`. If comment this than problem is gone. But I need to set this variable because I want to asyn copy. – Alex Oct 12 '17 at 16:31
  • I assume you see the same thing with vanilla Dired, i.e., starting from `emacs -Q` and not loading Dired+. If not, then let me know. But if so, consider filing a bug or enhancement request with the maintainer of dired-async (John Wiegley), saying something like you want the buffer reverted even when you have `dired-async-mode` turned on. But I suspect there is a good reason that this reverting doesn't happen automatically for async. – Drew Oct 12 '17 at 19:06