2RYGV5YG6JTZ6GKR2PANDP4PWRBJL6ROJUMGYBQA6KO4CR2UTXGQC (defun safe-files ()(let ((fn (expand-file-name "~/.safe-files")))(when (file-exists-p fn)(read-strings-in-file fn))))(defun fwoar/mark-safe (fn)(interactive (list buffer-file-name))(with-temp-buffer(insert "\n")(insert fn)(append-to-file (point-min) (point-max)(expand-file-name "~/.safe-files"))))(defvar-local safe-file-p nil)(setf (get 'safe-file-p 'risky-local-variable) t)(defun fwoar/confirm-babel-evaluate (lang body)(message "Buffer file name: %s" buffer-file-name)(let ((result (or safe-file-p(member buffer-file-name (safe-files)))))(setq-local safe-file-p result)(not safe-file-p)))(use-package ob-graphql:ensure t)(use-package ob-http:ensure t)(use-package ob-restclient:ensure t)(use-package org:ensure t:pin gnu:config(setq org-directory "~/org"org-confirm-babel-evaluate 'fwoar/confirm-babel-evaluateorg-default-notes-file (concat org-directory "/scratch.org")org-refile-use-outline-path 'fileorg-outline-path-complete-in-steps nilorg-log-done 'timeorg-log-into-drawer torg-capture-templates '(("t" "Todo" entry (file+headline "~/org/gtd.org" "Tasks")"* TODO %?\n %i\n %a")("j" "Journal" entry (file+olp+datetree "~/org/journal.org")"* %?\nEntered on %U\n %i\n %a")("s" "Snippet" entry (file "~/org/snippets.org")"* %?\n#+BEGIN_SRC\n%i\n#+END_SRC")("b" "Bookmarks" entry (file+olp+datetree "~/org/bookmarks.org")"* %? %^g\n%c\n")("a" "Agenda" entry(file "~/org/agenda.org")"* %? %^G\n SCHEDULED: %T"))org-refile-targets '((nil . (:maxlevel . 2))))(org-babel-do-load-languages'org-babel-load-languages'((restclient . t)(graphql . t)(http . t)(emacs-lisp . t)(lisp . t)(haskell . t)))(define-key global-map "\C-cc" 'org-capture)(evil-define-key 'visual 'global (kbd "<leader>c") 'org-capture))(use-package org-projectile:ensure t:after org company:config(progn(org-projectile-per-project)(setq org-agenda-skip-unavailable-files t)(setq org-projectile-per-project-filepath"notes/README.org")(setq org-agenda-files (append org-agenda-files (org-projectile-todo-files)))(push (org-projectile-project-todo-entry) org-capture-templates)(define-key projectile-mode-map (kbd "C-c c") 'org-capture)):ensure t)
(fwoar/zenburn-with-color-variables(defface magit-keyword-feature`((t :foreground ,zenburn-green :inherit magit-keyword))"Face for parts of commit messages inside brackets.":group 'magit-faces)(defface magit-keyword-chore`((t :foreground ,zenburn-blue :inherit magit-keyword))"Face for parts of commit messages inside brackets.":group 'magit-faces)(defface magit-keyword-misc`((t :foreground ,zenburn-fg-1 :inherit magit-keyword))"Face for parts of commit messages inside brackets.":group 'magit-faces)(defface magit-keyword-bug`((t :foreground ,zenburn-red :inherit magit-keyword))"Face for parts of commit messages inside brackets.":group 'magit-faces))(defun fwoar/propertize-magit-log (_rev msg)(let ((boundary 0))(while (string-match "^\\(\\(?:feat\\(?:ure\\)?(\\([^)]+?\\))\\)\\|\\(?:feat\\(ure\\)?\\>\\)\\)" msg boundary)(setq boundary (match-end 0))(magit--put-face (match-beginning 0) boundary'magit-keyword-feature msg)))(let ((boundary 0))(while (string-match "^\\(\\(?:chore(\\([^)]+?\\))\\)\\|\\(?:chore\\>\\)\\)" msg boundary)(setq boundary (match-end 0))(magit--put-face (match-beginning 0) boundary'magit-keyword-chore msg)))(let ((boundary 0))(while (string-match "^\\(\\(?:bug(\\([^)]+?\\))\\)\\|\\(?:bug\\>\\)\\)" msg boundary)(setq boundary (match-end 0))(magit--put-face (match-beginning 0) boundary'magit-keyword-bug msg)))(let ((boundary 0))(while (string-match "^\\([^:\n\t]+\\):" msg boundary)(setq boundary (match-end 0))(let ((group (match-string 1 msg)))(unless (or (> (length group) 20)(s-starts-with? "feat" group)(s-starts-with? "Merge" group)(s-starts-with? "merge" group)(s-starts-with? "chore" group)(s-starts-with? "bug" group))(magit--put-face (match-beginning 0) (1- boundary)'magit-keyword-misc msg))))))(use-package magit:ensure t:config;; TODO: figure this out with transients;;(magit-define-popup-action 'magit-dispatch-popup ?j "Browse remote" 'browse-at-remote)'magit-dispatch(advice-add 'magit-log-propertize-keywords :after'fwoar/propertize-magit-log))(use-package browse-at-remote:after magit:ensure t:config)
(defun safe-files ()(let ((fn (expand-file-name "~/.safe-files")))(when (file-exists-p fn)(read-strings-in-file fn))))(defun fwoar/mark-safe (fn)(interactive (list buffer-file-name))(with-temp-buffer(insert "\n")(insert fn)(append-to-file (point-min) (point-max)(expand-file-name "~/.safe-files"))))(defvar-local safe-file-p nil)(setf (get 'safe-file-p 'risky-local-variable) t)(defun fwoar/confirm-babel-evaluate (lang body)(message "Buffer file name: %s" buffer-file-name)(let ((result (or safe-file-p(member buffer-file-name (safe-files)))))(setq-local safe-file-p result)(not safe-file-p)))(use-package ob-graphql:ensure t)(use-package ob-http:ensure t)(use-package ob-restclient:ensure t)(use-package org:ensure t:pin gnu:config(setq org-directory "~/org"org-confirm-babel-evaluate 'fwoar/confirm-babel-evaluateorg-default-notes-file (concat org-directory "/scratch.org")org-refile-use-outline-path 'fileorg-outline-path-complete-in-steps nilorg-log-done 'timeorg-log-into-drawer torg-capture-templates '(("t" "Todo" entry (file+headline "~/org/gtd.org" "Tasks")"* TODO %?\n %i\n %a")("j" "Journal" entry (file+olp+datetree "~/org/journal.org")"* %?\nEntered on %U\n %i\n %a")("s" "Snippet" entry (file "~/org/snippets.org")"* %?\n#+BEGIN_SRC\n%i\n#+END_SRC")("b" "Bookmarks" entry (file+olp+datetree "~/org/bookmarks.org")"* %? %^g\n%c\n")("a" "Agenda" entry(file "~/org/agenda.org")"* %? %^G\n SCHEDULED: %T"))org-refile-targets '((nil . (:maxlevel . 2))))(org-babel-do-load-languages'org-babel-load-languages'((restclient . t)(graphql . t)(http . t)(emacs-lisp . t)(lisp . t)(haskell . t)))(define-key global-map "\C-cc" 'org-capture)(evil-define-key 'visual 'global (kbd "<leader>c") 'org-capture))(use-package org-projectile:ensure t:after org company:config(progn(org-projectile-per-project)(setq org-agenda-skip-unavailable-files t)(setq org-projectile-per-project-filepath"notes/README.org")(setq org-agenda-files (append org-agenda-files (org-projectile-todo-files)))(push (org-projectile-project-todo-entry) org-capture-templates)(define-key projectile-mode-map (kbd "C-c c") 'org-capture)):ensure t)
(fwoar/zenburn-with-color-variables(defface magit-keyword-feature`((t :foreground ,zenburn-green :inherit magit-keyword))"Face for parts of commit messages inside brackets.":group 'magit-faces)(defface magit-keyword-chore`((t :foreground ,zenburn-blue :inherit magit-keyword))"Face for parts of commit messages inside brackets.":group 'magit-faces)(defface magit-keyword-misc`((t :foreground ,zenburn-fg-1 :inherit magit-keyword))"Face for parts of commit messages inside brackets.":group 'magit-faces)(defface magit-keyword-bug`((t :foreground ,zenburn-red :inherit magit-keyword))"Face for parts of commit messages inside brackets.":group 'magit-faces))(defun fwoar/propertize-magit-log (_rev msg)(let ((boundary 0))(while (string-match "^\\(\\(?:feat\\(?:ure\\)?(\\([^)]+?\\))\\)\\|\\(?:feat\\(ure\\)?\\>\\)\\)" msg boundary)(setq boundary (match-end 0))(magit--put-face (match-beginning 0) boundary'magit-keyword-feature msg)))(let ((boundary 0))(while (string-match "^\\(\\(?:chore(\\([^)]+?\\))\\)\\|\\(?:chore\\>\\)\\)" msg boundary)(setq boundary (match-end 0))(magit--put-face (match-beginning 0) boundary'magit-keyword-chore msg)))(let ((boundary 0))(while (string-match "^\\(\\(?:bug(\\([^)]+?\\))\\)\\|\\(?:bug\\>\\)\\)" msg boundary)(setq boundary (match-end 0))(magit--put-face (match-beginning 0) boundary'magit-keyword-bug msg)))(let ((boundary 0))(while (string-match "^\\([^:\n\t]+\\):" msg boundary)(setq boundary (match-end 0))(let ((group (match-string 1 msg)))(unless (or (> (length group) 20)(s-starts-with? "feat" group)(s-starts-with? "Merge" group)(s-starts-with? "merge" group)(s-starts-with? "chore" group)(s-starts-with? "bug" group))(magit--put-face (match-beginning 0) (1- boundary)'magit-keyword-misc msg))))))(use-package magit:ensure t:config;; TODO: figure this out with transients;;(magit-define-popup-action 'magit-dispatch-popup ?j "Browse remote" 'browse-at-remote)'magit-dispatch(advice-add 'magit-log-propertize-keywords :after'fwoar/propertize-magit-log))(use-package browse-at-remote:after magit:ensure t:config)