From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/87956 Path: news.gmane.org!.POSTED!not-for-mail From: Haider Rizvi Newsgroups: gmane.emacs.gnus.general Subject: Re: Reddit Backend Message Ids Date: Thu, 12 Apr 2018 12:44:04 -0700 Message-ID: References: <87d118ij29.fsf@mail.de> <87r2pbvyep.fsf@mail.de> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1523562191 3663 195.159.176.226 (12 Apr 2018 19:43:11 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 12 Apr 2018 19:43:11 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (darwin) To: ding@gnus.org Original-X-From: ding-owner+m36170@lists.math.uh.edu Thu Apr 12 21:43:07 2018 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from mxfilter-048034.atla03.us.yomura.com ([107.189.48.34]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f6i7e-0000md-Hm for ding-account@gmane.org; Thu, 12 Apr 2018 21:43:06 +0200 X-Yomura-MXScrub: 1.0 Original-Received: from lists1.math.uh.edu (unknown [129.7.128.208]) by mxfilter-048034.atla03.us.yomura.com (Halon) with ESMTPS id 04fb2bf7-3e8a-11e8-950a-b499baa2b07a; Thu, 12 Apr 2018 19:45:14 +0000 (UTC) Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by lists1.math.uh.edu with smtp (Exim 4.90_1) (envelope-from ) id 1f6i8o-0000Pp-8i; Thu, 12 Apr 2018 14:44:18 -0500 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by lists1.math.uh.edu with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1f6i8k-0000P4-FU for ding@lists.math.uh.edu; Thu, 12 Apr 2018 14:44:14 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtps (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.90_1) (envelope-from ) id 1f6i8j-0000OH-17 for ding@lists.math.uh.edu; Thu, 12 Apr 2018 14:44:14 -0500 Original-Received: from [195.159.176.226] (helo=blaine.gmane.org) by quimby.gnus.org with esmtps (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1f6i8h-0005D0-Ni for ding@gnus.org; Thu, 12 Apr 2018 21:44:11 +0200 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1f6i6Z-0007gm-N5 for ding@gnus.org; Thu, 12 Apr 2018 21:41:59 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 55 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:iPnIxOSud1AwJqA+6/rNZwSAEgw= X-Spam-Score: 0.3 (/) X-Spam-Report: SpamAssassin (3.4.1 2015-04-28) analysis follows Bayesian score: 0.0000 Ham tokens: 0.000-159--5999h-0s--0d--H*M:fsf, 0.000-19--699h-0s--0d--ids, 0.000-13--484h-0s--0d--H*UA:Emacs, 0.000-13--477h-0s--0d--H*u:Emacs, 0.000-12--436h-0s--0d--Convert Spam tokens: 0.997-31058--580h-25294s--0d--H*r:quimby.gnus.org, 0.997-18264--348h-14880s--0d--HX-Envelope-From:sk:junkmas, 0.997-18264--348h-14880s--0d--Hx-spam-relays-internal:sk:junkmas, 0.997-18264--348h-14880s--0d--H*RT:sk:junkmas, 0.995-32008--970h-26365s--0d--HTo:D*gnus.org Autolearn status: no autolearn_force=no 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 DKIM_ADSP_CUSTOM_MED No valid author signature, adsp_override is CUSTOM_MED 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (harizvi[at]gmail.com) -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.8 RDNS_NONE Delivered to internal network by a host with no rDNS 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different 0.9 NML_ADSP_CUSTOM_MED ADSP custom_med hit, and not from a mailing list List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:87956 Archived-At: Stefan Huchler writes: > Hi Haider, > > I think I made what you wanted and posted the patch here: > > https://github.com/spiderbit/nnreddit Stefan, Apologize for being absent after our initial conversation, been busy at work. Thanks for making this change. I had hacked together something that works for me. I'll put it in git later, see the patch below. I add a header called Archived-at, which has the url to point to the reddit entry. This is the same header that gwene adds to rss feeds. I have prior code to jump to the url in Archived-at. I can share that separately if there is interest. Here is a patch if anyone is interested: --- nnreddit.el.original 2018-02-15 15:04:07.000000000 -0700 +++ nnreddit.el 2018-02-15 15:36:14.000000000 -0700 @@ -316,6 +316,13 @@ (defun nnreddit-make-message-id (reddit-id) (format "<%s@reddit.com>" reddit-id)) +;; Add an "Archived-At:" header somewhat like gwene does with a url pointing to the main +;; Reddit comment thread - HR +;; For example, add the following, full subject is not required to get to the comment +;; Archived-At: +(defun nnreddit-make-archived-at-header (reddit-id) + (format "Archived-At: " reddit-id)) + ;; (defun nnreddit-id-to-number (reddit-id) ;; "Convert a Reddit ID (6 alphanumeric characters) to an integer." ;; (car (read-from-string (concat "#36r" reddit-id)))) @@ -350,6 +357,7 @@ nil ; no cross references ;; Extra headers (append `((X-Reddit-ID . ,reddit-id)) + `((Archived-At . ,(nnreddit-make-archived-at-header reddit-id))) (if (integerp score) `((X-Reddit-Score . ,(number-to-string score)))) (if (integerp num_comments) @@ -489,6 +497,7 @@ "Date: " (or (mail-header-date header) "") "\n" "Message-ID: " (or (mail-header-id header) (nnmail-message-id)) "\n" "References: " (or (mail-header-references header) "") "\n" + (or (cdr (assq 'Archived-At (mail-header-extra header))) "") "\n" "Content-Type: text/html; charset=utf-8" "\n" (let ((score (plist-get data :score))) (if (and nnreddit-insert-score-header