Skip to content

Commit

Permalink
maybe straight.el will be happy now
Browse files Browse the repository at this point in the history
  • Loading branch information
Trevoke committed Dec 28, 2021
1 parent 58a0919 commit a884abb
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 50 deletions.
81 changes: 48 additions & 33 deletions dev/.emacs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,19 @@
("melpa-stable" . "https://stable.melpa.org/packages/")
("gnu" . "https://elpa.gnu.org/packages/")))

(defvar bootstrap-version)
(let ((bootstrap-file
(expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory))
(bootstrap-version 5))
(unless (file-exists-p bootstrap-file)
(with-current-buffer
(url-retrieve-synchronously
"https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el"
'silent 'inhibit-cookies)
(goto-char (point-max))
(eval-print-last-sexp)))
(load bootstrap-file nil 'nomessage))

(require 'package)
(package-initialize)

Expand All @@ -28,39 +41,41 @@
(assq-delete-all 'org package--builtins)
(assq-delete-all 'org package--builtin-versions)

(use-package org
:quelpa ((org) :upgrade t)
:demand t
:ensure t
:init
(setq org-directory "~/orgnotes/")
(setq org-id-track-globally t)
(setq org-id-locations-file "~/.emacs.d/.org-id-locations"))

(use-package org-gtd
:after org
:quelpa ((org-gtd :fetcher github :repo "trevoke/org-gtd.el")
:upgrade t)
:demand t
:custom
(org-agenda-property-position 'next-line)
(org-edna-use-inheritance t)
:config
(org-edna-mode)
:bind
(("C-c d c" . org-gtd-capture)
("C-c d e" . org-gtd-engage)
("C-c d p" . org-gtd-process-inbox)
("C-c d n" . org-gtd-show-all-next)
("C-c d s" . org-gtd-show-stuck-projects)
:map org-gtd-process-map
("C-c c" . org-gtd-choose)))

(use-package org-agenda
:ensure nil
:after org-gtd
:custom
(org-agenda-window-setup 'only-window))
(straight-use-package '(org-gtd :type git :host github :repo "trevoke/org-gtd.el"))

;; (use-package org
;; :quelpa ((org) :upgrade t)
;; :demand t
;; :ensure t
;; :init
;; (setq org-directory "~/orgnotes/")
;; (setq org-id-track-globally t)
;; (setq org-id-locations-file "~/.emacs.d/.org-id-locations"))

;; (use-package org-gtd
;; :after org
;; :quelpa ((org-gtd :fetcher github :repo "trevoke/org-gtd.el")
;; :upgrade t)
;; :demand t
;; :custom
;; (org-agenda-property-position 'next-line)
;; (org-edna-use-inheritance t)
;; :config
;; (org-edna-mode)
;; :bind
;; (("C-c d c" . org-gtd-capture)
;; ("C-c d e" . org-gtd-engage)
;; ("C-c d p" . org-gtd-process-inbox)
;; ("C-c d n" . org-gtd-show-all-next)
;; ("C-c d s" . org-gtd-show-stuck-projects)
;; :map org-gtd-process-map
;; ("C-c c" . org-gtd-choose)))

;; (use-package org-agenda
;; :ensure nil
;; :after org-gtd
;; :custom
;; (org-agenda-window-setup 'only-window))

(use-package camcorder :quelpa t)

Expand Down
17 changes: 0 additions & 17 deletions org-gtd-capture.el
Original file line number Diff line number Diff line change
Expand Up @@ -39,22 +39,5 @@ For GOTO and KEYS, see `org-capture' documentation for the variables of the same
(org-gtd--inbox-file)
(org-capture goto keys)))

(defun org-gtd--capture-templates ()
"Private function.
Return valid `org-capture' templates based on `org-gtd-capture-templates'."
(mapcar #'org-gtd--gen-capture-templates
org-gtd-capture-templates))

(defun org-gtd--gen-capture-templates (template)
"Private function.
Given an `org-capture-template' TEMPLATE string, generate a valid
org-gtd-capture item."
(cl-destructuring-bind (key description template-string) template
`(,key ,description entry
(file (lambda () (org-gtd-inbox-path)))
,template-string :kill-buffer t)))

(provide 'org-gtd-capture)
;;; org-gtd-capture.el ends here
21 changes: 21 additions & 0 deletions org-gtd-core.el
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,26 @@
(unwind-protect
(progn ,@body))))

;; move this here to make a clear load path to make straight.el happy
;; it was originally in org-gtd-capture.el
(defun org-gtd--capture-templates ()
"Private function.
Return valid `org-capture' templates based on `org-gtd-capture-templates'."
(mapcar #'org-gtd--gen-capture-templates
org-gtd-capture-templates))

;; move this here to make a clear load path to make straight.el happy
;; it was originally in org-gtd-capture.el
(defun org-gtd--gen-capture-templates (template)
"Private function.
Given an `org-capture-template' TEMPLATE string, generate a valid
org-gtd-capture item."
(cl-destructuring-bind (key description template-string) template
`(,key ,description entry
(file (lambda () (org-gtd-inbox-path)))
,template-string :kill-buffer t)))

(provide 'org-gtd-core)
;;; org-gtd-core.el ends here

0 comments on commit a884abb

Please sign in to comment.