emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Emacs 29.1, org-agenda and SCHEDULED entries
@ 2023-08-05  8:20 Christian Barthel
  2023-08-05 11:18 ` Ihor Radchenko
  0 siblings, 1 reply; 3+ messages in thread
From: Christian Barthel @ 2023-08-05  8:20 UTC (permalink / raw)
  To: emacs-orgmode

Hi,

while upgrading from emacs 28.1 to 29.1, my org-agenda stopped working.
The message in the echo area was:

--8<---------------cut here---------------start------------->8---
    Search failed: "\\<SCHEDULED: *<\\([^>]+\\)>"
--8<---------------cut here---------------end--------------->8---

The search seemed to fail in an old org file:

--8<---------------cut here---------------start------------->8---
  * someentry
    SCHEDULED: [2017-12-12 Tue 17:42]
--8<---------------cut here---------------end--------------->8---

Not sure why I've used an inactive timestamp there but it shouldn't
be a problem I guess?

As a workaround, I have updated the `org-schedule-time-regexp` to
match the brackets as well:

--8<---------------cut here---------------start------------->8---
(setq org-scheduled-time-regexp
  (concat "\\<" org-scheduled-string " *[[<]\\([^]>]+\\)[]>]"))
--8<---------------cut here---------------end--------------->8---

With that new regexp, my agenda loads again without errors but
I do wonder:


Was/Is that change on purpose? (I haven't seen anything in the
ChangeLog)

-- 
Christian Barthel


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

* Re: Emacs 29.1, org-agenda and SCHEDULED entries
  2023-08-05  8:20 Emacs 29.1, org-agenda and SCHEDULED entries Christian Barthel
@ 2023-08-05 11:18 ` Ihor Radchenko
  2023-08-18 12:24   ` Ihor Radchenko
  0 siblings, 1 reply; 3+ messages in thread
From: Ihor Radchenko @ 2023-08-05 11:18 UTC (permalink / raw)
  To: Christian Barthel; +Cc: emacs-orgmode

Christian Barthel <bch@online.de> writes:

> while upgrading from emacs 28.1 to 29.1, my org-agenda stopped working.
> The message in the echo area was:
>
> --8<---------------cut here---------------start------------->8---
>     Search failed: "\\<SCHEDULED: *<\\([^>]+\\)>"
> --8<---------------cut here---------------end--------------->8---
>
> The search seemed to fail in an old org file:
>
> --8<---------------cut here---------------start------------->8---
>   * someentry
>     SCHEDULED: [2017-12-12 Tue 17:42]
> --8<---------------cut here---------------end--------------->8---
>
> Not sure why I've used an inactive timestamp there but it shouldn't
> be a problem I guess?

It is exactly the problem.
Inactive timestamps are not allowed in SCHEDULED/DEADLINE.

> Was/Is that change on purpose? (I haven't seen anything in the
> ChangeLog)

Only internals changed. Previously, agenda used a dumb regexp search
using this failing regexp (and skipped your problematic entry
completely). Now, we first query parser cache, which considers your
"someentry" as :scheduled. But agenda expects scheduled items to use
active timestamps all the time, causing the error.

We should update the parser to treat such malformed SCHEDULED/DEADLINE
lines as ordinary paragraphs and report them in org-lint.

-- 
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] 3+ messages in thread

* Re: Emacs 29.1, org-agenda and SCHEDULED entries
  2023-08-05 11:18 ` Ihor Radchenko
@ 2023-08-18 12:24   ` Ihor Radchenko
  0 siblings, 0 replies; 3+ messages in thread
From: Ihor Radchenko @ 2023-08-18 12:24 UTC (permalink / raw)
  To: Christian Barthel; +Cc: emacs-orgmode

Ihor Radchenko <yantar92@posteo.net> writes:

> We should update the parser to treat such malformed SCHEDULED/DEADLINE
> lines as ordinary paragraphs and report them in org-lint.

I went another way, without changing the existing syntax.

org-agenda will now ignore scheduled/deadline with inactive timestamps,
as it did in the past.
org-lint now has a checker that will report such scenarios.
Fixed, on main.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=7cc208af9
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=3cbd9f423

-- 
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] 3+ messages in thread

end of thread, other threads:[~2023-08-18 12:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-05  8:20 Emacs 29.1, org-agenda and SCHEDULED entries Christian Barthel
2023-08-05 11:18 ` Ihor Radchenko
2023-08-18 12:24   ` Ihor Radchenko

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