From owner-freebsd-questions Wed Feb 2 13:12:42 2000 Delivered-To: freebsd-questions@freebsd.org Received: from typhoon.mail.pipex.net (typhoon.mail.pipex.net [158.43.128.27]) by builder.freebsd.org (Postfix) with SMTP id A40143F01 for ; Wed, 2 Feb 2000 13:12:37 -0800 (PST) Received: (qmail 6055 invoked from network); 2 Feb 2000 21:12:31 -0000 Received: from useraj28.uk.uudial.com (HELO marder-1.) (62.188.133.157) by smtp.dial.pipex.com with SMTP; 2 Feb 2000 21:12:31 -0000 Received: (from mark@localhost) by marder-1. (8.9.3/8.9.3) id VAA00558 for questions@freebsd.org; Wed, 2 Feb 2000 21:11:53 GMT (envelope-from mark) Date: Wed, 2 Feb 2000 21:11:53 +0000 From: Mark Ovens To: questions@freebsd.org Subject: Question about using grep in emacs Message-ID: <20000202211153.A478@marder-1> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre2i Organization: Total lack of Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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