From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Alexander Pohoyda Newsgroups: gmane.emacs.bugs Subject: Patch: Re: man.el should avoid "sh" Date: Sun, 2 May 2004 13:57:04 +0200 (CEST) Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Message-ID: <200405021157.i42Bv4aR000523@oak.pohoyda.family> References: NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1083499870 16928 80.91.224.253 (2 May 2004 12:11:10 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 2 May 2004 12:11:10 +0000 (UTC) Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun May 02 14:11:03 2004 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BKFoF-0001Ml-00 for ; Sun, 02 May 2004 14:11:03 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1BKFkb-0005Bg-Nj for geb-bug-gnu-emacs@m.gmane.org; Sun, 02 May 2004 08:07:17 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1BKFk4-0004yx-7o for bug-gnu-emacs@gnu.org; Sun, 02 May 2004 08:06:44 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1BKFiA-0003nu-1v for bug-gnu-emacs@gnu.org; Sun, 02 May 2004 08:05:17 -0400 Original-Received: from [213.165.64.20] (helo=mail.gmx.net) by monty-python.gnu.org with smtp (Exim 4.30) id 1BKFhF-0002nk-C9 for bug-gnu-emacs@gnu.org; Sun, 02 May 2004 08:03:49 -0400 Original-Received: (qmail 20545 invoked by uid 65534); 2 May 2004 11:57:05 -0000 Original-Received: from p50842197.dip0.t-ipconnect.de (EHLO www2.gmx.net) (80.132.33.151) by mail.gmx.net (mp005) with SMTP; 02 May 2004 13:57:05 +0200 X-Authenticated: #14602519 Original-Received: from oak.pohoyda.family (localhost [127.0.0.1]) by www2.gmx.net (8.12.10/8.12.10) with ESMTP id i42Bv4Nn000526 for ; Sun, 2 May 2004 13:57:05 +0200 (CEST) (envelope-from apog@oak.pohoyda.family) Original-Received: (from apog@localhost) by oak.pohoyda.family (8.12.10/8.12.10/Submit) id i42Bv4aR000523; Sun, 2 May 2004 13:57:04 +0200 (CEST) (envelope-from apog) Original-To: bug-gnu-emacs@gnu.org X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.4 Precedence: list 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 Xref: main.gmane.org gmane.emacs.bugs:7819 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:7819 Kevin Rodgers writes: > Max Polk wrote: > > Running emacs in Windows, by typing "M-x man ls" I get an error > > message that "sh" is not found. > > > > Here's a minor fix for man.el, line 618: > > > > - (start-process manual-program buffer "sh" "-c" > > + (start-process manual-program buffer shell-file-name "-c" > > > > This replaces the hard-coded "sh" with the variable shell-file-name. > > Notice that just below this shell-file-name is used and not "sh" so > > maybe it got fixed in one place but not the other. > > You should also replace "-c" with shell-command-switch. Thanks to Kevin and Max. Here's a diff to install: Index: man.el =================================================================== RCS file: /cvsroot/emacs/emacs/lisp/man.el,v retrieving revision 1.133 diff -u -r1.133 man.el --- man.el 23 Mar 2004 07:33:39 -0000 1.133 +++ man.el 2 May 2004 11:46:55 -0000 @@ -732,11 +732,13 @@ (setenv "GROFF_NO_SGR" "1") (if (fboundp 'start-process) (set-process-sentinel - (start-process manual-program buffer "sh" "-c" + (start-process manual-program buffer + shell-file-name shell-command-switch (format (Man-build-man-command) man-args)) 'Man-bgproc-sentinel) (let ((exit-status - (call-process shell-file-name nil (list buffer nil) nil "-c" + (call-process shell-file-name nil (list buffer nil) nil + shell-command-switch (format (Man-build-man-command) man-args))) (msg "")) (or (and (numberp exit-status) And ChangeLog entry: 2004-05-02 Alexander Pohoyda (tiny change) * man.el (Man-getpage-in-background): Use shell-file-name and shell-command-switch variables instead of hard-coded values. -- Alexander Pohoyda PGP Key fingerprint: 7F C9 CC 5A 75 CD 89 72 15 54 5F 62 20 23 C6 44