From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#36895: Patch in dired-guess-shell-alist-default Date: Fri, 02 Aug 2019 00:42:32 +0300 Organization: LINKOV.NET Message-ID: <87wofwva5j.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="200828"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) To: 36895@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Aug 01 23:47:11 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1htIul-000q8I-Dx for geb-bug-gnu-emacs@m.gmane.org; Thu, 01 Aug 2019 23:47:11 +0200 Original-Received: from localhost ([::1]:59362 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1htIuk-0003R4-Fc for geb-bug-gnu-emacs@m.gmane.org; Thu, 01 Aug 2019 17:47:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59149) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1htIuf-0003Px-6c for bug-gnu-emacs@gnu.org; Thu, 01 Aug 2019 17:47:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1htIue-0005w8-5o for bug-gnu-emacs@gnu.org; Thu, 01 Aug 2019 17:47:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:46729) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1htIue-0005vs-1t for bug-gnu-emacs@gnu.org; Thu, 01 Aug 2019 17:47:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1htIud-0003k0-UH for bug-gnu-emacs@gnu.org; Thu, 01 Aug 2019 17:47:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 01 Aug 2019 21:47:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 36895 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.156469598412453 (code B ref -1); Thu, 01 Aug 2019 21:47:03 +0000 Original-Received: (at submit) by debbugs.gnu.org; 1 Aug 2019 21:46:24 +0000 Original-Received: from localhost ([127.0.0.1]:55548 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1htItz-0003EO-ND for submit@debbugs.gnu.org; Thu, 01 Aug 2019 17:46:23 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:33677) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1htItu-00039N-5S for submit@debbugs.gnu.org; Thu, 01 Aug 2019 17:46:18 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58567) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1htItt-0002ib-4E for bug-gnu-emacs@gnu.org; Thu, 01 Aug 2019 17:46:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1htIts-00055Y-5g for bug-gnu-emacs@gnu.org; Thu, 01 Aug 2019 17:46:17 -0400 Original-Received: from buffalo.birch.relay.mailchannels.net ([23.83.209.24]:16235) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1htItr-00054j-TT for bug-gnu-emacs@gnu.org; Thu, 01 Aug 2019 17:46:16 -0400 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 8D4621A18C2 for ; Thu, 1 Aug 2019 21:46:13 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a12.g.dreamhost.com (100-96-4-69.trex.outbound.svc.cluster.local [100.96.4.69]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 4BFB31A1342 for ; Thu, 1 Aug 2019 21:46:13 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from pdx1-sub0-mail-a12.g.dreamhost.com ([TEMPUNAVAIL]. [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.17.5); Thu, 01 Aug 2019 21:46:13 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Tangy-Celery: 22ff86d1297958d4_1564695973383_1841320649 X-MC-Loop-Signature: 1564695973383:3168337824 X-MC-Ingress-Time: 1564695973382 Original-Received: from pdx1-sub0-mail-a12.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a12.g.dreamhost.com (Postfix) with ESMTP id 7B8E483B1D for ; Thu, 1 Aug 2019 14:46:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to :subject:date:message-id:mime-version:content-type; s= linkov.net; bh=Y6j2to2uEw7x/zQh8ikyD3U04aI=; b=uWshj4TLBlCOXRfL+ mtEVUxt1Q+Sb2E0SgYxvzeEGEJdKCu2N2n2B54+iWMrDpoLN+7djNcn9HN8Rca/2 aYxVQNrho9ZKvi+A/hQLDW4PUkkiFk2wBY179vWUbBh//uGzJdyT9aI+WYAmjzVq 1hH5TNwQ0eopjK8A0ivfihbnSM= Original-Received: from mail.jurta.org (m91-129-103-76.cust.tele2.ee [91.129.103.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by pdx1-sub0-mail-a12.g.dreamhost.com (Postfix) with ESMTPSA id 8865483B16 for ; Thu, 1 Aug 2019 14:46:08 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a12 X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: 0 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduvddrleekgddtgecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecunecujfgurhephffvufhofffkfgggtgesmhdtreertdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdefrdejieenucfrrghrrghmpehmohguvgepshhmthhppdhhvghlohepmhgrihhlrdhjuhhrthgrrdhorhhgpdhinhgvthepledurdduvdelrddutdefrdejiedprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopegsuhhgqdhgnhhuqdgvmhgrtghssehgnhhurdhorhhgnecuvehluhhsthgvrhfuihiivgepud X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:164285 Archived-At: --=-=-= Content-Type: text/plain Tags: patch Isn't "git apply" used more often nowadays than "patch"? If yes, then I propose this patch: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=dired-guess-shell-alist-default.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)) --=-=-=--