Gnus development mailing list
 help / color / mirror / Atom feed
From: Stefan Huchler <stefan.huchler@mail.de>
To: ding@gnus.org
Subject: Re: Reddit Backend Message Ids
Date: Thu, 15 Feb 2018 16:42:16 +0100	[thread overview]
Message-ID: <87606yw97r.fsf@mail.de> (raw)
In-Reply-To: <whyig7erf9xsp.fsf@hrizvi-wsm4.internal.salesforce.com>

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 <harizvi@gmail.com> writes:

> Stefan Huchler <stefan.huchler@mail.de> 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, 




  reply	other threads:[~2018-02-15 15:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-13 23:08 Stefan Huchler
2018-02-14  4:58 ` Jeffrey DeLeo
2018-02-14 11:07   ` Stefan Huchler
2018-02-14 19:27 ` Haider Rizvi
2018-02-15 15:42   ` Stefan Huchler [this message]
2018-02-15 16:25   ` Stefan Huchler
2018-02-24  3:50   ` Stefan Huchler
2018-04-12 19:44     ` Haider Rizvi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87606yw97r.fsf@mail.de \
    --to=stefan.huchler@mail.de \
    --cc=ding@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).