소스 검색

Lot of wip testing but its stable so committing a checkpoint

master
Mitchell Tishmack 5 년 전
committed by Mitch Tishmack
부모
커밋
43c63829d5
1개의 변경된 파일185개의 추가작업 그리고 45개의 파일을 삭제
  1. +185
    -45
      emacs.org

+ 185
- 45
emacs.org 파일 보기

@@ -589,9 +589,19 @@ oomph with all the crap it did.
(err (or (cdr (assq state counts)) "?"))
(running (eq 'running flycheck-last-status-change)))
(if (or errorp running) (format "•%s" err))))
#+END_SRC

TODO: Use or ditch?
#+BEGIN_SRC emacs-lisp :tangle no
(use-package org-protocol-capture-html
:after quelpa-use-package
:quelpa (org-protocol-capture-html :repo "alphapapa/org-protocol-capture-html" :fetcher github))
#+END_SRC

#+BEGIN_SRC emacs-lisp
(use-package quelpa-use-package
:ensure t)
(use-package s :ensure t)

(use-package mini-modeline
:ensure t
@@ -778,8 +788,70 @@ Todo is to figure out what needs to happen for the capture templates and
validate the agenda changes.

#+BEGIN_SRC emacs-lisp
;; (defun org-roam-monolith-capture-date-file(path &optional extension)
;; (mkdir-base-path path)
;; (format "%s/%s%s" base (format-time-string "%Y-%m-%d:%H:%M:%S")
;; ))

;; (defun org-roam-monolith-base-path(path)
;; (expand-file-name (concat path (format-time-string "/%Y/%B"))))

;; (defun org-roam-monolith-mkdir-base-path(path)
;; (mkdir (base-path path) t))

;; (defun org-roam-monolith-file-extension(extension)
;; (if (eq extension nil) ""
;; (if (string-match-p "\\." extension)
;; extension
;; (concat "." extension))))

;; (defun org-roam-monolith-ref-url(url path)
;; (setq base (org-roam-monolith-base-path path))
;; ;; (setq file-string (format-time-string "%Y-%m-%d:%H:%M:%S"))
;; (setq file-string "test")
;; (org-roam-monolith-mkdir-base-path(base))
;; (setq file-prefix (format "%s/%s" base, file-string))
;; (setq title (org-web-tools--html-title url))
;; (setq )
;; (append-to-file
;; (format "#+TITLE: %s\n#+ROAM_KEY: %s\n\n Monolith archive [[%s][%s]]\n" title url
;; title url (mt/insert-url-as-org url))
;; nil
;; reffile)
;; (find-file-other-window reffile)
;; )

;; (defun mt/roam-ref-url()
;; (interactive)
;; (progn
;; (setq url (read-string "url: "))
;; (setq reffile (capture-date-file "~/src/org/ref/url"))
;; (append-to-file
;; (format "#+TITLE: %s\n#+ROAM_KEY: %s\n\n\n* Content\n%s"
;; (org-web-tools--html-title url) url (mt/insert-url-as-org url))
;; nil
;; reffile)
;; (find-file-other-window reffile)))


;; (defun mt/insert-url-as-org(url)
;; (org-web-tools--html-to-org-with-pandoc
;; (org-web-tools--get-url url)))
(defun capture-file-extension(extension)
(if (eq extension nil) ""
(if (string-match-p "\\." extension)
extension
(concat "." extension))))

(defun capture-date-file(path &optional extension)
(setq prefix (expand-file-name (concat path (format-time-string "/%Y/%B"))))
(mkdir prefix t)
(setq file-name (format-time-string "%Y-%m-%d:%H:%M:%S"))
(format "%s/%s%s" prefix file-name (capture-file-extension extension)))

(use-package org
:ensure t
:ensure org-plus-contrib
:pin org
:bind (("C-c a" . org-agenda)
("C-c b" . org-iswitchb)
("C-c c" . org-capture)
@@ -802,9 +874,50 @@ validate the agenda changes.
;; Ref https://orgmode.org/manual/Template-elements.html for more detail.
(org-agenda-files
(list "~/src/org"
"~/src/git.functionalidiot.com/mitchty/dotfiles"))
"~/src/git.mitchty.net/mitchty/dotfiles"))
;; "#+TITLE: %a\n#+ROAM_KEY: %U\n\n [[%U][%U]]\n"

:config
(add-to-list 'org-structure-template-alist '("el" . "#+BEGIN_SRC emacs-lisp\n?\n#+END_SRC"))
(add-to-list 'org-structure-template-alist '("hs" . "#+BEGIN_SRC haskell\n?\n#+END_SRC"))
(add-to-list 'org-structure-template-alist '("pl" . "#+BEGIN_SRC perl\n?\n#+END_SRC"))
(add-to-list 'org-structure-template-alist '("py" . "#+BEGIN_SRC python\n?\n#+END_SRC"))
(add-to-list 'org-structure-template-alist '("sh" . "#+BEGIN_SRC sh\n?\n#+END_SRC"))
(org-babel-do-load-languages
'org-babel-load-languages
(append org-babel-load-languages
'(
(C . t)
(ditaa . t)
(emacs-lisp . t)
(haskell . t)
(latex . t)
(perl . t)
(python . t)
(ruby . t)
(shell . t)
))))

(use-package org-capture
:after org
:ensure t
:custom
(org-capture-templates
'(
;; TODO: make this crap work somehow
;; ("w" "website"
;; entry (file (capture-date-file "~/src/org/ref/url" "org"))
;; ;; "#+TITLE: %a\n#+ROAM_KEY: %U\n\n%? [[%U][%U]]\n"
;; "%?"
;; :prepend t :empty-lines 1)
;; ("u" "unsorted note"
;; entry (file capture-date-file "~/src/org/unsorted" "org")
;; "\n* %?\nRandom Note entered on %U\n %i\n %a\n"
;; :prepend t :empty-lines 1)
;; ("r" "ref url"
;; entry (file capture-date-file "~/src/org/ref/url")
;; "\n* %?\nRandom Note entered on %U\n %i\n %a\n"
;; :prepend t :empty-lines 1)
("d" "deadline"
entry (file+headline org-default-notes-file "Todos")
"* PRIO %? \nDEADLINE: %t"
@@ -823,8 +936,8 @@ validate the agenda changes.
:prepend t :empty-lines 1 :clock-in t :clock-resume t)
("u" "urls"
entry (file+headline org-default-notes-file "Urls")
"\n* %? :url:\n%i\n"
:prepend t :empty-lines 1 :clock-in t :clock-resume t)
"\n** TODO read url :url:\n[[%?]]\n"
:prepend t :empty-lines 1)
("i" "interruption"
entry (file+headline org-default-notes-file "Interruptions")
"\n* BLOCKED by %? :BLOCKED:\n%t"
@@ -833,55 +946,46 @@ validate the agenda changes.
entry (file (concat org-directory "/journal.org"))
"* %?\n%U\n"
:prepend t :empty-lines 1 :clock-in t :clock-resume t)
))
:config
(add-to-list 'org-structure-template-alist '("el" "#+BEGIN_SRC emacs-lisp\n?\n#+END_SRC" ""))
(add-to-list 'org-structure-template-alist '("hs" "#+BEGIN_SRC haskell\n?\n#+END_SRC" ""))
(add-to-list 'org-structure-template-alist '("pl" "#+BEGIN_SRC perl\n?\n#+END_SRC" ""))
(add-to-list 'org-structure-template-alist '("py" "#+BEGIN_SRC python\n?\n#+END_SRC" ""))
(add-to-list 'org-structure-template-alist '("sh" "#+BEGIN_SRC sh\n?\n#+END_SRC" ""))
(org-babel-do-load-languages 'org-babel-load-languages
(append org-babel-load-languages
'(
(C . t)
(ditaa . t)
(emacs-lisp . t)
(haskell . t)
(latex . t)
(perl . t)
(python . t)
(ruby . t)
(shell . t)
))))
#+END_SRC

**** TODO Org-roam testing :validation:
DEADLINE: <2020-09-11 Fri>
:LOGBOOK:
CLOCK: [2020-09-07 Mon 10:59]--[2020-09-07 Mon 11:00] => 0:01
:END:

Figure out how the hell to use this thing.
)))
#+END_SRC

**** Org-roam testing

Ref:
- https://github.com/org-roam/org-roam
- https://www.orgroam.com/manual/

#+BEGIN_SRC emacs-lisp :tangle no
Starting out simple..ish.

#+BEGIN_SRC emacs-lisp
(use-package org-roam
:after org
:ensure t
:hook
(after-init . org-roam-mode)
:hook after-init
:custom
(org-roam-directory "~/src/org/roam")
:bind (:map org-roam-mode-map
(("C-c n l" . org-roam)
("C-c n f" . org-roam-find-file)
("C-c n g" . org-roam-graph-show))
:map org-mode-map
(("C-c n i" . org-roam-insert))
(("C-c n I" . org-roam-insert-immediate))))
(org-roam-directory "~/src/org")
(org-roam-index-file "~/src/org/roam.org")
(org-roam-tag-sources '(prop all-directories))
(org-roam-capture-templates
'(("d" "default" plain (function org-roam--capture-get-point)
"%?"
:file-name "~/src/org/${slug}"
:unnarrowed t
:head "#+TITLE: ${title}\n")))
(org-roam-capture-ref-templates
'(("r" "ref" plain (function org-roam-capture--get-point)
"%?"
:file-name "~/src/org/ref/${slug}")
:unnarrowed t
:head "#+TITLE: ${title}\n#+ROAM_KEY: ${ref}\n- source :: ${ref}\n"))
:bind
(:map org-roam-mode-map
(("C-c n l" . org-roam)
("C-c n f" . org-roam-find-file)
("C-c n g" . org-roam-graph))
:map org-mode-map
(("C-c n i" . org-roam-insert))
(("C-c n I" . org-roam-insert-immediate))))
#+END_SRC

**** TODO org babel ob-async testing :validation:
@@ -944,6 +1048,14 @@ https://github.com/integral-dw/org-superstar-mode
)
#+END_SRC

TODO: testing
#+BEGIN_SRC emacs-lisp :tangle no
(use-package org-num
:load-path "lisp/"
:after org
:hook (org-mode . org-num-mode))
#+END_SRC

**** TODO Keep ox-latex in org setup? :validation:broken:

Its tangle is set to no...
@@ -974,6 +1086,15 @@ Flycheck for on the fly checking of code.
:hook (prog-mode . flycheck-mode))
#+END_SRC

TODO: see if this is better for error messages

#+BEGIN_SRC emacs-lisp :tangle no
(use-package pos-tip
:after flycheck
:hook
(flycheck-mode . flycheck-pos-tip-mode))
#+END_SRC

**** TODO pkg-config lib stuff for flycheck :broken:

Need to vet this, used it more when I did more c. But its handy for non standard pkg-config
@@ -1159,7 +1280,8 @@ So I write gooder. Me fail English? Thats unpossible.
*** rust-mode

#+BEGIN_SRC emacs-lisp
(use-package rust-mode :commands rust-mode :mode ("\\*.rs\\'" . rust-mode)
(use-package rust-mode
:commands rust-mode
:defer t)
#+END_SRC
*** TODO python-mode :broken:
@@ -1598,3 +1720,21 @@ Probably need to check if this file exists first...
#+BEGIN_SRC emacs-lisp :tangle no
(load-file "~/.emacs.d/local.el")
#+END_SRC

* TESTING

Stuff thats getting tested...

Iffy.... Does some jank ass wack stuff in fullscreen mode on cocoa emacs in macos.

#+BEGIN_SRC emacs-lisp :tangle no
(use-package mini-frame
:ensure t
:config
(mini-frame-mode t)
:custom
(mini-frame-show-parameters
'((top . 10))))
;; (width . 0.7)
;; (left . 0.5))))
#+END_SRC

불러오는 중...
취소
저장