Go to the first, previous, next, last section, table of contents.


Manipulating the entire collection

(collection-create buffer pretty-printer &optional header footer pos)
Create a collection that is displayed in buffer. buffer may be a buffer or a buffer name. It is created if it does not exist. pretty-printer should be a function that takes one argument, a cookie, and inserts a string representing it in the buffer (at point). The string pretty-printer inserts may be empty or span several lines. A trailing newline will always be inserted automatically. The pretty-printer should use insert, and not insert-before-markers. Optional third argument header is a string that will always be present at the top of the collection. header should end with a newline. Optionaly fourth argument footer is similar, and will always be inserted at the bottom of the collection. Optional fifth argument pos is a buffer position, specifying where the collection will be inserted. It defaults to the begining of the buffer. pos will probably default to the current value of (point) in future releases of Elib, so you should not depend on this default in cases where it matters.
(collection-empty collection)
Return true if there are no cookies in collection.
(collection-length collection)
Return the number of cookies in collection.
(collection-list-cookies collection)
Return a list of all cookies in collection.


Go to the first, previous, next, last section, table of contents.