From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.devel Subject: Re: bug#38136: [PATCH] Make gnus-group-get-new-news a non blocking thread Date: Thu, 21 Nov 2019 17:39:36 +0100 Message-ID: References: <87imnu1knq.fsf@dick> <87r22h7mka.fsf@ericabrahamsen.net> <87sgmrouxk.fsf@gnus.org> <8736emaxw6.fsf@ericabrahamsen.net> <87sgmlsgxx.fsf@gnus.org> <87zhgsncno.fsf@ericabrahamsen.net> <87lfscesen.fsf@dick> <871ru4n58t.fsf@ericabrahamsen.net> <87ftijdcay.fsf@ericabrahamsen.net> <874kyykd8b.fsf@gnus.org> <87sgmiyd6m.fsf@gmx.de> <87pnhmwvmz.fsf@gmx.de> <87y2wavf1p.fsf@gmx.de> <875zjd5tv7.fsf@gnus.org> <87zhgpjt1m.fsf@gmx.de> <87d0dl2xgr.fsf@gnus.org> <87d0dluvp3.fsf@gmx.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="33260"; mail-complaints-to="usenet@blaine.gmane.org" Cc: Eric Abrahamsen , Lars Ingebrigtsen , dick.r.chiang@gmail.com, emacs-devel@gnu.org To: Michael Albinus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Nov 21 17:39:50 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iXpUj-0008XB-GN for ged-emacs-devel@m.gmane.org; Thu, 21 Nov 2019 17:39:50 +0100 Original-Received: from localhost ([::1]:42546 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iXpUi-0008PQ-9B for ged-emacs-devel@m.gmane.org; Thu, 21 Nov 2019 11:39:48 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33343) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iXpUc-0008PI-6k for emacs-devel@gnu.org; Thu, 21 Nov 2019 11:39:43 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iXpUb-0006Jt-0u for emacs-devel@gnu.org; Thu, 21 Nov 2019 11:39:42 -0500 Original-Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]:56218) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iXpUa-0006Jd-Op for emacs-devel@gnu.org; Thu, 21 Nov 2019 11:39:40 -0500 Original-Received: by mail-wm1-x32a.google.com with SMTP id b11so4450924wmb.5 for ; Thu, 21 Nov 2019 08:39:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :mime-version:content-transfer-encoding; bh=lUMkwAe+UFGL1QAMjiGKV0IfVdlyd1Xn9FZ6PU2gP2o=; b=Ymhi/V3TKlcSALAK9fa3NV/MTxpL7qem/egOUJbVK2nzdtVYg4XRGJuCS2bavwhz5F rpZzkm1zbEGnE7eYnLLaSxTKzayPvEdX3m0Q4lNBWCDjjulfjojIMc7bJ2xHVR7qGst8 o1GG/6gV6Krz1nYUdsKRZ3MqYui9vRx/mXkJzygtYI/HUN8VDbvzUIye+aq0uE4IbzAg YfbTTn/jIbkgqOxI9+3fkCsoy/7tszEyupo5/R8NGE5516S4nwPArLCR/gWDAj9ACVV6 8dTkxthJPpPfXK0/Sa3WeyhLkJUPbbBTwQx0X1z9rQneu7HJ4IBplRYBxFfxqLoLFyWE cKaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:mime-version:content-transfer-encoding; bh=lUMkwAe+UFGL1QAMjiGKV0IfVdlyd1Xn9FZ6PU2gP2o=; b=EuOK6vXsJFGX4W7XRMN4qOHBr5lZWm9ejk5QTqZYoCdeMlVFOzD4JMW2A9DgztL5l9 kpqaD23I8nFdwI/Otsvv4RQQ5X7clRj69SXJz8ItdrMhKdQNFMJ6yMsxF1nNpLhHSNj/ qaKeoi45j10wxOfyU/agsMWsk7jBUdoavWyWXBgBlRRRSwmf8w8LV7iB2wA48vge2vXq f4iXjaoKGrKYIpWrWIpRlKuWON+F1EEpOV6HtIc0Hb9mOo7IoywLQw+D/A8EHJKpQpDd f7d6T00WjiTsp6GAdym/dEeMfk99a842IF/9xSZMHel4Mo1MHnInsdQEicpIIIhee4VW wPMw== X-Gm-Message-State: APjAAAWfgz0jKwvaPxRNbyaYyloLN/HNJkFtQdCNEhDZjSS33kT4G9en isKSqgB6f7NoDeTb9ly7tzsBAPe2w0c= X-Google-Smtp-Source: APXvYqxwy8GWUy1jpA3JhVhdxi/IRwBZbdfGtlmAnGe9leTktf3Hb88mICasd0knJbSXztz6TWD60Q== X-Received: by 2002:a7b:c8c2:: with SMTP id f2mr10518513wml.99.1574354378203; Thu, 21 Nov 2019 08:39:38 -0800 (PST) Original-Received: from rpluim-mac ([149.5.228.1]) by smtp.gmail.com with ESMTPSA id h16sm3833099wrs.48.2019.11.21.08.39.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Nov 2019 08:39:37 -0800 (PST) In-Reply-To: <87d0dluvp3.fsf@gmx.de> (Michael Albinus's message of "Thu, 21 Nov 2019 15:54:00 +0100") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::32a X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:242582 Archived-At: >>>>> On Thu, 21 Nov 2019 15:54:00 +0100, Michael Albinus said: Michael> I've pushed a change to elpa, adding commands debbugs-gnu-tagg= ed and Michael> debbugs-org-tagged. Michael> Robert, your command in preparation might change slightly the Michael> scope. Instead of showing all messages for the tagged bugs, it= might Michael> show all messages for the bugs in the current Debbugs buffer. = This is Michael> more general. Hey, when did I sign up for this? :-) Michael> Since the current buffer might contain many bugs, there should= be a Michael> limit. Let's say, show messages of max 50 bugs (the most highe= st ones Michael> per number). I=CA=BCm not sure what you mean with that parenthetical statement. This does it for the first 10 bugs in the current debbugs list. I could add an &optional all, but since in my testing I=CA=BCve already accidentally requested 1000 bugs from the server, that might not be a good idea. diff --git a/packages/debbugs/debbugs-gnu.el b/packages/debbugs/debbugs-gnu= .el index bf3ed2cd1..3e16a78a8 100644 --- a/packages/debbugs/debbugs-gnu.el +++ b/packages/debbugs/debbugs-gnu.el @@ -1399,6 +1399,29 @@ (defun debbugs-read-emacs-bug-with-rmail (id status = merged) (define-key rmail-mode-map "E" 'debbugs-gnu-make-control-message) (rmail-show-message 1))) =20 +(defvar debbugs-gnu-read-bugs-limit 10) + +(defun debbugs-gnu-read-current-bugs-with-gnus () + "Create a Gnus group of the messages from the currently shown bugs." + (interactive) + (unless (eq debbugs-gnu-mail-backend 'gnus) + (error "This function only works with Gnus.")) + (save-excursion + (let ((mbox-url (replace-regexp-in-string + ";mboxstat=3Dyes" "" + (alist-get 'emacs gnus-bug-group-download-format-alis= t) + nil t)) + ids) + (goto-char (point-min)) + (dotimes (i debbugs-gnu-read-bugs-limit) + (push (cdr (assq 'id (tabulated-list-get-id))) ids) + (forward-line 1)) + (setq ids (delete nil (nreverse ids))) + (gnus-read-ephemeral-bug-group + ids + mbox-url) + (debbugs-gnu-summary-mode 1)))) + (defun debbugs-read-tagged-bugs-with-gnus () "Create an ephemeral Gnus group of locally tagged Emacs bugs." (interactive)