unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* gnus patch to fix error on org-gnus-follow-link
@ 2012-09-21  2:37 Liang Wang
  2012-09-21  7:33 ` Bastien
  2012-09-24 13:55 ` Bastien
  0 siblings, 2 replies; 9+ messages in thread
From: Liang Wang @ 2012-09-21  2:37 UTC (permalink / raw)
  To: emacs-devel

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)



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

end of thread, other threads:[~2012-09-26 10:44 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-21  2:37 gnus patch to fix error on org-gnus-follow-link Liang Wang
2012-09-21  7:33 ` Bastien
2012-09-21  7:53   ` Liang Wang
2012-09-21  8:11     ` Bastien
2012-09-21  8:27       ` Liang Wang
2012-09-24 13:55 ` Bastien
2012-09-24 14:47   ` Liang Wang
2012-09-26  7:04     ` Bastien
     [not found]       ` <CAO+NnCa1G68prhfKcZ_fF87hjHiKxbWMpnpNrN_TgzfyRbNxKg@mail.gmail.com>
2012-09-26 10:44         ` Liang Wang

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).