Commit 4523dc7f authored by Gnus developers's avatar Gnus developers Committed by Katsumi Yamaoka
Browse files

gnus-registry.el (gnus-registry-handle-action): More debugging.

gnus-start.el (gnus-gnus-to-newsrc-format): Add a way to run interactively so the newsrc file can contain foreign groups too.  Useful for debugging but not much for users.
registry.el (registry-usage-test): Only do `registry-lookup-breaks-before-lexbind' testing for Emacs24 with lexical binding.
parent 5f64f7bd
2011-04-07 Teodor Zlatanov <tzz@lifelogs.com>
* gnus-registry.el (gnus-registry-handle-action): More debugging.
* gnus-start.el (gnus-gnus-to-newsrc-format): Add a way to run
interactively so the newsrc file can contain foreign groups too.
Useful for debugging but not much for users.
2011-04-07 David Engster <dengste@eml.cc>
* registry.el (registry-usage-test): Only do
`registry-lookup-breaks-before-lexbind' testing for Emacs24 with
lexical binding.
2011-04-06 David Engster <dengste@eml.cc> 2011-04-06 David Engster <dengste@eml.cc>
   
* registry.el, gnus-registry.el: Use `ignore-errors' instead of third * registry.el, gnus-registry.el: Use `ignore-errors' instead of third
......
...@@ -321,6 +321,9 @@ This is not required after changing `gnus-registry-cache-file'." ...@@ -321,6 +321,9 @@ This is not required after changing `gnus-registry-cache-file'."
(gnus-registry-handle-action id nil to subject sender))) (gnus-registry-handle-action id nil to subject sender)))
(defun gnus-registry-handle-action (id from to subject sender) (defun gnus-registry-handle-action (id from to subject sender)
(gnus-message
10
"gnus-registry-handle-action %S" (list id from to subject sender))
(let ((db gnus-registry-db) (let ((db gnus-registry-db)
;; safe if not found ;; safe if not found
(entry (gnus-registry-get-or-make-entry id))) (entry (gnus-registry-get-or-make-entry id)))
......
...@@ -2873,7 +2873,8 @@ If FORCE is non-nil, the .newsrc file is read." ...@@ -2873,7 +2873,8 @@ If FORCE is non-nil, the .newsrc file is read."
(pop list)) (pop list))
(nreverse olist))) (nreverse olist)))
(defun gnus-gnus-to-newsrc-format () (defun gnus-gnus-to-newsrc-format (&optional foreign-ok)
(interactive (list (gnus-y-or-n-p "write foreign groups too? ")))
;; Generate and save the .newsrc file. ;; Generate and save the .newsrc file.
(with-current-buffer (create-file-buffer gnus-current-startup-file) (with-current-buffer (create-file-buffer gnus-current-startup-file)
(let ((newsrc (cdr gnus-newsrc-alist)) (let ((newsrc (cdr gnus-newsrc-alist))
...@@ -2895,7 +2896,8 @@ If FORCE is non-nil, the .newsrc file is read." ...@@ -2895,7 +2896,8 @@ If FORCE is non-nil, the .newsrc file is read."
;; Don't write foreign groups to .newsrc. ;; Don't write foreign groups to .newsrc.
(when (or (null (setq method (gnus-info-method info))) (when (or (null (setq method (gnus-info-method info)))
(equal method "native") (equal method "native")
(inline (gnus-server-equal method gnus-select-method))) (inline (gnus-server-equal method gnus-select-method))
foreign-ok)
(insert (gnus-info-group info) (insert (gnus-info-group info)
(if (> (gnus-info-level info) gnus-level-subscribed) (if (> (gnus-info-level info) gnus-level-subscribed)
"!" ":")) "!" ":"))
......
...@@ -357,12 +357,13 @@ Removes only entries without the :precious keys." ...@@ -357,12 +357,13 @@ Removes only entries without the :precious keys."
(should (= 58 (caadr (registry-lookup db '(1 58 99))))) (should (= 58 (caadr (registry-lookup db '(1 58 99)))))
(message "Grouped individual lookup") (message "Grouped individual lookup")
(should (= 3 (length (registry-lookup db '(1 58 99))))) (should (= 3 (length (registry-lookup db '(1 58 99)))))
(message "Individual lookup (breaks before lexbind)") (when (boundp 'lexical-binding)
(should (= 58 (message "Individual lookup (breaks before lexbind)")
(caadr (registry-lookup-breaks-before-lexbind db '(1 58 99))))) (should (= 58
(message "Grouped individual lookup (breaks before lexbind)") (caadr (registry-lookup-breaks-before-lexbind db '(1 58 99)))))
(should (= 3 (message "Grouped individual lookup (breaks before lexbind)")
(length (registry-lookup-breaks-before-lexbind db '(1 58 99))))) (should (= 3
(length (registry-lookup-breaks-before-lexbind db '(1 58 99))))))
(message "Search") (message "Search")
(should (= n (length (registry-search db :all t)))) (should (= n (length (registry-search db :all t))))
(should (= n (length (registry-search db :member '((sender "me")))))) (should (= n (length (registry-search db :member '((sender "me"))))))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment