Skip to content

Commit

Permalink
Merge: (property) Use 'selective argument to org-entry-get
Browse files Browse the repository at this point in the history
Closes #346.  See also #356.

Reported-by: Bram Schoenmakers <https://github.com/bram85>
Co-developed-by: Bram Schoenmakers <https://github.com/bram85>
  • Loading branch information
alphapapa committed Dec 16, 2023
2 parents 1496185 + c78f785 commit 9a5680c
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 45 deletions.
2 changes: 1 addition & 1 deletion README.org
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@ Simple links may also be written manually in either sexp or non-sexp form, like:

*Fixes*

+ Predicate ~property~ correctly uses the value of ~org-use-property-inheritance~ when not specified ([[https://github.com/alphapapa/org-ql/issues/356][#356]]).
+ Predicate ~property~ correctly uses the value of ~org-use-property-inheritance~ when not specified. ([[https://github.com/alphapapa/org-ql/pull/346][#346]], [[https://github.com/alphapapa/org-ql/issues/356][#356]]. Thanks to [[https://github.com/bram85][Bram Schoenmakers]].)

*Compatibility*

Expand Down
12 changes: 4 additions & 8 deletions org-ql.el
Original file line number Diff line number Diff line change
Expand Up @@ -1823,14 +1823,10 @@ interpreted as nil or non-nil)."
;; otherwise would require ugly special-casing in the parsing).
(when (keywordp property)
(setf property (substring (symbol-name property) 1)))
`(property ,property ,value
:inherit ,(if (plist-member plist :inherit)
(plist-get plist :inherit)
;; TODO: Add tests for these cases.
(pcase org-use-property-inheritance
(`nil nil) (`t t)
((pred stringp) org-use-property-inheritance)
((pred listp) `(quote ,org-use-property-inheritance)))))))
(list 'property property value
:inherit (cond ((plist-member plist :inherit) (plist-get plist :inherit))
((listp org-use-property-inheritance) ''selective)
(t org-use-property-inheritance)))))
;; MAYBE: Should case folding be disabled for properties? What about values?
;; MAYBE: Support (property) without args.

Expand Down
74 changes: 38 additions & 36 deletions org-ql.info
Original file line number Diff line number Diff line change
Expand Up @@ -1097,8 +1097,10 @@ File: README.info, Node: 08-pre, Next: 074, Up: Changelog
*Fixes*

• Predicate ‘property’ correctly uses the value of
‘org-use-property-inheritance’ when not specified (#356
(https://github.com/alphapapa/org-ql/issues/356)).
‘org-use-property-inheritance’ when not specified. (#346
(https://github.com/alphapapa/org-ql/pull/346), #356
(https://github.com/alphapapa/org-ql/issues/356). Thanks to Bram
Schoenmakers (https://github.com/bram85).)

*Compatibility*

Expand Down Expand Up @@ -1897,40 +1899,40 @@ Node: Links38723
Node: Tips39410
Node: Changelog39734
Node: 08-pre40558
Node: 07442864
Node: 07343091
Node: 07243823
Node: 07144742
Node: 0745551
Node: 06348475
Node: 06249006
Node: 06149311
Node: 0649879
Node: 05252935
Node: 05153237
Node: 0553662
Node: 04955193
Node: 04855475
Node: 04755824
Node: 04656233
Node: 04556641
Node: 04457002
Node: 04357361
Node: 04257564
Node: 04157725
Node: 0457972
Node: 03262073
Node: 03162476
Node: 0362673
Node: 02365973
Node: 02266207
Node: 02166487
Node: 0266692
Node: 0170770
Node: Notes70871
Node: Comparison with Org Agenda searches71033
Node: org-sidebar71922
Node: License72201
Node: 07442987
Node: 07343214
Node: 07243946
Node: 07144865
Node: 0745674
Node: 06348598
Node: 06249129
Node: 06149434
Node: 0650002
Node: 05253058
Node: 05153360
Node: 0553785
Node: 04955316
Node: 04855598
Node: 04755947
Node: 04656356
Node: 04556764
Node: 04457125
Node: 04357484
Node: 04257687
Node: 04157848
Node: 0458095
Node: 03262196
Node: 03162599
Node: 0362796
Node: 02366096
Node: 02266330
Node: 02166610
Node: 0266815
Node: 0170893
Node: Notes70994
Node: Comparison with Org Agenda searches71156
Node: org-sidebar72045
Node: License72324

End Tag Table

Expand Down

0 comments on commit 9a5680c

Please sign in to comment.