unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Liang Wang <netcasper@gmail.com>
To: emacs-devel@gnu.org
Subject: gnus patch to fix error on org-gnus-follow-link
Date: Fri, 21 Sep 2012 10:37:11 +0800	[thread overview]
Message-ID: <CAO+NnCbX74Hr7M=vfybONbv1vKGHA47i6a4+qBUwv5CXTmF9YQ@mail.gmail.com> (raw)

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)



             reply	other threads:[~2012-09-21  2:37 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-21  2:37 Liang Wang [this message]
2012-09-21  7:33 ` gnus patch to fix error on org-gnus-follow-link 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAO+NnCbX74Hr7M=vfybONbv1vKGHA47i6a4+qBUwv5CXTmF9YQ@mail.gmail.com' \
    --to=netcasper@gmail.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).