all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [BUG] org-element-at-point: Throw an error when not in org-mode [9.7-pre (release_9.6.15-1033-gd8586f @ /home/marie/.emacs.d/straight/build/org/)]
@ 2024-01-04 20:46 Marie-Helene Burle
  2024-01-05 12:30 ` Ihor Radchenko
  0 siblings, 1 reply; 6+ messages in thread
From: Marie-Helene Burle @ 2024-01-04 20:46 UTC (permalink / raw)
  To: emacs-orgmode


Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

     https://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org mailing list.
------------------------------------------------------------------------

I suspect that this has already been reported as I saw it here: https://www.mail-archive.com/emacs-elpa-diffs@gnu.org/msg102743.html.

Just wanted to make sure it got to the right channel. Apologies for a useless message if it already did.

Noticed this problem with org 9.7. Used to be no problem with prior version.

Also mentioned in https://www.reddit.com/r/emacs/comments/18gkx0i/orgelementatpoint_cannot_be_used_in_nonorg_buffer/.

In my case, I get the error when using `org-meta-return` in non-org buffers.

I then get either of these error messages:

Warning (org-element): ‘org-element-at-point’ cannot be used in non-Org buffer
Warning (org-element): org-element--cache: Org parser error in <my-file>. Resetting.

Thank you.

Emacs  : GNU Emacs 29.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.38, cairo version 1.17.8)
Package: Org mode version 9.7-pre (release_9.6.15-1033-gd8586f @ /home/marie/.emacs.d/straight/build/org/)


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [BUG] org-element-at-point: Throw an error when not in org-mode [9.7-pre (release_9.6.15-1033-gd8586f @ /home/marie/.emacs.d/straight/build/org/)]
  2024-01-04 20:46 [BUG] org-element-at-point: Throw an error when not in org-mode [9.7-pre (release_9.6.15-1033-gd8586f @ /home/marie/.emacs.d/straight/build/org/)] Marie-Helene Burle
@ 2024-01-05 12:30 ` Ihor Radchenko
  2024-01-05 18:48   ` Marie-Helene Burle
  0 siblings, 1 reply; 6+ messages in thread
From: Ihor Radchenko @ 2024-01-05 12:30 UTC (permalink / raw)
  To: Marie-Helene Burle; +Cc: emacs-orgmode

Marie-Helene Burle <mhburle@gmail.com> writes:

> I suspect that this has already been reported as I saw it here: https://www.mail-archive.com/emacs-elpa-diffs@gnu.org/msg102743.html.

This is just a reference to the commit that introduced the explicit
error. Do note that the error got downgraded to a warning in a more
recent development version of Org mode. But the warning still indicates
inappropriate usage of Org functions that are designed to work in Org
mode and expect Org mode buffer.

> Just wanted to make sure it got to the right channel. Apologies for a
> useless message if it already did.
>
> Noticed this problem with org 9.7. Used to be no problem with prior version.
>
> Also mentioned in https://www.reddit.com/r/emacs/comments/18gkx0i/orgelementatpoint_cannot_be_used_in_nonorg_buffer/.

> In my case, I get the error when using `org-meta-return` in non-org buffers.

> I then get either of these error messages:
>
> Warning (org-element): ‘org-element-at-point’ cannot be used in non-Org buffer
> Warning (org-element): org-element--cache: Org parser error in <my-file>. Resetting.

`org-meta-return' cannot be used in non-Org buffers. Just as the error
states. May you please explain why you are trying to use Org mode
command outside Org mode?

Not a bug, although we can still discuss your use case.
Canceled. (as a bug)

-- 
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>


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [BUG] org-element-at-point: Throw an error when not in org-mode [9.7-pre (release_9.6.15-1033-gd8586f @ /home/marie/.emacs.d/straight/build/org/)]
  2024-01-05 12:30 ` Ihor Radchenko
@ 2024-01-05 18:48   ` Marie-Helene Burle
  2024-01-05 19:07     ` Marie-Helene Burle
  2024-01-05 19:13     ` Ihor Radchenko
  0 siblings, 2 replies; 6+ messages in thread
From: Marie-Helene Burle @ 2024-01-05 18:48 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: emacs-orgmode

Hi Ihor,

Thank you for your reply and your explanations: very useful to learn how the system works 🙂

Prior to org 9.7, I used to use `org-meta-return` everywhere to nicely add elements to a list. Whether in mu4e, markdown, or anywhere, typing:

- item1 <org-meta-return>

Would nicely give me:

- item1
-

Not a big deal you will say. But I liked the behaviour.

I know that org functions (with the exception of `org-open-at-point-global` and maybe a few others intended to work everywhere) are only supposed to work in org buffers. But many functions actually used to work outside of org, even if that was never intended. I took advantage of that 😄

So, indeed, not a bug and probably nothing you want to worry about. I'll just have to learn to live without those nice little org behaviours in non-org buffers.

Note that the Reddit thread I linked in my prior email suggests that I am not the only one who took advantage of this. I don't know what org function that other user was using in non-org buffer, but it used to work and stopped in 9.7.

Deep thanks for all the work,

Best,

Marie

--
Marie-Helene Burle
Research Solutions Specialist
Research Computing | Simon Fraser University
Digital Research Alliance of Canada
https://www.sfu.ca/~msb2/


Ihor Radchenko <yantar92@posteo.net> writes:

> Marie-Helene Burle <mhburle@gmail.com> writes:
>
>> I suspect that this has already been reported as I saw it here: https://www.mail-archive.com/emacs-elpa-diffs@gnu.org/msg102743.html.
>
> This is just a reference to the commit that introduced the explicit
> error. Do note that the error got downgraded to a warning in a more
> recent development version of Org mode. But the warning still indicates
> inappropriate usage of Org functions that are designed to work in Org
> mode and expect Org mode buffer.
>
>> Just wanted to make sure it got to the right channel. Apologies for a
>> useless message if it already did.
>>
>> Noticed this problem with org 9.7. Used to be no problem with prior version.
>>
>> Also mentioned in https://www.reddit.com/r/emacs/comments/18gkx0i/orgelementatpoint_cannot_be_used_in_nonorg_buffer/.
>
>> In my case, I get the error when using `org-meta-return` in non-org buffers.
>
>> I then get either of these error messages:
>>
>> Warning (org-element): ‘org-element-at-point’ cannot be used in non-Org buffer
>> Warning (org-element): org-element--cache: Org parser error in <my-file>. Resetting.
>
> `org-meta-return' cannot be used in non-Org buffers. Just as the error
> states. May you please explain why you are trying to use Org mode
> command outside Org mode?
>
> Not a bug, although we can still discuss your use case.
> Canceled. (as a bug)



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [BUG] org-element-at-point: Throw an error when not in org-mode [9.7-pre (release_9.6.15-1033-gd8586f @ /home/marie/.emacs.d/straight/build/org/)]
  2024-01-05 18:48   ` Marie-Helene Burle
@ 2024-01-05 19:07     ` Marie-Helene Burle
  2024-01-05 19:13     ` Ihor Radchenko
  1 sibling, 0 replies; 6+ messages in thread
From: Marie-Helene Burle @ 2024-01-05 19:07 UTC (permalink / raw)
  To: Ihor Radchenko, emacs-orgmode; +Cc: emacs-orgmode

Note: actually, reading that Reddit thread again, it appears that multiple persons were doing this and they regret loosing the use of org functions in non-org buffers so much that they decided to pin org to 9.6...

Marie

Marie-Helene Burle <mhburle@gmail.com> writes:

> Hi Ihor,
>
> Thank you for your reply and your explanations: very useful to learn how the system works 🙂
>
> Prior to org 9.7, I used to use `org-meta-return` everywhere to nicely add elements to a list. Whether in mu4e, markdown, or anywhere, typing:
>
> - item1 <org-meta-return>
>
> Would nicely give me:
>
> - item1
> -
>
> Not a big deal you will say. But I liked the behaviour.
>
> I know that org functions (with the exception of
> `org-open-at-point-global` and maybe a few others intended to work
> everywhere) are only supposed to work in org buffers. But many
> functions actually used to work outside of org, even if that was never
> intended. I took advantage of that 😄
>
> So, indeed, not a bug and probably nothing you want to worry about. I'll just have to learn to live without those nice little org behaviours in non-org buffers.
>
> Note that the Reddit thread I linked in my prior email suggests that I
> am not the only one who took advantage of this. I don't know what org
> function that other user was using in non-org buffer, but it used to
> work and stopped in 9.7.
>
> Deep thanks for all the work,
>
> Best,
>
> Marie



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [BUG] org-element-at-point: Throw an error when not in org-mode [9.7-pre (release_9.6.15-1033-gd8586f @ /home/marie/.emacs.d/straight/build/org/)]
  2024-01-05 18:48   ` Marie-Helene Burle
  2024-01-05 19:07     ` Marie-Helene Burle
@ 2024-01-05 19:13     ` Ihor Radchenko
  2024-01-05 19:53       ` Marie-Helene Burle
  1 sibling, 1 reply; 6+ messages in thread
From: Ihor Radchenko @ 2024-01-05 19:13 UTC (permalink / raw)
  To: Marie-Helene Burle; +Cc: emacs-orgmode

Marie-Helene Burle <mhburle@gmail.com> writes:

> Prior to org 9.7, I used to use `org-meta-return` everywhere to nicely add elements to a list. Whether in mu4e, markdown, or anywhere, typing:
>
> - item1 <org-meta-return>
>
> Would nicely give me:
>
> - item1
> -
> ...
> So, indeed, not a bug and probably nothing you want to worry about. I'll just have to learn to live without those nice little org behaviours in non-org buffers.
>
> Note that the Reddit thread I linked in my prior email suggests that I am not the only one who took advantage of this. I don't know what org function that other user was using in non-org buffer, but it used to work and stopped in 9.7.

You can still use org-meta-return at your own risk if you upgrade to the
latest Org mode. Just hide the warning message that is now displayed in
place of the error.

The reason org-meta-return and some other functions worked in the past
is their internal implementation based on regular expressions. In the
newer Org mode, we are switching to internal implementation based on Org
parser - it is more accurate and fixes various bugs, but can fail
unpredictably when not in Org mode buffer.

In future, there is a chance that Org parser will be able to run without
errors (although not necessarily accurately) in non-Org buffers, but it
is not something I am specifically looking to fix - rather a side effect
of some planned changes.

-- 
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>


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [BUG] org-element-at-point: Throw an error when not in org-mode [9.7-pre (release_9.6.15-1033-gd8586f @ /home/marie/.emacs.d/straight/build/org/)]
  2024-01-05 19:13     ` Ihor Radchenko
@ 2024-01-05 19:53       ` Marie-Helene Burle
  0 siblings, 0 replies; 6+ messages in thread
From: Marie-Helene Burle @ 2024-01-05 19:53 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: emacs-orgmode

I see. That makes sense.

Thank you very much for getting back to me with info. This is much appreciated!

Marie


Ihor Radchenko <yantar92@posteo.net> writes:

> Marie-Helene Burle <mhburle@gmail.com> writes:
>
>> Prior to org 9.7, I used to use `org-meta-return` everywhere to nicely add elements to a list. Whether in mu4e, markdown, or anywhere, typing:
>>
>> - item1 <org-meta-return>
>>
>> Would nicely give me:
>>
>> - item1
>> -
>> ...
>> So, indeed, not a bug and probably nothing you want to worry about. I'll just have to learn to live without those nice little org behaviours in non-org buffers.
>>
>> Note that the Reddit thread I linked in my prior email suggests that
>> I am not the only one who took advantage of this. I don't know what
>> org function that other user was using in non-org buffer, but it
>> used to work and stopped in 9.7.
>
> You can still use org-meta-return at your own risk if you upgrade to the
> latest Org mode. Just hide the warning message that is now displayed in
> place of the error.
>
> The reason org-meta-return and some other functions worked in the past
> is their internal implementation based on regular expressions. In the
> newer Org mode, we are switching to internal implementation based on Org
> parser - it is more accurate and fixes various bugs, but can fail
> unpredictably when not in Org mode buffer.
>
> In future, there is a chance that Org parser will be able to run without
> errors (although not necessarily accurately) in non-Org buffers, but it
> is not something I am specifically looking to fix - rather a side effect
> of some planned changes.



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-01-05 19:55 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-04 20:46 [BUG] org-element-at-point: Throw an error when not in org-mode [9.7-pre (release_9.6.15-1033-gd8586f @ /home/marie/.emacs.d/straight/build/org/)] Marie-Helene Burle
2024-01-05 12:30 ` Ihor Radchenko
2024-01-05 18:48   ` Marie-Helene Burle
2024-01-05 19:07     ` Marie-Helene Burle
2024-01-05 19:13     ` Ihor Radchenko
2024-01-05 19:53       ` Marie-Helene Burle

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.