Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 2 Feb 2000 21:11:53 +0000
From:      Mark Ovens <mark@ukug.uk.freebsd.org>
To:        questions@freebsd.org
Subject:   Question about using grep in emacs
Message-ID:  <20000202211153.A478@marder-1>

next in thread | raw e-mail | index | archive | help
Can anyone shed any light on the following odd behaviour in emacs
(20.5, made from the port).

I start emacs as a normal user (mark) and open any file,
/sys/i386/isa/aic6360.c in this example. Then I do

	M-x grep -n -e main *.c

The output in the *grep* buffer is:

cd /sys/i386/isa/
grep -n -e main *.c /dev/null
anagram.c:65:  *z;t(*z++,j.i));}}main(o,p)char**p; {for(;m = *++p;)for(;*m-
fastrad.c:12:main(argc, argv)
fastrad.c:107:    xv_main_loop(frame);
fontdump.c:14:main(int argc, char **argv) {
fontmake.c:14:main(int argc, char **argv) {
getch.c:4:int main(void)
happy_new_year.c:4:c */ main() { cat(); printf("Happy New Year!\n"); } /*
plane.c:4:int main()

......

OK, except that all the matching files are in my home dir (/usr/mark),
not /sys/i386/isa/, yet there is no error to the ``cd /sys/i386/isa/''.

Now, start emacs as root (root has the same ~/.emacs as user mark), do
*exactly* as above and the output is:

cd /sys/i386/isa/
grep -n -e main *.c /dev/null
aic6360.c:72:/* Allow disconnects?  Was mainly used in an early phase of the driver when
aic6360.c:1919:	/* I have tried to make the main loop as tight as possible.  This
asc.c:331: *** the main functions
clock.c:641:	 * so the main cause of inaccuracy is the varying latency from 
cy.c:198: *	CS_BUSY		= TS_BUSY (maintained by comstart(), siopoll() and
cy.c:200: *	CS_TTGO		= ~TS_TTSTOP (maintained by comparam() and comstart())
cy.c:201: *	CS_CTS_OFLOW	= CCTS_OFLOW (maintained by comparam())
cy.c:202: *	CS_RTS_IFLOW	= CRTS_IFLOW (maintained by comparam())
fd.c:640:	isa_dmainit(fdc->dmachan, 128 << 3 /* XXX max secsize */);

.......

which is correct.

Why does this work for root but not for the normal user mark? I've
looked in /usr/local/share/emacs/20.5/lisp/progmodes/compile.el where
grep is run from, but can't find clues.

Incidentally, the results are the same if it is run from "Search
Files..." on the Tools menu and ``which grep'' returns the same
(/usr/bin/grep) for both users.

Also, I've built emacs, from the same source tarball as the FreeBSD
port, on SunOS 4.1.3 and Solaris 2.5 at work and this problem doesn't
exist there. It seems FreeBSD specific.


-- 
	"there's a long-standing bug relating to the x86 architecture
	that allows you to install Windows too"
				   -Matthew D. Fuller
________________________________________________________________
      FreeBSD - The Power To Serve http://www.freebsd.org
      My Webpage http://ukug.uk.freebsd.org/~mark/
mailto:mark@ukug.uk.freebsd.org              http://www.radan.com



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000202211153.A478>