GNU bug report logs - #54154
29.0.50; [PATCH] `sieve-manage-getscript' fails if script contains multibyte characters

Previous Next

Package: emacs;

Reported by: "Kai Tetzlaff" <kai.tetzlaff <at> t-online.de>

Date: Fri, 25 Feb 2022 09:20:01 UTC

Severity: normal

Tags: patch

Found in version 29.0.50

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Kai Tetzlaff <emacs+bug <at> tetzco.de>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: herbert <at> gojira.at, 54154 <at> debbugs.gnu.org, larsi <at> gnus.org
Subject: bug#54154: Emacs commit ae963e80a79f5a9184daabfc8197f211a39b136d (sieve-manage)
Date: Sun, 22 Jan 2023 03:12:00 +0100
[Message part 1 (text/plain, inline)]
I've now added an additional patch which automatically handles unix/dos
eol-types when downloading/uploading sieve scripts. So far, if a script
downloaded from the server contained CRLF EOLs, the script buffer was
full of '^M's. With the additional patch
(0005-Autodetect-eol-type-of-sieve-manage-scripts), the EOL type is
detected and used for decoding during script download (and subsequently
also for encoding during upload).

For that, I changed the interface between 'sieve-upload' (in sieve.el),
and 'manage-sieve-putscript' (plus 'sieve-manage-decode' and
'sieve-manage-send' in sieve-manage.el). Instead of transferring the
script data as a string, the functions are now using the actual script
buffer.

The eol-type detection is done in the new function
'sieve-manage--guess-buffer-coding-system'. But I would assume, that
this functionality already exists somewhere else. E.g. 'find-file' must
do a similar, much more detailed analysis. However, that seems to happen
in the C implementation, so it's not directly usable in sieve-manage. Or
am I missing something?


[0001-Fix-bug-in-sieve-manage-append-to-log-and-do-some-re.patch (text/x-diff, attachment)]
[0002-Handle-BYE-in-sieve-manage-server-responses.patch (text/x-diff, attachment)]
[0003-Add-test-lisp-net-sieve-manage-tests.el.patch (text/x-diff, attachment)]
[0004-Some-minor-fixes-in-lisp-net-sieve.el.patch (text/x-diff, attachment)]
[0005-Autodetect-eol-type-of-sieve-manage-scripts.patch (text/x-diff, attachment)]

This bug report was last modified 297 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.