From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: ** X-Spam-Status: No, score=2.4 required=5.0 tests=BULK_RE_SUSP_NTLD,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FROM_SUSPICIOUS_NTLD,PDS_OTHER_BAD_TLD, RCVD_IN_DNSWL_MED,RDNS_NONE autolearn=no autolearn_force=no version=3.4.2 Received: (qmail 9806 invoked from network); 28 Mar 2020 22:46:07 -0000 Received: from unknown (HELO lists1.math.uh.edu) (129.7.128.208) by inbox.vuxu.org with ESMTP; 28 Mar 2020 22:46:07 -0000 Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by lists1.math.uh.edu with smtp (Exim 4.92.3) (envelope-from ) id 1jIKCm-0006uJ-Jo; Sat, 28 Mar 2020 17:45:28 -0500 Received: from mx2.math.uh.edu ([129.7.128.33]) by lists1.math.uh.edu with esmtps (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92.3) (envelope-from ) id 1jIKCh-0006rU-QG for ding@lists.math.uh.edu; Sat, 28 Mar 2020 17:45:23 -0500 Received: from quimby.gnus.org ([95.216.78.240]) by mx2.math.uh.edu with esmtps (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92.3) (envelope-from ) id 1jIKCf-00024X-MQ for ding@lists.math.uh.edu; Sat, 28 Mar 2020 17:45:23 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version: In-Reply-To:Date:Message-Id:References:Subject:To:From:Sender:Reply-To:Cc: 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=2qTV0iaaCt+TQhIkEu15XrYSW3PVB35FEjseKZDKptg=; b=tcrfqkGCHn9Y9pkygbeE2Az4Td dwhh83A69Ip4mF7DzFET5BDk7Zh/tldlJscwBEYtm/QM3anE+Kq6DmSavjSL7YauF3WX77Iwere6/ YyfaVNkf8Ihf51N43AmEo8FTBv2ByFITh8gne8fzJNLkwIK2gaoiELz5X6pyKbJpxvvo=; Received: from mail-pl1-x631.google.com ([2607:f8b0:4864:20::631]) by quimby.gnus.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jIKCW-0005xL-SX for ding@gnus.org; Sat, 28 Mar 2020 23:45:17 +0100 Received: by mail-pl1-x631.google.com with SMTP id v23so5039772ply.10 for ; Sat, 28 Mar 2020 15:45:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=doraji.xyz; s=yw; h=from:to:subject:organization:references:face:message-id:date :in-reply-to:user-agent:mime-version:content-transfer-encoding; bh=2qTV0iaaCt+TQhIkEu15XrYSW3PVB35FEjseKZDKptg=; b=HtB99AtbLkjdSdbYg4Pg4Vh+/TtuME4U2C704cZ+xuj9o10ef/ykVS0V1I8JcpzkU+ XKNlmKdZ9V6aZIDULC90UMsyAFYhAE4XhuZY7pXi8GLjS/4dIWCMgUhC4FqZDYEY22Gh EkBp8/bVixGmcYUXjKpD6prudlizVarVQjIYxfgliLQpPYqczIs2xX+4xW1I9GlyBzpf O+RFE7msh+gq8cJWvr1i9+H1doyDDqoidGIHLsWasdRNzeNxdv1N21vveUyVAeP9Xf6U 369/oa5GoYxC7dL9cV0mLBL6i1xik9cC0lBvcL9wZXpLNLG5n6xR3ZMesjvn0fTWsvPg DM3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:organization:references:face :message-id:date:in-reply-to:user-agent:mime-version :content-transfer-encoding; bh=2qTV0iaaCt+TQhIkEu15XrYSW3PVB35FEjseKZDKptg=; b=DIS3yqH4VR0al2lLuhw3A6drdx00eOn1toUIAa3ZpQL1KU6BD2E4xe7la4bva/CL1A d19pY8QfF7JmZHd/drS1Rd6V9ZrxjF41cN+8ivZmxE/sEOSMwzq1yt7WnRrd/ITJl4B6 16nr7d8d4RZFTKKiwvVXW//3caZkfqlVS5oYTo0ReRXG6tqgSLOOldpojnFq+LnLJTMf nKpRTL8u9nKmIlhaeYRhOuG1ifBnd14ei3KF88Uo5wRKqPhAsNMJlPXEN1oQjkKgOuH6 zWIJCROaFwf8yoEBuka0odHkIwze3c3PXjgwascAhC07QG6xYKT/1P3HdY0D3mSsOIXi VKJA== X-Gm-Message-State: ANhLgQ1NDZlXKdQZgMRshIECpBbgmCQHxMwBmqGukN4rG1OX8/+I7piP vMylqck9l8FbF0UHLdqMX2eO8QZAC0/Lcg== X-Google-Smtp-Source: ADFU+vvR6anmVBEWgvE4VlIt47e7Gc9PsptmUZX/06oTaqUMC0nccSh/ciPE6pDnCTy6YoRDk4PHfQ== X-Received: by 2002:a17:902:7283:: with SMTP id d3mr5538931pll.65.1585435509834; Sat, 28 Mar 2020 15:45:09 -0700 (PDT) Received: from delta.birch.chromebook ([223.39.161.176]) by smtp.gmail.com with ESMTPSA id c126sm6969575pfb.83.2020.03.28.15.45.08 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 28 Mar 2020 15:45:09 -0700 (PDT) Received: (nullmailer pid 27558 invoked by uid 1000); Sat, 28 Mar 2020 22:45:02 -0000 From: soyeomul@doraji.xyz (=?utf-8?B?7Zmp67OR7Z2s?=) To: The Gnus Subject: Re: gnus-cloud.el Organization: =?utf-8?B?6YeR6Zm1ICjsl7Dsm5DsnZgg66eI7J2MKQ==?= References: <87zhc0v1m8.fsf@ericabrahamsen.net> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAHlBMVEVMM2UIAhGJrpkJDwsDAwgJAggKPnwFBAIEBAQJAjTkRM0eAAACN0lEQVQ4jW3Tv2sb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=?= =?utf-8?B?7Ja07JW8IOyggeynhOydhCDtl6TsuaAg6rKD7J206rOgIOyaqeydtCDsobA=?= =?utf-8?B?7IiY66W8IOyWu+yWtOyVvCDsspzrrLjsl5Ag7Jik66W064KY64uI6528Lic=?= X-Thanks-Thanks-Thanks: =?utf-8?B?7LKc7ZWY7LC97IOd7J2EIOuLpCDsgrTrpqzsi5w=?= =?utf-8?B?66Ck64qUIOuniOydjC4uLl5eXg==?= X-Thanks-Absolete-Coding-System: UTF-8 X-Operating-System: =?utf-8?B?4omqZGluZ+KJqw==?= -- The Gnus X-Gnus-Motto: In a cloud bones of steel. Date: Sun, 29 Mar 2020 07:45:02 +0900 In-Reply-To: (David Edmondson's message of "Sat, 28 Mar 2020 19:10:24 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-ID: Precedence: bulk Hellow David^^^ David Edmondson writes: > [......] > From a3bdd2219855a72e2ee90de1b6f823c9678a470c Mon Sep 17 00:00:00 2001 > From: David Edmondson > 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. > --- > lisp/gnus/gnus-cloud.el | 54 ++++++++++++++++++++--------------------- > 1 file changed, 27 insertions(+), 27 deletions(-) > > diff --git a/lisp/gnus/gnus-cloud.el b/lisp/gnus/gnus-cloud.el > index da6231d73300..7ea691e7220c 100644 > --- a/lisp/gnus/gnus-cloud.el > +++ b/lisp/gnus/gnus-cloud.el > @@ -223,13 +223,10 @@ easy interactive way to set this from the Server bu= ffer." > (t > (gnus-message 1 "Unknown type %s; ignoring" type)))))) >=20=20 > -(defun gnus-cloud-update-newsrc-data (group elem &optional force-older) > - "Update the newsrc data for GROUP from ELEM. > -Use old data if FORCE-OLDER is not nil." > +(defun gnus-cloud-update-newsrc-data (group elem) > + "Update the newsrc data for GROUP from ELEM." > (let* ((contents (plist-get elem :contents)) > (date (or (plist-get elem :timestamp) "0")) > - (now (gnus-cloud-timestamp nil)) > - (newer (string-lessp date now)) > (group-info (gnus-get-info group))) > (if (and contents > (stringp (nth 0 contents)) > @@ -238,15 +235,13 @@ Use old data if FORCE-OLDER is not nil." > (if (equal (format "%S" group-info) > (format "%S" contents)) > (gnus-message 3 "Skipping cloud update of group %s, the = info is the same" group) > - (if (and newer (not force-older)) > - (gnus-message 3 "Skipping outdated cloud info for group = %s, the info is from %s (now is %s)" group date now) > - (when (or (not gnus-cloud-interactive) > - (gnus-y-or-n-p > - (format "%s has older different info in the c= loud as of %s, update it here? " > - group date))) > - (gnus-message 2 "Installing cloud update of group %s" group) > - (gnus-set-info group contents) > - (gnus-group-update-group group)))) > + (when (or (not gnus-cloud-interactive) > + (gnus-y-or-n-p > + (format "%s has different info in the cloud from %s, update it here?= " > + group date))) > + (gnus-message 2 "Installing cloud update of group %s" group) > + (gnus-set-info group contents) > + (gnus-group-update-group group))) > (gnus-error 1 "Sorry, group %s is not subscribed" group)) > (gnus-error 1 "Sorry, could not update newsrc for group %s (invali= d data %S)" > group elem)))) > @@ -380,8 +375,9 @@ When FULL is t, upload everything, not just a differe= nce from the last full." > (gnus-cloud-files-to-upload full) > (gnus-cloud-collect-full-newsrc))) > (group (gnus-group-full-name gnus-cloud-group-name gnus-cloud-= method))) > + (setq gnus-cloud-sequence (1+ (or gnus-cloud-sequence 0))) > (insert (format "Subject: (sequence: %s type: %s storage-method: %= s)\n" > - (or gnus-cloud-sequence "UNKNOWN") > + gnus-cloud-sequence > (if full :full :partial) > gnus-cloud-storage-method)) > (insert "From: nobody@gnus.cloud.invalid\n") > @@ -390,7 +386,6 @@ When FULL is t, upload everything, not just a differe= nce from the last full." > (if (gnus-request-accept-article gnus-cloud-group-name gnus-cloud-= method > t t) > (progn > - (setq gnus-cloud-sequence (1+ (or gnus-cloud-sequence 0))) > (gnus-cloud-add-timestamps elems) > (gnus-message 3 "Uploaded Gnus Cloud data successfully to %s= " group) > (gnus-group-refresh-group group)) > @@ -459,18 +454,21 @@ instead of `gnus-cloud-sequence'. > When UPDATE is t, returns the result of calling `gnus-cloud-update-all'. > Otherwise, returns the Gnus Cloud data chunks." > (let ((articles nil) > + (highest-sequence-seen gnus-cloud-sequence) > chunks) > (dolist (header (gnus-cloud-available-chunks)) > - (when (> (gnus-cloud-chunk-sequence (mail-header-subject header)) > - (or sequence-override gnus-cloud-sequence -1)) > - > - (if (string-match (format "storage-method: %s" gnus-cloud-storag= e-method) > - (mail-header-subject header)) > - (push (mail-header-number header) articles) > - (gnus-message 1 "Skipping article %s because it didn't match t= he Gnus Cloud method %s: %s" > - (mail-header-number header) > - gnus-cloud-storage-method > - (mail-header-subject header))))) > + (let ((this-sequence (gnus-cloud-chunk-sequence (mail-header-subje= ct header)))) > + (when (> this-sequence (or sequence-override gnus-cloud-sequence -1)) > + > + (if (string-match (format "storage-method: %s" gnus-cloud-storage-met= hod) > + (mail-header-subject header)) > + (progn > + (push (mail-header-number header) articles) > + (setq highest-sequence-seen (max highest-sequence-seen this-sequence))) > + (gnus-message 1 "Skipping article %s because it didn't match the Gn= us Cloud method %s: %s" > + (mail-header-number header) > + gnus-cloud-storage-method > + (mail-header-subject header)))))) > (when articles > (nnimap-request-articles (nreverse articles) gnus-cloud-group-name) > (with-current-buffer nntp-server-buffer > @@ -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))) >=20=20 > (defun gnus-cloud-server-p (server) Sorry man i don't know emacs lisp at all. By the way the your codes are looks beautiful^^^ Sincerely, Gnus fan Byung-Hee --=20 ^=EA=B3=A0=EB=A7=99=EC=8A=B5=EB=8B=88=EB=8B=A4 _=E7=99=BD=E8=A1=A3=E5=BE=9E= =E8=BB=8D_ =EA=B0=90=EC=82=AC=ED=95=A9=EB=8B=88=EB=8B=A4_^))//