[14414] in Athena Bugs
sun4 8.0B: sendbug
daemon@ATHENA.MIT.EDU (Albert Dvornik)
Tue Jun 25 17:02:55 1996
To: bugs@MIT.EDU
Date: Tue, 25 Jun 1996 17:02:47 EDT
From: "Albert Dvornik" <bert@MIT.EDU>
System name: infocalypse
Type and version: SPARC/Classic 8.0B (2 update(s) to same version)
Display type: cgthree
What were you trying to do?
Send out a bug report.
What's wrong:
(1) if sendbug thinks I'm not a MH user, and my $EDITOR is set
to a command in my $PATH but not in one of
/srvd/patch:/usr/athena/bin:/bin/athena:/usr/bin/X11:
/usr/ucb:/bin:/usr/bin:/usr/bsd:/usr/sbin
then sendbug won't find my $EDITOR properly.
(2) sendbug looks at $HOME/.mh_profile to determine if a user
uses MH, even if $MH is set.
What should have happened:
I should have reported this bug a long time ago.
In fact, I thought I had, but then I couldn't find it.
Please describe any relevant documentation references:
The following message is misleading, since EDITOR *is* consulted:
BUGS
The default editor specified by the EDITOR or VISUAL
environment variable should be used, instead of the default
editor under MH, which is controlled by a separate confi-
guration file.
Is a patch a documentation reference? =)
*** /usr/athena/bin/sendbug Wed May 8 17:25:00 1996
--- sendbug Tue Jun 25 15:36:03 1996
***************
*** 1,7 ****
--- 1,10 ----
#!/bin/sh
# $Id: sendbug.sh,v 1.14 1995/03/01 03:59:17 cfields Exp $
+ # save PATH so we can restore it for user's EDITOR later
+ savedPATH=${PATH}
# make sure stuff this script needs is up front
PATH=/srvd/patch:/usr/athena/bin:/bin/athena:/usr/bin/X11:/usr/ucb:/bin:/usr/bin:/usr/bsd:/usr/sbin
+ export PATH
bugs_address=bugs@MIT.EDU
sendmail="/usr/lib/sendmail -t -oi"
report_file=/tmp/bug$$.text
***************
*** 70,76 ****
Remember to save the file before exiting the editor.
EOF
! if [ -r $HOME/.mh_profile ]; then
comp -form $report_file
rm $report_file
exit 0
--- 73,79 ----
Remember to save the file before exiting the editor.
EOF
! if [ -r "${MH-$HOME/.mh_profile}" ]; then
comp -form $report_file
rm $report_file
exit 0
***************
*** 79,85 ****
MH=/dev/null; export MH
if [ "${EDITOR}" = "" ]; then
EDITOR=emacs ; export EDITOR
fi
! $EDITOR $report_file
! exec whatnow $report_file
--- 82,91 ----
MH=/dev/null; export MH
if [ "${EDITOR}" = "" ]; then
EDITOR=emacs ; export EDITOR
+ else
+ # we want to switch back to the user's path before invoking
+ # his $EDITOR, unless we set $EDITOR ourselves.
+ PATH=${savedPATH}
fi
! exec whatnow -editor "$EDITOR" $report_file