Changed link and description of the dblock
Further to this reply - https://github.com/alphapapa/org-ql/pull/184#issuecomment-766868004, I used the buffer name from org-marker element.
This commit is contained in:
parent
87e7e95aa4
commit
5baa0d63dc
1 changed files with 15 additions and 4 deletions
|
|
@ -289,9 +289,19 @@ For example, an org-ql dynamic block header could look like:
|
||||||
(list (cons 'todo (lambda (element)
|
(list (cons 'todo (lambda (element)
|
||||||
(org-element-property :todo-keyword element)))
|
(org-element-property :todo-keyword element)))
|
||||||
(cons 'heading (lambda (element)
|
(cons 'heading (lambda (element)
|
||||||
(org-make-link-string (org-element-property :raw-value element)
|
(org-link-make-string
|
||||||
(org-link-display-format
|
(format "file:%s::%s"
|
||||||
(org-element-property :raw-value element)))))
|
(marker-buffer (org-element-property :org-marker element))
|
||||||
|
(org-element-property :raw-value element))
|
||||||
|
;; Prune statistics cookies. Replace
|
||||||
|
;; links with their description, or
|
||||||
|
;; a plain link if there is none.
|
||||||
|
(org-trim
|
||||||
|
(org-link-display-format
|
||||||
|
(replace-regexp-in-string
|
||||||
|
"\\[[0-9]*\\(?:%\\|/[0-9]*\\)\\]" ""
|
||||||
|
(org-element-property :raw-value element)))))
|
||||||
|
))
|
||||||
(cons 'priority (lambda (element)
|
(cons 'priority (lambda (element)
|
||||||
(--when-let (org-element-property :priority element)
|
(--when-let (org-element-property :priority element)
|
||||||
(char-to-string it))))
|
(char-to-string it))))
|
||||||
|
|
@ -305,7 +315,7 @@ For example, an org-ql dynamic block header could look like:
|
||||||
(org-element-property (intern (concat ":" (upcase property))) element)))))
|
(org-element-property (intern (concat ":" (upcase property))) element)))))
|
||||||
(elements (org-ql-query :from file
|
(elements (org-ql-query :from file
|
||||||
:where query
|
:where query
|
||||||
:select '(org-element-headline-parser (line-end-position))
|
:select 'element-with-markers
|
||||||
:order-by sort)))
|
:order-by sort)))
|
||||||
(when take
|
(when take
|
||||||
(setf elements (cl-etypecase take
|
(setf elements (cl-etypecase take
|
||||||
|
|
@ -334,6 +344,7 @@ For example, an org-ql dynamic block header could look like:
|
||||||
(insert "| " (format-element element) " |" "\n"))
|
(insert "| " (format-element element) " |" "\n"))
|
||||||
(delete-char -1)
|
(delete-char -1)
|
||||||
(org-table-align))))
|
(org-table-align))))
|
||||||
|
|
||||||
;;;; Functions
|
;;;; Functions
|
||||||
|
|
||||||
(cl-defun org-ql-search-directories-files
|
(cl-defun org-ql-search-directories-files
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue