--- Begin Message ---
Subject: |
Patch in dired-guess-shell-alist-default |
Date: |
Fri, 02 Aug 2019 00:42:32 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) |
Tags: patch
Isn't "git apply" used more often nowadays than "patch"?
If yes, then I propose this patch:
diff --git a/lisp/dired-x.el b/lisp/dired-x.el
index 462fa4ee15..3b3c0aeaf3 100644
--- a/lisp/dired-x.el
+++ b/lisp/dired-x.el
@@ -909,11 +909,11 @@ dired-guess-shell-alist-default
'(concat "znew" (if dired-guess-shell-gzip-quiet " -q")
" " dired-guess-shell-znew-switches))
- '("\\.patch\\'" "cat * | patch")
- (list "\\.patch\\.g?z\\'" "gunzip -qc * | patch"
+ '("\\.patch\\'" "cat * | patch" "cat * | git apply")
+ (list "\\.patch\\.g?z\\'" "gunzip -qc * | patch" "gunzip -qc * | git apply"
;; Optional decompression.
'(concat "gunzip" (if dired-guess-shell-gzip-quiet " -q")))
- (list "\\.patch\\.Z\\'" "zcat * | patch"
+ (list "\\.patch\\.Z\\'" "zcat * | patch" "zcat * | git apply"
;; Optional conversion to gzip format.
'(concat "znew" (if dired-guess-shell-gzip-quiet " -q")
" " dired-guess-shell-znew-switches))
--- End Message ---
--- Begin Message ---
Subject: |
Re: bug#36895: Patch in dired-guess-shell-alist-default |
Date: |
Tue, 06 Aug 2019 00:04:40 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) |
>> >> Isn't "git apply" used more often nowadays than "patch"?
>> >
>> > No, not here. "git apply" is only relevant for when working in a Git
>> > repository.
>> >
>> > We could perhaps make this customizable, or maybe even make Emacs
>> > intuit the right command looking at the current buffer, though.
>>
>> Yes, this would be more appropriate:
>
> Thanks, LGTM.
Pushed to master and closed.
--- End Message ---