emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] org-crypt: Secure encrypted message against inadvertent change


From: Hymie!
Subject: Re: [O] org-crypt: Secure encrypted message against inadvertent change
Date: Tue, 8 Sep 2015 14:48:14 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

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)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]