Path: utzoo!telly!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!sun-barr!decwrl!ucbvax!tut.cis.ohio-state.edu!UUNET.UU.NET!moncam!paul From: moncam!paul@UUNET.UU.NET (Paul Hudson) Newsgroups: gnu.emacs.bug Subject: Problem with reverting a buffer ... Message-ID: <8907141502.AA18649@marvin.moncam.uucp> Date: 14 Jul 89 15:02:17 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 31 I give up: after much abortive emacs lisp hackery.... This comes from attempting to change the recent sccs.el package What happens: the package does a delta followed by a get on a buffer. This leaves the file on the disk with modes -r--r--r-- and the contents of the buffer are the file *before* the delta. Problem: how do I get the contents of the buffer correct without changing the mode of the file on the disk? The supplied code went something like ... (set-buffer buffer) (setq buffer-file-name nil) (erase-buffer) (insert-file-contents file t) (setq buffer-read-only t) For some reason this leaves the file on the disk in mode -rw-r--r--. This won't do since a get -e will then bitch. Revert-buffer does almost what I want but I can't make it do it quite right. Ideas anyone? Paul Hudson MAIL: Monotype ADG, Science Park, Cambridge, CB4 4FQ, UK. PHONE: +44 (223) 420018 EMAIL: paul@moncam.co.uk, ;" FAX: +44 (223) 420911 ...!ukc!acorn!moncam!paul `"";";" These opinions void where prohibited by law.