Skip to content

Commit

Permalink
Fix: (org-ql--define-query-preamble-fn) Pcase pattern for Emacs 30
Browse files Browse the repository at this point in the history
Now all tests and lints pass on Emacs versions 27.1-29.4.  But on the
current Emacs snapshot build used in CI, Buttercup is hanging
indefinitely, which may be the same problem that led Guix to disable
the tests in
<https://git.savannah.gnu.org/cgit/guix.git/commit/gnu/packages/emacs-xyz.scm?id=3add97c7761e6c58a1d7405f417a49dda5f0a742>.
But I've no way of knowing whether that's a problem in org-ql (seems
unlikely), Emacs snapshot, or Buttercup.  It would be nice to solve
this before Emacs 30.1 is released, but I don't know how to peer
inside Buttercup to find out what it's hanging on.

Fixes #433.

Reported-by: Akira Komamura <akira.komamura@gmail.com>
Co-developed-by: Stefan Monnier <monnier@iro.umontreal.ca>
  • Loading branch information
alphapapa committed Jun 27, 2024
1 parent 6111981 commit b7d4856
Showing 3 changed files with 56 additions and 51 deletions.
3 changes: 2 additions & 1 deletion README.org
Original file line number Diff line number Diff line change
@@ -556,7 +556,8 @@ Simple links may also be written manually in either sexp or non-sexp form, like:

** 0.9-pre

Nothing new yet.
*Compatibility*
+ Fix compilation error on Emacs 30. ([[https://github.com/alphapapa/org-ql/issues/433][#433]]. Thanks to [[https://github.com/akirak][Akira Komamura]] and [[https://github.com/monnier][Stefan Monnier]].)

*** helm-org-ql

8 changes: 4 additions & 4 deletions org-ql.el
Original file line number Diff line number Diff line change
@@ -1118,10 +1118,10 @@ defined in `org-ql-predicates' by calling `org-ql-defpred'."
;; Only one preamble is allowed
element)
(pcase element
;; FIXME: Should the pattern below be "`(or . ,_)"? It
;; seems to work fine either way, but it seems like it
;; should be changed.
(`(or _) element)
(`(or ,element)
;; A predicate with a single name: unwrap the OR. (Pcase doesn't like
;; "one-armed ORs", giving a "Please avoid it" compilation error.)
element)

,@preamble-patterns

96 changes: 50 additions & 46 deletions org-ql.info
Original file line number Diff line number Diff line change
@@ -1091,7 +1091,11 @@ File: README.info, Node: 09-pre, Next: 087, Up: Changelog
5.1 0.9-pre
===========

Nothing new yet.
*Compatibility*
• Fix compilation error on Emacs 30. (#433
(https://github.com/alphapapa/org-ql/issues/433). Thanks to Akira
Komamura (https://github.com/akirak) and Stefan Monnier
(https://github.com/monnier).)

* Menu:

@@ -2088,51 +2092,51 @@ Node: Links39023
Node: Tips39710
Node: Changelog40034
Node: 09-pre40973
Node: helm-org-ql (1)41122
Node: 08741263
Node: 08642494
Node: 08542728
Node: 08443384
Node: 08343836
Node: 08244177
Node: 08144570
Node: 0844991
Node: 07447715
Node: 07347940
Node: 07248674
Node: 07149595
Node: 0750406
Node: 06353272
Node: 06253805
Node: 06154112
Node: 0654682
Node: 05257738
Node: 05158040
Node: 0558465
Node: 04959996
Node: 04860278
Node: 04760627
Node: 04661036
Node: 04561444
Node: 04461805
Node: 04362164
Node: 04262367
Node: 04162528
Node: 0462775
Node: 03266876
Node: 03167279
Node: 0367476
Node: 02370776
Node: 02271010
Node: 02171290
Node: 0271495
Node: 0175573
Node: Development75674
Node: Copyright assignment75907
Node: Notes76497
Node: Comparison with Org Agenda searches76661
Node: org-sidebar77550
Node: License77829
Node: helm-org-ql (1)41339
Node: 08741480
Node: 08642711
Node: 08542945
Node: 08443601
Node: 08344053
Node: 08244394
Node: 08144787
Node: 0845208
Node: 07447932
Node: 07348157
Node: 07248891
Node: 07149812
Node: 0750623
Node: 06353489
Node: 06254022
Node: 06154329
Node: 0654899
Node: 05257955
Node: 05158257
Node: 0558682
Node: 04960213
Node: 04860495
Node: 04760844
Node: 04661253
Node: 04561661
Node: 04462022
Node: 04362381
Node: 04262584
Node: 04162745
Node: 0462992
Node: 03267093
Node: 03167496
Node: 0367693
Node: 02370993
Node: 02271227
Node: 02171507
Node: 0271712
Node: 0175790
Node: Development75891
Node: Copyright assignment76124
Node: Notes76714
Node: Comparison with Org Agenda searches76878
Node: org-sidebar77767
Node: License78046

End Tag Table

0 comments on commit b7d4856

Please sign in to comment.