From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Skip Montanaro Newsgroups: gmane.emacs.help Subject: Re: Read/process mbox file in Gnus Date: Fri, 6 Nov 2020 12:40:59 -0600 Message-ID: References: <87blgb8dho.fsf@ericabrahamsen.net> <87h7q2ix32.fsf@gmail.com> <87d00qr82a.fsf@ucl.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4074"; mail-complaints-to="usenet@ciao.gmane.io" To: Help GNU Emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Fri Nov 06 19:42:45 2020 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kb6hB-0000wm-CX for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 06 Nov 2020 19:42:45 +0100 Original-Received: from localhost ([::1]:59120 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kb6hA-0003i0-ET for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 06 Nov 2020 13:42:44 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57852) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kb6fo-0002aQ-V4 for help-gnu-emacs@gnu.org; Fri, 06 Nov 2020 13:41:21 -0500 Original-Received: from mail-yb1-xb2b.google.com ([2607:f8b0:4864:20::b2b]:40768) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kb6fl-0006vK-GW for help-gnu-emacs@gnu.org; Fri, 06 Nov 2020 13:41:20 -0500 Original-Received: by mail-yb1-xb2b.google.com with SMTP id n142so1984487ybf.7 for ; Fri, 06 Nov 2020 10:41:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=mWogHH6EVj20Lvz8XwtaUbbkd3WLHaCFjsZbk7QY2tM=; b=Fe2Jvri0OCFpRYQMjjmmR0vFY8pv8VWbt/xlx/enT2Szh95E+BImAUF8mFnbLIJh/Z QM2Cnk3wkx78z28mxtNEwaD903kxTvExbSQOwxoaNzWN3p9g5PyxycEhVcXNE2qTgNIx TfWVOrmMRDUnA1/bhI2M2SxhdbI8oP2PdfMBdKApxJl13YA0K2zlBzllfzbKwnw1ea7n f6BP0ysW4FMq8WRscERFZpDUs04k7quL+vbfWclF3SzPxoUpROigQBs4auwRD829HTP2 L+zqzoatv6MIDL1FHoW2GDlyAI5O/7E3rOPF/1DJ5eQx8oyU8/9llc6Leu/wztufZPM8 dGOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=mWogHH6EVj20Lvz8XwtaUbbkd3WLHaCFjsZbk7QY2tM=; b=UXx4klY80+oucDWkBcIYzqc07YDhOFFcSe/obFKeP8QpGDHZL/HMyqFp0NXGzBfogP MDLuURwKAGMTHoo37yqSX7kwQoQ/uxJEfXRAtyarmZ9mjlRNxVJM9MtIIFiPGhs2HKrq UcEFNSdfo8gznPHzh7lSXxM/6/sZrJOBAppENllk1tpONBScQ/RT+xDBdpJUNzhQE7Uc BJi67kZV+VqARNdtf0vRY6+sLIOz9I4gk3z81GztdZ416cvn4zOTUHRYWcij+0tgdiXi zXkrtxZloMQxOF8/yg2U4oLTb3HCvT8fAA9V8scnCD0r3GMTXUNwNREuyJmx4Snn1l86 zotw== X-Gm-Message-State: AOAM533bwEeWWRuY/usGHqQQgwUkn/arO4AeLE5iu65UQyE879myQdkv yRe3BTfOeVUalf5FFWwLmkmiNb8dl9rLA9uiW9caMJ6ypXJU X-Google-Smtp-Source: ABdhPJyqET1FzqpfsMM+rCT5NKt0uwq9Z1aUqgyZMTYGnNsj+Kh3lp2d75tJ8QOz7XKircXFL8+PPH5nx2GFj7uueHE= X-Received: by 2002:a25:820d:: with SMTP id q13mr4919105ybk.67.1604688075460; Fri, 06 Nov 2020 10:41:15 -0800 (PST) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::b2b; envelope-from=skip.montanaro@gmail.com; helo=mail-yb1-xb2b.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:125081 Archived-At: I was out riding around (new bike day =F0=9F=98= =80) and it occurred to me that the way I am using mbox files is just as a transmission tool. All mail readers save some detail about the current state of affairs (read, deleted, message order, etc). I think most probably keep this information out-of-band somewhere, in something akin to a database. VM keeps that information in the mbox file in the form of a bunch of X-VM-whatever headers. This works perfectly for how I consume these messages. My workflow on mail.python.org generates a file named u.mbox. I download it and load it into VM, saving messages of interest to either s.mbox or h.mbox. Those two files are uploaded back to mail.python.org, then all three local files [ush].mbox are deleted. The next time I process new unsure messages, I start from scratch. Deleting an mbox file effectively zaps all metadata for that file's messages and I start anew next time. I'm going to guess Gnus saves metadata in ~/.newsrc.eld. It's not clear how well it would take to me pulling the rug out from under it by replacing the previous u.mbox file with a completely new one without also somehow performing careful surgery on its metadata (assuming I also use it as my normal mail reader). Skip