about summary refs log tree commit diff
path: root/third_party/lisp/mime4cl (follow)
AgeCommit message (Collapse)AuthorFilesLines
2022-02-02 r/3754 feat: move mblog header handling into mime4clsterni4-2/+34
Accessing the headers of a MIME message feels like something mime4cl should handle. We implemented this ad hoc in mblog before in order to not need to worry about doing it in a sensible way. Now we introduce a decent-ish interface for getting a header from a MIME message, mime-message-header-values: * It returns a list because MIME message headers may appear multiple times. * It decodes RFC2047 only upon request, as you may want to be stricter about parsing certain fields. * It checks header name equality case insensitively. The code for decoding the RFC2047 string is retained and still uses babel for doing the actual decoding. Change-Id: I58bbbe4b46dbded04160b481a28a40d14775673d Reviewed-on: https://cl.tvl.fyi/c/depot/+/5150 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
2022-02-02 r/3749 feat(3p/lisp/mime4cl): cache offset in delimited-input-streamsterni1-19/+39
By computing the amount the stream position advanced we can save a syscall on every read which speeds up mime:mime-body-stream by /a lot/, e.g. extracting a ~3MB attachment drops from over 15s to under ~0.5s. There's still a lot to be gained and correctness left to be desired which can be addressed as described in the newly added comment. Change-Id: I5e1dfd213aac41203f271cf220db456dfb95a02b Reviewed-on: https://cl.tvl.fyi/c/depot/+/5073 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
2022-01-26 r/3677 chore(3p/lisp/mime4cl): remove CMUCL specific codesterni7-18/+11
Having #+cmu all over the place suggests that we maintain CMUCL support or test with CMUCL which is not the case. Change-Id: Ia0828cb1ac48e49acdee6fef7a0fa2c04c1805b3 Reviewed-on: https://cl.tvl.fyi/c/depot/+/5068 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
2022-01-26 r/3676 refactor(3p/lisp/mime4cl): use trivial-gray-streamssterni4-51/+16
This should be a net positive for portability and lets us drop some of the CMUCL cruft (which we don't test anyway, CMU support may have regressed regardless). Change-Id: I85664d82d211177da1db9eebea65c956295b09f7 Reviewed-on: https://cl.tvl.fyi/c/depot/+/5067 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
2022-01-26 r/3675 style(3p/lisp): expand tabs in npg, mime4cl and sclfsterni10-991/+991
Done using find third_party/lisp/{sclf,mime4cl,npg} \ -name '*.lisp' -or -name '*.asd' \ -exec bash -c 'expand -i -t 8 "$0" | sponge "$0"' {} \; Change-Id: If84afac9c1d5cbc74e137a5aa0ae61472f0f1e90 Reviewed-on: https://cl.tvl.fyi/c/depot/+/5066 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
2021-09-12 r/2853 feat(3p/lisp/mime4cl): search for first (default) mime text partsterni2-0/+25
Adds a simple generic function find-mime-text-part which returns the first suitable text/* part in any MIME part it is given. Has no meaningful alternatives handling at the moment: It will pick the first text part and doesn't allow specifying a preference. Change-Id: Id9b113b3ef3ca1a575ce8f3582a4f85e30edfb43 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3379 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
2021-09-01 r/2815 feat(3p/lisp/mime4cl): build using buildLispsterni6-5/+69
The following changes are required to make mime4cl build: * file-position doesn't like to be called with NIL as the position argument, so we have to make sure to not do that in stream-file-position. My workaround is a bit clunky, but works. * Tests discover the sample file via relative path resolution. This doesn't work when they are imported into the nix store as individual files. Instead we make use of the fact that DEFVAR is a no-op if the variable is already defined and inject a file via the nix build that sets the relevant ones. For the path to sample1.msg, we need to create a new variable. Change-Id: I74eeda7bf2c2a4f64cc2b90e72081513ec3285d5 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3270 Tested-by: BuildkiteCI Reviewed-by: grfn <grfn@gws.fyi>
2021-09-01 r/2814 chore(3p/lisp): import mime4cl source tarballsterni13-0/+3313
Used http://wcp.sdf-eu.org/software/mime4cl-20150207T211851.tbz (sha256 5a914669bba7561efe59a4fd0817204c07ad2add98b03ae206ef185ac04affb3). Importing seems sensible since there's no upstream repo nor has their been a release since 2015. This is just an import commit, so the changes made to make it build are more discoverable as their own commit. Change-Id: I2ff28c3c7433abdf7857204bc89eaf9edc0b1cbc Reviewed-on: https://cl.tvl.fyi/c/depot/+/3378 Tested-by: BuildkiteCI Reviewed-by: grfn <grfn@gws.fyi>