[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#48072: 28.0.50: dired-read-shell-command: handle empty input properl
From: |
Michael Albinus |
Subject: |
bug#48072: 28.0.50: dired-read-shell-command: handle empty input properly [PATCH] |
Date: |
Wed, 28 Apr 2021 14:13:38 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Boruch Baum <boruch_baum@gmx.com> writes:
Hi Boruch,
>> > + (unless (executable-find command)
>> > + (user-error "Not a valid command!"))
>>
>> This doesn't check the remote case.
>
> Good point. It's an area of dired I'm weak in because I don't use it.
> How about the following (with the update diredc regex):
>
> (unless (executable-find
> (if (string-match "^ *\\([^ ]+\\) " command)
> (substring command (match-beginning 1) (match-end 1))
> command)
> (file-remote-p file))
> (user-error "Not a valid command!"))
Instead of (file-remote-p file) you could always use t. If
default-directory is local, it doesn't hurt.
Best regards, Michael.
- bug#48072: 28.0.50: dired-read-shell-command: handle empty input properly [PATCH], (continued)
- bug#48072: 28.0.50: dired-read-shell-command: handle empty input properly [PATCH], Eli Zaretskii, 2021/04/28
- bug#48072: 28.0.50: dired-read-shell-command: handle empty input properly [PATCH], Boruch Baum, 2021/04/28
- bug#48072: 28.0.50: dired-read-shell-command: handle empty input properly [PATCH], Eli Zaretskii, 2021/04/28
- bug#48072: 28.0.50: dired-read-shell-command: handle empty input properly [PATCH], Boruch Baum, 2021/04/28
- bug#48072: 28.0.50: dired-read-shell-command: handle empty input properly [PATCH], Eli Zaretskii, 2021/04/28
- bug#48072: 28.0.50: dired-read-shell-command: handle empty input properly [PATCH], Michael Albinus, 2021/04/28
- bug#48072: 28.0.50: dired-read-shell-command: handle empty input properly [PATCH], Boruch Baum, 2021/04/28
- bug#48072: 28.0.50: dired-read-shell-command: handle empty input properly [PATCH], Eli Zaretskii, 2021/04/28
bug#48072: 28.0.50: dired-read-shell-command: handle empty input properly [PATCH], Michael Albinus, 2021/04/28