Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

org-element-at-point and w3m error #61

Open
OrionRandD opened this issue Nov 3, 2023 · 3 comments
Open

org-element-at-point and w3m error #61

OrionRandD opened this issue Nov 3, 2023 · 3 comments
Milestone

Comments

@OrionRandD
Copy link

I am getting this error now after an Emacs update...

Error running timer ‘org-reveal’: (error "‘org-element-at-point’ cannot be used in non-Org buffer #<buffer w3m> (w3m-mode)") [2 times]

It happens when I am in a w3m buffer, trying to capture it...
with the command:
C-c c
then:
w

I hadn't had such an error in the past...

@alphapapa
Copy link
Owner

This is more fallout from a backwards-incompatible change in Org 9.7.

@yantar92 I understand why this change was made, but perhaps it was a bit premature, given how much breakage it's causing downstream? It would seem appropriate to at least make it a warning for a full major version before making it an error, to give downstream devs and users a break.

@yantar92
Copy link

yantar92 commented Nov 5, 2023 via email

KDr2 pushed a commit to KDr2/org-mode that referenced this issue Nov 6, 2023
…g buffer

* lisp/org-element.el (org-element-at-point): Do not throw an error
when `org-element-at-point' is called from non-Org buffer.  A number
of third-party packages are incorrectly using `org-element-at-point'
this way, relying upon `org-element-at-point' working in certain
scenarios.  Throwing an error (as was done previously) made an urgent
call to fix this problem, even when `org-element-at-point' happened to
work in a particular scenario.  Now, we just display a warning to give
package author more time to address or work around this.

See alphapapa/org-web-tools#61:

    @yantar92 I understand why this change was made, but perhaps it
    was a bit premature, given how much breakage it's causing
    downstream? It would seem appropriate to at least make it a
    warning for a full major version before making it an error, to
    give downstream devs and users a break.
@alphapapa
Copy link
Owner

@yantar92 Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants