girzel / gnorb

Glue code between the Org, Gnus, and BBDB packages for Emacs.
32 stars 4 forks source link

gnorb-gnus-outgoing-do-todo problem with registry and group name #9

Closed brabalan closed 10 years ago

brabalan commented 10 years ago

I now tried with a message that has no related todo, and I get another backtrace:

Debugger entered--Lisp error: (void-variable gcc)
  (list gcc)
  (gnus-registry-set-id-key msg-id (quote group) (list gcc))
  (progn (gnus-registry-get-or-make-entry msg-id) (gnus-registry-set-id-key msg-id (quote sender) (list sender)) (gnus-registry-set-id-key msg-id (quote subject) (list subject)) (gnus-registry-set-id-key msg-id (quote gnorb-ids) (if (stringp org-id) (list org-id) org-id)) (gnus-registry-set-id-key msg-id (quote group) (list gcc)))
  (if gnus-registry-enabled (progn (gnus-registry-get-or-make-entry msg-id) (gnus-registry-set-id-key msg-id (quote sender) (list sender)) (gnus-registry-set-id-key msg-id (quote subject) (list subject)) (gnus-registry-set-id-key msg-id (quote gnorb-ids) (if (stringp org-id) (list org-id) org-id)) (gnus-registry-set-id-key msg-id (quote group) (list gcc))))
  gnorb-gnus-make-registry-entry("<m2mwb2fd8k.fsf@polytechnique.org>" "Alan Schmitt <alan.schmitt@inria.fr>" "Sandrine et soutenance de Martin" "DEA46919-8135-4B77-8D69-6AE530A6EBFE" "[[gnus:nnimap+zimbra:Sent")
  (progn (org-entry-put (point) gnorb-org-msg-id-key msg-id) (gnorb-org-add-id-hash-entry msg-id) (gnorb-gnus-make-registry-entry msg-id sender subject (org-id-get-create) group))
  (if msg-id (progn (org-entry-put (point) gnorb-org-msg-id-key msg-id) (gnorb-org-add-id-hash-entry msg-id) (gnorb-gnus-make-registry-entry msg-id sender subject (org-id-get-create) group)))
  (let* ((link (plist-get gnorb-gnus-sending-message-info :link)) (group (plist-get gnorb-gnus-sending-message-info :group)) (date (plist-get gnorb-gnus-sending-message-info :date)) (date-ts (and date (condition-case nil (progn (format-time-string (org-time-stamp-format t) (date-to-time date))) (error nil)))) (date-ts-ia (and date (condition-case nil (progn (format-time-string (org-time-stamp-format t t) (date-to-time date))) (error nil)))) (msg-id (plist-get gnorb-gnus-sending-message-info :msg-id)) (sender (plist-get gnorb-gnus-sending-message-info :from)) (subject (plist-get gnorb-gnus-sending-message-info :subject)) (org-capture-link-is-already-stored t)) (if link (org-add-link-props :date date :date-timestamp date-ts :date-timestamp-inactive date-ts-ia :annotation link) (org-store-link-props :subject (plist-get gnorb-gnus-sending-message-info :subject) :to (plist-get gnorb-gnus-sending-message-info :to) :date date :date-timestamp date-ts :date-timestamp-inactive date-ts-ia :message-id msg-id :annotation link)) (org-capture nil gnorb-gnus-new-todo-capture-key) (if msg-id (progn (org-entry-put (point) gnorb-org-msg-id-key msg-id) (gnorb-org-add-id-hash-entry msg-id) (gnorb-gnus-make-registry-entry msg-id sender subject (org-id-get-create) group))))
  gnorb-gnus-outgoing-make-todo-1()
  (if ref-ids (progn (if (stringp ref-ids) (progn (setq ref-ids (split-string ref-ids)))) (setq rel-headings (gnorb-org-find-visit-candidates ref-ids)) (if (not rel-headings) (gnorb-gnus-outgoing-make-todo-1) (progn (let ((--dolist-tail-- rel-headings) h) (while --dolist-tail-- (setq h (car --dolist-tail--)) (setq gnorb-message-org-ids (cons ... gnorb-message-org-ids)) (setq --dolist-tail-- (cdr --dolist-tail--))))) (gnorb-org-restore-after-send))) (gnorb-gnus-outgoing-make-todo-1))
  (if arg (progn (setq gnorb-message-org-ids (cons (caar rel-headings) gnorb-message-org-ids)) (gnorb-org-restore-after-send)) (setq ref-ids (plist-get gnorb-gnus-sending-message-info :refs)) (if ref-ids (progn (if (stringp ref-ids) (progn (setq ref-ids (split-string ref-ids)))) (setq rel-headings (gnorb-org-find-visit-candidates ref-ids)) (if (not rel-headings) (gnorb-gnus-outgoing-make-todo-1) (progn (let ((--dolist-tail-- rel-headings) h) (while --dolist-tail-- (setq h ...) (setq gnorb-message-org-ids ...) (setq --dolist-tail-- ...)))) (gnorb-org-restore-after-send))) (gnorb-gnus-outgoing-make-todo-1)))
  (if (not (eq major-mode (quote message-mode))) (if arg (progn (setq gnorb-message-org-ids (cons (caar rel-headings) gnorb-message-org-ids)) (gnorb-org-restore-after-send)) (setq ref-ids (plist-get gnorb-gnus-sending-message-info :refs)) (if ref-ids (progn (if (stringp ref-ids) (progn (setq ref-ids (split-string ref-ids)))) (setq rel-headings (gnorb-org-find-visit-candidates ref-ids)) (if (not rel-headings) (gnorb-gnus-outgoing-make-todo-1) (progn (let (... h) (while --dolist-tail-- ... ... ...))) (gnorb-org-restore-after-send))) (gnorb-gnus-outgoing-make-todo-1))) (if message-reply-headers (progn (setq reply-id (aref message-reply-headers 4)))) (save-restriction (widen) (message-narrow-to-headers-or-head) (setq header-ids (mail-fetch-field gnorb-mail-header nil nil t)) (setq ref-ids (if arg nil (mail-fetch-field "References" t))) (setq reply-group (if (mail-fetch-field "X-Draft-From" t) (progn (car-safe (read (mail-fetch-field "X-Draft-From" t)))))) (if (and reply-group reply-id) (progn (let ((wconfig (current-window-configuration))) (unwind-protect (progn (org-gnus-follow-link reply-group reply-id) (call-interactively ...)) (set-window-configuration wconfig))))) (if ref-ids (progn (if (stringp ref-ids) (progn (setq ref-ids (split-string ref-ids)))) (setq rel-headings (gnorb-org-find-visit-candidates ref-ids)))) (if rel-headings (progn (goto-char (point-min)) (progn (let ((--dolist-tail-- rel-headings) h) (while --dolist-tail-- (setq h ...) (if ... nil ... ... ... ...) (setq --dolist-tail-- ...))))))) (message-goto-body) (add-to-list (quote message-exit-actions) (if header-ids (quote gnorb-org-restore-after-send) (quote gnorb-gnus-outgoing-make-todo-1)) t) (message (if header-ids "Message will trigger TODO state-changes after sending" "A TODO will be made from this message after it's sent")))
  (let ((org-refile-targets gnorb-gnus-trigger-refile-targets) header-ids ref-ids rel-headings gnorb-org-window-conf reply-id reply-group) (if arg (progn (setq rel-headings (org-refile-get-location "Trigger action on" nil t)) (setq rel-headings (list (list (let (...) (unwind-protect ... ...))))))) (if (not (eq major-mode (quote message-mode))) (if arg (progn (setq gnorb-message-org-ids (cons (caar rel-headings) gnorb-message-org-ids)) (gnorb-org-restore-after-send)) (setq ref-ids (plist-get gnorb-gnus-sending-message-info :refs)) (if ref-ids (progn (if (stringp ref-ids) (progn (setq ref-ids ...))) (setq rel-headings (gnorb-org-find-visit-candidates ref-ids)) (if (not rel-headings) (gnorb-gnus-outgoing-make-todo-1) (progn (let ... ...)) (gnorb-org-restore-after-send))) (gnorb-gnus-outgoing-make-todo-1))) (if message-reply-headers (progn (setq reply-id (aref message-reply-headers 4)))) (save-restriction (widen) (message-narrow-to-headers-or-head) (setq header-ids (mail-fetch-field gnorb-mail-header nil nil t)) (setq ref-ids (if arg nil (mail-fetch-field "References" t))) (setq reply-group (if (mail-fetch-field "X-Draft-From" t) (progn (car-safe (read ...))))) (if (and reply-group reply-id) (progn (let ((wconfig ...)) (unwind-protect (progn ... ...) (set-window-configuration wconfig))))) (if ref-ids (progn (if (stringp ref-ids) (progn (setq ref-ids ...))) (setq rel-headings (gnorb-org-find-visit-candidates ref-ids)))) (if rel-headings (progn (goto-char (point-min)) (progn (let (... h) (while --dolist-tail-- ... ... ...)))))) (message-goto-body) (add-to-list (quote message-exit-actions) (if header-ids (quote gnorb-org-restore-after-send) (quote gnorb-gnus-outgoing-make-todo-1)) t) (message (if header-ids "Message will trigger TODO state-changes after sending" "A TODO will be made from this message after it's sent"))))
  gnorb-gnus-outgoing-do-todo(nil)
  call-interactively(gnorb-gnus-outgoing-do-todo record-it)

The todo is correctly created, the problem happens with the registry part. I think the problem comes from the string "[[gnus:nnimap+zimbra:Sent" passed as group name.

girzel commented 10 years ago

Yup, I've found and fixed this one already, but it's not on the master branch. Hang on a second and I'll cherry pick the fix over.

On 08/18/14 00:57 AM, Alan Schmitt wrote:

I now tried with a message that has no related todo, and I get another backtrace:

Debugger entered--Lisp error: (void-variable gcc) (list gcc) (gnus-registry-set-id-key msg-id (quote group) (list gcc)) (progn (gnus-registry-get-or-make-entry msg-id) (gnus-registry-set-id-key msg-id (quote sender) (list sender)) (gnus-registry-set-id-key msg-id (quote subject) (list subject)) (gnus-registry-set-id-key msg-id (quote gnorb-ids) (if (stringp org-id) (list org-id) org-id)) (gnus-registry-set-id-key msg-id (quote group) (list gcc))) (if gnus-registry-enabled (progn (gnus-registry-get-or-make-entry msg-id) (gnus-registry-set-id-key msg-id (quote sender) (list sender)) (gnus-registry-set-id-key msg-id (quote subject) (list subject)) (gnus-registry-set-id-key msg-id (quote gnorb-ids) (if (stringp org-id) (list org-id) org-id)) (gnus-registry-set-id-key msg-id (quote group) (list gcc)))) gnorb-gnus-make-registry-entry("m2mwb2fd8k.fsf@polytechnique.org" "Alan Schmitt alan.schmitt@inria.fr" "Sandrine et soutenance de Martin" "DEA46919-8135-4B77-8D69-6AE530A6EBFE" "[[gnus:nnimap+zimbra:Sent") (progn (org-entry-put (point) gnorb-org-msg-id-key msg-id) (gnorb-org-add-id-hash-entry msg-id) (gnorb-gnus-make-registry-entry msg-id sender subject (org-id-get-create) group)) (if msg-id (progn (org-entry-put (point) gnorb-org-msg-id-key msg-id) (gnorb-org-add-id-hash-entry msg-id) (gnorb-gnus-make-registry-entry msg-id sender subject (org-id-get-create) group))) (let* ((link (plist-get gnorb-gnus-sending-message-info :link)) (group (plist-get gnorb-gnus-sending-message-info :group)) (date (plist-get gnorb-gnus-sending-message-info :date)) (date-ts (and date (condition-case nil (progn</ span> (format-time-string (org-time-stamp-format t) (date-to-time date))) (error nil)))) (date-ts-ia (and date (condition-case nil (progn (format-time-string (org-time-stamp-format t t) (date-to-time date ))) (error nil)))) (msg-id (plist-get gnorb-gnus-sending-message-info :msg-id)) (sender (plist-get gnorb-gnus-sending-message-info :from)) (subject (plist-get gnorb-gnus-sending-message-info :subject)) (org-capture-link-is-already-stored t)) (if link (org-add-link-props :date date :date-timestamp date-ts :date-timestamp-inactive date-ts-ia :annotation link) (org-store-link-props :subject (plist-get gnorb-gnus-sending-message-info :subject) :to (plist-get gnorb-gnus-sending-message-info :to) :date date :date-timestamp date-t s :date-timestamp-inactive date-ts-ia :message-id msg-id :annotation link)) (org-capture nil gnorb-gnus-new-todo-capture-key) (if msg-id (progn (org-entry-put (point) gnorb-org-msg-id-key msg-id) (gnorb-org-add-id-hash-entry msg-id) (gnorb-gnus-make-registry-entry msg-id sender subject (org-id-get-create) group)))) gnorb-gnus-outgoing-make-todo-1() (if ref-ids (progn (if (stringp ref-ids) (progn (setq ref-ids (split-string ref-ids)))) (setq rel-headings (gnorb-org-find-visit-candidates ref-ids)) (if (not rel-headings) (gnorb-gnus-o utgoing-make-todo-1) (progn (let ((--dolist-tail-- rel-headings) h) (while --dolist-tail-- (setq h (car --dolist-tail--)) (setq gnorb-message-org-ids (cons ... gnorb-message-org-ids)) (setq --dolist-tail-- (cdr --dolist-tail--))))) (gnorb-org-restore-after-send))) (gnorb-gnus-outgoing-make-todo-1)) (if arg (progn (setq gnorb-message-org-ids (cons (caar rel-headings) gnorb-message-org-ids)) (gnorb-org-restore-after-send)) (setq ref-ids (plist-get gnorb-gnus-sending-message-info :refs)) (if ref-ids (progn (if (stringp ref-ids) (progn (setq ref-ids (split-string ref-ids)))) (setq rel-headings (gnorb-org-find-visit-candidates ref-ids)) (if (not rel-headings) (gnorb-gnus-outgoing-make-todo-1) (progn (let ((</ span>--dolist-tail-- rel-headings) h) (while --dolist-tail-- (setq h ...) (setq gnorb-message-org-ids ...) (setq --dolist-tail-- ...)))) (gnorb-org-restore-after-send))) (gnorb-gnus-outgoing-make-todo-1))) (if (not (eq major-mode (quote message-mode))) (if arg (progn (setq gnorb-message-org-ids (cons (caar rel-headings) gnorb-message-org-ids)) (gnorb-org-restore-after-send)) (setq ref-ids (plist-get gnorb-gnus-sending-message-info :refs)) (if ref-ids (progn (if (stringp ref-ids) (progn (setq ref-ids (split-string ref-ids)))) (setq rel-headings (gnorb-org-find-visit-candidates ref-ids)) (if (not rel-headings) (gnorb-gnus-outgoing-make-todo-1) (progn (let (... h) (while --dolist-tail-- ... ... ...))) (gnorb-org-restore-after-send))) (gnorb-gnus-outgoing-make-todo-1))) (if message-reply-headers (progn (setq < span class="nv">reply-id (aref message-reply-headers 4)))) (save-restriction (widen) (message-narrow-to-headers-or-head) (setq header-ids (mail-fetch-field gnorb-mail-header nil nil t)) (setq ref-ids (if arg nil (mail-fetch-field "References" t))) (setq reply-group (if (mail-fetch-field "X-Draft-From" t) (progn (car-safe (read (mail-fetch-field "X-Draft-From" t)))))) (if (and reply-group reply-id) (progn (let ((wconfig (current-window-configuration))) (unwind-protect (progn (org-gnus-follow-link reply-group reply-id) (call-interactively ...)) (set-window-configuration wconfig))))) (if ref-ids (progn (if (stringp ref-ids) ( progn (setq ref-ids (split-string ref-ids)))) (setq rel-headings (gnorb-org-find-visit-candidates ref-ids)))) (if rel-headings (progn (goto-char (point-min)) (progn (let ((--dolist-tail-- rel-headings) h ) (while --dolist-tail-- (setq h ...) (if ... nil ... ... ... ...) (setq --dolist-tail-- ...))))))) (message-goto-body) (add-to-list (quote message-exit-actions) (if header-ids (quote gnorb-org-restore-after-send) (quote gnorb-gnus-outgoing-make-todo-1)) t) (message (if header-ids "Message will trigger TODO state-changes after sending" "A TODO will be made from this message after it's sent"))) (let ((org-refile-targets gnorb-gnus-trigger-refile-targets) header-ids ref-ids rel-headings gnorb-org-window-conf reply-id reply-group) (if arg (progn (setq rel-headings (org-refile-get-location "Trigger action on" nil t)) (setq rel-headings (list (list (let (...) (unwind-protect ... ...))))))) (if (not (eq major-mode (quote message-mode))) (if arg (progn (setq gnorb-message-org-ids (cons (caar rel-headings ) gnorb-message-org-ids)) (gnorb-org-restore-after-send)) (setq ref-ids (plist-get gnorb-gnus-sending-message-info :refs)) (if ref-ids (progn (if (stringp ref-ids) (progn (setq ref-ids ...))) (setq rel-headings (gnorb-org-find-visit-candidates ref-ids)) (if (not rel-headings) (gnorb-gnus-outgoing-make-todo-1) (progn (let ... ...)) (gnorb-org-restore-after-send))) (gnorb-gnus-outgoing-make-todo-1))) (if message-reply-headers (progn (setq reply-id (aref message-reply-headers 4)))) (save-restriction (widen) (message-narrow-to-headers-or-head) (setq header-ids (mail-fetch-field gnorb-mail-header nil nil t)) (setq ref-ids (if arg nil (mail-fetch-field "References" t))) (setq reply-group (if (mail-fetch-field "X-Draft-From" t) (progn (car-safe (read ...))))) (if (and reply-group reply-id) (progn (let ((wconfig ...)) (unwind-protect (progn ... ...) (set-window-configuration wconfig))))) (if ref-ids (progn (if (stringp ref-ids) (progn (setq ref-ids ...))) (setq rel-headings (gnorb-org-find-v isit-candidates ref-ids)))) (if rel-headings (progn (goto-char (point-min)) (progn (let (... h) (while --dolist-tail-- ... ... ...)))))) (message-goto-body) (add-to-list (quote messa ge-exit-actions) (if header-ids (quote gnorb-org-restore-after-send) (quote gnorb-gnus-outgoing-make-todo-1)) t) (message (if header-ids "Message will trigger TODO state-changes after sending" "A TODO will be made from this message after it's sent")))) gnorb-gnus-outgoing-do-todo(nil) call-interactively(gnorb-gnus-outgoing-do-todo record-it)

The todo is correctly created, the problem happens with the registry part. I think the problem comes from the string " [[gnus:nnimap+zimbra:Sent" passed as group name.

Reply to this email directly or view it on GitHub.*