From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.bugs Subject: bug#38136: [PATCH] Make gnus-group-get-new-news a non blocking thread Date: Mon, 18 Nov 2019 15:18:10 -0800 Message-ID: <871ru4n58t.fsf@ericabrahamsen.net> 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> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="176195"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: Lars Ingebrigtsen , 38136@debbugs.gnu.org To: dick.r.chiang@gmail.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Nov 19 00:19:11 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1iWqIZ-000jiY-Di for geb-bug-gnu-emacs@m.gmane.org; Tue, 19 Nov 2019 00:19:11 +0100 Original-Received: from localhost ([::1]:40446 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iWqIY-0003Jm-6k for geb-bug-gnu-emacs@m.gmane.org; Mon, 18 Nov 2019 18:19:10 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51062) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iWqIR-0003JQ-PI for bug-gnu-emacs@gnu.org; Mon, 18 Nov 2019 18:19:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iWqIQ-0005K8-KS for bug-gnu-emacs@gnu.org; Mon, 18 Nov 2019 18:19:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:37606) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iWqIQ-0005Jg-HG for bug-gnu-emacs@gnu.org; Mon, 18 Nov 2019 18:19:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iWqIQ-0007Nu-3j; Mon, 18 Nov 2019 18:19:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eric Abrahamsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bugs@gnus.org Resent-Date: Mon, 18 Nov 2019 23:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38136 X-GNU-PR-Package: emacs,gnus X-GNU-PR-Keywords: patch Original-Received: via spool by 38136-submit@debbugs.gnu.org id=B38136.157411910228329 (code B ref 38136); Mon, 18 Nov 2019 23:19:02 +0000 Original-Received: (at 38136) by debbugs.gnu.org; 18 Nov 2019 23:18:22 +0000 Original-Received: from localhost ([127.0.0.1]:46427 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iWqHl-0007Mr-VK for submit@debbugs.gnu.org; Mon, 18 Nov 2019 18:18:22 -0500 Original-Received: from ericabrahamsen.net ([52.70.2.18]:46724 helo=mail.ericabrahamsen.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iWqHi-0007MY-95 for 38136@debbugs.gnu.org; Mon, 18 Nov 2019 18:18:19 -0500 Original-Received: from localhost (c-73-254-86-141.hsd1.wa.comcast.net [73.254.86.141]) (Authenticated sender: eric@ericabrahamsen.net) by mail.ericabrahamsen.net (Postfix) with ESMTPSA id E2322FA087; Mon, 18 Nov 2019 23:18:11 +0000 (UTC) In-Reply-To: <87lfscesen.fsf@dick> (dick r. chiang's message of "Mon, 18 Nov 2019 17:22:40 -0500") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:171949 Archived-At: On 11/18/19 17:22 PM, dick.r.chiang@gmail.com wrote: > I am very grateful for your interest and testing! My pleasure, of course -- I think this is an important direction to be going in. >> selecting a deleted buffer > > I get this quite a bit. It occurs when `gnus-summary-buffer` in the main > thread gets usurped by a background thread. I am either allowing this > important variable to get reassigned before the dynamic-let in `gnus-thread-body` > or I am not understanding dynamic-let in the presence of threads. > Incidentally, it's very difficult to point to lines of code I'm talking > about without git{hub,lab}. We could consider turning on `lexical-binding' in gnus-start.el, and just see what happens :) Regarding code line numbers, etc, I just do it manually -- I'm looking at the code to begin with, and it's trivial to check what line I'm on. >> line 1791, because it's expecting "(car gnus-group-list-mode)" to be a >> number, but it hasn't been set yet. > > I'll look into this, and add a test for `nntp-open-server`. > > I am happy to let this marinate to get people thinking about Gnus's > future. There are many historical artifacts (like blocking > `gnus-group-get-new-news` > and left-field variables like `gnus-secondary-select-methods`) that prevent > Gnus from becoming a viable MUA for more people. Well they definitely prevent bug-hunters and feature-implementers from making much progress. Stuff like `gnus-group-list-mode' drives me nuts: an undocumented variable that might totally change Gnus' behavior. But unpicking this complexity is slow work. > Some other fellow recently posted about an ephemeral group branch which he > somehow got others to test for him in-parallel. I don't know how he did that > outside the debbugs system. I make liberal use of git worktrees. I made a local branch to apply your patch, then checked it out into a separate directory with "git worktree add" and built Emacs there. Then I run that Emacs. For Gnus stuff I have a package called gnus-mock that provides a working Gnus environment with dummy data. I point gnus-mock at the worktree directory, and it starts up a clean Emacs with the Gnus data in place. I do most of my testing there. On the Emacs side it's projectile and magit: projectile indexes the worktree as a separate project. If you send me a line number from your branch to look at, I do "C-c p p" -> helm-projectile-switch-project which opens up magit for the project, then "C-c p f" -> helm-projectile-find-file, then the usual "M-g g" -> goto-line. Not too inconvenient. If you have access to the Emacs repos and are collaborating with others who do, too, then it can make sense to push a "feature/foo" branch to the repos, and share it. I've done testing that way. What I'd like is a Gnus summary minor mode I could enable in, say, "emacs.bugs", which turns commit hashes into hyperlinks and provides commands for "apply the attached patch to some worktree". I think other people have done that, I've just never gotten around to it. Eric