From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,791530e499e6a7f9 X-Google-Attributes: gid103376,public From: Brian Courtney Subject: Re: ada writing guide Date: 2000/04/18 Message-ID: <38FCD954.F1F86536@hercii.mar.lmco.com>#1/1 X-Deja-AN: 612874966 Content-Transfer-Encoding: 7bit References: <8d1rso$bir$2@bunyip.cc.uq.edu.au> <8d1vhj$hdr$1@nnrp1.deja.com> <8d2hig$7e6$1@nnrp1.deja.com> <38F5DF8C.1A01E5A4@utech.net> <8d4t07$o15$1@nnrp1.deja.com> <38F603FE.B0C3ED83@utech.net> <8d5dsc$c27$1@nnrp1.deja.com> <8d6hjn$j9p$1@clnews.edf.fr> <8d76vj$9jt$1@nnrp1.deja.com> <8d7uak$1d1$1@wanadoo.fr> <8dfd6q$uch$1@nnrp1.deja.com> <87em84vavt.fsf@deneb.cygnus.argh.org> <8dfpj7$crs$1@nnrp1.deja.com> <8dgk8i$ak4$1@nnrp1.deja.com> <8dhqi7$jv3$1@nnrp1.deja.com> <8dhuuu$ou5$1@nnrp1.deja.com> <8di8da$4el$1@nnrp1.deja.com> Organization: Lockheed Martin Corporation Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 2000-04-18T00:00:00+00:00 List-Id: Ted Dennison wrote: > In article <8dhuuu$ou5$1@nnrp1.deja.com>, > Robert Dewar wrote: > > In article <8dhqi7$jv3$1@nnrp1.deja.com>, > > Ted Dennison wrote: > > > T.E.D. seems to be describing a system in which people use > > neither approach, and merrily destroy one anothers fixes by > > updating old versions. I would NOT call this version control > > at all. Perhaps I can clear things up a bit here. Teds complaint stems from the fact that the implementation of Emacs ada-mode assumes that each user has their own copy of a special capitalization exception file (used to overide the default capitalization rules used by the editor). If each user has their own copy, then there is no problem. Think of it like a .cshrc file were each user defines their own customized commands, aliases, etc...). If a single 'common' file is used (shared among several users) to ensure that all capitalization is consistent, there is a chance that changes to the capitalization exception file can be lost, due to the fact that there is no protection built into Emacs to detect if someone else has modified the file since it was last read in. Whether the file is under configuration control or not is irrelevant in this situation. This is a special configuration file used by the Emacs editor that can be updated on-the-fly by a user. Since the implementation of ada-mode modifies to its "potentialy out of date" internal copy of the exception file before writting it to disk, someone elses updates to the same file (made after your Emacs session read the file) can be lost. Ted was simply giving his opinion on a possible pitfall associated with using ada-mode and a *single* capitialization exception file. I do not believe this is a CM issue. CM comes into play *after* the updates have been made to a file. A CM tool can not prevent you from accidently deleting lines from a file and then saving them. CM will, however, allow you to restore the file to the last controlled version, but all the intermediate changes made outside the CM tool (while you are still editing the file) are not controlled. This is the situtation we are dealing with. Ted, There are two possible solutions that I see 1. make the capitalization file read-only and have the users submit changes to the file through the owner. Not the best solution. 2. change ada-mode.el to re-read the exception file and update the internal copy just before it saves the file. NOTE: There may still be small chance that changes will be lost with this approach, but very very unlikely. ex, (NOTE: I have not tried this, but it should work). from ada-create-case-exception ;; Save the list in the file (find-file (expand-file-name ada-case-exception-file)) (erase-buffer) ;; force update of ada-case-exception (reread exception file) (ada-case-read-exceptions) ;; this line added from original (mapcar '(lambda (x) (insert (car x) "\n")) ada-case-exception) (save-buffer) (kill-buffer nil) )