From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 18 23:47:27 2022 Received: (at submit) by debbugs.gnu.org; 19 Apr 2022 03:47:27 +0000 Received: from localhost ([127.0.0.1]:41306 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ngepq-0004QK-Uz for submit@debbugs.gnu.org; Mon, 18 Apr 2022 23:47:27 -0400 Received: from lists.gnu.org ([209.51.188.17]:32772) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ngepo-0004QC-Sa for submit@debbugs.gnu.org; Mon, 18 Apr 2022 23:47:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41098) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ngepn-0007bM-HV for bug-gnu-emacs@gnu.org; Mon, 18 Apr 2022 23:47:24 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:58302) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ngepn-0002z6-8l for bug-gnu-emacs@gnu.org; Mon, 18 Apr 2022 23:47:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=Date:Subject:To:From:mime-version:in-reply-to: references; bh=UZV7k7QpYCmMSSzuDr9hrOL8fOEZiPICA1vGcKmiils=; b=IhJ7M+msREyvCS xRM85Np60ImGrVj3ZqWbNQnU+gUmNurxOVuH55xUkRTdaFZ1JXpF4/b9VWiZY1tt2imTn1Fe4NThv PsY0M44KjLgJsAuIRAvCNfP4u6nI2hMs8LxZWzJSdUUc2MccIs99JLyMEiZA1T4U0vyEzLo1rlH/n cJGNfbg/t06IvulPsPc/hlBZysfuBnpaxOV9tHhbMLYviwC/YLKVuv33bzOjoL7mmRaUfmylX3VTU iKuRmbs6hq/nYDQFpm38IBiPccGRWYlMUHrsWw38rz+Jo8FH7jGxk/qA5kI+WMIuh+sy2dFdytpdy oFqS53ewLGVGSRdaRiSg==; Received: from rms by fencepost.gnu.org with local (Exim 4.90_1) (envelope-from ) id 1ngepm-00076n-TK; Mon, 18 Apr 2022 23:47:23 -0400 Content-Type: text/plain; charset=Utf-8 From: Richard Stallman To: bug-gnu-emacs@gnu.org Subject: 29.0.50; mml-generate-mime gets error Message-Id: Date: Mon, 18 Apr 2022 23:47:22 -0400 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: rms@gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) I had this in my *mail* buffer (in Mail mode): ====================================================================== Content-Type: text/plain; charset=Utf-8 From: Richard Stallman To: rms Subject: Reply-To: rms@gnu.org Test. <#part type="application/pdf" filename="~/foo.pdf" disposition=attachment> <#/part> ====================================================================== I ran (mml-secure-message-sign-pgpmime), then typed C-c C-c and got an error from mml-generate-mime, that assq returned nil here: (setcdr (assq 'type (cdr (car cont))) content-type)) cont contained this. ====================================================================== ((multipart (sign . "pgpmime") (tag-location . 119) (part (type . "text/plain") (contents . "Test. ")) (part (type . "application/pdf") (filename . "~/foo.pdf") (disposition . "attachment") (tag-location . 152) (contents . "")))) ====================================================================== The code there is kludgy, but in the absence of a precise description of that data structure, I can't directly tell what's wrong. Is there a description somewhere? The rest of the backtrace: setcdr(nil "text/plain; charset=Utf-8") (progn (setcdr (assq 'type (cdr (car cont))) content-type)) (if (and (consp (car cont)) (= (length cont) 1) content-type) (progn (setcdr (assq 'type (cdr (car cont))) content-type))) (if (not cont) nil (if (and (consp (car cont)) (= (length cont) 1) content-type) (progn (setcdr (assq 'type (cdr (car cont))) content-type))) (if (fboundp 'libxml-parse-html-region) (progn (setq cont (mapcar #'mml-expand-all-html-into-multipart-related cont)))) (prog1 (let ((temp-buffer (generate-new-buffer " *temp*" t))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (set-buffer-multibyte nil) (setq message-options options) (cond (... ...) (... ...) (t ...)) (setq options message-options) (buffer-string)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))) (setq message-options options))) (let ((cont (mml-parse)) (mml-multipart-number mml-multipart-number) (options message-options)) (if (not cont) nil (if (and (consp (car cont)) (= (length cont) 1) content-type) (progn (setcdr (assq 'type (cdr (car cont))) content-type))) (if (fboundp 'libxml-parse-html-region) (progn (setq cont (mapcar #'mml-expand-all-html-into-multipart-related cont)))) (prog1 (let ((temp-buffer (generate-new-buffer " *temp*" t))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (set-buffer-multibyte nil) (setq message-options options) (cond ... ... ...) (setq options message-options) (buffer-string)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))) (setq message-options options)))) mml-generate-mime(nil "text/plain; charset=Utf-8") message-encode-message-body() mml-to-mime() mail-send() mail-send-and-exit(nil) In GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 2.24.32, cairo version 1.16.0) of 2022-04-13 built on freetop Repository revision: ed6237e039e6fb51229054d0fce74df074903f19 Repository branch: master System Description: Trisquel GNU/Linux Nabia (10.0) Configured using: 'configure 'CFLAGS=-O0 -g' --with-gnutls=ifavailable' Configured features: CAIRO DBUS FREETYPE GIF GLIB GPM GSETTINGS HARFBUZZ JPEG LIBOTF LIBSELINUX LIBXML2 M17N_FLT MODULES NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS X11 XDBE XIM XPM GTK2 ZLIB Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Mail Minor modes in effect: gpm-mouse-mode: t tooltip-mode: t global-eldoc-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t line-number-mode: t transient-mark-mode: t auto-composition-mode: linux auto-encryption-mode: t auto-compression-mode: t abbrev-mode: t Load-path shadows: None found. Features: (shadow dabbrev emacsbug shortdoc thingatpt misearch multi-isearch cl-extra vc-git diff-mode easy-mmode vc-dispatcher bug-reference help-fns radix-tree cl-print debug backtrace help-mode find-func cus-start cus-load mailalias qp rmailmm message sendmail yank-media rmc puny rfc822 mml mml-sec epa epg rfc6068 epg-config gnus-util text-property-search time-date mm-decode mm-bodies mm-encode mailabbrev gmm-utils mailheader mail-parse rfc2231 rmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils dired-aux dired dired-loaddefs t-mouse term/linux view derived advice finder-inf package browse-url url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf url-util mailcap url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache json map url-vars seq gv subr-x byte-opt bytecomp byte-compile cconv cl-loaddefs cl-lib iso-transl tooltip eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer nadvice simple cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget keymap hashtable-print-readable backquote threads dbusbind inotify dynamic-setting system-font-setting font-render-setting cairo move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 353614 44925) (symbols 48 10482 5) (strings 32 36669 1027) (string-bytes 1 1029513) (vectors 16 19555) (vector-slots 8 219774 25967) (floats 8 97 267) (intervals 56 52273 1191) (buffers 992 35)) [[[ To any NSA and FBI agents reading my email: please consider ]]] [[[ whether defending the US Constitution against all enemies, ]]] [[[ foreign or domestic, requires you to follow Snowden's example. ]]] -- Dr Richard Stallman (https://stallman.org) Chief GNUisance of the GNU Project (https://gnu.org) Founder, Free Software Foundation (https://fsf.org) Internet Hall-of-Famer (https://internethalloffame.org) From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 19 07:44:20 2022 Received: (at 55014) by debbugs.gnu.org; 19 Apr 2022 11:44:20 +0000 Received: from localhost ([127.0.0.1]:41842 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ngmHL-0004Jy-OW for submit@debbugs.gnu.org; Tue, 19 Apr 2022 07:44:19 -0400 Received: from quimby.gnus.org ([95.216.78.240]:34774) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ngmHJ-0004Jj-Tw for 55014@debbugs.gnu.org; Tue, 19 Apr 2022 07:44:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=J/PbGRDz5FUIAgawX0DsUd9C67SRWsv6O1SJIcH+ok8=; b=SplYz8XQizo0MKeS9cJEGRMFxN BfX5svMYFLdD5Lgr5XbdzSY7cgLlofY4M76cPukYBHMN18nbKyDtkb3nwROS70i6SLgaCwSDqqTYh TdFvb8OjoWLxCNe13sMzhnLNOm8FJdkf+blhXwF9UXdVspnFilCDRkDjwwbwJ71sGUO0=; Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ngmHA-0006Qh-Ui; Tue, 19 Apr 2022 13:44:11 +0200 From: Lars Ingebrigtsen To: Richard Stallman Subject: Re: bug#55014: 29.0.50; mml-generate-mime gets error References: X-Now-Playing: AR Kane's _Single Collection (1)_: "Butterfly Collector " Date: Tue, 19 Apr 2022 13:44:08 +0200 In-Reply-To: (Richard Stallman's message of "Mon, 18 Apr 2022 23:47:22 -0400") Message-ID: <87ee1tcn7b.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Richard Stallman writes: > I had this in my *mail* buffer (in Mail mode): > > ====================================================================== > Content-Type: text/plain; charset=Utf-8 > From: Richard Stallman List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Richard Stallman writes: > I had this in my *mail* buffer (in Mail mode): > > ====================================================================== > Content-Type: text/plain; charset=Utf-8 > From: Richard Stallman > To: rms > Subject: > Reply-To: rms@gnu.org > > Test. > > <#part type="application/pdf" filename="~/foo.pdf" disposition=attachment> > <#/part> > ====================================================================== > > I ran (mml-secure-message-sign-pgpmime), then typed C-c C-c > and got an error from mml-generate-mime, that assq returned nil here: > > (setcdr (assq 'type (cdr (car cont))) content-type)) > > cont contained this. This is because you're asking Emacs to do something impossible -- you've put a header into the buffer saying it's a text/plain message, but you're trying to create a multipart message. So if you remove that Content-Type header, things will work fine. I've now added a test for this situation so that it doesn't bug out in Emacs 29. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 19 07:44:26 2022 Received: (at control) by debbugs.gnu.org; 19 Apr 2022 11:44:26 +0000 Received: from localhost ([127.0.0.1]:41846 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ngmHS-0004KO-1H for submit@debbugs.gnu.org; Tue, 19 Apr 2022 07:44:26 -0400 Received: from quimby.gnus.org ([95.216.78.240]:34788) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ngmHQ-0004Jw-Jc for control@debbugs.gnu.org; Tue, 19 Apr 2022 07:44:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=8+8kc+mvRzNwUYDAx+91vtw+GHXJVwXsy/oB+cDm/cQ=; b=JdqF4as45I/DAH5jOiCJNFEQMA 0Mak0lhUVUTy2u88YA1RALEhjTSB4LDfoNK9E0L8pG1rFkpqUcHD5mLE5mKG9GuAfoHruTGdZgE1w GLvZxWB+Ma8m8kZA08C2CYW4JYKLdAACOwinhZuCkgNCtl0ChnBnQri9D6SMtkKCi9TI=; Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ngmHI-0006Qo-OG for control@debbugs.gnu.org; Tue, 19 Apr 2022 13:44:18 +0200 Date: Tue, 19 Apr 2022 13:44:13 +0200 Message-Id: <87czhdcn76.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #55014 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: close 55014 29.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) close 55014 29.1 quit From unknown Sun Aug 10 16:48:39 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 18 May 2022 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator