Skip to content

Commit

Permalink
fix bug. I am not sure how this worked before. you have to get the or…
Browse files Browse the repository at this point in the history
…g element in the org buffer.
  • Loading branch information
Your Name committed Feb 6, 2024
1 parent f05591d commit 956bb92
Showing 1 changed file with 28 additions and 25 deletions.
53 changes: 28 additions & 25 deletions ore.el
Original file line number Diff line number Diff line change
Expand Up @@ -300,37 +300,40 @@ Perhaps Info node `(org) Tables'?
(defun ore ()
"Help function for the org-mode element at point."
(interactive)
(with-help-window
(help-buffer)
(let* ((oeap (org-element-context))
(ore-func (intern (format "ore-%s" (car oeap))))
(s (if (fboundp ore-func)
(funcall ore-func oeap)
(format
"No documentation found for %s.
(let* ((oeap (org-element-context))
(ore-func (intern (format "ore-%s" (car oeap))))
(s (if (fboundp ore-func)
(funcall ore-func oeap)
(format
"No documentation found for %s.
%s"
(car oeap)
(ore-user-documentation (car oeap))))))
;; There are some special cases.
(cond
((and (eq 'src-block (car oeap))
(ore-src-block-header-p oeap))
(setq s (ore-src-block-header oeap)))

((or (eq 'table (car oeap))
(eq 'table-row (car oeap))
(eq 'table-cell (car oeap)))
(setq s (ore-table oeap)))

((or (eq 'latex-fragment (car oeap))
(eq 'latex-environment (car oeap)))
(setq s (ore-latex oeap))))
(car oeap)
(ore-user-documentation (car oeap))))))
;; There are some special cases.
(cond
((and (eq 'src-block (car oeap))
(ore-src-block-header-p oeap))
(setq s (ore-src-block-header oeap)))

((or (eq 'table (car oeap))
(eq 'table-row (car oeap))
(eq 'table-cell (car oeap)))
(setq s (ore-table oeap)))

((or (eq 'latex-fragment (car oeap))
(eq 'latex-environment (car oeap)))
(setq s (ore-latex oeap))))

(with-help-window
(help-buffer)


(princ s)
(princ "\n\nHere is how org-mode sees the element.\n\n")
(pp oeap)
(emacs-keybinding-command-tooltip-mode))))
(emacs-keybinding-command-tooltip-mode)))
)


(defun match-next-ore-file (&optional limit)
Expand Down

0 comments on commit 956bb92

Please sign in to comment.