jwiegley / emacs-async

Simple library for asynchronous processing in Emacs
GNU General Public License v3.0
838 stars 68 forks source link

dired-async does not work with /sudo:: buffers #91

Closed jabranham closed 6 years ago

jabranham commented 6 years ago

From emacs -Q

(add-to-list 'load-path "path/to/async")

(require 'async)
(require 'dired-async)
(dired-async-mode)

then open a dired buffer with e.g.

C-x C-f /sudo::/etc

and make two files e.g. file.old and file.new, then type R on file.new and try to rename it to file.old. For me, nothing happens, other than "1 async job running" appearing on the modeline. It doesn't seem to ever finish.

jwiegley commented 6 years ago

If you look at your active processes, is there another Emacs running the whole time?

thierryvolpiatto commented 6 years ago

If you are using emacs-26+ see #80 and use (setq async-quiet-switch "-q"), it should fix your problem. This is an emacs bug that should be fixed upstream.

jabranham commented 6 years ago

Yes, there is another Emacs session running.

This is using Emacs 25.3.

thierryvolpiatto commented 6 years ago

This is not reproducible.

Also I was wrong above for 26+, there is no need to set async-quiet-switch to "-q", I didn't remember dired-async does it automatically when needed.

jabranham commented 6 years ago

I'm surprised this isn't reproducible for you. It happens every time for me on Emacs 25.3 following the steps at the top. I'm running Arch linux currently, here's some build info:

In GNU Emacs 25.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.22.26)
 of 2017-12-04 built on arojas
Windowing system distributor 'The X.Org Foundation', version 11.0.11905000
Configured using:
 'configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib
 --localstatedir=/var --with-x-toolkit=gtk3 --with-xft --with-modules
 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong
 -fno-plt' CPPFLAGS=-D_FORTIFY_SOURCE=2
 LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now'

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GCONF GSETTINGS
NOTIFY ACL GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11 MODULES

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix
thierryvolpiatto commented 6 years ago

Alex Branham notifications@github.com writes:

I'm surprised this isn't reproducible for you.

I followed the exact steps you provided from emacs -Q and couldn't reproduce.

Can't reproduce also when copying/renaming from Helm.

Note that I use dired-async for all my copying/renaming/symlinking tasks since long time now without failures (except the emacs-26+ bug mentioned previously).

It happens every time for me on Emacs 25.3 following the steps at the top.

Do you have a ~/.authinfo.gpg file ?

If not try to add one with a line like this:

default port sudo login root password xxxxxxx

-- Thierry

thierryvolpiatto commented 6 years ago

Ah! I could reproduce without the .authinfo file, so yes that's the problem, you need a .authinfo.gpg file to copy/rename asynchronously.

thierryvolpiatto commented 6 years ago

That's now explained in README