* Does gnus-summary-move-article need to clear the marks?
@ 2023-01-07 20:42 Kevin Boulain
2023-01-11 19:07 ` Kevin Boulain
0 siblings, 1 reply; 2+ messages in thread
From: Kevin Boulain @ 2023-01-07 20:42 UTC (permalink / raw)
To: ding
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Does gnus-summary-move-article need to clear the marks?
2023-01-07 20:42 Does gnus-summary-move-article need to clear the marks? Kevin Boulain
@ 2023-01-11 19:07 ` Kevin Boulain
0 siblings, 0 replies; 2+ messages in thread
From: Kevin Boulain @ 2023-01-11 19:07 UTC (permalink / raw)
To: Kevin Boulain; +Cc: ding
Please disregard this message: it took a few days to show up and I've
double posted at
https://lists.gnu.org/archive/html/info-gnus-english/2023-01/msg00005.html
(with an example patch).
Sorry for the noise.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-01-11 19:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-07 20:42 Does gnus-summary-move-article need to clear the marks? Kevin Boulain
2023-01-11 19:07 ` Kevin Boulain
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).