Re: bug#38136: [PATCH] Make gnus-group-get-new-news a non blocking thread

classic Classic list List threaded Threaded
33 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Re: bug#38136: [PATCH] Make gnus-group-get-new-news a non blocking thread

Robert Pluim

(I dropped the bug and added emacs-devel)

>>>>> On Wed, 20 Nov 2019 14:00:04 +0100, Michael Albinus <[hidden email]> said:

    >> Now the next time you run debbugs-gnu as above that bug will appear as
    >> well.

    Michael> Sure (and I use it every single day). But I understood the request as
    Michael> "Pls give me one gnus summary buffer containing all messages of bugs I
    Michael> have tagged locally". This doesn't exist yet.

Ah, I misunderstood. How's this?

(defun debbugs-gnus-ephemeral-from-tagged ()
  (interactive)
  (when (file-exists-p debbugs-gnu-persistency-file)
    (with-temp-buffer
      (insert-file-contents debbugs-gnu-persistency-file)
      (eval (read (current-buffer)) t))
    (when debbugs-gnu-local-tags
      (gnus-read-ephemeral-bug-group
       debbugs-gnu-local-tags
       (alist-get 'emacs gnus-bug-group-download-format-alist)))))

Reply | Threaded
Open this post in threaded view
|

Re: bug#38136: [PATCH] Make gnus-group-get-new-news a non blocking thread

Michael Albinus
Robert Pluim <[hidden email]> writes:

>     Michael> Sure (and I use it every single day). But I understood
>     Michael> the request as "Pls give me one gnus summary buffer
>     Michael> containing all messages of bugs I have tagged
>     Michael> locally". This doesn't exist yet.
>
> Ah, I misunderstood. How's this?
>
> (defun debbugs-gnus-ephemeral-from-tagged ()
>   (interactive)
>   (when (file-exists-p debbugs-gnu-persistency-file)
>     (with-temp-buffer
>       (insert-file-contents debbugs-gnu-persistency-file)
>       (eval (read (current-buffer)) t))
>     (when debbugs-gnu-local-tags
>       (gnus-read-ephemeral-bug-group
>        debbugs-gnu-local-tags
>        (alist-get 'emacs gnus-bug-group-download-format-alist)))))

Works for me. However, the "Status:" messages shall be kicked off. And
it shall be checked, whether `debbugs-gnu-mail-backend' is bound to `gnus'.

If Lars doesn't object, you might commit it, plus docstring, and plus
documentation in debbugs-ug.texi.

Best regards, Michael.

Reply | Threaded
Open this post in threaded view
|

Re: bug#38136: [PATCH] Make gnus-group-get-new-news a non blocking thread

Robert Pluim
>>>>> On Wed, 20 Nov 2019 14:43:46 +0100, Michael Albinus <[hidden email]> said:

    Michael> Works for me. However, the "Status:" messages shall be kicked off. And
    Michael> it shall be checked, whether `debbugs-gnu-mail-backend' is bound to `gnus'.

The clue is in the name of the function, but OK.

No more feature requests :-)

    Michael> If Lars doesn't object, you might commit it, plus docstring, and plus
    Michael> documentation in debbugs-ug.texi.

I donʼt think Iʼm set up to push to elpa.

(defun debbugs-gnus-ephemeral-from-tagged ()
  "Create an ephemeral Gnus group of locally tagged emacs bugs."
  (interactive)
  (unless (eq debbugs-gnu-mail-backend 'gnus)
    (error "This function only works with Gnus."))
  (when (file-exists-p debbugs-gnu-persistency-file)
    (with-temp-buffer
      (insert-file-contents debbugs-gnu-persistency-file)
      (eval (read (current-buffer)) t))
    (when debbugs-gnu-local-tags
      (let ((mbox-url (replace-regexp-in-string
                       ";mboxstat=yes" ""
                       (alist-get 'emacs gnus-bug-group-download-format-alist)
                       nil t)))
      (gnus-read-ephemeral-bug-group
       debbugs-gnu-local-tags
       mbox-url)))))

Reply | Threaded
Open this post in threaded view
|

Re: bug#38136: [PATCH] Make gnus-group-get-new-news a non blocking thread

Michael Albinus
Robert Pluim <[hidden email]> writes:

> I donʼt think Iʼm set up to push to elpa.

I believe everybody with write access to emacs can also do so for
elpa, but I'm not sure.

Let's wait what Lars says, and then I could commit it in your name.

Best regards, Michael.

Reply | Threaded
Open this post in threaded view
|

Re: bug#38136: [PATCH] Make gnus-group-get-new-news a non blocking thread

Eric Abrahamsen-2
In reply to this post by Robert Pluim
Robert Pluim <[hidden email]> writes:

>>>>>> On Wed, 20 Nov 2019 14:43:46 +0100, Michael Albinus <[hidden email]> said:
>
>     Michael> Works for me. However, the "Status:" messages shall be kicked off. And
>     Michael> it shall be checked, whether `debbugs-gnu-mail-backend' is bound to `gnus'.
>
> The clue is in the name of the function, but OK.
>
> No more feature requests :-)
>
>     Michael> If Lars doesn't object, you might commit it, plus docstring, and plus
>     Michael> documentation in debbugs-ug.texi.
>
> I donʼt think Iʼm set up to push to elpa.
>
> (defun debbugs-gnus-ephemeral-from-tagged ()
>   "Create an ephemeral Gnus group of locally tagged emacs bugs."
>   (interactive)
>   (unless (eq debbugs-gnu-mail-backend 'gnus)
>     (error "This function only works with Gnus."))
>   (when (file-exists-p debbugs-gnu-persistency-file)
>     (with-temp-buffer
>       (insert-file-contents debbugs-gnu-persistency-file)
>       (eval (read (current-buffer)) t))
>     (when debbugs-gnu-local-tags
>       (let ((mbox-url (replace-regexp-in-string
>                        ";mboxstat=yes" ""
>                        (alist-get 'emacs gnus-bug-group-download-format-alist)
>                        nil t)))
>       (gnus-read-ephemeral-bug-group
>        debbugs-gnu-local-tags
>        mbox-url)))))

How nice to wake up and find that someone's implemented my (fairly
off-handed) feature request! In fact I wasn't necessarily demanding that
all the bugs be displayed in one summary buffer -- that actually skips
the overview buffer where you can issue the control messages, which is
the main benefit. Though I'm sure I'd use this ephemeral group approach,
the tagging approach is perfectly good. I was a little confused when
searching for tags prompted me to enter a particular user tag, but
it turns out just hitting <RET> at the prompt showed me the tagged
reports.

Thanks for both of these approaches!

Eric

Reply | Threaded
Open this post in threaded view
|

Re: bug#38136: [PATCH] Make gnus-group-get-new-news a non blocking thread

Robert Pluim
>>>>> On Wed, 20 Nov 2019 08:42:47 -0800, Eric Abrahamsen <[hidden email]> said:
    Eric> How nice to wake up and find that someone's implemented my (fairly
    Eric> off-handed) feature request! In fact I wasn't necessarily demanding that
    Eric> all the bugs be displayed in one summary buffer -- that actually skips
    Eric> the overview buffer where you can issue the control messages, which is
    Eric> the main benefit. Though I'm sure I'd use this ephemeral group approach,
    Eric> the tagging approach is perfectly good. I was a little confused when
    Eric> searching for tags prompted me to enter a particular user tag, but
    Eric> it turns out just hitting <RET> at the prompt showed me the tagged
    Eric> reports.

If you stick

      (debbugs-gnu-summary-mode 1)

at the end of my function, you'll get 'E' 'C' and 'M-m' bindings,
which do the same things as in 'debbugs-gnu'.

Robert

Reply | Threaded
Open this post in threaded view
|

Re: bug#38136: [PATCH] Make gnus-group-get-new-news a non blocking thread

Michael Albinus
In reply to this post by Eric Abrahamsen-2
Eric Abrahamsen <[hidden email]> writes:

Hi Eric,

>> (defun debbugs-gnus-ephemeral-from-tagged ()

Btw, this will be `debbugs-gnu-ephemeral-from-tagged'.

> How nice to wake up and find that someone's implemented my (fairly
> off-handed) feature request! In fact I wasn't necessarily demanding that
> all the bugs be displayed in one summary buffer -- that actually skips
> the overview buffer where you can issue the control messages, which is
> the main benefit. Though I'm sure I'd use this ephemeral group approach,
> the tagging approach is perfectly good.

You can already issue control messages from existing ephemeral groups in
debbugs, Lars did implement it. I will see whether I could bring it also
to this accumulated group; shall be possible, because the bug number is
always in the subject.

But first I'll wait for a comment from Lars.

> I was a little confused when searching for tags prompted me to enter a
> particular user tag, but it turns out just hitting <RET> at the prompt
> showed me the tagged reports.

Yes, it is a little bit unfortune that we have both local tags (used
here) and user tags (propagated to the server). Should have been made it
more clear in the UI.

By the way, I have customized debbugs-gnu-default-severities to
'("tagged") - always starting with the local tagged bugs.

> Thanks for both of these approaches!
>
> Eric

Best regards, Michael.

Reply | Threaded
Open this post in threaded view
|

Re: bug#38136: [PATCH] Make gnus-group-get-new-news a non blocking thread

Michael Albinus
In reply to this post by Robert Pluim
Robert Pluim <[hidden email]> writes:

>     Eric> I was a little confused when searching for tags prompted me
>     Eric> to enter a particular user tag, but it turns out just
>     Eric> hitting <RET> at the prompt showed me the tagged reports.
>
> If you stick
>
>       (debbugs-gnu-summary-mode 1)
>
> at the end of my function, you'll get 'E' 'C' and 'M-m' bindings,
> which do the same things as in 'debbugs-gnu'.

Do they find already the proper bug-id? Cool, this saves me work :-)

> Robert

Best regards, Michael.

Reply | Threaded
Open this post in threaded view
|

Re: bug#38136: [PATCH] Make gnus-group-get-new-news a non blocking thread

Robert Pluim
>>>>> On Wed, 20 Nov 2019 18:01:42 +0100, Michael Albinus <[hidden email]> said:

    Michael> Robert Pluim <[hidden email]> writes:
    Eric> I was a little confused when searching for tags prompted me
    Eric> to enter a particular user tag, but it turns out just
    Eric> hitting <RET> at the prompt showed me the tagged reports.
    >>
    >> If you stick
    >>
    >> (debbugs-gnu-summary-mode 1)
    >>
    >> at the end of my function, you'll get 'E' 'C' and 'M-m' bindings,
    >> which do the same things as in 'debbugs-gnu'.

    Michael> Do they find already the proper bug-id? Cool, this saves me work :-)

Kind of, they search for #\\([0-9]+\\) on the current line, and then
from point-min, which will do the wrong thing if youʼre not on the
first line of the bug thread. They also look for an appropriate text
property, but thatʼs not set by 'gnus-read-ephemeral-bug-group'. I can
look at adding that, but if you have a debbugs-gnu list of tagged
bugs, you can visit each of them as a gnus group individually, so Iʼm
not sure itʼs worth the effort.

Robert

Reply | Threaded
Open this post in threaded view
|

Re: bug#38136: [PATCH] Make gnus-group-get-new-news a non blocking thread

Robert Pluim
In reply to this post by Michael Albinus
>>>>> On Wed, 20 Nov 2019 17:59:18 +0100, Michael Albinus <[hidden email]> said:

    Michael> Eric Abrahamsen <[hidden email]> writes:
    Michael> Hi Eric,

    >>> (defun debbugs-gnus-ephemeral-from-tagged ()

    Michael> Btw, this will be `debbugs-gnu-ephemeral-from-tagged'.

'debbugs-gnu-gnus-ephemeral-from-tagged'? In theory you could
implement something similar for rmail. I hereby delegate the heavy
responsibility of naming this correctly to Somebody Else :-)

    >> How nice to wake up and find that someone's implemented my (fairly
    >> off-handed) feature request! In fact I wasn't necessarily demanding that
    >> all the bugs be displayed in one summary buffer -- that actually skips
    >> the overview buffer where you can issue the control messages, which is
    >> the main benefit. Though I'm sure I'd use this ephemeral group approach,
    >> the tagging approach is perfectly good.

    Michael> You can already issue control messages from existing ephemeral groups in
    Michael> debbugs, Lars did implement it. I will see whether I could bring it also
    Michael> to this accumulated group; shall be possible, because the bug number is
    Michael> always in the subject.

(debbugs-gnu-summary-mode 1)

(but see my caveats in my other message to Eric).

Robert

Reply | Threaded
Open this post in threaded view
|

Re: bug#38136: [PATCH] Make gnus-group-get-new-news a non blocking thread

Robert Pluim
In reply to this post by Michael Albinus
>>>>> On Wed, 20 Nov 2019 15:30:06 +0100, Michael Albinus <[hidden email]> said:

    Michael> Robert Pluim <[hidden email]> writes:
    >> I donʼt think Iʼm set up to push to elpa.

    Michael> I believe everybody with write access to emacs can also do so for
    Michael> elpa, but I'm not sure.

I meant "I donʼt have an elpa checkout lying around, and Iʼm too lazy
to read up on what it would take to set things up so I can commit" :-)

Robert

Reply | Threaded
Open this post in threaded view
|

Re: bug#38136: [PATCH] Make gnus-group-get-new-news a non blocking thread

Michael Albinus
In reply to this post by Robert Pluim
Robert Pluim <[hidden email]> writes:

>     >> If you stick
>     >>
>     >> (debbugs-gnu-summary-mode 1)
>     >>
>     >> at the end of my function, you'll get 'E' 'C' and 'M-m' bindings,
>     >> which do the same things as in 'debbugs-gnu'.
>
>     Michael> Do they find already the proper bug-id? Cool, this saves
>     Michael> me work :-)
>
> Kind of, they search for #\\([0-9]+\\) on the current line, and then
> from point-min, which will do the wrong thing if youʼre not on the
> first line of the bug thread. They also look for an appropriate text
> property, but thatʼs not set by 'gnus-read-ephemeral-bug-group'. I can
> look at adding that, but if you have a debbugs-gnu list of tagged
> bugs, you can visit each of them as a gnus group individually, so Iʼm
> not sure itʼs worth the effort.

As you want. It's just convenience to send a control message immediately
while you're reading a given message in the accumulated summary buffer.

> Robert

Best regards, Michael.

Reply | Threaded
Open this post in threaded view
|

Re: bug#38136: [PATCH] Make gnus-group-get-new-news a non blocking thread

Robert Pluim
>>>>> On Wed, 20 Nov 2019 18:34:11 +0100, Michael Albinus <[hidden email]> said:

    Michael> Robert Pluim <[hidden email]> writes:
    >> >> If you stick
    >> >>
    >> >> (debbugs-gnu-summary-mode 1)
    >> >>
    >> >> at the end of my function, you'll get 'E' 'C' and 'M-m' bindings,
    >> >> which do the same things as in 'debbugs-gnu'.
    >>
    Michael> Do they find already the proper bug-id? Cool, this saves
    Michael> me work :-)
    >>
    >> Kind of, they search for #\\([0-9]+\\) on the current line, and then
    >> from point-min, which will do the wrong thing if youʼre not on the
    >> first line of the bug thread. They also look for an appropriate text
    >> property, but thatʼs not set by 'gnus-read-ephemeral-bug-group'. I can
    >> look at adding that, but if you have a debbugs-gnu list of tagged
    >> bugs, you can visit each of them as a gnus group individually, so Iʼm
    >> not sure itʼs worth the effort.

    Michael> As you want. It's just convenience to send a control message immediately
    Michael> while you're reading a given message in the accumulated summary buffer.

Well, with debbug-gnu-summary-mode enabled you'll be able to do that,
you'll just have to be slightly more careful with those
commands.

Hmm, how about if I changed the detection code to do

- search current line
- search backwards
- search from (point-min)

That would change nothing for single-bug ephemeral groups.

Robert

Reply | Threaded
Open this post in threaded view
|

Re: bug#38136: [PATCH] Make gnus-group-get-new-news a non blocking thread

Michael Albinus
In reply to this post by Robert Pluim
Robert Pluim <[hidden email]> writes:

>     Michael> Btw, this will be `debbugs-gnu-ephemeral-from-tagged'.
>
> 'debbugs-gnu-gnus-ephemeral-from-tagged'? In theory you could
> implement something similar for rmail. I hereby delegate the heavy
> responsibility of naming this correctly to Somebody Else :-)

We have no `debbugs-gnus-*' functions. The two accidents left I've just
fixed in the repository.

Maybe we shall even avoid `ephemeral' in the name (its gnus-ish), and we
call it `debbugs-read-tagged-bugs-with-gnus'. With the upper command
`debbugs-read-tagged-bugs'.

> Robert

Best regards, Michael.

Reply | Threaded
Open this post in threaded view
|

Re: bug#38136: [PATCH] Make gnus-group-get-new-news a non blocking thread

Michael Albinus
In reply to this post by Robert Pluim
Robert Pluim <[hidden email]> writes:

> I meant "I donʼt have an elpa checkout lying around, and Iʼm too lazy
> to read up on what it would take to set things up so I can commit" :-)

That's a pretty good reason. Will commit in your name, when it's time for.

> Robert

Best regards, Michael.

Reply | Threaded
Open this post in threaded view
|

Re: bug#38136: [PATCH] Make gnus-group-get-new-news a non blocking thread

Michael Albinus
In reply to this post by Robert Pluim
Robert Pluim <[hidden email]> writes:

> Well, with debbug-gnu-summary-mode enabled you'll be able to do that,
> you'll just have to be slightly more careful with those
> commands.
>
> Hmm, how about if I changed the detection code to do
>
> - search current line
> - search backwards
> - search from (point-min)
>
> That would change nothing for single-bug ephemeral groups.

Pls do. As always, I'm happy if I can avoid work :-)

> Robert

Best regards, Michael.

Reply | Threaded
Open this post in threaded view
|

Re: bug#38136: [PATCH] Make gnus-group-get-new-news a non blocking thread

Robert Pluim
In reply to this post by Michael Albinus
>>>>> On Wed, 20 Nov 2019 18:43:42 +0100, Michael Albinus <[hidden email]> said:

    Michael> Robert Pluim <[hidden email]> writes:
    Michael> Btw, this will be `debbugs-gnu-ephemeral-from-tagged'.
    >>
    >> 'debbugs-gnu-gnus-ephemeral-from-tagged'? In theory you could
    >> implement something similar for rmail. I hereby delegate the heavy
    >> responsibility of naming this correctly to Somebody Else :-)

    Michael> We have no `debbugs-gnus-*' functions. The two accidents left I've just
    Michael> fixed in the repository.

    Michael> Maybe we shall even avoid `ephemeral' in the name (its gnus-ish), and we
    Michael> call it `debbugs-read-tagged-bugs-with-gnus'. With the upper command
    Michael> `debbugs-read-tagged-bugs'.

Hmm, is this not only for the GNU bugtracker, hence debbugs-gnu? Or
are you generalizing it to all types of debbugs instances?

Robert

Reply | Threaded
Open this post in threaded view
|

Re: bug#38136: [PATCH] Make gnus-group-get-new-news a non blocking thread

Robert Pluim
In reply to this post by Michael Albinus
>>>>> On Wed, 20 Nov 2019 18:51:29 +0100, Michael Albinus <[hidden email]> said:

    Michael> Robert Pluim <[hidden email]> writes:
    >> Well, with debbug-gnu-summary-mode enabled you'll be able to do that,
    >> you'll just have to be slightly more careful with those
    >> commands.
    >>
    >> Hmm, how about if I changed the detection code to do
    >>
    >> - search current line
    >> - search backwards
    >> - search from (point-min)
    >>
    >> That would change nothing for single-bug ephemeral groups.

    Michael> Pls do. As always, I'm happy if I can avoid work :-)

Iʼm going to have to go and read "How to commit to Elpa for dummies"
now, aren't I? :-)

Robert

Reply | Threaded
Open this post in threaded view
|

Re: bug#38136: [PATCH] Make gnus-group-get-new-news a non blocking thread

Michael Albinus
In reply to this post by Robert Pluim
Robert Pluim <[hidden email]> writes:

>     Michael> We have no `debbugs-gnus-*' functions. The two accidents
>     Michael> left I've just fixed in the repository.
>
>     Michael> Maybe we shall even avoid `ephemeral' in the name (its
>     Michael> gnus-ish), and we call it
>     Michael> `debbugs-read-tagged-bugs-with-gnus'. With the upper
>     Michael> command `debbugs-read-tagged-bugs'.
>
> Hmm, is this not only for the GNU bugtracker, hence debbugs-gnu? Or
> are you generalizing it to all types of debbugs instances?

You are right, of course. But Lars(?) did break this rule already with
`debbugs-read-emacs-bug-with-gnus'.

Well, since this and ´debbugs-read-emacs-bug-with-rmail' are the only
exceptions (and no commands to preserve), we shall rename them to
debbugs-gnu-*. And your new functions shall start then also with
debbugs-gnu-.

I shall stop to write for today. Too much confusion.

> Robert

Best regards, Michael.

Reply | Threaded
Open this post in threaded view
|

Re: bug#38136: [PATCH] Make gnus-group-get-new-news a non blocking thread

Michael Albinus
In reply to this post by Robert Pluim
Robert Pluim <[hidden email]> writes:

> Iʼm going to have to go and read "How to commit to Elpa for dummies"
> now, aren't I? :-)

It's simple. The repository is at git.sv.gnu.org:/srv/git/emacs/elpa.git

After pulling, you call "make -k", because some of the packages don't
compile successfully.

If you want also to see the external packages, you need "make externals"
between "git pull" and "make -k". That's all.

> Robert

Best regards, Michael.

12