From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 25938 invoked from network); 7 Jun 2020 15:37:35 -0000 Received: from lists1.math.uh.edu (129.7.128.208) by inbox.vuxu.org with ESMTPUTF8; 7 Jun 2020 15:37:35 -0000 Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by lists1.math.uh.edu with smtp (Exim 4.92.3) (envelope-from ) id 1jhxLV-0006Tm-Vk; Sun, 07 Jun 2020 10:36:25 -0500 Received: from mx2.math.uh.edu ([129.7.128.33]) by lists1.math.uh.edu with esmtps (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92.3) (envelope-from ) id 1jhxLR-0006Qt-I6 for ding@lists.math.uh.edu; Sun, 07 Jun 2020 10:36:21 -0500 Received: from quimby.gnus.org ([95.216.78.240]) by mx2.math.uh.edu with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1jhxLP-006ecW-VA for ding@lists.math.uh.edu; Sun, 07 Jun 2020 10:36:21 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=Ap67690I5xHs5LHX5VnQbTfvL1KRVhgC1oLSCZ2UBFY=; b=f0pdAQvtGsSjcJiBmLjs2DW9Lx FkQWaF7+8/3XqWbgbS2x44FaBBbl5f6nCwa8jNVSJbtOhPChYjJRaRwOT6QOZhurWrXOC80v/UdWC sC9wA0IfpUv3WSBo0iG6MQS1YlxsednWwnRYAcWUGqLe6f77BD8FKuFxddM7yuGzxpRM=; Received: from ericabrahamsen.net ([52.70.2.18] helo=mail.ericabrahamsen.net) by quimby.gnus.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jhxLF-0008V8-Qi for ding@gnus.org; Sun, 07 Jun 2020 17:36:14 +0200 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 539C3FA034; Sun, 7 Jun 2020 15:36:07 +0000 (UTC) From: Eric Abrahamsen To: Tassilo Horn Cc: ding@gnus.org Subject: Re: nnir-summary-line-format doesn't work References: <87a71gsg6e.fsf@gnu.org> <87mu5grm4n.fsf@ericabrahamsen.net> <87v9k39u9a.fsf@gnu.org> Date: Sun, 07 Jun 2020 08:36:05 -0700 In-Reply-To: <87v9k39u9a.fsf@gnu.org> (Tassilo Horn's message of "Sun, 07 Jun 2020 10:04:33 +0200") Message-ID: <87eeqqriqi.fsf@ericabrahamsen.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain List-ID: Precedence: bulk Tassilo Horn writes: > Eric Abrahamsen writes: > > Hi Eric, > >>> The patch below fixes this problem. Could someone with a bit more >>> Gnus knowledge have a look at it and tell me if IDRT? >> >> I would expect that you can just move all of `nnir-mode' to >> `gnus-summary-generate-hook'. The only other thing `nnir-mode' does is >> mess with the article-(delete|move|expire)-hook, and those hooks have >> all had their local values set by this stage. >> >> It would be a simpler solution, anyway -- try it out and see if >> anything goes wrong? > > Seems to work. So I would like to push this change: > > 1 file changed, 6 insertions(+), 3 deletions(-) > lisp/gnus/nnir.el | 9 ++++++--- > > modified lisp/gnus/nnir.el > @@ -663,7 +663,7 @@ nnir-open-server > (let ((backend (car (gnus-server-to-method server)))) > (if backend > (nnoo-change-server backend server definitions) > - (add-hook 'gnus-summary-prepared-hook 'nnir-mode) > + (add-hook 'gnus-summary-generate-hook 'nnir-mode) > (nnoo-change-server 'nnir server definitions)))) > > (deffoo nnir-request-group (group &optional server dont-check _info) > @@ -1850,8 +1850,11 @@ nnir-registry-action > > (defun nnir-mode () > (when (eq (car (gnus-find-method-for-group gnus-newsgroup-name)) 'nnir) > - (setq gnus-summary-line-format > - (or nnir-summary-line-format gnus-summary-line-format)) > + (when (and nnir-summary-line-format > + (not (string= nnir-summary-line-format > + gnus-summary-line-format))) > + (setq gnus-summary-line-format nnir-summary-line-format) > + (gnus-update-format-specifications nil 'summary)) > (when (bound-and-true-p gnus-registry-enabled) > (remove-hook 'gnus-summary-article-delete-hook 'gnus-registry-action t) > (remove-hook 'gnus-summary-article-move-hook 'gnus-registry-action t) > > The `gnus-update-format-specifications' seems to be needed anyway when a > different summary line should be shown in nnir summaries. > > I'd like to push to emacs-27 (given that the nnir code is almost the > same there), although I couldn't test it there because of an error. > When I do a nnir search there which has any matches, I get to an infloop > where Emacs blinks and repeatedly shows Patch looks good to me, and I see it's in. Hope Eli doesn't bite you for making Emacs 27 changes at this late hour... :)