From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/88976 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?Adam_Sj=C3=B8gren?= Newsgroups: gmane.emacs.gnus.general Subject: Re: Gnus backend for GitHub/GitLab? Date: Tue, 14 Jan 2020 23:45:34 +0100 Organization: koldfront - analysis & revolution, Copenhagen, Denmark Message-ID: <87r201u06p.fsf@tullinup.koldfront.dk> References: <8736ejsehi.fsf@tullinup.koldfront.dk> <87lfq9vkh0.fsf@tullinup.koldfront.dk> <87d0blspf3.fsf@dick> <87v9pdu24x.fsf@tullinup.koldfront.dk> <871rs1smv8.fsf@dick> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="99795"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) To: ding@gnus.org Original-X-From: ding-owner+M37179@lists.math.uh.edu Tue Jan 14 23:46:19 2020 Return-path: Envelope-to: ding-account@m.gmane-mx.org Original-Received: from lists1.math.uh.edu ([129.7.128.208]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1irUx0-000PXp-5X for ding-account@m.gmane-mx.org; Tue, 14 Jan 2020 23:46:18 +0100 Original-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 1irUwe-0002y0-2y; Tue, 14 Jan 2020 16:45:56 -0600 Original-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 1irUwb-0002uw-3F for ding@lists.math.uh.edu; Tue, 14 Jan 2020 16:45:53 -0600 Original-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 1irUwY-0005ug-A0 for ding@lists.math.uh.edu; Tue, 14 Jan 2020 16:45:52 -0600 Original-Received: from blaine.gmane.org ([195.159.176.226]) by quimby.gnus.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1irUwS-0002lT-63 for ding@gnus.org; Tue, 14 Jan 2020 23:45:46 +0100 Original-Received: from list by blaine.gmane.org with local (Exim 4.89) (envelope-from ) id 1irUwR-000NkR-GH for ding@gnus.org; Tue, 14 Jan 2020 23:45:43 +0100 X-Injected-Via-Gmane: http://gmane.org/ OpenPGP: id=476630590A231909B0A0961A49D0746121BDE416; url=https://asjo.koldfront.dk/gpg.asc Mail-Follow-Up-To: never X-Face: )qY&CseJ?.:=8F#^~GcSA?F=9eu'{KAFfL1C3/A&:nE?PW\i65"ba0NS)97,Q(^@xk}n4Ou rPuR#V8I(J_@~H($[ym:`K_+]*kjvW>xH5jbgLBVFGXY:(#4P>zVBklLbdL&XxL\M)%T}3S/IS9lMJ ^St'=VZBR Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:88976 Archived-At: dick writes: > AS> As far as I can see, these need to be mapped to article numbers, so Gnus > AS> can get information about max number and min number for the group, and to > AS> retrieve articles by number. > > Yes, absolutely, your backend needs to sequentially number articles (which in > this context are issues/comments). > > But that numbering is one of your own making, not gitlab's. Yes, that's pretty much exactly what I wrote. > I keep an array of articles (to go from our numbering to the issue/comment). > And I maintain a hashtable to go from gitlab's arbitrary id to our numbering. It sounds like you've already implemented nngitlab, is this something you care to share? > Is there a requirement to keep no state? I would prefer the backend only depend on the API - and of course Gnus will do whatever it usually does with state. > I need to at least persist state for .newsrc.eld to keep track of what > has and hasn't been read and seen (yes, there's a difference in Gnus > between "read" and "seen"). This is something Gnus keeps track of generally, not something that a new backend needs to concern itself with, right? So besides what Gnus usually does, you keep state about your mapping between GitLab's ids and article numbers - where do you keep that state, inside .newsrc.eld or in a separate file? Best regards, Adam -- "What would you like to drink?" "Formaldehyde." Adam Sjøgren "Straight or on the rocks?" asjo@koldfront.dk