[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#11815: 24.1; Confusing behavior of & in Dired

From: John Wiegley
Subject: bug#11815: 24.1; Confusing behavior of & in Dired
Date: Fri, 29 Jun 2012 03:29:25 -0500
User-agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.1 (darwin)

If I mark several files in dired and press !, I can execute:

    rsync -av * jw:/srv/ftp/pub

I can also run:

    rsync -av * jw:/srv/ftp/pub &

But if I type &, I cannot run:

    rsync -av * jw:/srv/ftp/pub

Because this is equivalent to:

    rsync -av * jw:/srv/ftp/pub * &

It actually decribes this behavior in the docstring: with the & command, if no
& appears at the end of the line (which makes little sense, since I pressed &
to indicate it was asynchronous), Dired adds "* &".  ??

I think that the following equivalence should hold:

    ! COMMAND & == & COMMAND

The fix is simply to change the two lines in `dired-do-async-shell-command'
which append " *" to the end of the line to read:

  (unless (string-match "[ \t][*?][ \t]" command)
    (setq command (concat command " *")))


In GNU Emacs 24.1.1 (x86_64-apple-darwin11.4.0, Carbon Version 1.6.0 AppKit 
 of 2012-06-28 on vulcan.local

reply via email to

[Prev in Thread] Current Thread [Next in Thread]