Closed mooseyboots closed 1 year ago
Yes, Org 9.6.something changed a lot of things related to org-element. This is probably a limitation we'll have to deal with now. But it probably won't be hard to fix.
I can't promise to get to this soon, so patches welcome.
Thanks for reporting.
Adam Porter @.***> writes:
Yes, Org 9.6.something changed a lot of things related to org-element. This is probably a limitation we'll have to deal with now. But it probably won't be hard to fix.
This particular error is not about changes in org-element. It is about running Org parser in non-Org buffers, which can either lead to parser failing completely or returning garbage. Because of numerous abuses that caused "mysterious" errors, I made parser explicitly throw an error in non-Org buffers.
-- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at https://orgmode.org/. Support Org development at https://liberapay.com/org-mode, or support my work at https://liberapay.com/yantar92
i don't know the library's code, but i just tried adding (org-mode)
to org-web-tools--html-to-org-with-pandoc
(just before calling the offending functions) and it un-broke it for me:
(defun org-web-tools--html-to-org-with-pandoc (html &optional selector)
"Return string of HTML converted to Org with Pandoc.
When SELECTOR is non-nil, the HTML is filtered using
`esxml-query' SELECTOR and re-rendered to HTML with
`org-web-tools--dom-to-html', which see."
(when selector
(setq html (->> (with-temp-buffer
(insert html)
(libxml-parse-html-region 1 (point-max)))
(esxml-query selector)
;; MAYBE: Should probably use `shr-dom-print' instead.
(org-web-tools--dom-to-html))))
(with-temp-buffer
(insert html)
(unless (zerop (call-process-region (point-min) (point-max) "pandoc"
t t nil
(org-web-tools--pandoc-no-wrap-option)
"-f" "html-raw_html-native_divs" "-t" "org"))
;; TODO: Add error output, see org-protocol-capture-html
(error "Pandoc failed"))
(org-mode)
(org-web-tools--clean-pandoc-output)
(buffer-string)))
i'm just not sure if that's all there is to it?
i recently updated my packages, now i receive an error when i try to use
org-web-tools-read-url-as-org
.the backtrace i see looks like this (w url and html args substituted):
i wonder if when updating, org was updated, and the behaviour of
org-element-at-point
has been changed?