Compare commits

...

2 Commits

6 changed files with 225 additions and 198 deletions

View File

@ -1,6 +1,6 @@
(define-package "dash" "20220608.1931" "A modern list library for Emacs"
(define-package "dash" "20221013.836" "A modern list library for Emacs"
'((emacs "24"))
:commit "0ac1ecf6b56eb67bb81a3cf70f8d4354b5782341" :authors
:commit "3df46d7d9fe74f52a661565888e4d31fd760f0df" :authors
'(("Magnar Sveen" . "magnars@gmail.com"))
:maintainer
'("Magnar Sveen" . "magnars@gmail.com")

View File

@ -762,7 +762,15 @@ See also: `-flatten'"
(setq list (apply #'append (mapcar #'-list list))))
list)
(defalias '-concat #'append)
(defalias '-concat #'append
"Concatenate all the arguments and make the result a list.
The result is a list whose elements are the elements of all the arguments.
Each argument may be a list, vector or string.
All arguments except the last argument are copied. The last argument
is just used as the tail of the new list.
\(fn &rest SEQUENCES)")
(defalias '-copy 'copy-sequence
"Create a shallow copy of LIST.

View File

@ -641,8 +641,10 @@ Functions returning a modified copy of the input list.
-- Function: -concat (&rest sequences)
Concatenate all the arguments and make the result a list. The
result is a list whose elements are the elements of all the
arguments. Each argument may be a list, vector or string. The
last argument is not copied, just used as the tail of the new list.
arguments. Each argument may be a list, vector or string.
All arguments except the last argument are copied. The last
argument is just used as the tail of the new list.
(-concat '(1))
⇒ (1)
@ -4469,8 +4471,8 @@ Index
(line 373)
* -fixfn: Function combinators.
(line 224)
* -flatten: List to list. (line 36)
* -flatten-n: List to list. (line 58)
* -flatten: List to list. (line 38)
* -flatten-n: List to list. (line 60)
* -flip: Function combinators.
(line 95)
* -fourth-item: Other list operations.
@ -4482,7 +4484,7 @@ Index
* -if-let: Binding. (line 34)
* -if-let*: Binding. (line 45)
* -inits: Reductions. (line 222)
* -insert-at: List to list. (line 112)
* -insert-at: List to list. (line 114)
* -interleave: Other list operations.
(line 56)
* -interpose: Other list operations.
@ -4555,16 +4557,16 @@ Index
* -reductions-r: Reductions. (line 154)
* -reductions-r-from: Reductions. (line 118)
* -remove: Sublist selection. (line 26)
* -remove-at: List to list. (line 149)
* -remove-at-indices: List to list. (line 162)
* -remove-at: List to list. (line 151)
* -remove-at-indices: List to list. (line 164)
* -remove-first: Sublist selection. (line 44)
* -remove-item: Sublist selection. (line 84)
* -remove-last: Sublist selection. (line 65)
* -repeat: Unfolding. (line 44)
* -replace: List to list. (line 70)
* -replace-at: List to list. (line 123)
* -replace-first: List to list. (line 84)
* -replace-last: List to list. (line 98)
* -replace: List to list. (line 72)
* -replace-at: List to list. (line 125)
* -replace-first: List to list. (line 86)
* -replace-last: List to list. (line 100)
* -rotate: Other list operations.
(line 8)
* -rotate-args: Function combinators.
@ -4618,7 +4620,7 @@ Index
* -union: Set operations. (line 8)
* -unzip: Other list operations.
(line 147)
* -update-at: List to list. (line 135)
* -update-at: List to list. (line 137)
* -when-let: Binding. (line 9)
* -when-let*: Binding. (line 21)
* -zip: Other list operations.
@ -4675,176 +4677,176 @@ Ref: -select-column20467
Node: List to list20930
Ref: -keep21122
Ref: -concat21698
Ref: -flatten22181
Ref: -flatten-n22943
Ref: -replace23327
Ref: -replace-first23788
Ref: -replace-last24283
Ref: -insert-at24771
Ref: -replace-at25096
Ref: -update-at25483
Ref: -remove-at26024
Ref: -remove-at-indices26509
Node: Reductions27088
Ref: -reduce-from27284
Ref: -reduce-r-from28008
Ref: -reduce29271
Ref: -reduce-r30022
Ref: -reductions-from31300
Ref: -reductions-r-from32106
Ref: -reductions32936
Ref: -reductions-r33647
Ref: -count34392
Ref: -sum34622
Ref: -running-sum34810
Ref: -product35131
Ref: -running-product35339
Ref: -inits35680
Ref: -tails35925
Ref: -common-prefix36169
Ref: -common-suffix36463
Ref: -min36757
Ref: -min-by36983
Ref: -max37504
Ref: -max-by37729
Ref: -frequencies38255
Node: Unfolding38870
Ref: -iterate39111
Ref: -unfold39558
Ref: -repeat40363
Ref: -cycle40647
Node: Predicates41046
Ref: -some41223
Ref: -every41652
Ref: -any?42366
Ref: -all?42715
Ref: -none?43457
Ref: -only-some?43777
Ref: -contains?44322
Ref: -is-prefix?44828
Ref: -is-suffix?45160
Ref: -is-infix?45492
Ref: -cons-pair?45852
Node: Partitioning46183
Ref: -split-at46371
Ref: -split-with47035
Ref: -split-on47675
Ref: -split-when48346
Ref: -separate48989
Ref: -partition49523
Ref: -partition-all49972
Ref: -partition-in-steps50397
Ref: -partition-all-in-steps50943
Ref: -partition-by51457
Ref: -partition-by-header51835
Ref: -partition-after-pred52436
Ref: -partition-before-pred52889
Ref: -partition-before-item53274
Ref: -partition-after-item53581
Ref: -group-by53883
Node: Indexing54316
Ref: -elem-index54518
Ref: -elem-indices55005
Ref: -find-index55464
Ref: -find-last-index56133
Ref: -find-indices56784
Ref: -grade-up57546
Ref: -grade-down57953
Node: Set operations58367
Ref: -union58550
Ref: -difference58980
Ref: -intersection59408
Ref: -powerset59837
Ref: -permutations60114
Ref: -distinct60552
Ref: -same-items?60946
Node: Other list operations61555
Ref: -rotate61780
Ref: -cons*62133
Ref: -snoc62555
Ref: -interpose62967
Ref: -interleave63261
Ref: -iota63627
Ref: -zip-with64110
Ref: -zip64824
Ref: -zip-lists65653
Ref: -zip-fill66351
Ref: -unzip66673
Ref: -pad67415
Ref: -table67900
Ref: -table-flat68686
Ref: -first69691
Ref: -last70224
Ref: -first-item70570
Ref: -second-item70982
Ref: -third-item71399
Ref: -fourth-item71774
Ref: -fifth-item72152
Ref: -last-item72527
Ref: -butlast72888
Ref: -sort73133
Ref: -list73625
Ref: -fix74194
Node: Tree operations74683
Ref: -tree-seq74879
Ref: -tree-map75740
Ref: -tree-map-nodes76180
Ref: -tree-reduce77044
Ref: -tree-reduce-from77926
Ref: -tree-mapreduce78526
Ref: -tree-mapreduce-from79385
Ref: -clone80670
Node: Threading macros80997
Ref: ->81222
Ref: ->>81710
Ref: -->82213
Ref: -as->82769
Ref: -some->83223
Ref: -some->>83608
Ref: -some-->84055
Ref: -doto84622
Node: Binding85175
Ref: -when-let85382
Ref: -when-let*85843
Ref: -if-let86372
Ref: -if-let*86738
Ref: -let87361
Ref: -let*93451
Ref: -lambda94388
Ref: -setq95194
Node: Side effects95995
Ref: -each96189
Ref: -each-while96716
Ref: -each-indexed97336
Ref: -each-r97928
Ref: -each-r-while98370
Ref: -dotimes99014
Node: Destructive operations99567
Ref: !cons99785
Ref: !cdr99989
Node: Function combinators100182
Ref: -partial100386
Ref: -rpartial100904
Ref: -juxt101552
Ref: -compose102004
Ref: -applify102611
Ref: -on103041
Ref: -flip103813
Ref: -rotate-args104337
Ref: -const104966
Ref: -cut105308
Ref: -not105788
Ref: -orfn106332
Ref: -andfn107125
Ref: -iteratefn107912
Ref: -fixfn108614
Ref: -prodfn110188
Node: Development111349
Node: Contribute111638
Node: Contributors112650
Node: FDL114743
Node: GPL140063
Node: Index177812
Ref: -flatten22226
Ref: -flatten-n22988
Ref: -replace23372
Ref: -replace-first23833
Ref: -replace-last24328
Ref: -insert-at24816
Ref: -replace-at25141
Ref: -update-at25528
Ref: -remove-at26069
Ref: -remove-at-indices26554
Node: Reductions27133
Ref: -reduce-from27329
Ref: -reduce-r-from28053
Ref: -reduce29316
Ref: -reduce-r30067
Ref: -reductions-from31345
Ref: -reductions-r-from32151
Ref: -reductions32981
Ref: -reductions-r33692
Ref: -count34437
Ref: -sum34667
Ref: -running-sum34855
Ref: -product35176
Ref: -running-product35384
Ref: -inits35725
Ref: -tails35970
Ref: -common-prefix36214
Ref: -common-suffix36508
Ref: -min36802
Ref: -min-by37028
Ref: -max37549
Ref: -max-by37774
Ref: -frequencies38300
Node: Unfolding38915
Ref: -iterate39156
Ref: -unfold39603
Ref: -repeat40408
Ref: -cycle40692
Node: Predicates41091
Ref: -some41268
Ref: -every41697
Ref: -any?42411
Ref: -all?42760
Ref: -none?43502
Ref: -only-some?43822
Ref: -contains?44367
Ref: -is-prefix?44873
Ref: -is-suffix?45205
Ref: -is-infix?45537
Ref: -cons-pair?45897
Node: Partitioning46228
Ref: -split-at46416
Ref: -split-with47080
Ref: -split-on47720
Ref: -split-when48391
Ref: -separate49034
Ref: -partition49568
Ref: -partition-all50017
Ref: -partition-in-steps50442
Ref: -partition-all-in-steps50988
Ref: -partition-by51502
Ref: -partition-by-header51880
Ref: -partition-after-pred52481
Ref: -partition-before-pred52934
Ref: -partition-before-item53319
Ref: -partition-after-item53626
Ref: -group-by53928
Node: Indexing54361
Ref: -elem-index54563
Ref: -elem-indices55050
Ref: -find-index55509
Ref: -find-last-index56178
Ref: -find-indices56829
Ref: -grade-up57591
Ref: -grade-down57998
Node: Set operations58412
Ref: -union58595
Ref: -difference59025
Ref: -intersection59453
Ref: -powerset59882
Ref: -permutations60159
Ref: -distinct60597
Ref: -same-items?60991
Node: Other list operations61600
Ref: -rotate61825
Ref: -cons*62178
Ref: -snoc62600
Ref: -interpose63012
Ref: -interleave63306
Ref: -iota63672
Ref: -zip-with64155
Ref: -zip64869
Ref: -zip-lists65698
Ref: -zip-fill66396
Ref: -unzip66718
Ref: -pad67460
Ref: -table67945
Ref: -table-flat68731
Ref: -first69736
Ref: -last70269
Ref: -first-item70615
Ref: -second-item71027
Ref: -third-item71444
Ref: -fourth-item71819
Ref: -fifth-item72197
Ref: -last-item72572
Ref: -butlast72933
Ref: -sort73178
Ref: -list73670
Ref: -fix74239
Node: Tree operations74728
Ref: -tree-seq74924
Ref: -tree-map75785
Ref: -tree-map-nodes76225
Ref: -tree-reduce77089
Ref: -tree-reduce-from77971
Ref: -tree-mapreduce78571
Ref: -tree-mapreduce-from79430
Ref: -clone80715
Node: Threading macros81042
Ref: ->81267
Ref: ->>81755
Ref: -->82258
Ref: -as->82814
Ref: -some->83268
Ref: -some->>83653
Ref: -some-->84100
Ref: -doto84667
Node: Binding85220
Ref: -when-let85427
Ref: -when-let*85888
Ref: -if-let86417
Ref: -if-let*86783
Ref: -let87406
Ref: -let*93496
Ref: -lambda94433
Ref: -setq95239
Node: Side effects96040
Ref: -each96234
Ref: -each-while96761
Ref: -each-indexed97381
Ref: -each-r97973
Ref: -each-r-while98415
Ref: -dotimes99059
Node: Destructive operations99612
Ref: !cons99830
Ref: !cdr100034
Node: Function combinators100227
Ref: -partial100431
Ref: -rpartial100949
Ref: -juxt101597
Ref: -compose102049
Ref: -applify102656
Ref: -on103086
Ref: -flip103858
Ref: -rotate-args104382
Ref: -const105011
Ref: -cut105353
Ref: -not105833
Ref: -orfn106377
Ref: -andfn107170
Ref: -iteratefn107957
Ref: -fixfn108659
Ref: -prodfn110233
Node: Development111394
Node: Contribute111683
Node: Contributors112695
Node: FDL114788
Node: GPL140108
Node: Index177857

End Tag Table

View File

@ -836,12 +836,21 @@ Work task and home task are determined by the current values of
The checklist consists of a listing of all backlinks to the
current item and its parents (without archives) as well as a
template. The template is determined by the TEMPLATE_ID
property, which must be an ID referencing the proper template
item. If that property is not set, search for the topmost
sibling of the current item and see whether its headline is
matching \"^Template.*\"; if so, use its body as template, and
barf otherwise."
template.
The depth to which backlinks to parents are considered can be
configured via the CHECKLIST_BACKLINK_DEPTH property. This
property is looked up only at the current item, i.e., no
inheritance is considered. If this property is not set, the
depth to which backlinks to parents is considered is unlimited by
default (i.e., nil).
The template is determined by the TEMPLATE_ID property, which
must be an ID referencing the proper template item. If that
property is not set, search for the topmost sibling of the
current item and see whether its headline is matching
\"^Template.*\"; if so, use its body as template, and barf
otherwise."
(interactive)
(unless (derived-mode-p 'org-mode)
@ -876,12 +885,20 @@ barf otherwise."
(unless template-pom
(user-error "Cannot find template via TEMPLATE_ID property or top-most sibling"))
(insert "\nBacklinks (not DONE, no TEMPLATE, all parents, no archives):\n\n")
(org-dblock-write:db/org-backlinks '(:org-ql-match (and
(not (done))
(not (ltags "TEMPLATE")))
:parent-depth nil
:archive nil))
(let ((parent-depth (--when-let (org-entry-get (point) "CHECKLIST_BACKLINK_DEPTH" nil)
(string-to-number it))))
(insert (format "\nBacklinks (not DONE, no TEMPLATE, %s, no archives):\n\n"
(if parent-depth
(format "parent-depth %d" parent-depth)
"all parents")))
(org-dblock-write:db/org-backlinks (list
:org-ql-match '(and
(not (done))
(not (ltags "TEMPLATE")))
:parent-depth (--when-let (org-entry-get (point) "CHECKLIST_BACKLINK_DEPTH" nil)
(string-to-number it))
:archive nil)))
(insert "\n\nTemplate:\n")
(db/org-copy-body-from-item-to-point template-pom)))
@ -1312,7 +1329,7 @@ PARAMS may contain the following values:
(when (and (not (null parent-depth))
(not (integerp parent-depth)))
(user-error ":parent-depth is not an integer"))
(user-error ":parent-depth is not an integer: %s" parent-depth))
;; Get all backlinks as list of Org mode IDs. Each list consists of the ID
;; of the headline (current or partent), followed by the IDs linking back to