summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Ecay <aaronecay@gmail.com>2014-12-11 23:48:27 -0500
committerAaron Ecay <aaronecay@gmail.com>2014-12-11 23:48:27 -0500
commit7c86747881c2aafaa1d3cbde3ebf13c596ca6eab (patch)
tree4a40a8e73798fe2412a882c8a151d587a6776f7a
parent398286a00c41af44667da8a10e514973e1e08780 (diff)
downloadorg-mode-7c86747881c2aafaa1d3cbde3ebf13c596ca6eab.tar.gz
org-src: add a note about bogosity of read-only overlays
* lisp/org-src.el (org-src--make-source-overlay): Add a TODO comment.
-rw-r--r--lisp/org-src.el8
1 files changed, 8 insertions, 0 deletions
diff --git a/lisp/org-src.el b/lisp/org-src.el
index 67e9de4..67760a9 100644
--- a/lisp/org-src.el
+++ b/lisp/org-src.el
@@ -294,6 +294,14 @@ END."
(let ((map (make-sparse-keymap)))
(define-key map [mouse-1] 'org-edit-src-continue)
map))
+ ;; TODO: The below line doesn't work for two reasons:
+ ;; - It should be 'read-only
+ ;; - 'read-only apparently doesn't work on overlays (also empirically tested):
+ ;; <https://lists.gnu.org/archive/html/emacs-devel/2008-01/msg01598.html>
+ ;; If this feature is to be kept, it should be implemented via text
+ ;; properties, which will require fiddling around in more places
+ ;; (such as when the contents are copied back into the buffer after
+ ;; editing is complete.)
(overlay-put overlay :read-only "Leave me alone")
overlay))