From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Tino Calancha Newsgroups: gmane.emacs.devel Subject: Re: dired-tests.el fails on MS-Windows Date: Wed, 2 Aug 2017 12:38:59 +0900 (JST) Message-ID: References: <83zibjz519.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; BOUNDARY="8323329-1977456410-1501645142=:12768" X-Trace: blaine.gmane.org 1501645196 9176 195.159.176.226 (2 Aug 2017 03:39:56 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 2 Aug 2017 03:39:56 +0000 (UTC) User-Agent: Alpine 2.20 (DEB 67 2015-01-07) Cc: Eli Zaretskii , Emacs developers , Michael Albinus , Tino Calancha To: Fabrice Popineau Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Aug 02 05:39:45 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dckVc-0001h1-0X for ged-emacs-devel@m.gmane.org; Wed, 02 Aug 2017 05:39:44 +0200 Original-Received: from localhost ([::1]:45331 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dckVh-0007NY-TG for ged-emacs-devel@m.gmane.org; Tue, 01 Aug 2017 23:39:49 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37950) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dckV4-0007KT-1T for emacs-devel@gnu.org; Tue, 01 Aug 2017 23:39:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dckV3-0008Q8-5l for emacs-devel@gnu.org; Tue, 01 Aug 2017 23:39:10 -0400 Original-Received: from mail-pf0-x22f.google.com ([2607:f8b0:400e:c00::22f]:35683) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dckUz-0008MK-UV; Tue, 01 Aug 2017 23:39:06 -0400 Original-Received: by mail-pf0-x22f.google.com with SMTP id t86so15715464pfe.2; Tue, 01 Aug 2017 20:39:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=BQnhgyt4Wvr1MidlaMlN6bGfHaKwn2jGdO435+m6edI=; b=C3WZYUwuq7zONrTewT00Cv8FGbYM5qcavBCXGfXA+OYxv59JUtKKmjbLQHbfTqfRMp FWFWmRKPoc908r+ZuaioA3TzEY0QhanFyRBeTuWIyD1mRrkSrhOJXZfWcoRMPZ8/wX3u kTv56psHLu8rGjATXkNWdaHYcYSQrc57GaCjULbID/Eo8WuvTga8oIjh96AgMpJUg8e1 huCrWaRAxlLbR8ao07R7uttaeq/XK/dR1GUEa7ZaJhnpOysTp0EgGhUeIRdIZEJglfDy 7CJ8pyVNlrbCLTMdaIf3L/n3l7p2wY+jQvY+AarlsYJcDcPam6/AEIL47a4l06TrRRTM q3Yw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=BQnhgyt4Wvr1MidlaMlN6bGfHaKwn2jGdO435+m6edI=; b=IDR4l0gwoffbGQhlUGKJ5naU/9dLh1fl7sL9SKGfWFh+rmif/eOn+wqjRvXqrDFC+Q nD0txpMMK1Pl9W2vP0HMvR5TsA+YR1g7HlmSl0PITwKJnbWwKpx0TfkhNiY7+ET9xvJl Y5+wzftGIYJfbmLkr2YeGAZ+WxAFmRfz2dowDH5evTKEcTWa+Q2D4eqqEunhBS+Xwz0+ E1ku9ekJq0NzG7JVv0QhBKYgDzRngfWt4MPIHjO7InF6tdIyynGr1halnMT3oaY7zX4w xViRZu/x/ljKDBTM8cR/Qu1k25SxvMuF3ySj5bRk5iynpK+V7dtzF6SyMG/OaNnI0LMk 0riA== X-Gm-Message-State: AIVw112oJAD+5KQoBVd7buWKIHRpXBRNKqHMPg6d8TjJgEWW2l8UlqHX iKUXKMBVlocKTQ== X-Received: by 10.99.7.131 with SMTP id 125mr20831063pgh.136.1501645143412; Tue, 01 Aug 2017 20:39:03 -0700 (PDT) Original-Received: from calancha-pc (170.224.128.101.dy.bbexcite.jp. [101.128.224.170]) by smtp.gmail.com with ESMTPSA id j124sm27943113pfc.78.2017.08.01.20.39.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 01 Aug 2017 20:39:02 -0700 (PDT) X-Google-Original-From: Tino Calancha X-X-Sender: calancha@calancha-pc In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c00::22f X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:217231 Archived-At: --8323329-1977456410-1501645142=:12768 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8BIT On Tue, 1 Aug 2017, Fabrice Popineau wrote: > I don't get a failure on dired-test-bug25609 with windows 10 and running from a mingw64 bash. > I get a failure on  dired-test-bug27631 because "/bin/sh" is hardcoded in lisp/dired.el and the > place for sh.exe in msys2 is in /usr/bin . Thank you for the comments and suggestions! I should used 'executable-find' for a local connection. For a tramp connection i don't know how to get the 'sh' location in the remote host: i just kept '/bin/sh' for them. Michael? --8<-----------------------------cut here---------------start------------->8--- commit 76f1ea53c7469f7d4c5b9007633642124ae88c62 Author: Tino Calancha Date: Wed Aug 2 12:27:42 2017 +0900 Don't assume /bin/sh as the 'sh' location in the local host * lisp/dired.el (dired-insert-directory): Use executable-find in a local host. diff --git a/lisp/dired.el b/lisp/dired.el index 4f8f615a34..a0e1fe185d 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -1281,7 +1281,8 @@ dired-insert-directory (unless (zerop (process-file - "/bin/sh" nil (current-buffer) nil "-c" script)) + (or (and (file-remote-p default-directory) "/bin/sh") (executable-find "sh")) + nil (current-buffer) nil "-c" script)) (user-error "%s: No files matching wildcard" (cdr dir-wildcard))) (insert-directory-clean (point) switches))) --8<-----------------------------cut here---------------end--------------->8--- In GNU Emacs 26.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.11) of 2017-08-02 Repository revision: 0fd6de9cb444d6cc553ea67815ccfb7a923012a2 --8323329-1977456410-1501645142=:12768--