AW <alexander.willand <at> t-online.de> writes:
> Dear John, > > thank you. I simply changed "read_only" to "crypt" in the functions you > developed. This functions prevent a change of encrypted text, which I think is > really an improvment. This is awesome. But I have a follow-up questions. This function marks my buffer as "modified". Is there any way to automatically have the org-mark-readonly function turn off the modified flag? This isn't a major problem, just a nicety. --hymie! > > (defun org-mark-readonly () > (interactive) > (org-map-entries > (lambda () > (let* ((element (org-element-at-point)) > (begin (org-element-property :begin element)) > (end (org-element-property :end element))) > (add-text-properties begin (- end 1) '(read-only t)))) > "crypt") > (message "Made readonly!")) > > (add-hook 'org-mode-hook 'org-mark-readonly)