From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 24539 invoked from network); 11 Jan 2023 18:16:45 -0000 Received: from mx1.math.uh.edu (129.7.128.32) by inbox.vuxu.org with ESMTPUTF8; 11 Jan 2023 18:16:45 -0000 Received: from lists1.math.uh.edu ([129.7.128.208]) by mx1.math.uh.edu with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1pFfeX-006yT4-05 for ml@inbox.vuxu.org; Wed, 11 Jan 2023 12:16:45 -0600 Received: from lists1.math.uh.edu ([127.0.0.1] helo=lists.math.uh.edu) by lists1.math.uh.edu with smtp (Exim 4.96) (envelope-from ) id 1pFfeW-005L0s-2G for ml@inbox.vuxu.org; Wed, 11 Jan 2023 12:16:44 -0600 Received: from mx2.math.uh.edu ([129.7.128.33]) by lists1.math.uh.edu with esmtp (Exim 4.96) (envelope-from ) id 1pEG1z-0059T6-0n for ding@lists.math.uh.edu; Sat, 07 Jan 2023 14:43:07 -0600 Received: from quimby.gnus.org ([95.216.78.240]) by mx2.math.uh.edu with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1pEG1w-001szt-Nk for ding@lists.math.uh.edu; Sat, 07 Jan 2023 14:43:06 -0600 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:Date:Subject:To:From: Sender:Reply-To:Cc: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=I+yqUeEXHVepG7ysHv/GLX6gO6IcVL+NvUgsnXUnp/U=; b=Fds2H3nHKqBLyxRZIouYqa9Lwf M7avHQvRuiZG4ufDn1vByN3TUk5rAPVtK0g9VEq/FB4kJJsxWFxXApO+ynwOxqZo6BJRutmN2IBTv tlCp7vXcmQUWxVfoD4djIQJsC6/z+fIeK3zBf8OK58H1xFVuNlcYR+rEBx8kS1+q3GBI=; Received: from out-6.mta0.migadu.com ([2001:41d0:1004:224b::6]) by quimby.gnus.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pEG1n-0006Yf-VY for ding@gnus.org; Sat, 07 Jan 2023 21:42:59 +0100 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=boula.in; s=key1; t=1673124173; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=I+yqUeEXHVepG7ysHv/GLX6gO6IcVL+NvUgsnXUnp/U=; b=g7GyWBaqmPAr8udhQ9BHvbE/Fd9QaIee+37eC+1u0YBIvakniM1ZmOSm5vVfAMggc6kBaV 4bnODm3EjZkmNqZtn0UOI4k2jagFHICC0v3DHJTlnhZ1bSnNuRM41BmpN4OxM4rFwUVvb2 n4c9X3l5qtyxknPZZFyYcnUEzQmvxSpCUjDl9j1ysuKxTiaSJ36qgf4zPyVZ9Yo0pvkhBp OWT+fnys3wsJPX0bpyE/+Pg/LGDK62K/kW1TOvDljsV9yOBIxLuTlq5lO065CeOlQzyNP6 inycQVPIsJs1nHyBSjMYSh5EULVj4PQlxWjhzR8uLEruumOmMqlkPUGN+MyLAQ== From: Kevin Boulain To: ding@gnus.org Subject: Does gnus-summary-move-article need to clear the marks? Date: Sat, 07 Jan 2023 21:42:45 +0100 Message-ID: <875ydirs8q.fsf@boula.in> MIME-Version: 1.0 Content-Type: text/plain X-Migadu-Flow: FLOW_OUT List-ID: Precedence: bulk Hey, I'm trying out Gnus and the IMAP server from which I'm getting my emails is running a Sieve script that takes some actions, including setting a bunch of IMAP keywords/flags ('client' ones, not the system ones like \Seen as per https://www.rfc-editor.org/rfc/rfc3501#section-2.3.2). When an email with these custom flags is marked as read (via 'd', gnus-summary-mark-as-read-forward) and moved to another IMAP folder (via 'B m', gnus-summary-move-article) it loses its flags. In the IMAP log (that I got with nnimap-record-commands) I can see: UID STORE 65 FLAGS.SILENT (\Seen) A quick Edebug breakpoint on nnimap-request-set-mark (where the magic seems to happen) gives the following backtrace: nnimap-request-set-mark("INBOX" (((65) set (read)) ((65) del (unexist seen forward unsend download cache save score dormant bookmark killed expire reply tick))) "$SERVER") gnus-request-set-mark("nnimap+$SERVER:INBOX" (((65) set (read)) ((65) del (unexist seen forward unsend download cache save score dormant bookmark killed expire reply tick)))) gnus-summary-push-marks-to-backend(65) gnus-summary-move-article(nil) funcall-interactively(gnus-summary-move-article nil) command-execute(gnus-summary-move-article) So the issue appears to be that gnus-summary-push-marks-to-backend calls gnus-request-set-mark with 'set: https://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/gnus/gnus-sum.el?h=emacs-28.2#n10390 Should it be 'add instead, which should preserve the set of flags? https://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/gnus/nnimap.el?h=emacs-28.2#n1243 Similarly to what marking as read does: UID STORE 67 +FLAGS.SILENT (\Seen) >From around here: https://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/gnus/gnus-sum.el?h=emacs-28.2#n12896