summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--custom/jao-custom-org.el2
-rw-r--r--custom/jao-custom-pdf.el2
-rw-r--r--init.el9
-rw-r--r--lib/doc/jao-pdf.el4
4 files changed, 9 insertions, 8 deletions
diff --git a/custom/jao-custom-org.el b/custom/jao-custom-org.el
index ef1fbbe..a0b1b8b 100644
--- a/custom/jao-custom-org.el
+++ b/custom/jao-custom-org.el
@@ -3,6 +3,8 @@
;;; General configuration
(defvar jao-org-dir (expand-file-name "org" jao-doc-dir))
+(defun jao-org-dir () jao-org-dir)
+
(use-package org
:ensure t
:demand t
diff --git a/custom/jao-custom-pdf.el b/custom/jao-custom-pdf.el
index e82873f..cbe74ef 100644
--- a/custom/jao-custom-pdf.el
+++ b/custom/jao-custom-pdf.el
@@ -48,7 +48,7 @@
:config
(setq jao-open-doc-fun 'jao-find-or-open)
(setq jao-org-open-pdf-fun jao-open-doc-fun)
- (setq jao-pdf-org-dir jao-org-dir))
+ (setq jao-pdf-org-dir (jao-org-dir)))
;;;; doc-view
(use-package doc-view
diff --git a/init.el b/init.el
index d20afeb..95578c6 100644
--- a/init.el
+++ b/init.el
@@ -58,8 +58,6 @@
(defvar jao-doc-dir (expand-file-name (jao-d-l "~/Documents" "~/doc")))
-(setq jao-org-dir (expand-file-name "org" jao-doc-dir))
-
(defvar jao-sink-dir
(file-name-as-directory (expand-file-name "sink" jao-doc-dir))
"Directory used for downloads and such.")
@@ -638,8 +636,7 @@
;;; Calendar, diary
;;;; diary
-(setq ;; diary-file (expand-file-name "diary" jao-org-dir)
- diary-display-function 'diary-fancy-display
+(setq diary-display-function 'diary-fancy-display
diary-mail-addr "jao@localhost"
diary-comment-start ";;"
diary-comment-end "")
@@ -649,12 +646,12 @@
;;;; calendar
(use-package calendar
+ :custom (calendar-month-width 30)
:init
(setq appt-display-format nil
calendar-latitude 55.9533
calendar-longitude -3.1883
calendar-left-margin 2
- calendar-month-width 30
calendar-location-name "Edinburgh, Scotland"
calendar-mark-diary-entries-flag t
calendar-week-start-day 1 ;; 0 sunday
@@ -875,7 +872,7 @@
(defun jao-recoll-consult-docs ()
(interactive)
- (consult-recoll (format "dir:%s/doc " jao-org-dir)))
+ (consult-recoll (format "dir:%s/doc " (jao-org-dir))))
(defun jao-recoll-consult-notes ()
"Use consult-recoll to search notes."
diff --git a/lib/doc/jao-pdf.el b/lib/doc/jao-pdf.el
index 73b4a6a..01334b1 100644
--- a/lib/doc/jao-pdf.el
+++ b/lib/doc/jao-pdf.el
@@ -34,6 +34,8 @@
(declare-function 'pdf-info-outline "pdf-info")
(defvar jao-pdf-org-dir nil)
+(defun jao-pdf-org-dir () jao-pdf-org-dir)
+
(defvar-local jao-pdf--outline nil)
(defun jao-pdf-is-pdf-file (file)
@@ -105,7 +107,7 @@
(interactive)
(when-let* ((file (or file
(read-file-name "Document: "
- (concat jao-pdf-org-dir "/doc/")))))
+ (concat (jao-pdf-org-dir) "/doc/")))))
(funcall jao-open-doc-fun file page height)))
;;; doc:// links for browse-url