Compare commits

...

2 commits

2 changed files with 10 additions and 9 deletions

View file

@ -14,16 +14,17 @@
Version 2023-08-04"
(interactive)
(let* ((link-info (org-element-context))
(path (org-element-property :path link-info))
(abs-path (if (string-prefix-p "file:" path)
(file-truename (replace-regexp-in-string "^file:" "" path))
(file-truename path)))
(default-decrypt-path (concat abs-path ".clear")))
(path (org-element-property :path link-info))
(abs-path (if (string-prefix-p "file:" path)
(file-truename (replace-regexp-in-string "^file:" "" path))
(file-truename path)))
(default-decrypt-path (concat abs-path ".clear")))
(if (file-exists-p abs-path)
(let ((decrypt-path (read-file-name
(let ((decrypt-path (read-file-name
(format "Enter target path (default %s): " default-decrypt-path)
nil nil nil default-decrypt-path)))
(epa-decrypt-file abs-path decrypt-path))
(epa-decrypt-file abs-path decrypt-path)
(message "%s is decrypted to %s" abs-path decrypt-path))
(message "File not found: %s" abs-path))))
;; END }}
@ -34,4 +35,4 @@ Version 2023-08-04"
;; Local Variables:
;; coding: utf-8
;; End:
;;; init-gpg.el ends here
;;; init-gpg.el ends here

View file

@ -441,7 +441,7 @@
;; :if window-system ; for graphical Emacs
:after emacsql-sqlite3
:config
(add-hook 'emacs-startup-hook #'my-activate-org-roam-db-autosync)
(my-run-after-emacs-startup 'my-activate-org-roam-db-autosync)
(setq org-roam-database-connector 'sqlite3)
(setq org-roam-mode-sections
(list #'org-roam-backlinks-section