[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnus patch to fix error on org-gnus-follow-link
From: |
Liang Wang |
Subject: |
gnus patch to fix error on org-gnus-follow-link |
Date: |
Fri, 21 Sep 2012 10:37:11 +0800 |
Hi,
I get an error when I open an gnus link in orgmode. I don't know much
about gnus implementation. Could someone take a look? I have a small
patch to fix it, but I'm not sure if it is correct.
=== modified file 'lisp/gnus/gnus-int.el'
*** lisp/gnus/gnus-int.el 2012-08-31 04:39:30 +0000
--- lisp/gnus/gnus-int.el 2012-09-21 02:29:59 +0000
***************
*** 600,606 ****
;; Use `head' function.
((fboundp head)
(setq res (funcall head article
! (and (not gnus-override-method)
(gnus-group-real-name group))
(nth 1 gnus-command-method))))
;; Use `article' function.
(t
--- 600,606 ----
;; Use `head' function.
((fboundp head)
(setq res (funcall head article
! (and (not (null gnus-override-method))
(gnus-group-real-name group))
(nth 1 gnus-command-method))))
;; Use `article' function.
(t
Below are the value of gnus-override-method and backtrace. I replace
real article id with a faked string and delete bytecode.
gnus-override-method is a variable defined in `gnus.el'.
Its value is (nnimap "QCOM"
(nnimap-address "localhost")
(nnimap-inbox "INBOX")
(nnimap-server-port 143)
(nnimap-authenticator login)
(nnimap-expunge-on-close 'never)
(nnimap-stream starttls))
Debugger entered--Lisp error: (wrong-type-argument stringp nil)
encode-coding-string(nil utf-7-imap)
utf7-encode(nil t)
nnimap-find-article-by-message-id(nil "some-article-id")
nnimap-request-head("some-article-id" nil "QCOM")
funcall(nnimap-request-head "some-article-id" nil "QCOM")
(setq res (funcall head article (and (not gnus-override-method)
(gnus-group-real-name group)) (nth 1 gnus-command-method)))
(cond ((and gnus-use-cache (numberp article)
(gnus-cache-request-article article group)) (setq res (cons group
article) clean-up t)) ((gnus-agent-request-article article group)
(setq res (cons group article) clean-up t)) ((fboundp head) (setq res
(funcall head article (and (not gnus-override-method)
(gnus-group-real-name group)) (nth 1 gnus-command-method)))) (t (setq
res (gnus-request-article article group) clean-up t)))
(let* ((gnus-command-method (gnus-find-method-for-group group))
(head (gnus-get-function gnus-command-method (quote request-head) t))
res clean-up) (cond ((and gnus-use-cache (numberp article)
(gnus-cache-request-article article group)) (setq res (cons group
article) clean-up t)) ((gnus-agent-request-article article group)
(setq res (cons group article) clean-up t)) ((fboundp head) (setq res
(funcall head article (and (not gnus-override-method)
(gnus-group-real-name group)) (nth 1 gnus-command-method)))) (t (setq
res (gnus-request-article article group) clean-up t))) (when clean-up
(with-current-buffer nntp-server-buffer (goto-char (point-min)) (when
(search-forward "\n\n" nil t) (delete-region (1- (point))
(point-max))) (nnheader-fold-continuation-lines))) res)
gnus-request-head("some-article-id" "nnimap+QCOM:INBOX.2012")
gnus-read-header("some-article-id")
gnus-summary-insert-subject("some-article-id")
byte-code()
gnus-summary-refer-article("some-article-id")
gnus-summary-goto-article("some-article-id" nil t)
byte-code()
org-gnus-follow-link("nnimap+QCOM:INBOX.2012" "some-article-id")
org-gnus-open(#("nnimap+QCOM:INBOX.2012#some-article-id" 0 91 (org-attr nil)))
org-open-at-point(nil)
call-interactively(org-open-at-point nil nil)