From 8a0aaca5c969eb33f01f3cb54803bc30a1ba5c87 Mon Sep 17 00:00:00 2001 From: Mountain Man <43313373+MountainMan1312@users.noreply.github.com> Date: Tue, 21 Nov 2023 01:44:32 -0500 Subject: Undo commit a few commits back, or maybe just get rid of most of it --- init.el | 121 ---------------------------------------------------------------- 1 file changed, 121 deletions(-) (limited to 'init.el') diff --git a/init.el b/init.el index a213686..d8ddbcf 100644 --- a/init.el +++ b/init.el @@ -1269,127 +1269,6 @@ :todo "NEXT") (:discard (:anything t))))))))))) -;; Make all time-grid entries, including ones from :LOGBOOK:, look the same -(defun org-agenda-get-progress () - "Return the logged TODO entries for agenda display." - (with-no-warnings (defvar date)) - (let* ((props (list 'mouse-face 'highlight - 'org-not-done-regexp org-not-done-regexp - 'org-todo-regexp org-todo-regexp - 'org-complex-heading-regexp org-complex-heading-regexp - 'help-echo - (format "mouse-2 or RET jump to org file %s" - (abbreviate-file-name buffer-file-name)))) - (items (if (consp org-agenda-show-log-scoped) - org-agenda-show-log-scoped - (if (eq org-agenda-show-log-scoped 'clockcheck) - '(clock) - org-agenda-log-mode-items))) - (parts - (delq nil - (list - (when (memq 'closed items) (concat "\\<" org-closed-string)) - (when (memq 'clock items) (concat "\\<" org-clock-string)) - (when (memq 'state items) - (format "- +State \"%s\".*?" org-todo-regexp))))) - (parts-re (if parts (mapconcat #'identity parts "\\|") - (error "`org-agenda-log-mode-items' is empty"))) - (regexp (concat - "\\(" parts-re "\\)" - " *\\[" - (regexp-quote - (substring - (format-time-string - (org-time-stamp-format) - (org-encode-time ; DATE bound by calendar - 0 0 0 (nth 1 date) (car date) (nth 2 date))) - 1 11)))) - (org-agenda-search-headline-for-time nil) - marker hdmarker priority category level tags closedp type - statep clockp state ee txt extra timestr rest clocked inherited-tags - effort effort-minutes) - (goto-char (point-min)) - (while (re-search-forward regexp nil t) - (catch :skip - (org-agenda-skip) - (setq marker (org-agenda-new-marker (match-beginning 0)) - closedp (equal (match-string 1) org-closed-string) - statep (equal (string-to-char (match-string 1)) ?-) - clockp (not (or closedp statep)) - state (and statep (match-string 2)) - category (org-get-category (match-beginning 0)) - timestr (buffer-substring (match-beginning 0) (line-end-position)) - effort (save-match-data (or (get-text-property (point) 'effort) - (org-entry-get (point) org-effort-property)))) - (setq effort-minutes (when effort (save-match-data (org-duration-to-minutes effort)))) - (when (string-match "\\]" timestr) - ;; substring should only run to end of time stamp - (setq rest (substring timestr (match-end 0)) - timestr (substring timestr 0 (match-end 0))) - (if (and (not closedp) (not statep) - (string-match "\\([0-9]\\{1,2\\}:[0-9]\\{2\\}\\)\\].*?\\([0-9]\\{1,2\\}:[0-9]\\{2\\}\\)" - rest)) - (progn (setq timestr (concat (substring timestr 0 -1) - "-" (match-string 1 rest) "]")) - (setq clocked (match-string 2 rest))) - ;; THIS IS CHANGED from a single dash "-" to "CLOCKED" - (setq clocked "CLOCKED"))) - (save-excursion - (setq extra - (cond - ((not org-agenda-log-mode-add-notes) nil) - (statep - (and (looking-at ".*\\\\\n[ \t]*\\([^-\n \t].*?\\)[ \t]*$") - (match-string 1))) - (clockp - (and (looking-at ".*\n[ \t]*-[ \t]+\\([^-\n \t].*?\\)[ \t]*$") - (match-string 1))))) - (if (not (re-search-backward org-outline-regexp-bol nil t)) - (throw :skip nil) - (goto-char (match-beginning 0)) - (setq hdmarker (org-agenda-new-marker) - inherited-tags - (or (eq org-agenda-show-inherited-tags 'always) - (and (listp org-agenda-show-inherited-tags) - (memq 'todo org-agenda-show-inherited-tags)) - (and (eq org-agenda-show-inherited-tags t) - (or (eq org-agenda-use-tag-inheritance t) - (memq 'todo org-agenda-use-tag-inheritance)))) - tags (org-get-tags nil (not inherited-tags)) - level (make-string (org-reduced-level (org-outline-level)) ? )) - (looking-at "\\*+[ \t]+\\([^\r\n]+\\)") - (setq txt (match-string 1)) - ;; MAYBE DELETE NEXT 5 LINES - (when extra - (if (string-match "\\([ \t]+\\)\\(:[^ \n\t]*?:\\)[ \t]*$" txt) - (setq txt (concat (substring txt 0 (match-beginning 1)) - " - " extra " " (match-string 2 txt))) - (setq txt (concat txt " - " extra)))) - (setq txt (org-agenda-format-item - (cond - ;; CHANGES ARE HERE - (closedp (concat "Closed: " "CLOSED" (spaces-string 6))) - (statep (concat "State: " state (spaces-string (- 12 (length state))))) - (t (concat "Clocked: " clocked (spaces-string (- 12 (length clocked)))))) - ;; END CHANGES - (org-add-props txt nil - 'effort effort - 'effort-minutes effort-minutes) - level category tags timestr))) - (setq type (cond (closedp "closed") - (statep "state") - (t "clock"))) - (setq priority 100000) - (org-add-props txt props - 'org-marker marker 'org-hd-marker hdmarker 'face 'org-agenda-done - 'urgency priority 'priority priority 'level level - 'effort effort 'effort-minutes effort-minutes - 'type type 'date date - 'undone-face 'org-warning 'done-face 'org-agenda-done) - (push txt ee)) - (goto-char (line-end-position)))) - (nreverse ee))) - ;; Update agenda periodically every `mm/refresh-agenda-time-seconds' seconds. ;; This was taken from https://emacs.stackexchange.com/a/68767/38877 ;; (defvar mm/refresh-agenda-time-seconds 15) -- cgit v1.2.3