🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by La Monte Yarroll Tue, 26 Jan 1993 01:19
BUG: subst-char-in-region and read-only zones (no fix)
#471
Author: La Monte Yarroll
Date: Tue, 26 Jan 1993 01:19
33 lines
1571 bytes
version: Epoch 4.2

It is impossible to hide the body of any entry in outline mode which
contains ANY read only zones.

The problem is that subst-char-in-region gives an error if the region
passed to it contains ANY read only zones, even if these zones would
not be modified by the operation.

Here is a function which demonstrates this behaviour:

(defun demonstrate-subst-bug ()
  (let ((start (point)))
    (insert "Sample text.")
    (add-read-only-zone (+ 1 start) (+ 3 start)  nil nil)
    (subst-char-in-region 454 464 ?x ?w t)
    )
  )

I believe that an operation on a region should only signal an error if
the operation would actually alter a read only zone.

It would be nicer still if read only zones could be temporarily
overridden, much in the same spirit as the last argument to
subst-char-in-region.

Comments?  Opinions?  For the moment, I'll just leave read only zones
out of my buffers.
--
La Monte H. Yarroll	Home:		piggy@baqaqi.chi.il.us
   Work:		piggy@hilbert.maths.utas.edu.au
   AKA:			piggy@gargoyle.uchicago.edu
   Once upon a time:	postmaster@clout.chi.il.us
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads