unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* man.el should avoid "sh"
@ 2004-04-16 18:20 Max Polk
  0 siblings, 0 replies; 3+ messages in thread
From: Max Polk @ 2004-04-16 18:20 UTC (permalink / raw)


This bug report will be sent to the Free Software Foundation,
not to your local site managers!
Please write in English, because the Emacs maintainers do not have
translators to read other languages for them.

Your bug report will be posted to the bug-gnu-emacs@gnu.org mailing list,
and to the gnu.emacs.bug news group.

In GNU Emacs 21.3.1 (i386-msvc-nt5.1.2600)
 of 2003-03-27 on buffy
configured using `configure --with-msvc (12.00)'
Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: ENU
  locale-coding-system: iso-latin-1
  default-enable-multibyte-characters: t

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:

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.

My shell-file-name happens to be "c:/cyg/bin/bash.exe".

I don't believe this is a PATH issue, even if it is, "sh" should still
probably be avoided.

Thanks,  Max Polk

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: man.el should avoid "sh"
       [not found] <mailman.311.1082139976.1061.bug-gnu-emacs@gnu.org>
@ 2004-04-16 22:53 ` Kevin Rodgers
       [not found] ` <mailman.318.1082156069.1061.bug-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 3+ messages in thread
From: Kevin Rodgers @ 2004-04-16 22:53 UTC (permalink / raw)


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.

-- 
Kevin Rodgers

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Patch: Re: man.el should avoid "sh"
       [not found] ` <mailman.318.1082156069.1061.bug-gnu-emacs@gnu.org>
@ 2004-05-02 11:57   ` Alexander Pohoyda
  0 siblings, 0 replies; 3+ messages in thread
From: Alexander Pohoyda @ 2004-05-02 11:57 UTC (permalink / raw)


Kevin Rodgers <ihs_4664@yahoo.com> 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  <alexander.pohoyda@gmx.net>  (tiny change)

	* man.el (Man-getpage-in-background): Use shell-file-name
	and shell-command-switch variables instead of hard-coded
	values.

 

-- 
Alexander Pohoyda <alexander.pohoyda@gmx.net>
PGP Key fingerprint: 7F C9 CC 5A 75 CD 89 72  15 54 5F 62 20 23 C6 44

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-05-02 11:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.311.1082139976.1061.bug-gnu-emacs@gnu.org>
2004-04-16 22:53 ` man.el should avoid "sh" Kevin Rodgers
     [not found] ` <mailman.318.1082156069.1061.bug-gnu-emacs@gnu.org>
2004-05-02 11:57   ` Patch: " Alexander Pohoyda
2004-04-16 18:20 Max Polk

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).