From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/87876 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Huchler Newsgroups: gmane.emacs.gnus.general Subject: Re: Reddit Backend Message Ids Date: Thu, 15 Feb 2018 16:42:16 +0100 Message-ID: <87606yw97r.fsf@mail.de> References: <87d118ij29.fsf@mail.de> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1518709347 15441 195.159.176.226 (15 Feb 2018 15:42:27 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 15 Feb 2018 15:42:27 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) To: ding@gnus.org Original-X-From: ding-owner+m36090@lists.math.uh.edu Thu Feb 15 16:42:23 2018 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from mxfilter-048035.atla03.us.yomura.com ([107.189.48.35]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1emLfr-0003Cl-BS for ding-account@gmane.org; Thu, 15 Feb 2018 16:42:15 +0100 X-Yomura-MXScrub: 1.0 Original-Received: from lists1.math.uh.edu (unknown [129.7.128.208]) by mxfilter-048035.atla03.us.yomura.com (Halon) with ESMTPS id 09509fc3-1267-11e8-94e8-b499baabecb2; Thu, 15 Feb 2018 15:43:58 +0000 (UTC) Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by lists1.math.uh.edu with smtp (Exim 4.89) (envelope-from ) id 1emLgd-0005By-LN; Thu, 15 Feb 2018 09:43:03 -0600 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.89) (envelope-from ) id 1emLga-0005BQ-Oy for ding@lists.math.uh.edu; Thu, 15 Feb 2018 09:43:00 -0600 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.89) (envelope-from ) id 1emLgY-0008Mr-SR for ding@lists.math.uh.edu; Thu, 15 Feb 2018 09:43:00 -0600 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 1emLgW-0001jT-LU for ding@gnus.org; Thu, 15 Feb 2018 16:42:56 +0100 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1emLeJ-0005wd-5c for ding@gnus.org; Thu, 15 Feb 2018 16:40:39 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 60 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:DjMouGXOAye4A/WN0p3Wr4TSN5I= X-Spam-Score: 0.8 (/) X-Spam-Report: SpamAssassin (3.4.1 2015-04-28) analysis follows Bayesian score: 0.0155 Ham tokens: 0.000-155--5676h-0s--0d--H*M:fsf, 0.000-11--401h-0s--0d--ids, 0.000-8--275h-0s--0d--promising, 0.000-7--246h-0s--0d--H*UA:Emacs, 0.000-7--242h-0s--0d--H*u:Emacs Spam tokens: 0.997-16917--325h-14130s--0d--Hx-spam-relays-internal:sk:junkmas, 0.997-16917--325h-14130s--0d--HX-Envelope-From:sk:junkmas, 0.997-16917--325h-14130s--0d--H*RT:sk:junkmas, 0.997-29386--571h-24551s--0d--H*r:quimby.gnus.org, 0.994-30317--953h-25627s--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 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (stefan.huchler[at]mail.de) -0.5 BAYES_05 BODY: Bayes spam probability is 1 to 5% [score: 0.0155] 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different 0.8 RDNS_NONE Delivered to internal network by a host with no rDNS List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:87876 Archived-At: Hi Haider, I played a bit around and I got something working very hackish but it works: if you go to the function: nnreddit-request-article (let ((header (car value)) (data (cadr value)) (type (caddr value)) (subreddit (string-remove-suffix "*" (string-remove-prefix "*Article nnreddit:" (buffer-name))))) add this "subreddit" binding here and a few lines further change the Subject to that: (concat "Subject: " (format "[https://reddit.com/r/%s/comments/%s] - " subreddit (plist-get data :id)) (or (mail-header-subject header) "(none)") "\n") "") "Date: " (or (mail-header-date header) "") "\n" You get a clickable url in your Subject line to the subreddit. Only works with the messages, not with the comments there you get a 404. Not sure how to get the message id from the subreddit inside a comment. Hope that's not to confusing :D I hesitate to create a github till its more solid than that :D So sorry for the copy/pasting. Haider Rizvi writes: > Stefan Huchler writes: > > >> I try to make the mmreddit backend of gnus better, I want to make it >> possible that gnus can track the viewed messaged so that I can see what >> is new and where new posts and comments are: >> >> https://github.com/paul-issartel/nnreddit/issues/6 > > Stefan, thanks for posting about nnreddit. It was on my todo list to > try out, your msg nudged me to do it. Looks promising on first view. > > Unfortunately can't help you with the Gnus code. But, a question for you. > > Have you already got some code to jump to the Reddit thread in a > browser. Since the Message-id has the Reddit id, it can be built > reasonably easily. If you have something please share. > > Regards,