-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathprivate-diary.el
57 lines (44 loc) · 1.92 KB
/
private-diary.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
;;; private-diary.el --- maintain a private diary in Emacs
;; Copyright (C) 2015 James P. Ascher
;; Author: James P. Ascher <[email protected]>
;; Keywords: diary, encryption
;; URL: https://github.com/cacology/private-diary
;; Version: 1.0
;; Package-Requires: ((emacs "24.0"))
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary:
;; This package supports a private diary file that functions like the
;; existing Emacs diary, but can be encrypted while leaving the
;; non-private diary in plain text. Documentation on
;; https://github.com/cacology/private-diary
;;; Code:
(require 'diary-lib)
(defgroup private-diary nil
"Variables for the private-diary package."
:prefix "private-diary"
:group 'files
:link '(url-link :tag "Github" "https://github.com/cacology/private-diary")
)
(defcustom private-diary-file "~/private-diary.txt.gpg"
"The file that is the other diary, not currently in use."
:group 'private-diary
:type '(file))
;;;###autoload
(defun private-diary-swap-with-diary nil
"Swaps the values of the `diary-file' and `private-diary-file'."
(interactive nil)
(let ((old-diary-file diary-file))
(setq diary-file private-diary-file)
(setq private-diary-file old-diary-file)
(message "Diary: %s Private: %s" diary-file private-diary-file)))
(provide 'private-diary)
;;; private-diary.el ends here