From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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.2 Received: (qmail 3357 invoked from network); 1 Apr 2020 23:16:53 -0000 Received: from lists1.math.uh.edu (129.7.128.208) by inbox.vuxu.org with UTF8ESMTPZ; 1 Apr 2020 23:16:53 -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 1jJmb0-000126-5O; Wed, 01 Apr 2020 18:16:30 -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 1jJmav-0000zF-MD for ding@lists.math.uh.edu; Wed, 01 Apr 2020 18:16:25 -0500 Received: from quimby.gnus.org ([95.216.78.240]) by mx2.math.uh.edu with esmtps (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92.3) (envelope-from ) id 1jJmau-0004pU-9F for ding@lists.math.uh.edu; Wed, 01 Apr 2020 18:16:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID :In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To: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=P7dpeeWRaKRphZCWSsMUJZ/BBtAQIKclGnqAc8Ejfd8=; b=LPc5/Z8E3G024XKcGFfehKH50R Lasz0XtcCCVQM/IYk7eZqNyg7d51Yv7u6eYoc4UYVMg3dobnvfM3tSieGkQcDJhpVbIE9rtyWux72 9ecsGTcmJMbasYqZ7sXCBo2J2C03JLan1S5D1T4XTGZL3Fa/twEwSUA47gOvwlCKR8jY=; 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 1jJmak-0006Ks-8R for ding@gnus.org; Thu, 02 Apr 2020 01:16:20 +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 4B94AFA094; Wed, 1 Apr 2020 23:16:10 +0000 (UTC) From: Eric Abrahamsen To: hobbes@poukram.net (=?utf-8?Q?R=C3=A9mi?= Letot) Cc: ding@gnus.org Subject: Re: saving registry is fixed, but gnorb still can't gnorb-org-view References: <87d08rs5ei.fsf@sphax> <87y2rec48a.fsf@sphax> <87bloahlmo.fsf@ericabrahamsen.net> Date: Wed, 01 Apr 2020 16:16:09 -0700 In-Reply-To: <87bloahlmo.fsf@ericabrahamsen.net> (Eric Abrahamsen's message of "Wed, 01 Apr 2020 15:44:15 -0700") Message-ID: <87zhbug5l2.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; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-ID: Precedence: bulk Eric Abrahamsen writes: > hobbes@poukram.net (R=C3=A9mi Letot) writes: > >> hobbes@poukram.net writes: >> >>> Hello, >>> >>> this is what happens when I push s while in the group buffer: >> >> I quit gnus without saving newsrc, then restarted, and that problem is >> gone. I probably lost some registry entries, some recent links between >> org headings and gnus messages, but that's not a big problem. >> >> However this one is still there: >> >>> Also, might be related, gnorb-org-view (C-c v) on most (if not all) org >>> entries linked to mails produces the following: >>> >>> Debugger entered--Lisp error: (wrong-type-argument arrayp nil) >>> replace-regexp-in-string("\\(\\\\+\\)\\(?:\\'\\|[][]\\)" (closure >>> ((link) org-ts-regexp org-time-stamp-formats org-src-source-file-name >>> org-outline-regexp-bol org-inhibit-startup org-id-link-to-org-use-id >>> org-highlight-links org-comment-string org-agenda-buffer-name >>> clean-buffer-list-kill-buffer-names t) (_) (concat (make-string (/ (- >>> (match-end 1) (match-beginning 1)) 2) 92))) nil nil t 1) >>> org-link-unescape(nil) >>> nnir-run-gnorb(((query . >>> "id+6d3a4ef0-2748-409f-8607-a26112ea4353")) "nngnorb:Org tracking" > > What should be happening in this situation is that the code visits > whatever subtree has ID "6d3a4ef0-2748-409f-8607-a26112ea4353", then > collects all links of type "gnus:". Those links should look like: > > gnus:gmane.emacs.gnus.general#87y2rec48a.fsf@sphax > > Then each link is split on "#", and the second section (a message ID) is > run through `org-link-unescape'. > > In your case, there's a link that has no message ID part. You could take > a look at the Org tree in question and see which it is, and if you know > how that link might have been created (or mangled). Ooh, I might be wrong -- I got bitten by Org's changing link-related regular expressions, and fixed some code for the new regexps, and apparently wasn't careful enough with the fix. I'm assuming in your subtree there's a "plain" link to a Gnus message, ie one that isn't wrapped in brackets. Would you eval the function below and see if it fixes the problem? (defun gnorb-scan-links (bound &rest types) (unless (=3D (point) bound) (let ((alist (mapcar #'list (copy-sequence types)))) (while (re-search-forward org-link-any-re bound t) (pcase-let* ((`(,type ,link) (split-string (or (match-string-no-properties 2) (match-string-no-properties 0)) ":")) (sym (intern-soft type))) (when (and sym (memq sym types)) (push link (alist-get sym alist))))) alist)))