Skip to content

Commit

Permalink
avoid org-element parser warnings on finding molds
Browse files Browse the repository at this point in the history
  • Loading branch information
ag91 committed Aug 3, 2024
1 parent b9c4ebd commit 188f655
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
9 changes: 5 additions & 4 deletions moldable-emacs.el
Original file line number Diff line number Diff line change
Expand Up @@ -375,10 +375,11 @@ so with keyword entries, into a org table with headings.
(defun me-first-org-table (&optional buffer)
"Find first org table. Optionally in BUFFER."
(ignore-errors
(with-current-buffer (or buffer (current-buffer)) ;; TODO remove org links in table!
(me-with-org-parent-heading
(re-search-forward org-table-line-regexp nil t)
(me-org-tabletolisp-to-plist (org-table-to-lisp))))))
(when (equal major-mode 'org-mode)
(with-current-buffer (or buffer (current-buffer)) ;; TODO remove org links in table!
(me-with-org-parent-heading
(re-search-forward org-table-line-regexp nil t)
(me-org-tabletolisp-to-plist (org-table-to-lisp)))))))

(defun me-all-flat-org-tables (&optional buffer whole-buffer)
"Find org tables within current headline or in whole buffer if no headline found.
Expand Down
3 changes: 3 additions & 0 deletions molds/contrib.el
Original file line number Diff line number Diff line change
Expand Up @@ -821,6 +821,7 @@ following in your lein project.clj
(me-register-mold
:key "Backlinks as Org"
:given (:fn (and
(equal major-mode 'org-mode)
(me-require 'org-roam)
(org-roam-node-p (org-roam-node-at-point))))
:then (:fn
Expand All @@ -840,6 +841,7 @@ following in your lein project.clj
(me-register-mold
:key "Backlinks as Org With transclusion"
:given (:fn (and
(equal major-mode 'org-mode)
(me-require 'org-roam)
(me-require 'org-transclusion)
(org-roam-node-p (org-roam-node-at-point))))
Expand All @@ -856,6 +858,7 @@ following in your lein project.clj
(me-register-mold
:key "Deep Backlinks as Org"
:given (:fn (and
(equal major-mode 'org-mode)
(me-require 'org-roam)
(org-roam-node-p (org-roam-node-at-point))))
:then (:fn
Expand Down

0 comments on commit 188f655

Please sign in to comment.