Subject: Re: bug#40280: gnus-cloud doesn't do anything useful

From: David Edmondson <[email-masked]>
Date: Wed, 17 Jun 2020 09:13:29 +0100

On Tuesday, 2020-06-16 at 19:56:05 +01, Basil L. Contovounesios wrote:

>> From a3bdd2219855a72e2ee90de1b6f823c9678a470c Mon Sep 17 00:00:00 2001
>> From: David Edmondson <[email-masked]>
>> Date: Sat, 28 Mar 2020 19:03:58 +0000
>> Subject: [PATCH] gnus-cloud: Improve cloud sync
>>
>> After replaying a set of actions downloaded by gnus-cloud, persist the
>> highest sequence number seen as the local `gnus-cloud-sequence'
>> number, in order that a future download will not unnecessarily replay
>> previously seen actions and any future uploads from this emacs
>> instance use a higher sequence number than that downloaded.
>>
>> Remove the test on whether individual newsrc entries are older than
>> the current time, as that is always going to be the case.
>
> In the future please follow the formatting guidelines for change log
> messages described in the file CONTRIBUTE.

Understood.

> [...]
>
>> --- a/lisp/gnus/gnus-cloud.el
>> +++ b/lisp/gnus/gnus-cloud.el
>> @@ -480,7 +478,9 @@ Otherwise, returns the Gnus Cloud data chunks."
>>            (push (gnus-cloud-parse-chunk) chunks)
>>            (forward-line 1))))
>>      (if update
>> -        (mapcar #'gnus-cloud-update-all chunks)
>> +        (progn
>> +	  (mapcar #'gnus-cloud-update-all chunks)
>> +	  (setq gnus-cloud-sequence highest-sequence-seen))
>>        chunks)))
>
> This change means the result of the mapcar is no longer used or
> returned, giving rise to the following warning:
>
>   In gnus-cloud-download-data:
>   gnus/gnus-cloud.el:482:12: Warning: ‘mapcar’ called for effect; use ‘mapc’ or
>       ‘dolist’ instead
>
> It also makes highest-sequence-seen the return value of
> gnus-cloud-download-data.  Is this intended?

No, it's not an intended change and is not desirable. Presumably
replacing `progn' with `prog1' would properly restore the previous
behaviour.

Should I submit a further patch?

dme.
-- 
J'aurais toujours faim de toi.