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

* Re: gnus patch to fix error on org-gnus-follow-link
  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-24 13:55 ` Bastien
  1 sibling, 1 reply; 9+ messages in thread
From: Bastien @ 2012-09-21  7:33 UTC (permalink / raw)
  To: Liang Wang; +Cc: emacs-devel

Hi Liang,

Liang Wang <netcasper@gmail.com> writes:

> I get an error when I open an gnus link in orgmode.  

Can you describe how the error occurs?  

Also, which versions of Gnus and Org?

> 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.

I'll have a look at this when I better understand the error.

Thanks!

-- 
 Bastien



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

* Re: gnus patch to fix error on org-gnus-follow-link
  2012-09-21  7:33 ` Bastien
@ 2012-09-21  7:53   ` Liang Wang
  2012-09-21  8:11     ` Bastien
  0 siblings, 1 reply; 9+ messages in thread
From: Liang Wang @ 2012-09-21  7:53 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-devel

On Fri, Sep 21, 2012 at 3:33 PM, Bastien <bzg@gnu.org> wrote:
> Hi Liang,
>
> Liang Wang <netcasper@gmail.com> writes:
>
>> I get an error when I open an gnus link in orgmode.
>
> Can you describe how the error occurs?
>
> Also, which versions of Gnus and Org?

Gnus comes from latest emacs trunk.  revno is 110121.
Org is cloned from git://repo.or.cz/org-mode.git.  my local latest
commit is c276eeebeec (org-export.el: Revert an erroneous commit,
sigh).

>
>> 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.
>
> I'll have a look at this when I better understand the error.

Thank you.

>
> Thanks!
>
> --
>  Bastien



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

* Re: gnus patch to fix error on org-gnus-follow-link
  2012-09-21  7:53   ` Liang Wang
@ 2012-09-21  8:11     ` Bastien
  2012-09-21  8:27       ` Liang Wang
  0 siblings, 1 reply; 9+ messages in thread
From: Bastien @ 2012-09-21  8:11 UTC (permalink / raw)
  To: Liang Wang; +Cc: emacs-devel

Liang Wang <netcasper@gmail.com> writes:

> Gnus comes from latest emacs trunk.  revno is 110121.
> Org is cloned from git://repo.or.cz/org-mode.git.  my local latest
> commit is c276eeebeec (org-export.el: Revert an erroneous commit,
> sigh).

Btw, you should better use the orgmode.org git repo:
git clone git://orgmode.org/org-mode.git

Also, please describe how you get the error.

Thanks,

-- 
 Bastien



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

* Re: gnus patch to fix error on org-gnus-follow-link
  2012-09-21  8:11     ` Bastien
@ 2012-09-21  8:27       ` Liang Wang
  0 siblings, 0 replies; 9+ messages in thread
From: Liang Wang @ 2012-09-21  8:27 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-devel

On Fri, Sep 21, 2012 at 4:11 PM, Bastien <bzg@gnu.org> wrote:
> Liang Wang <netcasper@gmail.com> writes:
>
>> Gnus comes from latest emacs trunk.  revno is 110121.
>> Org is cloned from git://repo.or.cz/org-mode.git.  my local latest
>> commit is c276eeebeec (org-export.el: Revert an erroneous commit,
>> sigh).
>
> Btw, you should better use the orgmode.org git repo:
> git clone git://orgmode.org/org-mode.git

I will switch to it.  Thanks.

>
> Also, please describe how you get the error.

I press C-c C-o on a gnus link created in gnus summary buffer by C-c l
and inserted into orgmode file by C-c C-l.
I'm not sure if this is what you want.

>
> Thanks,
>
> --
>  Bastien



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

* Re: gnus patch to fix error on org-gnus-follow-link
  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-24 13:55 ` Bastien
  2012-09-24 14:47   ` Liang Wang
  1 sibling, 1 reply; 9+ messages in thread
From: Bastien @ 2012-09-24 13:55 UTC (permalink / raw)
  To: Liang Wang; +Cc: emacs-devel

Hi Liang,

Liang Wang <netcasper@gmail.com> writes:

> I get an error when I open an gnus link in orgmode.  

What is your value of `gnus-override-method'?  

C-h v gnus-override-method RET

Based on your fix, I guess it is not nil.

If that's the case, please send me a minimal configuration
so that I try to reproduce your problem.

Thanks,

-- 
 Bastien



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

* Re: gnus patch to fix error on org-gnus-follow-link
  2012-09-24 13:55 ` Bastien
@ 2012-09-24 14:47   ` Liang Wang
  2012-09-26  7:04     ` Bastien
  0 siblings, 1 reply; 9+ messages in thread
From: Liang Wang @ 2012-09-24 14:47 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-devel

On Mon, Sep 24, 2012 at 9:55 PM, Bastien <bzg@gnu.org> wrote:
> Hi Liang,
>
> Liang Wang <netcasper@gmail.com> writes:
>
>> I get an error when I open an gnus link in orgmode.
>
> What is your value of `gnus-override-method'?
>
> C-h v gnus-override-method RET

(nnimap "gmail"
	  (nnimap-address "imap.gmail.com")
	  (nnimap-server-port 993)
	  (nnimap-stream ssl))

>
> Based on your fix, I guess it is not nil.
>
> If that's the case, please send me a minimal configuration
> so that I try to reproduce your problem.

(setq mail-sources nil)
(setq gnus-nntp-server nil
      gnus-read-active-file nil
      gnus-save-newsrc-file nil
      gnus-read-newsrc-file nil
      gnus-check-new-newsgroups nil)

(setq gnus-select-method '(nnnil "")
      gnus-secondary-select-methods
        `((nnimap "gmail"
	  (nnimap-address "imap.gmail.com")
	  (nnimap-server-port 993)
	  (nnimap-stream ssl))))

>
> Thanks,
>
> --
>  Bastien



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

* Re: gnus patch to fix error on org-gnus-follow-link
  2012-09-24 14:47   ` Liang Wang
@ 2012-09-26  7:04     ` Bastien
       [not found]       ` <CAO+NnCa1G68prhfKcZ_fF87hjHiKxbWMpnpNrN_TgzfyRbNxKg@mail.gmail.com>
  0 siblings, 1 reply; 9+ messages in thread
From: Bastien @ 2012-09-26  7:04 UTC (permalink / raw)
  To: Liang Wang; +Cc: emacs-devel

Hi Liang,

Liang Wang <netcasper@gmail.com> writes:

>> C-h v gnus-override-method RET
>
> (nnimap "gmail"
> 	  (nnimap-address "imap.gmail.com")
> 	  (nnimap-server-port 993)
> 	  (nnimap-stream ssl))

Well, I don't use this variable, it has no docstring and I can't find
any reference in the Gnus manual... so maybe your best luck is to try
asking the Gnus devs.

Let me know if org-gnus.el must be updated wrt this issue.

Thanks,

-- 
 Bastien



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

* Re: gnus patch to fix error on org-gnus-follow-link
       [not found]       ` <CAO+NnCa1G68prhfKcZ_fF87hjHiKxbWMpnpNrN_TgzfyRbNxKg@mail.gmail.com>
@ 2012-09-26 10:44         ` Liang Wang
  0 siblings, 0 replies; 9+ messages in thread
From: Liang Wang @ 2012-09-26 10:44 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 667 bytes --]

在 2012-9-26 下午3:04,"Bastien" <bzg@gnu.org>写道:
>
> Hi Liang,
>
> Liang Wang <netcasper@gmail.com> writes:
>
> >> C-h v gnus-override-method RET
> >
> > (nnimap "gmail"
> >         (nnimap-address "imap.gmail.com")
> >         (nnimap-server-port 993)
> >         (nnimap-stream ssl))
>
> Well, I don't use this variable,

I don't set it myself either.   It's computed on the fly.

it has no docstring and I can't find
> any reference in the Gnus manual... so maybe your best luck is to try
> asking the Gnus devs.
>
> Let me know if org-gnus.el must be updated wrt this issue.

Thanks anyway.

>
> Thanks,
>
> --
>  Bastien

[-- Attachment #2: Type: text/html, Size: 1063 bytes --]

^ 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).