🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.help
Article #188965

Re: Directory Files

#188965
From: Guess who
Date: Fri, 24 May 1991 02:11
47 lines
2082 bytes
In article <1991May21.213101.22515@m.cs.uiuc.edu> joshi@m.cs.uiuc.edu (Anil Joshi) writes:

   Newsgroups: gnu.emacs.help
   Path: milton!uw-beaver!mit-eddie!mintaka!think.com!zaphod.mps.ohio-state.edu!wuarchive!m.cs.uiuc.edu!joshi
   From: joshi@m.cs.uiuc.edu (Anil Joshi)
   Summary: What I am doing wrong?
   Keywords: directory-files, match-regexp
   Organization: University of Illinois, Dept. of Comp. Sci., Urbana, IL
   Date: Tue, 21 May 1991 21:31:01 GMT

   I am doing the following (in the scratch buffer):


   (directory-files default-directory nil "*.[ch]")

   and am getting back

   nil

   where as there are files that match the reg-exp.

   What am I doing wrong?

--
	The regexp should perhaps be ".*\\.[ch]$"? or even simpler:
		"\\.[ch]$"

	Read about regexps in the gnu emacs lisp manual or info. It does
	*not* follow the rules of csh or other shells regexps.

--
   I need the above for a macro which I want to write -

   'Replace all occurences of word "float" with word "double" in all
   the *.c and *.h files in the current dirctory'

--
	Why would you want to replace "float" with "double", can't
	a simple 'typedef double float;' or -Dfloat=double do the trick?
--
   Is there a elisp macro which I can run in batch? Thanks in advance.
   Anil joshi@cs.uiuc.edu

--
	Don't know about anyone, hopefully someone else can help you there.

Alf
Technical Details
Message-ID: <1991May24.021152.25010@milton.u.washington.edu>
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!dali.cs.montana.edu!milton!salte
References: <1991May21.213101.22515@m.cs.uiuc.edu>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 103b8b,47d8d87ddf6099a4
X-Google-Attributes: gid103b8b,public
X-Google-ArrivalTime: 1991-05-23 20:48:25 PST
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!dali.cs.montana.edu!milton!salte
From: salte@milton.u.washington.edu (Guess who)
Newsgroups: gnu.emacs.help
Subject: Re: Directory Files
Message-ID: <1991May24.021152.25010@milton.u.washington.edu>
Date: 24 May 91 02:11:52 GMT
References: <1991May21.213101.22515@m.cs.uiuc.edu>
Organization: University of Washington
Lines: 47
In-Reply-To: joshi@m.cs.uiuc.edu's message of Tue, 21 May 1991 21:31:01 GM