Article View: gnu.epoch.misc
Article #471BUG: subst-char-in-region and read-only zones (no fix)
From: La Monte Yarroll
Date: Tue, 26 Jan 1993 01:19
Date: Tue, 26 Jan 1993 01:19
33 lines
1571 bytes
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
Technical Details
Message-ID:
<piggy.728011177@newsroom.utas.edu.au>Path:
arc1-ca.pugleaf.net!sparky!uunet!munnari.oz.au!newsroom.utas.edu.au!hilbert!piggyShow Full Headers
Complete Article Headers
Newsgroups: gnu.epoch.misc Path: arc1-ca.pugleaf.net!sparky!uunet!munnari.oz.au!newsroom.utas.edu.au!hilbert!piggy From: piggy@hilbert.cc.utas.edu.au (La Monte Yarroll) Subject: BUG: subst-char-in-region and read-only zones (no fix) Message-ID: <piggy.728011177@newsroom.utas.edu.au> Summary: Read only zones break outline mode. Sender: news@newsroom.utas.edu.au Organization: University of Tasmania, Australia. Date: Tue, 26 Jan 1993 01:19:37 GMT Lines: 33