Gnus development mailing list
 help / color / mirror / Atom feed
* can't save gnus registry anymore, and gnorb can't gnorb-org-view
@ 2020-04-01 13:32 hobbes
  2020-04-01 20:59 ` saving registry is fixed, but gnorb still " Rémi Letot
  0 siblings, 1 reply; 11+ messages in thread
From: hobbes @ 2020-04-01 13:32 UTC (permalink / raw)
  To: ding

Hello,

this is what happens when I push s while in the group buffer:

Debugger entered--Lisp error: (error "Odd number of elements in hash table data")
  read("#s(hash-table size 51200 test equal rehash-size 2.0 rehash-threshold 0.8125 data (... I trimmed private data here ...))")
  #f(compiled-function (key val) #<bytecode 0x1c2bb29>)(subject #<hash-table equal 37237/51200 0x11377a1>)
  maphash(#f(compiled-function (key val) #<bytecode 0x1c2bb29>) #<hash-table eql 5/100 0x209cf89>)
  eieio-override-prin1(#<hash-table eql 5/100 0x1a5c86d>)
  #f(compiled-function (this &optional comment) "Write object THIS out to the current stream.\nThis writes out the vector version of this object.  Complex and recursive\nobject are discouraged from being written.\n  If optional COMMENT is non-nil, include comments when outputting\nthis object." #<bytecode 0x4a77ed>)(#<registry-db registry-db> ";; EIEIO PERSISTENT OBJECT")
  apply(#f(compiled-function (this &optional comment) "Write object THIS out to the current stream.\nThis writes out the vector version of this object.  Complex and recursive\nobject are discouraged from being written.\n  If optional COMMENT is non-nil, include comments when outputting\nthis object." #<bytecode 0x4a77ed>) (#<registry-db registry-db> ";; EIEIO PERSISTENT OBJECT"))
  #f(compiled-function (&rest cnm-args) #<bytecode 0x1c2bb1d>)(#<registry-db registry-db> ";; EIEIO PERSISTENT OBJECT")
  #f(compiled-function (cl--cnm this &optional comment) "Write persistent object THIS out to the current stream.\nOptional argument COMMENT is a header line comment." #<bytecode 0x11c6f5d>)(#f(compiled-function (&rest cnm-args) #<bytecode 0x1c2bb1d>) #<registry-db registry-db> ";; EIEIO PERSISTENT OBJECT")
  apply(#f(compiled-function (cl--cnm this &optional comment) "Write persistent object THIS out to the current stream.\nOptional argument COMMENT is a header line comment." #<bytecode 0x11c6f5d>) #f(compiled-function (&rest cnm-args) #<bytecode 0x1c2bb1d>) (#<registry-db registry-db> ";; EIEIO PERSISTENT OBJECT"))
  #f(compiled-function (&rest args) #<bytecode 0x35faeb1>)(#<registry-db registry-db> ";; EIEIO PERSISTENT OBJECT")
  apply(#f(compiled-function (&rest args) #<bytecode 0x35faeb1>) #<registry-db registry-db> ";; EIEIO PERSISTENT OBJECT")
  object-write(#<registry-db registry-db> ";; EIEIO PERSISTENT OBJECT")
  #f(compiled-function (this &optional file) "Save persistent object THIS to disk.\nOptional argument FILE overrides the file name specified in the object\ninstance." #<bytecode 0x11c6fd1>)(#<registry-db registry-db> "~/.gnus.registry.eieio")
  apply(#f(compiled-function (this &optional file) "Save persistent object THIS to disk.\nOptional argument FILE overrides the file name specified in the object\ninstance." #<bytecode 0x11c6fd1>) #<registry-db registry-db> "~/.gnus.registry.eieio")
  eieio-persistent-save(#<registry-db registry-db> "~/.gnus.registry.eieio")
  gnus-registry-save()
  run-hooks(gnus-save-newsrc-hook)
  apply(run-hooks gnus-save-newsrc-hook)
  gnus-run-hooks(gnus-save-newsrc-hook)
  gnus-save-newsrc-file(nil)
  gnus-group-save-newsrc(nil)
  funcall-interactively(gnus-group-save-newsrc nil)
  call-interactively(gnus-group-save-newsrc nil nil)
  command-execute(gnus-group-save-newsrc)

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" ("gnorb-id+6d3a4ef0-2748-409f-8607-a26112ea4353"))
  #f(compiled-function (x) #<bytecode 0x1343971>)(("nngnorb:Org tracking" ("gnorb-id+6d3a4ef0-2748-409f-8607-a26112ea4353")))
  mapcar(#f(compiled-function (x) #<bytecode 0x1343971>) (("nngnorb:Org tracking" ("gnorb-id+6d3a4ef0-2748-409f-8607-a26112ea4353"))))
  nnir-run-query(((nnir-query-spec (query . "id+6d3a4ef0-2748-409f-8607-a26112ea4353")) (nnir-group-spec ("nngnorb:Org tracking" ("gnorb-id+6d3a4ef0-2748-409f-8607-a26112ea4353")))))
  nnir-request-group("gnorb-id+6d3a4ef0-2748-409f-8607-a26112ea4353" "nngnorb:Org tracking-ephemeral" t ("nnir:gnorb-id+6d3a4ef0-2748-409f-8607-a26112ea4353" 3 nil nil (nnir "nngnorb:Org tracking-ephemeral" (nnir-address "nngnorb:Org tracking")) ((quit-config when (and (window-configuration-p gnorb-window-conf) gnorb-return-marker) (set-window-configuration gnorb-window-conf) (goto-char gnorb-return-marker)) (nnir-specs (nnir-query-spec (query . "id+6d3a4ef0-2748-409f-8607-a26112ea4353")) (nnir-group-spec ("nngnorb:Org tracking" ("gnorb-id+6d3a4ef0-2748-409f-8607-a26112ea4353")))) (nnir-artlist))))
  gnus-request-group("nnir:gnorb-id+6d3a4ef0-2748-409f-8607-a26112ea4353" t nil ("nnir:gnorb-id+6d3a4ef0-2748-409f-8607-a26112ea4353" 3 nil nil (nnir "nngnorb:Org tracking-ephemeral" (nnir-address "nngnorb:Org tracking")) ((quit-config when (and (window-configuration-p gnorb-window-conf) gnorb-return-marker) (set-window-configuration gnorb-window-conf) (goto-char gnorb-return-marker)) (nnir-specs (nnir-query-spec (query . "id+6d3a4ef0-2748-409f-8607-a26112ea4353")) (nnir-group-spec ("nngnorb:Org tracking" ("gnorb-id+6d3a4ef0-2748-409f-8607-a26112ea4353")))) (nnir-artlist))))
  gnus-select-newsgroup("nnir:gnorb-id+6d3a4ef0-2748-409f-8607-a26112ea4353" t nil)
  gnus-summary-read-group-1("nnir:gnorb-id+6d3a4ef0-2748-409f-8607-a26112ea4353" t t nil nil nil)
  gnus-summary-read-group("nnir:gnorb-id+6d3a4ef0-2748-409f-8607-a26112ea4353" t t nil nil nil nil)
  (let ((no-display (eq all 0)) (group (or group (gnus-group-group-name))) number active marked entry) (if (eq all 0) (progn (setq all nil))) (if group nil (error "No group on current line")) (setq marked (nth 3 (nth 2 (setq entry (symbol-value (intern-soft group gnus-newsrc-hashtb)))))) (setq number (cond ((numberp all) all) (entry (car entry)) ((setq active (symbol-value (intern-soft group gnus-active-hashtb))) (- (1+ (cdr active)) (car active))))) (gnus-summary-read-group group (or all (and (numberp number) (= 0 (+ number (gnus-range-length (cdr ...)) (gnus-range-length (cdr ...)))))) no-article nil no-display nil select-articles))
  gnus-group-read-group(t t "nnir:gnorb-id+6d3a4ef0-2748-409f-8607-a26112ea4353" nil)
  (let ((gnus-large-newsgroup gnus-large-ephemeral-newsgroup) (gnus-fetch-old-headers gnus-fetch-old-ephemeral-headers)) (gnus-group-read-group (or number t) t group select-articles))
  (if (let ((gnus-large-newsgroup gnus-large-ephemeral-newsgroup) (gnus-fetch-old-headers gnus-fetch-old-ephemeral-headers)) (gnus-group-read-group (or number t) t group select-articles)) (progn group))
  (condition-case nil (if (let ((gnus-large-newsgroup gnus-large-ephemeral-newsgroup) (gnus-fetch-old-headers gnus-fetch-old-ephemeral-headers)) (gnus-group-read-group (or number t) t group select-articles)) (progn group)) (quit (if debug-on-quit (debug "Quit") (message "Quit reading the ephemeral group")) nil))
  (if request-only group (condition-case nil (if (let ((gnus-large-newsgroup gnus-large-ephemeral-newsgroup) (gnus-fetch-old-headers gnus-fetch-old-ephemeral-headers)) (gnus-group-read-group (or number t) t group select-articles)) (progn group)) (quit (if debug-on-quit (debug "Quit") (message "Quit reading the ephemeral group")) nil)))
  (let ((group (if (gnus-group-foreign-p group) group (gnus-group-prefixed-name (let ((gname group)) (if (string-match "^[^:]+:" gname) (substring gname ...) gname)) method)))) (set (intern group gnus-active-hashtb) nil) (set (intern group gnus-newsrc-hashtb) (list -1 nil (list group gnus-level-default-subscribed nil nil method (cons (cons (quote quit-config) (cond (quit-config quit-config) (... ...) (t ...))) parameters)))) (setq gnus-ephemeral-servers (cons method gnus-ephemeral-servers)) (if (gnus-buffer-live-p gnus-group-buffer) (progn (set-buffer gnus-group-buffer))) (if (gnus-check-server method) nil (error "Unable to contact server: %s" (gnus-status-message method))) (if activate (progn (gnus-activate-group group (quote scan)) (if (gnus-request-group group) nil (error "Couldn't request group: %s" (nnheader-get-report (car method)))))) (if request-only group (condition-case nil (if (let ((gnus-large-newsgroup gnus-large-ephemeral-newsgroup) (gnus-fetch-old-headers gnus-fetch-old-ephemeral-headers)) (gnus-group-read-group (or number t) t group select-articles)) (progn group)) (quit (if debug-on-quit (debug "Quit") (message "Quit reading the ephemeral group")) nil))))
  gnus-group-read-ephemeral-group("gnorb-id+6d3a4ef0-2748-409f-8607-a26112ea4353" (nnir "nngnorb:Org tracking") nil (when (and (window-configuration-p gnorb-window-conf) gnorb-return-marker) (set-window-configuration gnorb-window-conf) (goto-char gnorb-return-marker)) nil nil ((nnir-specs (nnir-query-spec (query . "id+6d3a4ef0-2748-409f-8607-a26112ea4353")) (nnir-group-spec ("nngnorb:Org tracking" ("gnorb-id+6d3a4ef0-2748-409f-8607-a26112ea4353")))) (nnir-artlist)))
  gnorb-gnus-search-messages("id+6d3a4ef0-2748-409f-8607-a26112ea4353" nil "contacter xeptor / flexit pour problème alim portable de damien" (when (and (window-configuration-p gnorb-window-conf) gnorb-return-marker) (set-window-configuration gnorb-window-conf) (goto-char gnorb-return-marker)))
  gnorb-org-view(nil)
  funcall-interactively(gnorb-org-view nil)
  call-interactively(gnorb-org-view nil nil)
  command-execute(gnorb-org-view)

Also, might be related, I updated most packages on my emacs a few days
back. Including gnorb and org.

Also, might be related, two weeks ago I asked for help here because my
gnus registry was huge and took 21 seconds to save, and I couldn't prune
it. I applied the gnus-registry-fixit fix, which worked at the time. And
I used it without any problem for some times, so it might not be that
related, but I still mention it just in case :-)

I tried to diagnose it myself, but this is waaaaay beyond my elisp-foo
:-)

Thanks,
-- 
Rémi



^ permalink raw reply	[flat|nested] 11+ messages in thread

* saving registry is fixed, but gnorb still can't gnorb-org-view
  2020-04-01 13:32 can't save gnus registry anymore, and gnorb can't gnorb-org-view hobbes
@ 2020-04-01 20:59 ` Rémi Letot
  2020-04-01 22:44   ` Eric Abrahamsen
  0 siblings, 1 reply; 11+ messages in thread
From: Rémi Letot @ 2020-04-01 20:59 UTC (permalink / raw)
  To: ding

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" ("gnorb-id+6d3a4ef0-2748-409f-8607-a26112ea4353"))
>   #f(compiled-function (x) #<bytecode 0x1343971>)(("nngnorb:Org tracking" ("gnorb-id+6d3a4ef0-2748-409f-8607-a26112ea4353")))
>   mapcar(#f(compiled-function (x) #<bytecode 0x1343971>) (("nngnorb:Org tracking" ("gnorb-id+6d3a4ef0-2748-409f-8607-a26112ea4353"))))
>   nnir-run-query(((nnir-query-spec (query
> . "id+6d3a4ef0-2748-409f-8607-a26112ea4353")) (nnir-group-spec
> ("nngnorb:Org tracking"
> ("gnorb-id+6d3a4ef0-2748-409f-8607-a26112ea4353")))))
>   nnir-request-group("gnorb-id+6d3a4ef0-2748-409f-8607-a26112ea4353"
> "nngnorb:Org tracking-ephemeral" t
> ("nnir:gnorb-id+6d3a4ef0-2748-409f-8607-a26112ea4353" 3 nil nil (nnir
> "nngnorb:Org tracking-ephemeral" (nnir-address "nngnorb:Org
> tracking")) ((quit-config when (and (window-configuration-p
> gnorb-window-conf) gnorb-return-marker) (set-window-configuration
> gnorb-window-conf) (goto-char gnorb-return-marker)) (nnir-specs
> (nnir-query-spec (query . "id+6d3a4ef0-2748-409f-8607-a26112ea4353"))
> (nnir-group-spec ("nngnorb:Org tracking"
> ("gnorb-id+6d3a4ef0-2748-409f-8607-a26112ea4353")))) (nnir-artlist))))
>   gnus-request-group("nnir:gnorb-id+6d3a4ef0-2748-409f-8607-a26112ea4353"
> t nil ("nnir:gnorb-id+6d3a4ef0-2748-409f-8607-a26112ea4353" 3 nil nil
> (nnir "nngnorb:Org tracking-ephemeral" (nnir-address "nngnorb:Org
> tracking")) ((quit-config when (and (window-configuration-p
> gnorb-window-conf) gnorb-return-marker) (set-window-configuration
> gnorb-window-conf) (goto-char gnorb-return-marker)) (nnir-specs
> (nnir-query-spec (query . "id+6d3a4ef0-2748-409f-8607-a26112ea4353"))
> (nnir-group-spec ("nngnorb:Org tracking"
> ("gnorb-id+6d3a4ef0-2748-409f-8607-a26112ea4353")))) (nnir-artlist))))
>   gnus-select-newsgroup("nnir:gnorb-id+6d3a4ef0-2748-409f-8607-a26112ea4353" t nil)
>   gnus-summary-read-group-1("nnir:gnorb-id+6d3a4ef0-2748-409f-8607-a26112ea4353" t t nil nil nil)
>   gnus-summary-read-group("nnir:gnorb-id+6d3a4ef0-2748-409f-8607-a26112ea4353" t t nil nil nil nil)
>   (let ((no-display (eq all 0)) (group (or group
> (gnus-group-group-name))) number active marked entry) (if (eq all 0)
> (progn (setq all nil))) (if group nil (error "No group on current
> line")) (setq marked (nth 3 (nth 2 (setq entry (symbol-value
> (intern-soft group gnus-newsrc-hashtb)))))) (setq number (cond
> ((numberp all) all) (entry (car entry)) ((setq active (symbol-value
> (intern-soft group gnus-active-hashtb))) (- (1+ (cdr active)) (car
> active))))) (gnus-summary-read-group group (or all (and (numberp
> number) (= 0 (+ number (gnus-range-length (cdr ...))
> (gnus-range-length (cdr ...)))))) no-article nil no-display nil
> select-articles))
>   gnus-group-read-group(t t "nnir:gnorb-id+6d3a4ef0-2748-409f-8607-a26112ea4353" nil)
>   (let ((gnus-large-newsgroup gnus-large-ephemeral-newsgroup)
> (gnus-fetch-old-headers gnus-fetch-old-ephemeral-headers))
> (gnus-group-read-group (or number t) t group select-articles))
>   (if (let ((gnus-large-newsgroup gnus-large-ephemeral-newsgroup)
> (gnus-fetch-old-headers gnus-fetch-old-ephemeral-headers))
> (gnus-group-read-group (or number t) t group select-articles)) (progn
> group))
>   (condition-case nil (if (let ((gnus-large-newsgroup
> gnus-large-ephemeral-newsgroup) (gnus-fetch-old-headers
> gnus-fetch-old-ephemeral-headers)) (gnus-group-read-group (or number
> t) t group select-articles)) (progn group)) (quit (if debug-on-quit
> (debug "Quit") (message "Quit reading the ephemeral group")) nil))
>   (if request-only group (condition-case nil (if (let
> ((gnus-large-newsgroup gnus-large-ephemeral-newsgroup)
> (gnus-fetch-old-headers gnus-fetch-old-ephemeral-headers))
> (gnus-group-read-group (or number t) t group select-articles)) (progn
> group)) (quit (if debug-on-quit (debug "Quit") (message "Quit reading
> the ephemeral group")) nil)))
>   (let ((group (if (gnus-group-foreign-p group) group
> (gnus-group-prefixed-name (let ((gname group)) (if (string-match
> "^[^:]+:" gname) (substring gname ...) gname)) method)))) (set (intern
> group gnus-active-hashtb) nil) (set (intern group gnus-newsrc-hashtb)
> (list -1 nil (list group gnus-level-default-subscribed nil nil method
> (cons (cons (quote quit-config) (cond (quit-config quit-config)
> (... ...) (t ...))) parameters)))) (setq gnus-ephemeral-servers (cons
> method gnus-ephemeral-servers)) (if (gnus-buffer-live-p
> gnus-group-buffer) (progn (set-buffer gnus-group-buffer))) (if
> (gnus-check-server method) nil (error "Unable to contact server: %s"
> (gnus-status-message method))) (if activate (progn
> (gnus-activate-group group (quote scan)) (if (gnus-request-group
> group) nil (error "Couldn't request group: %s" (nnheader-get-report
> (car method)))))) (if request-only group (condition-case nil (if (let
> ((gnus-large-newsgroup gnus-large-ephemeral-newsgroup)
> (gnus-fetch-old-headers gnus-fetch-old-ephemeral-headers))
> (gnus-group-read-group (or number t) t group select-articles)) (progn
> group)) (quit (if debug-on-quit (debug "Quit") (message "Quit reading
> the ephemeral group")) nil))))
>   gnus-group-read-ephemeral-group("gnorb-id+6d3a4ef0-2748-409f-8607-a26112ea4353"
> (nnir "nngnorb:Org tracking") nil (when (and (window-configuration-p
> gnorb-window-conf) gnorb-return-marker) (set-window-configuration
> gnorb-window-conf) (goto-char gnorb-return-marker)) nil nil
> ((nnir-specs (nnir-query-spec (query
> . "id+6d3a4ef0-2748-409f-8607-a26112ea4353")) (nnir-group-spec
> ("nngnorb:Org tracking"
> ("gnorb-id+6d3a4ef0-2748-409f-8607-a26112ea4353")))) (nnir-artlist)))
>   gnorb-gnus-search-messages("id+6d3a4ef0-2748-409f-8607-a26112ea4353"
> nil "contacter xeptor / flexit pour problème alim portable de damien"
> (when (and (window-configuration-p gnorb-window-conf)
> gnorb-return-marker) (set-window-configuration gnorb-window-conf)
> (goto-char gnorb-return-marker)))
>   gnorb-org-view(nil)
>   funcall-interactively(gnorb-org-view nil)
>   call-interactively(gnorb-org-view nil nil)
>   command-execute(gnorb-org-view)
>


Any idea ?

Thanks,
-- 
Rémi



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: saving registry is fixed, but gnorb still can't gnorb-org-view
  2020-04-01 20:59 ` saving registry is fixed, but gnorb still " Rémi Letot
@ 2020-04-01 22:44   ` Eric Abrahamsen
  2020-04-01 23:16     ` Eric Abrahamsen
  0 siblings, 1 reply; 11+ messages in thread
From: Eric Abrahamsen @ 2020-04-01 22:44 UTC (permalink / raw)
  To: Rémi Letot; +Cc: ding

hobbes@poukram.net (Rémi 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).

I can put a filter in to make sure that links with no message-id part
are dropped -- they are bogus, anyway. I also wonder why I'm running
them through `org-link-unescape' at all: do message-ids ever have square
brackets in them? But even if I took that out, a null message-id would
just cause an error further down the line.

Eric


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: saving registry is fixed, but gnorb still can't gnorb-org-view
  2020-04-01 22:44   ` Eric Abrahamsen
@ 2020-04-01 23:16     ` Eric Abrahamsen
  2020-04-02 13:05       ` hobbes
  0 siblings, 1 reply; 11+ messages in thread
From: Eric Abrahamsen @ 2020-04-01 23:16 UTC (permalink / raw)
  To: Rémi Letot; +Cc: ding

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> hobbes@poukram.net (Rémi 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 (= (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)))


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: saving registry is fixed, but gnorb still can't gnorb-org-view
  2020-04-01 23:16     ` Eric Abrahamsen
@ 2020-04-02 13:05       ` hobbes
  2020-04-02 14:55         ` Eric Abrahamsen
  0 siblings, 1 reply; 11+ messages in thread
From: hobbes @ 2020-04-02 13:05 UTC (permalink / raw)
  To: ding

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

>> 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 (= (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)))

So, after some more experimenting: it's indeed linked to the gnus links
in the org tree.

But all links have brackets, and all have a message id, and I can follow
them. Evaluating the defun didn't help.

If I remove the links, C-c v works like it should, so it's clearly
linked to those links...

Thanks,
-- 
Rémi



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: saving registry is fixed, but gnorb still can't gnorb-org-view
  2020-04-02 13:05       ` hobbes
@ 2020-04-02 14:55         ` Eric Abrahamsen
  2020-04-02 15:03           ` hobbes
  0 siblings, 1 reply; 11+ messages in thread
From: Eric Abrahamsen @ 2020-04-02 14:55 UTC (permalink / raw)
  To: hobbes; +Cc: ding

hobbes@poukram.net writes:

> Eric Abrahamsen <eric@ericabrahamsen.net> writes:

[...]

> So, after some more experimenting: it's indeed linked to the gnus links
> in the org tree.
>
> But all links have brackets, and all have a message id, and I can follow
> them. Evaluating the defun didn't help.
>
> If I remove the links, C-c v works like it should, so it's clearly
> linked to those links...

That's perplexing, but at least the location of the problem is clear.
Would you feel comfortable mailing me the contents of the subtree in
question, off-list? Obviously redacting anything sensitive.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: saving registry is fixed, but gnorb still can't gnorb-org-view
  2020-04-02 14:55         ` Eric Abrahamsen
@ 2020-04-02 15:03           ` hobbes
  2020-04-02 16:28             ` Eric Abrahamsen
  2020-04-02 18:15             ` Eric Abrahamsen
  0 siblings, 2 replies; 11+ messages in thread
From: hobbes @ 2020-04-02 15:03 UTC (permalink / raw)
  To: ding

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> hobbes@poukram.net writes:
>
>> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>
> [...]
>
>> So, after some more experimenting: it's indeed linked to the gnus links
>> in the org tree.
>>
>> But all links have brackets, and all have a message id, and I can follow
>> them. Evaluating the defun didn't help.
>>
>> If I remove the links, C-c v works like it should, so it's clearly
>> linked to those links...
>
> That's perplexing, but at least the location of the problem is clear.
> Would you feel comfortable mailing me the contents of the subtree in
> question, off-list? Obviously redacting anything sensitive.

The problem seems to happen as soon as there is a gnus link in the org
entry, so I just created one:

** TODO debug gnorb
:PROPERTIES:
:ID:       8be1357a-1323-4950-93c2-019b0f04a904
:END:
[2020-04-02 jeu 16:58]
test entry to debug gnorb
[[gnus:nnimap+hobbes:INBOX#87369mym1d.fsf@ericabrahamsen.net][Email from Eric Abrahamsen: Re: saving registry is fixed, but gnorb still can't gnorb-org-view]]

The link works if I visit it.

Thanks,
-- 
Rémi Letot



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: saving registry is fixed, but gnorb still can't gnorb-org-view
  2020-04-02 15:03           ` hobbes
@ 2020-04-02 16:28             ` Eric Abrahamsen
  2020-04-02 18:15             ` Eric Abrahamsen
  1 sibling, 0 replies; 11+ messages in thread
From: Eric Abrahamsen @ 2020-04-02 16:28 UTC (permalink / raw)
  To: hobbes; +Cc: ding

hobbes@poukram.net writes:

> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>
>> hobbes@poukram.net writes:
>>
>>> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>>
>> [...]
>>
>>> So, after some more experimenting: it's indeed linked to the gnus links
>>> in the org tree.
>>>
>>> But all links have brackets, and all have a message id, and I can follow
>>> them. Evaluating the defun didn't help.
>>>
>>> If I remove the links, C-c v works like it should, so it's clearly
>>> linked to those links...
>>
>> That's perplexing, but at least the location of the problem is clear.
>> Would you feel comfortable mailing me the contents of the subtree in
>> question, off-list? Obviously redacting anything sensitive.
>
> The problem seems to happen as soon as there is a gnus link in the org
> entry, so I just created one:
>
> ** TODO debug gnorb
> :PROPERTIES:
> :ID:       8be1357a-1323-4950-93c2-019b0f04a904
> :END:
> [2020-04-02 jeu 16:58]
> test entry to debug gnorb
> [[gnus:nnimap+hobbes:INBOX#87369mym1d.fsf@ericabrahamsen.net][Email
> from Eric Abrahamsen: Re: saving registry is fixed, but gnorb still
> can't gnorb-org-view]]
>
> The link works if I visit it.

Okay I see the problem. Hang on a bit...


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: saving registry is fixed, but gnorb still can't gnorb-org-view
  2020-04-02 15:03           ` hobbes
  2020-04-02 16:28             ` Eric Abrahamsen
@ 2020-04-02 18:15             ` Eric Abrahamsen
  2020-04-05 19:18               ` hobbes
  1 sibling, 1 reply; 11+ messages in thread
From: Eric Abrahamsen @ 2020-04-02 18:15 UTC (permalink / raw)
  To: hobbes; +Cc: ding

[Didn't see this show up on gnus.general, so I'm resending it]

hobbes@poukram.net writes:

> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>
>> hobbes@poukram.net writes:
>>
>>> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>>
>> [...]
>>
>>> So, after some more experimenting: it's indeed linked to the gnus links
>>> in the org tree.
>>>
>>> But all links have brackets, and all have a message id, and I can follow
>>> them. Evaluating the defun didn't help.
>>>
>>> If I remove the links, C-c v works like it should, so it's clearly
>>> linked to those links...
>>
>> That's perplexing, but at least the location of the problem is clear.
>> Would you feel comfortable mailing me the contents of the subtree in
>> question, off-list? Obviously redacting anything sensitive.
>
> The problem seems to happen as soon as there is a gnus link in the org
> entry, so I just created one:
>
> ** TODO debug gnorb
> :PROPERTIES:
> :ID:       8be1357a-1323-4950-93c2-019b0f04a904
> :END:
> [2020-04-02 jeu 16:58]
> test entry to debug gnorb
> [[gnus:nnimap+hobbes:INBOX#87369mym1d.fsf@ericabrahamsen.net][Email
> from Eric Abrahamsen: Re: saving registry is fixed, but gnorb still
> can't gnorb-org-view]]
>
> The link works if I visit it.

Okay, would you try this version of the function? Thanks...

(defun gnorb-scan-links (bound &rest types)
  (unless (= (point) bound)
    (let ((alist (mapcar #'list (copy-sequence types))))
      (while (re-search-forward org-link-any-re bound t)
	(let ((link (or
		     ;; Bracket link.
		     (match-string-no-properties 2)
		     ;; "Bare" link.
		     (match-string-no-properties 0)))
	      sym)
	  (when (string-match "\\([^:]+\\):\\(.+\\)" link)
	    (setq sym (intern-soft (match-string 1 link))
		  link (match-string 2 link))
	    (when (and sym (memq sym types))
	      (push link (alist-get sym alist))))))
      alist)))


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: saving registry is fixed, but gnorb still can't gnorb-org-view
  2020-04-02 18:15             ` Eric Abrahamsen
@ 2020-04-05 19:18               ` hobbes
  2020-04-05 21:32                 ` Eric Abrahamsen
  0 siblings, 1 reply; 11+ messages in thread
From: hobbes @ 2020-04-05 19:18 UTC (permalink / raw)
  To: ding

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

>> The problem seems to happen as soon as there is a gnus link in the org
>> entry, so I just created one:
>>
>> ** TODO debug gnorb
>> :PROPERTIES:
>> :ID:       8be1357a-1323-4950-93c2-019b0f04a904
>> :END:
>> [2020-04-02 jeu 16:58]
>> test entry to debug gnorb
>> [[gnus:nnimap+hobbes:INBOX#87369mym1d.fsf@ericabrahamsen.net][Email
>> from Eric Abrahamsen: Re: saving registry is fixed, but gnorb still
>> can't gnorb-org-view]]
>>
>> The link works if I visit it.
>
> Okay, would you try this version of the function? Thanks...
>
> (defun gnorb-scan-links (bound &rest types)
>   (unless (= (point) bound)
>     (let ((alist (mapcar #'list (copy-sequence types))))
>       (while (re-search-forward org-link-any-re bound t)
> 	(let ((link (or
> 		     ;; Bracket link.
> 		     (match-string-no-properties 2)
> 		     ;; "Bare" link.
> 		     (match-string-no-properties 0)))
> 	      sym)
> 	  (when (string-match "\\([^:]+\\):\\(.+\\)" link)
> 	    (setq sym (intern-soft (match-string 1 link))
> 		  link (match-string 2 link))
> 	    (when (and sym (memq sym types))
> 	      (push link (alist-get sym alist))))))
>       alist)))

Yep, works ! Thanks a lot :-)

-- 
Remi



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: saving registry is fixed, but gnorb still can't gnorb-org-view
  2020-04-05 19:18               ` hobbes
@ 2020-04-05 21:32                 ` Eric Abrahamsen
  0 siblings, 0 replies; 11+ messages in thread
From: Eric Abrahamsen @ 2020-04-05 21:32 UTC (permalink / raw)
  To: hobbes; +Cc: ding

hobbes@poukram.net writes:


[...]

> Yep, works! Thanks a lot :-)

Great, I'll do a release with this change in the next day.

Thanks for the report,
Eric


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2020-04-05 21:33 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-01 13:32 can't save gnus registry anymore, and gnorb can't gnorb-org-view hobbes
2020-04-01 20:59 ` saving registry is fixed, but gnorb still " Rémi Letot
2020-04-01 22:44   ` Eric Abrahamsen
2020-04-01 23:16     ` Eric Abrahamsen
2020-04-02 13:05       ` hobbes
2020-04-02 14:55         ` Eric Abrahamsen
2020-04-02 15:03           ` hobbes
2020-04-02 16:28             ` Eric Abrahamsen
2020-04-02 18:15             ` Eric Abrahamsen
2020-04-05 19:18               ` hobbes
2020-04-05 21:32                 ` Eric Abrahamsen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).