commit | author | age
|
76bbd0
|
1 |
;ELC |
C |
2 |
;;; Compiled |
|
3 |
;;; in Emacs version 26.1 |
|
4 |
;;; with all optimizations. |
|
5 |
|
|
6 |
;;; This file uses dynamic docstrings, first added in Emacs 19.29. |
|
7 |
|
|
8 |
;;; This file does not contain utf-8 non-ASCII characters, |
|
9 |
;;; and so can be loaded in Emacs versions earlier than 23. |
|
10 |
|
|
11 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
|
12 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
|
13 |
|
|
14 |
|
|
15 |
(byte-code "\300\301!\210\302\303\304\305\306\307\310\301&\210\311\312\313\314\315DD\316\317\320\310\303&\210\311\321\313\314\322DD\323\317\320\310\303&\210\311\324\313\314\325DD\326\310\303\327\330\317\331& \207" [require org custom-declare-group org-crypt nil "Org Crypt." :tag "Org Crypt" :group custom-declare-variable org-crypt-tag-matcher funcall function #[0 "\300\207" [#1="crypt"] 1 #1#] "The tag matcher used to find headings whose contents should be encrypted.\n\nSee the \"Match syntax\" section of the org manual for more details." :type string org-crypt-key #[0 "\300\207" [#2=""] 1 #2#] "The default key to use when encrypting the contents of a heading.\n\nThis setting can also be overridden in the CRYPTKEY property." org-crypt-disable-auto-save #[0 "\300\207" [ask] 1] "What org-decrypt should do if `auto-save-mode' is enabled.\n\nt : Disable auto-save-mode for the current buffer\n prior to decrypting an entry.\n\nnil : Leave auto-save-mode enabled.\n This may cause data to be written to disk unencrypted!\n\n`ask' : Ask user whether or not to disable auto-save-mode\n for the current buffer.\n\n`encrypt': Leave auto-save-mode enabled for the current buffer,\n but automatically re-encrypt all decrypted entries\n *before* auto-saving.\n NOTE: This only works for entries which have a tag\n that matches `org-crypt-tag-matcher'." :version "24.1" (choice (const :tag "Always" t) (const :tag "Never" nil) (const :tag "Ask" ask) (const :tag "Encrypt" encrypt))] 10) |
|
16 |
#@225 Check whether auto-save-mode is enabled for the current buffer. |
|
17 |
|
|
18 |
`auto-save-mode' may cause leakage when decrypting entries, so |
|
19 |
check whether it's enabled, and decide what to do about it. |
|
20 |
|
|
21 |
See `org-crypt-disable-auto-save'. |
|
22 |
(defalias 'org-crypt-check-auto-save #[0 "\205@ \302=\204 \303=\203$ \304\305!\203$ \306\307\310 \206 p\"\210\311\312!\207 \313=\203. \306\314!\207 \315=\203? \306\316!\210\317\320\321\313\302$\207\313\207" [buffer-auto-save-file-name org-crypt-disable-auto-save t ask y-or-n-p "org-decrypt: auto-save-mode may cause leakage. Disable it for current buffer? " message "org-decrypt: Disabling auto-save-mode for %s" buffer-file-name auto-save-mode -1 nil "org-decrypt: Decrypting entry with auto-save-mode enabled. This may cause leakage." encrypt "org-decrypt: Enabling re-encryption on auto-save." add-hook auto-save-hook #[0 "\300\301!\210\302 \207" [message "org-crypt: Re-encrypting all decrypted entries due to auto-save." org-encrypt-entries] 2]] 5 (#$ . 1983)]) |
|
23 |
#@52 Return the encryption key for the current heading. |
|
24 |
(defalias 'org-crypt-key-for-heading #[0 "\212\302\303!\210\304\305\306\307#\206 \206 \310\301!\203 \206 \311\312!)\207" [org-crypt-key epa-file-encrypt-to org-back-to-heading t org-entry-get nil "CRYPTKEY" selective boundp message "No crypt key set, using symmetric encryption."] 4 (#$ . 2988)]) |
|
25 |
#@58 Return STR encrypted with CRYPT-KEY. |
|
26 |
|
|
27 |
(fn STR CRYPT-KEY) |
|
28 |
(defalias 'org-encrypt-string #[514 "\211\301\302\303#\230\203 \304!\301\302\305#\230\203 \301\302\306#\207\307\300!\210\310\311\312\211#\313\314\"#\207" [epg-context get-text-property 0 org-crypt-key sha1 org-crypt-checksum org-crypt-text make-local-variable epg-make-context nil t epg-encrypt-string epg-list-keys] 8 (#$ . 3348)]) |
|
29 |
#@46 Encrypt the content of the current headline. |
|
30 |
(defalias 'org-encrypt-entry #[0 "\302\303!\210\212\214~\210\304\305!\210\306\300!\210\307\310\305\211#`\311 \210\312\305\313!)\262?\205a \314 \315 `b\210\316\305\211\"\210\317 \210\320`\"\3211H \322\"c0\202R c\210\323A@!\262\266\203^ b\210\324 \210\310\266\203\262*\207" [epg-context inhibit-changing-match-data require epg org-back-to-heading t make-local-variable epg-make-context nil org-end-of-meta-data "-----BEGIN PGP MESSAGE-----" looking-at org-invisible-p org-crypt-key-for-heading org-end-of-subtree org-back-over-empty-lines delete-and-extract-region (error) org-encrypt-string error outline-hide-subtree] 8 (#$ . 3755) nil]) |
|
31 |
#@46 Decrypt the content of the current headline. |
|
32 |
(defalias 'org-decrypt-entry #[0 "\301\302!\210\303 ?\205m \212\214~\210\304\305!\210`\212\306 \210\307 )\310 \210\311\312!\205j \313 \210\314\300!\210\315\316\305\211#\212\317\320!\210\316y\210`)\321`\"\322\323\"\324\"`S|\210\325\326\327\330!\331\332 \333 &\261\210\203g b\210\334\305!\210\316\266\203\266\202*\207" [epg-context require epg org-before-first-heading-p org-back-to-heading t outline-end-of-heading org-invisible-p org-end-of-meta-data looking-at "-----BEGIN PGP MESSAGE-----" org-crypt-check-auto-save make-local-variable epg-make-context nil search-forward "-----END PGP MESSAGE-----" buffer-substring-no-properties decode-coding-string epg-decrypt-string utf-8 "\n" propertize org-crypt-checksum sha1 org-crypt-key org-crypt-key-for-heading org-crypt-text org-flag-subtree] 14 (#$ . 4459) nil]) |
|
33 |
#@54 Encrypt all top-level entries in the current buffer. |
|
34 |
(defalias 'org-encrypt-entries #[0 "\302\303\304\305 !A#)\207" [org--matcher-tags-todo-only org-crypt-tag-matcher nil org-scan-tags org-encrypt-entry org-make-tags-matcher] 4 (#$ . 5335) nil]) |
|
35 |
#@44 Decrypt all entries in the current buffer. |
|
36 |
(defalias 'org-decrypt-entries #[0 "\302\303\304\305 !A#)\207" [org--matcher-tags-todo-only org-crypt-tag-matcher nil org-scan-tags org-decrypt-entry org-make-tags-matcher] 4 (#$ . 5589) nil]) |
|
37 |
#@33 Is the current entry encrypted? |
|
38 |
(defalias 'org-at-encrypted-entry-p #[0 "\300 ?\205 \212\301\302!\210\303\304\212\305 )\302#)\207" [org-before-first-heading-p org-back-to-heading t search-forward "-----BEGIN PGP MESSAGE-----" outline-next-heading] 4 (#$ . 5833)]) |
|
39 |
#@77 Add a hook to automatically encrypt entries before a file is saved to disk. |
|
40 |
(defalias 'org-crypt-use-before-save-magic #[0 "\300\301\302\"\207" [add-hook org-mode-hook #[0 "\300\301\302\303\304$\207" [add-hook before-save-hook org-encrypt-entries nil t] 5]] 3 (#$ . 6104)]) |
|
41 |
(byte-code "\300\301\302\"\210\303\304!\207" [add-hook org-reveal-start-hook org-decrypt-entry provide org-crypt] 3) |