emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@posteo.net>
To: Marie-Helene Burle <mhburle@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: 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/)]
Date: Fri, 05 Jan 2024 19:13:01 +0000	[thread overview]
Message-ID: <87h6jry4oy.fsf@localhost> (raw)
In-Reply-To: <87il47libr.fsf@westdri.ca>

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>


  parent reply	other threads:[~2024-01-05 19:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2024-01-05 19:53       ` Marie-Helene Burle

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87h6jry4oy.fsf@localhost \
    --to=yantar92@posteo.net \
    --cc=emacs-orgmode@gnu.org \
    --cc=mhburle@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).