🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.help
Article #189685

Trouble executing emacs with -batch option

#189685
From: lubkt
Date: Tue, 11 Dec 1990 15:07
38 lines
1650 bytes
I would like to use emacs in batch mode to do some simple editing. Here
is how I try, but it does not work.

The two files are: emacs.cmd (the command file) and emacs.file (data file).

::::::::::::::
emacs.cmd
::::::::::::::
(defun doit ()
  (set-mark (point-min))
  (replace-string "25000" "40000" nil)
  (save-buffers-kill-emacs))

::::::::::::::
emacs.file
::::::::::::::
Disk quotas for bt00 (uid 11):
Filesystem     usage  quota  limit    timeleft  files  quota  limit    timeleft
/usr            8687  25000  25000                564      0      0

---------
I would like to change 25000 to say 40000, so I execute:

	emacs -batch -l emacs.cmd -f doit emacs.file

This generates the following output and the file emacs.file remains 
unchanged:
	Mark set
	Mark set
	Done
	(No files need saving)

Can anyone tell me why the file emacs.file remains unchanged?

Binod Taterway				bt00@PL118a.CC.Lehigh.EDU
User Consultant				LUBKT@vax1.CC.Lehigh.EDU
Lehigh University, Beth, PA.
(215) 758-3984.
Technical Details
Message-ID: <115.2764afc7@vax1.cc.lehigh.edu>
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!sdd.hp.com!news.cs.indiana.edu!cs.widener.edu!netnews.upenn.edu!vax1.cc.lehigh.edu!lubkt

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 103b8b,723bcdcbd9fc9b20,start
X-Google-Attributes: gid103b8b,public
X-Google-ArrivalTime: 1990-12-11 14:55:02 PST
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!sdd.hp.com!news.cs.indiana.edu!cs.widener.edu!netnews.upenn.edu!vax1.cc.lehigh.edu!lubkt
From: lubkt@vax1.cc.lehigh.edu
Newsgroups: gnu.emacs.help
Subject: Trouble executing emacs with -batch option
Message-ID: <115.2764afc7@vax1.cc.lehigh.edu>
Date: 11 Dec 90 15:07:03 GMT
Organization: Lehigh University
Lines: 38
Posted: Tue Dec 11 16:07:03 1990