Notes: Add WIP Helm stuff
This commit is contained in:
parent
2831e940eb
commit
c2022b6168
1 changed files with 40 additions and 0 deletions
40
notes.org
40
notes.org
|
|
@ -436,6 +436,46 @@ Also, maybe instead of having a single =date= selector, I should have =scheduled
|
||||||
(not (done)))))
|
(not (done)))))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
|
** Helm
|
||||||
|
|
||||||
|
#+BEGIN_SRC elisp
|
||||||
|
(defun helm-org-ql-heading ()
|
||||||
|
(let* ((path (mapconcat 'identity
|
||||||
|
(nreverse (org-split-string (org-format-outline-path (org-get-outline-path)
|
||||||
|
1000 nil "")
|
||||||
|
""))
|
||||||
|
org-sticky-header-outline-path-reversed-separator))
|
||||||
|
(s (concat (org-sticky-header--get-prefix)
|
||||||
|
(org-get-heading)
|
||||||
|
org-sticky-header-outline-path-reversed-separator
|
||||||
|
path)))
|
||||||
|
(remove-list-of-text-properties 0 (length s) '(line-prefix) s)
|
||||||
|
(s-trim (if (> (length s) (window-width))
|
||||||
|
(concat (substring s 0 (- (window-width) 2))
|
||||||
|
"..")
|
||||||
|
s))))
|
||||||
|
|
||||||
|
(defun helm-org-ql-next ()
|
||||||
|
(interactive)
|
||||||
|
(helm :sources (list (helm-build-sync-source "helm-org-ql"
|
||||||
|
;; :after-init-hook helm-org-rifle-after-init-hook
|
||||||
|
:candidates (lambda ()
|
||||||
|
(or (when-let* ((items (org-ql-select (org-agenda-files)
|
||||||
|
'(todo "NEXT")
|
||||||
|
:action 'element-with-markers
|
||||||
|
:sort '(priority date))))
|
||||||
|
(--map (let* ((marker (org-element-property :org-marker it)))
|
||||||
|
(org-with-point-at marker
|
||||||
|
(cons (helm-org-ql-heading) marker)))
|
||||||
|
items))
|
||||||
|
(list "NONE")))
|
||||||
|
:match 'identity
|
||||||
|
:multiline nil
|
||||||
|
:volatile t
|
||||||
|
:action 'helm-org-rifle-actions
|
||||||
|
:keymap helm-org-rifle-map))))
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
* Profiling
|
* Profiling
|
||||||
|
|
||||||
** Preambles
|
** Preambles
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue