From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Liang Wang Newsgroups: gmane.emacs.devel Subject: gnus patch to fix error on org-gnus-follow-link Date: Fri, 21 Sep 2012 10:37:11 +0800 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1348195042 5351 80.91.229.3 (21 Sep 2012 02:37:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 21 Sep 2012 02:37:22 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Sep 21 04:37:24 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TEt7K-0006mP-Sc for ged-emacs-devel@m.gmane.org; Fri, 21 Sep 2012 04:37:23 +0200 Original-Received: from localhost ([::1]:46007 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TEt7G-0004xA-2d for ged-emacs-devel@m.gmane.org; Thu, 20 Sep 2012 22:37:18 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:53621) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TEt7C-0004x4-NR for emacs-devel@gnu.org; Thu, 20 Sep 2012 22:37:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TEt7B-0002gO-Ix for emacs-devel@gnu.org; Thu, 20 Sep 2012 22:37:14 -0400 Original-Received: from mail-lb0-f169.google.com ([209.85.217.169]:53717) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TEt7B-0002gI-Bu for emacs-devel@gnu.org; Thu, 20 Sep 2012 22:37:13 -0400 Original-Received: by lbbgj10 with SMTP id gj10so3254884lbb.0 for ; Thu, 20 Sep 2012 19:37:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=no+0JcDnJbaymQ133+Ph9hbYpIsGWbgw05o5tHhQVuw=; b=RI2bJLi9WQsK5XOTx/kB7AgN7dHAsOrk+uVlLKP1JoPop8sl3M85xGswPuHcOhMY89 BlRYo+H8a6psru/4/SXl9gyO3e4LxE4G9KTBOkUx4CVxjR5upyZtzEu38859Ny+DzOS1 8xsg67OfhmDnskFMy4aO/TdlkxCoM2ePck+Hnt7gJdAvvVgs6RDx4YaGxNxmQrd/L2ih dYLU/1BoNsyg9iro24iW5Ga2JKTY/iKb0nmtzrLyDaIaQUiRBvYEdKtSTsTjqwTAdvIU GSmrWd6v8KsgmD4ldEygPRuy/0pcBHIzl6R3UvmZi+afaydAEj6gL6/UXQ0F5g4VYf11 6OZQ== Original-Received: by 10.152.103.84 with SMTP id fu20mr3132137lab.9.1348195031606; Thu, 20 Sep 2012 19:37:11 -0700 (PDT) Original-Received: by 10.114.67.211 with HTTP; Thu, 20 Sep 2012 19:37:11 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.217.169 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:153415 Archived-At: 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)