guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mummi wishlist: API using Message-ID


From: Ricardo Wurmus
Subject: Re: Mummi wishlist: API using Message-ID
Date: Thu, 17 Sep 2020 13:33:16 +0200
User-agent: mu4e 1.4.13; emacs 27.1

zimoun <zimon.toutoune@gmail.com> writes:

> (Sorry for the misspelling of Mumi in the Subject thread.)
>
> (For the record, reading [1], I discovered [2,3] with similar goals
> than Mumi and that the Org-mode community uses public-inbox [4].)
>
> [1] https://bzg.fr/en/org-mode-9.4-is-out-can-you-help.html/
> [2] https://updates.orgmode.org/
> [3] https://github.com/bzg/woof
> [4] https://orgmode.org/list/87r1vd92eg.fsf@bzg.fr/
>
> On Thu, 17 Sep 2020 at 12:00, Ricardo Wurmus <rekado@elephly.net> wrote:
>> zimoun <zimon.toutoune@gmail.com> writes:
>
>> > Instead, it is easy to get the Message-ID.  (Using emacs-notmuch, only
>> > hit the key ’ci’) Therefore, it could be nice to be able to provide
>> > e.g., the URL:
>> >
>> > <issues.guix.gnu.org/HAv_FWZRa_dCADY6U07oX-E2vTrtcxk8ltkpfvTpYCsIh4O5PuItHGIh6w-g5GGmoqVEfkjDUOplpUErdGEPAiFYdrjjDhwd9RJ4OyjjGgY=@hector.link>
>> >
>> > redirecting to <http://issues.guix.gnu.org/33899#16>.
>>
>> This is an interesting idea!  I don’t know if it’ll work as a plain URL,
>> because not all characters of a message id might be usable in a URL (you
>> may need to URL-encode it and can’t just paste it in the URL bar of your
>> browser), but it would certainly work as a search query.  The only
>> problem is that we’re not currently indexing the message ids.
>
> I do not know but public-inbox is doing such thing, isn't it?
> I mean, the example with emacs-debbugs, my "custom" function and the
> service <yhetil.org>: […]

It might be fine.  I just don’t know for sure if Message-Ids may contain
characters that are not permitted in URLs.

>> > And maybe the
>> > current webpage could provide the Message-ID, easy to copy and then
>> > paste in my email reader.
>>
>> It’s already there but hidden!  Every message is rendered in a
>> div.message.  Inside of that is div.card > div.card-header > div.details
>> (hidden) > div.message-id.
>>
>> With custom CSS you could unhide div.details, and with a custom JS you
>> could grab the contents of div.message-id on the click of a button.
>> Most browsers make it a little hard to augment the CSS and/or JS of a
>> served page, but with a little hacking I’m sure you can extract what you
>> want.
>
> Okish... CSS/JS is not really my cup of tea.  I will try to rehash
> your words when giving a look at Mumi source.

You can give this a try:

* in Icecat hit F12
* select the Inspector (if it isn’t selected yet)
* in the right column (next to :hov and .cls) there’s a plus icon with
  hover text “Add new rule”; click it
* edit the text to say: “.details { display: block !important }”

This should show you all message ids.  It’s possible to make this
permanent but it’s rather tedious with Icecat/Firefox.

If you just need this for scripting, though, you can parse the HTML and
filter the “div” tag with the “message-id” class.  If scripting is
desired I could probably also offer a JSON endpoint that provides all
information in a format that is easily processed.

-- 
Ricardo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]