summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJaromil <jaromil@dyne.org>2013-05-07 15:07:06 (GMT)
committer Jaromil <jaromil@dyne.org>2013-05-07 15:07:06 (GMT)
commit5b63ba366cbfeace09aae25558bd9623d92570d3 (patch)
tree42fd45ffd027159732f968c616a357d5dfe305b5
parent2a7c9ba544596656ca861ab4db1bddfbf4ca5784 (diff)
Added encryption support
Using the new EasyPG interface, now AutOrg includes GnuPG 1.4 all paths are correctly preconfigured, auto-encryption on .gpg files
-rw-r--r--elisp/autorg.el11
-rwxr-xr-xmac/AutOrg.command3
-rwxr-xr-xmac/pack.sh5
3 files changed, 16 insertions, 3 deletions
diff --git a/elisp/autorg.el b/elisp/autorg.el
index 206027f..93dc2d8 100644
--- a/elisp/autorg.el
+++ b/elisp/autorg.el
@@ -70,12 +70,17 @@ org-crypt org-remember org-agenda)))
(require 'freemind)
; Encryption
-(require 'pgg)
+(require 'epa)
+(require 'epa-file)
+(epa-file-enable)
+(add-to-list 'auto-mode-alist '("\\.gpg\\(~\\|\\.~[0-9]+~\\)?\\'" nil epa-file))
+;; (require 'pgg)
(require 'org-crypt)
(org-crypt-use-before-save-magic)
-; enables semantic mode for completion
-(semantic-mode t)
+; enables semantic mode
+; (semantic-mode t)
+;
; load HTML, PHP and related variou syntax support
(load (concat AutOrgRes "/nxhtml/autostart.el"))
diff --git a/mac/AutOrg.command b/mac/AutOrg.command
index 6f7e060..649a92a 100755
--- a/mac/AutOrg.command
+++ b/mac/AutOrg.command
@@ -5,6 +5,8 @@
# GNU GPL V3 (see COPYING)
appbin="${0%/*}"
+# appbase is the directory containing AutOrg.app
+# most commonly this will be /Applications
appbase=$(dirname $(dirname $(dirname $appbin)))
autorg=AutOrg.app/Contents/Resources/AutOrg
@@ -29,6 +31,7 @@ if [ -r $HOME/.emacs ]; then
fi
export PATH="$PATH:$appbase/$autorg:/usr/texbin:/Applications/LibreOffice.app/Contents/MacOS"
+export GNUPGHOME="$HOME/.gnupg"
# export LANG=en_US
# export LC_CTYPE=UTF-8
cat <<EOF > $appbase/$autorg/.aspell.conf
diff --git a/mac/pack.sh b/mac/pack.sh
index 9442a5b..6c1ae5d 100755
--- a/mac/pack.sh
+++ b/mac/pack.sh
@@ -43,4 +43,9 @@ cp ../spell/ispell AutOrg.app/Contents/Resources/AutOrg/
# cp ../spell/dictionaries.el AutOrg.app/Contents/Resources/AutOrg/
rsync -ra ../spell/dict AutOrg.app/Contents/Resources/AutOrg/
+# GnuPG for EPA encryption (provided by brew)
+if [ -r AutOrg.app/Contents/Resources/AutOrg/gpg ]; then
+ chmod +w AutOrg.app/Contents/Resources/AutOrg/gpg; fi
+cp /usr/local/bin/gpg AutOrg.app/Contents/Resources/AutOrg/
+
echo "Done."