ENH make use-package fetch org-ml and org-sql

This commit is contained in:
Nathan Dwarshuis 2021-03-13 21:32:19 -05:00
parent a058fb3602
commit ed336342e1
1 changed files with 40 additions and 44 deletions

View File

@ -171,8 +171,13 @@ Define a path to internal libraries (either things I am developing or external =
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(defvar nd/local-pkg-directory "local/share/") (defvar nd/local-pkg-directory "local/share/")
(defvar nd/lib-directory "local/lib/")
(defun nd/expand-local-pkg-directory (path) (defun nd/expand-local-pkg-directory (path)
(f-join user-emacs-directory nd/local-pkg-directory path)) (f-join user-emacs-directory nd/local-pkg-directory path))
(defun nd/expand-lib-directory (path)
(f-join user-emacs-directory nd/lib-directory path))
#+END_SRC #+END_SRC
** macros ** macros
:PROPERTIES: :PROPERTIES:
@ -1421,8 +1426,8 @@ No custom code here, but flycheck needs =shellcheck= (a Haskell program). On Arc
(nd/when-bin "shellcheck" (nd/when-bin "shellcheck"
:aur "shellcheck-bin") :aur "shellcheck-bin")
(add-to-list 'load-path (nd/expand-local-pkg-directory "essh")) ;;(add-to-list 'load-path (nd/expand-local-pkg-directory "essh"))
(require 'essh) ;;(require 'essh)
#+END_SRC #+END_SRC
*** SQL *** SQL
No custom code here, but flycheck needs =sqlint= (on Arch available through the AUR). No custom code here, but flycheck needs =sqlint= (on Arch available through the AUR).
@ -1494,10 +1499,11 @@ Save all org buffers 1 minute before the hour.
:END: :END:
Org extras Org extras
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(add-to-list 'load-path (nd/expand-local-pkg-directory "org-x")) (add-to-list 'load-path (nd/expand-lib-directory "org-x"))
(add-to-list 'load-path (nd/expand-local-pkg-directory "org-ml"))
(require 'org-ml)
(require 'org-x) (require 'org-x)
(use-package org-ml
:straight t)
#+END_SRC #+END_SRC
** buffer interface ** buffer interface
*** line wrap *** line wrap
@ -1738,8 +1744,8 @@ Taskjuggler is provided by an external package that provides the command line to
;; (require 'ox-taskjuggler) ;; (require 'ox-taskjuggler)
;; from here: https://www.skamphausen.de/cgi-bin/ska/taskjuggler-mode.el ;; from here: https://www.skamphausen.de/cgi-bin/ska/taskjuggler-mode.el
(add-to-list 'load-path (nd/expand-local-pkg-directory "taskjuggler")) ;;(add-to-list 'load-path (nd/expand-local-pkg-directory "taskjuggler"))
(require 'taskjuggler-mode) ;;(require 'taskjuggler-mode)
;; nice and short :) ;; nice and short :)
(setq org-tj-report-tag "τrep" (setq org-tj-report-tag "τrep"
@ -3341,39 +3347,29 @@ In these cases, it is nice to know what happened during each cycle, so force not
(setq org-log-repeat 'note) (setq org-log-repeat 'note)
#+END_SRC #+END_SRC
*** sqlite backend *** sqlite backend
Org mode is great and all, but in many cases, text files just won't cut it. Hardcore data analysis is one of them, so make functions to shove org files (specifically archive files) into a sqlite database Org mode is great and all, but in many cases, text files just won't cut it. Hardcore data analysis is one of them, so make functions to shove org files (specifically archive files) into a sql database
**** load path
:PROPERTIES:
:ID: 78bf6eb7-d3d7-43e9-8a03-ecedd7ca19e3
:END:
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(add-to-list 'load-path (nd/expand-local-pkg-directory "org-sql")) (use-package org-sql
(require 'org-sql) :straight t
#+END_SRC :config
**** customized variables (setq org-sql-db-config '(postgres :database "org_sql"
:PROPERTIES: :port 35432
:ID: 9b5b3587-676a-45da-84c8-c88a5f0ac348 :hostname "portnoy4prez.yavin4.ch"
:END: :password "org_sql"
These are variables that I set for my use but will not go into the eventual package :username "org_sql")
#+BEGIN_SRC emacs-lisp ;; some SQL code to denormalize my org-file data for visualization
(setq org-sql-db-config '(postgres :database "org_sql" org-sql-post-init-hooks `((file+ ,(f-join no-littering-etc-directory
:port 35432 "org-sql" "viz_setup.sql")))
:hostname "portnoy4prez.yavin4.ch" org-sql-post-push-hooks '((sql+ "CALL make_vis_tables();"))
:password "org_sql" org-sql-debug t
:username "org_sql") org-sql-files '("~/Org/.archive/"
;; some SQL code to denormalize my org-file data for visualization "~/Org/general.org_archive"
org-sql-post-init-hooks `((file+ ,(f-join no-littering-etc-directory "~/Org/general.org"
"org-sql" "viz_setup.sql"))) "~/Org/test1.org_archive"
org-sql-post-push-hooks '((sql+ "CALL make_vis_tables();")) "~/Org/test2.org_archive"
org-sql-debug t "~/Org/incubator.org"
org-sql-files '("~/Org/.archive/" "~/Org/projects/"
"~/Org/general.org_archive" "~/Org/repeater.org_archive")))
"~/Org/general.org"
"~/Org/test1.org_archive"
"~/Org/test2.org_archive"
"~/Org/incubator.org"
"~/Org/projects/"
"~/Org/repeater.org_archive"))
#+END_SRC #+END_SRC
** tomato mode ** tomato mode
:PROPERTIES: :PROPERTIES:
@ -3381,12 +3377,12 @@ These are variables that I set for my use but will not go into the eventual pack
:END: :END:
This really means "super awesome pomodoro implementation." =Tomato-mode= sounds cooler and more emacs like. This really means "super awesome pomodoro implementation." =Tomato-mode= sounds cooler and more emacs like.
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package sound-wav :straight t) ;;(use-package sound-wav :straight t)
(add-to-list 'load-path (nd/expand-local-pkg-directory "org-tomato")) ;;(add-to-list 'load-path (nd/expand-local-pkg-directory "org-tomato"))
(require 'org-tomato) ;;(require 'org-tomato)
(setq org-tomato-timer-sound (no-littering-expand-etc-file-name ;;(setq org-tomato-timer-sound (no-littering-expand-etc-file-name
"you_suffer.wav")) ;; "you_suffer.wav"))
#+END_SRC #+END_SRC
* tools * tools
** printing ** printing