<commit_before>;;; org-conf.el -- Settings for org-mode.
(eval-when-compile
  (require 'saveplace)
  (require 'org-install)
  (require 'org)
  (require 'org-clock)
  (require 'org-html))

;; Silence a compiler warning
(declare-function org-bookmark-jump-unhide "org")

;; General Org Settings
(setq org-log-done t
      org-reverse-note-order t
      org-deadline-warning-days 14
      org-hide-leading-stars t
      org-blank-before-new-entry '((heading . nil) (plain-list-item . nil))
      org-empty-line-terminates-plain-lists t
      org-use-fast-todo-selection t
      org-use-fast-tag-selection 'auto
      org-fast-tag-selection-single-key t
      org-special-ctrl-a/e t
      org-special-ctrl-k t
      org-M-RET-may-split-line t
      org-time-clocksum-format "%02d:%02d"
      org-clock-into-drawer "CLOCK"
      org-clock-clocked-in-display 'frame-title
      org-log-into-drawer "LOGBOOK"
      org-tags-exclude-from-inheritance nil
      org-completion-use-ido t
      org-goto-interface 'outline-path-completion
      org-outline-path-complete-in-steps t

      ;; Showing context
      org-show-hierarchy-above '((default . t))
      org-show-following-heading '((default . t))
      org-show-siblings '((default . t))
      org-show-entry-below '((default . t))

      ;; Following Links
      org-link-frame-setup
      '((vm   . vm-visit-folder-other-frame)
        (gnus . org-gnus-no-new-news)
        (file . find-file)
        (wl   . wl-other-frame))

      ;; Emphasis
      org-emphasis-alist
      `(("_" bold "<b>" "</b>")
        ("*" italic "<i>" "</i>")
        ("=" underline "<span style=\"text-decoration:underline;\">" "</span>")
        ("`" org-code "<code>" "</code>" verbatim)
        ("~" org-verbatim "<code>" "</code>" verbatim)))

;; Need to tell org-mode to update org-emphasis-alist
(org-set-emph-re 'org-emphasis-alist org-emphasis-alist)

;; Stuff for org-agenda.
(setq org-agenda-files '("~/documents/kb/lists/projects.org")
      org-stuck-projects '("+LEVEL=2/-DONE"
                           ("TODO" "NEXT" "PENDING" "DEPENDS")
                           nil "")
      org-agenda-custom-commands
      '(("p" "Projects"
         ((todo "TODO|NEXT")
          (todo "WAITING")
          (stuck)))))

(defadvice org-agenda (around pjones:agenda-remember-windows activate)
  (window-configuration-to-register :org-agenda-windows)
  ad-do-it
  (jump-to-register :org-agenda-windows)
  (set-window-buffer (selected-window) "*Org Agenda*"))

(defun pjones:org-agenda-quit ()
  "Restores the previous window configuration and kills the
agenda buffer."
  (interactive)
  (org-agenda-quit)
  (jump-to-register :org-agenda-windows))

(defun pjones:org-mode-hook ()
  ;; Extra Bindings
  (org-defkey org-mode-map "\C-\M-f"   'org-metaright)
  (org-defkey org-mode-map "\C-\M-b"   'org-metaleft)
  (org-defkey org-mode-map "\C-\M-S-f" 'org-shiftmetaright)
  (org-defkey org-mode-map "\C-\M-S-b" 'org-shiftmetaleft)
  (org-defkey org-mode-map "\C-\M-p"   'org-metaup)
  (org-defkey org-mode-map "\C-\M-n"   'org-metadown)
  (org-defkey org-mode-map "\C-c;"     'flyspell-auto-correct-previous-word)

  (org-defkey org-mode-map "\C-c0"               'pjones:org-hide-all)
  (org-defkey org-mode-map "\C-c1"               'pjones:org-hide-others)
  (org-defkey org-mode-map "\C-j"                'pjones:org-list-append)
  (org-defkey org-mode-map "\C-c\C-j"            'pjones:org-goto)
  (org-defkey org-mode-map [(meta return)]       'pjones:org-list-append)
  (org-defkey org-mode-map [(shift meta return)] 'pjones:org-list-append-with-checkbox)

  ;; Buffer Settings
  (setq save-place nil)

  ;; Exporting
  (setq org-export-html-link-org-files-as-html nil
        org-export-with-sub-superscripts nil
        org-export-with-emphasize nil
        org-export-html-style-default ""
        org-export-html-style-extra ""
        org-export-html-style nil))
(add-hook 'org-mode-hook 'pjones:org-mode-hook)

(defun pjones:org-agenda-mode-hook ()<commit_msg>Add a new org TODO keyword: DAILY<commit_after>;;; org-conf.el -- Settings for org-mode.
(eval-when-compile
  (require 'saveplace)
  (require 'org-install)
  (require 'org)
  (require 'org-clock)
  (require 'org-html))

;; Silence a compiler warning
(declare-function org-bookmark-jump-unhide "org")

;; General Org Settings
(setq org-log-done t
      org-reverse-note-order t
      org-deadline-warning-days 14
      org-hide-leading-stars t
      org-blank-before-new-entry '((heading . nil) (plain-list-item . nil))
      org-empty-line-terminates-plain-lists t
      org-use-fast-todo-selection t
      org-use-fast-tag-selection 'auto
      org-fast-tag-selection-single-key t
      org-special-ctrl-a/e t
      org-special-ctrl-k t
      org-M-RET-may-split-line t
      org-time-clocksum-format "%02d:%02d"
      org-clock-into-drawer "CLOCK"
      org-clock-clocked-in-display 'frame-title
      org-log-into-drawer "LOGBOOK"
      org-tags-exclude-from-inheritance nil
      org-completion-use-ido t
      org-goto-interface 'outline-path-completion
      org-outline-path-complete-in-steps t

      ;; Showing context
      org-show-hierarchy-above '((default . t))
      org-show-following-heading '((default . t))
      org-show-siblings '((default . t))
      org-show-entry-below '((default . t))

      ;; Following Links
      org-link-frame-setup
      '((vm   . vm-visit-folder-other-frame)
        (gnus . org-gnus-no-new-news)
        (file . find-file)
        (wl   . wl-other-frame))

      ;; Emphasis
      org-emphasis-alist
      `(("_" bold "<b>" "</b>")
        ("*" italic "<i>" "</i>")
        ("=" underline "<span style=\"text-decoration:underline;\">" "</span>")
        ("`" org-code "<code>" "</code>" verbatim)
        ("~" org-verbatim "<code>" "</code>" verbatim)))

;; Need to tell org-mode to update org-emphasis-alist
(org-set-emph-re 'org-emphasis-alist org-emphasis-alist)

;; Stuff for org-agenda.
(setq org-agenda-files '("~/documents/kb/lists/projects.org")
      org-stuck-projects '("+LEVEL=2/-DONE"
                           ("TODO" "NEXT" "PENDING" "DEPENDS")
                           nil "")
      org-agenda-custom-commands
      '(("p" "Projects" ((todo "TODO|NEXT")
                         (todo "DAILY")
                         (todo "WAITING")
                         (stuck)))))

(defadvice org-agenda (around pjones:agenda-remember-windows activate)
  (window-configuration-to-register :org-agenda-windows)
  ad-do-it
  (jump-to-register :org-agenda-windows)
  (set-window-buffer (selected-window) "*Org Agenda*"))

(defun pjones:org-agenda-quit ()
  "Restores the previous window configuration and kills the
agenda buffer."
  (interactive)
  (org-agenda-quit)
  (jump-to-register :org-agenda-windows))

(defun pjones:org-mode-hook ()
  ;; Extra Bindings
  (org-defkey org-mode-map "\C-\M-f"   'org-metaright)
  (org-defkey org-mode-map "\C-\M-b"   'org-metaleft)
  (org-defkey org-mode-map "\C-\M-S-f" 'org-shiftmetaright)
  (org-defkey org-mode-map "\C-\M-S-b" 'org-shiftmetaleft)
  (org-defkey org-mode-map "\C-\M-p"   'org-metaup)
  (org-defkey org-mode-map "\C-\M-n"   'org-metadown)
  (org-defkey org-mode-map "\C-c;"     'flyspell-auto-correct-previous-word)

  (org-defkey org-mode-map "\C-c0"               'pjones:org-hide-all)
  (org-defkey org-mode-map "\C-c1"               'pjones:org-hide-others)
  (org-defkey org-mode-map "\C-j"                'pjones:org-list-append)
  (org-defkey org-mode-map "\C-c\C-j"            'pjones:org-goto)
  (org-defkey org-mode-map [(meta return)]       'pjones:org-list-append)
  (org-defkey org-mode-map [(shift meta return)] 'pjones:org-list-append-with-checkbox)

  ;; Buffer Settings
  (setq save-place nil)

  ;; Exporting
  (setq org-export-html-link-org-files-as-html nil
        org-export-with-sub-superscripts nil
        org-export-with-emphasize nil
        org-export-html-style-default ""
        org-export-html-style-extra ""
        org-export-html-style nil))
(add-hook 'org-mode-hook 'pjones:org-mode-hook)
(add-hook 'org-mode-hook 'whitespace-mode)

(defun pjones:org-agenda-mode-hook ()
{'fraction_non_alphanumeric': 0.16937669376693767, 'fraction_numerical': 0.0022172949002217295, 'mean_word_length': 2.4548936170212765, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '735432', 'n_tokens_mistral': 3057, 'n_tokens_neox': 2959, 'n_words': 525}