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


Message #135 received at 54154 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: herbert <at> gojira.at
Cc: larsi <at> gnus.org, 54154 <at> debbugs.gnu.org, emacs+bug <at> tetzco.de
Subject: Re: bug#54154: Emacs commit ae963e80a79f5a9184daabfc8197f211a39b136d
 (sieve-manage)
Date: Sun, 29 Sep 2024 13:23:03 +0300
> Cc: larsi <at> gnus.org, 54154 <at> debbugs.gnu.org, emacs+bug <at> tetzco.de
> Date: Sun, 29 Sep 2024 12:29:39 +0300
> From: Eli Zaretskii <eliz <at> gnu.org>
> 
> > - Run emacs -Q
> > - M-x sieve-manage
> > - Input IMAP server (e.g. imap.mailbox.org)
> > 
> > Debugger entered--Lisp error: (wrong-type-argument stringp t)
> >   sieve-manage--append-to-log("sieve-manage: Connecting to imap.mailbox.org..." "\n")
> >   sieve-manage--message("Connecting to %s..." "imap.mailbox.org")
> >   sieve-manage-open("imap.mailbox.org" nil)
> >   sieve-open-server("imap.mailbox.org" nil)
> >   sieve-manage("imap.mailbox.org")
> >   funcall-interactively(sieve-manage "imap.mailbox.org")
> >   command-execute(sieve-manage record)
> >   execute-extended-command(nil "sieve-manage" "sieve-ma")
> >   funcall-interactively(execute-extended-command nil "sieve-manage" "sieve-ma")
> >   command-execute(execute-extended-command)
> > 
> > On 2nd try it works!
> 
> The fix was not merged to the-then master branch, so it is not in
> Emacs 30.  Therefore, it is not a surprise you still see the problem:
> it was only fixed in Emacs 29.
> 
> I lost the context long ago, so I hope Kai will suggest how to handle
> this.

However, it's quite possible that the following band-aid should fix
this particular issue:

diff --git a/lisp/net/sieve-manage.el b/lisp/net/sieve-manage.el
index 0faeb02..da2167c 100644
--- a/lisp/net/sieve-manage.el
+++ b/lisp/net/sieve-manage.el
@@ -178,7 +178,8 @@ sieve-manage--append-to-log
                              (with-current-buffer
                                  (get-buffer-create sieve-manage-log)
                                (set-buffer-multibyte nil)
-                               (buffer-disable-undo)))
+                               (buffer-disable-undo)
+                               (current-buffer)))
       (goto-char (point-max))
       (apply #'insert args))))
 

Can you test this?




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.