|
From: | Stefan Monnier |
Subject: | Re: inverse of add-to-list: remove-from-list |
Date: | Tue, 13 Oct 2020 09:57:13 -0400 |
User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Uwe Brauer [2020-10-13 10:42:46] wrote: > This has always bothered me: for example > > (add-to-list 'org-export-filter-src-block-functions > 'my-html-filter-src-blocks) I think this reflects a misdesign in `org-export-filters-alist`. It should use hooks rather than lists of functions. This way you'd use `add-hook` instead of `add-to-list`. > (remove-from-list 'org-export-filter-src-block-functions > 'my-html-filter-src-blocks) > > Does not exist. Wouldn't that be useful? I think if we want to add something to remove an element from a variable holding a list, then we should make it accept a "place" rather than a symbol as argument. I.e. make it the opposite of `push` (or `cl-pushnew`) rather than the opposite of `add-to-list`. Stefan "who dislikes `add-to-list`"
[Prev in Thread] | Current Thread | [Next in Thread] |