home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / gnu / epoch / misc / 1267 < prev    next >
Encoding:
Text File  |  1993-01-25  |  1.5 KB  |  45 lines

  1. Newsgroups: gnu.epoch.misc
  2. Path: sparky!uunet!munnari.oz.au!newsroom.utas.edu.au!hilbert!piggy
  3. From: piggy@hilbert.cc.utas.edu.au (La Monte Yarroll)
  4. Subject: BUG: subst-char-in-region and read-only zones (no fix)
  5. Message-ID: <piggy.728011177@newsroom.utas.edu.au>
  6. Summary: Read only zones break outline mode.
  7. Sender: news@newsroom.utas.edu.au
  8. Organization: University of Tasmania, Australia.
  9. Date: Tue, 26 Jan 1993 01:19:37 GMT
  10. Lines: 33
  11.  
  12. version: Epoch 4.2
  13.  
  14. It is impossible to hide the body of any entry in outline mode which
  15. contains ANY read only zones.
  16.  
  17. The problem is that subst-char-in-region gives an error if the region
  18. passed to it contains ANY read only zones, even if these zones would
  19. not be modified by the operation.
  20.  
  21. Here is a function which demonstrates this behaviour:
  22.  
  23. (defun demonstrate-subst-bug ()
  24.   (let ((start (point)))
  25.     (insert "Sample text.")
  26.     (add-read-only-zone (+ 1 start) (+ 3 start)  nil nil)
  27.     (subst-char-in-region 454 464 ?x ?w t)
  28.     )
  29.   )
  30.  
  31. I believe that an operation on a region should only signal an error if
  32. the operation would actually alter a read only zone.
  33.  
  34. It would be nicer still if read only zones could be temporarily
  35. overridden, much in the same spirit as the last argument to
  36. subst-char-in-region.
  37.  
  38. Comments?  Opinions?  For the moment, I'll just leave read only zones
  39. out of my buffers.
  40. --
  41. La Monte H. Yarroll    Home:        piggy@baqaqi.chi.il.us
  42.    Work:        piggy@hilbert.maths.utas.edu.au
  43.    AKA:            piggy@gargoyle.uchicago.edu
  44.    Once upon a time:    postmaster@clout.chi.il.us
  45.