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


Deleting cookies

There are a couple of different ways to delete cookies from the collection.

(tin-delete collection tin)
Delete tin from collection. The cookie that is stored in tin is returned.
(cookie-delete-first collection)
Delete first cookie in collection and return it. Returns nil if there are no cookies left in collection.
(cookie-delete-last collection)
Delete last cookie in collection and return it. Returns nil if there are no cookies left in collection.

The following two functions can be used to delete several cookies that fulfills certain criteria.

(collection-filter-cookies collection predicate &rest extra-args)
Remove all cookies in collection for which predicate returns nil. Note that the buffer for collection will be current-buffer when predicate is called. predicate must restore the current buffer before it returns if it changes it. The predicate is called with cookie as its first argument. If any extra-args are given to collection-filter-cookies they will be passed unmodified to predicate.
(collection-filter-tins collection predicate &rest extra-args)
This is like collection-filter-cookies, but predicate is called with a tin instead of a cookie.

And finally, a way to delete all cookies in one swift function call:

(collection-clear collection)
Remove all cookies in collection.


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