emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Gnus link BUGS
@ 2006-12-22  3:11 Leo
  2006-12-22  3:39 ` Bastien
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Leo @ 2006-12-22  3:11 UTC (permalink / raw)
  To: emacs-orgmode

Hi Carsten,

I found two bugs on gnus link.

 .1.

C-c l (bound to org-store-link) in Gnus summary buffer will store the
link but also has the side-effect of reading the article. This is
quite distracting.

 .2.

Opening gnus article link will prompt the user for how many articles
to read, for example if a group has more than 200
(`gnus-large-ephemeral-newsgroup') articles. This is unnecessary and
obtrusive instead it should just go to that article.

Regards,
-- 
Leo <sdl.web AT gmail.com>                         (GPG Key: 9283AA3F)

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

* Re: Gnus link BUGS
  2006-12-22  3:11 Gnus link BUGS Leo
@ 2006-12-22  3:39 ` Bastien
  2006-12-23 17:58   ` Leo
  2006-12-22  5:44 ` Leo
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 12+ messages in thread
From: Bastien @ 2006-12-22  3:39 UTC (permalink / raw)
  To: emacs-orgmode

Leo <sdl.web@gmail.com> writes:

> Opening gnus article link will prompt the user for how many articles
> to read, for example if a group has more than 200
> (`gnus-large-ephemeral-newsgroup') articles. This is unnecessary and
> obtrusive instead it should just go to that article.

I spent some time trying to circumvent this behavior and the easiest
(but temporary) solution i've found is this one:

(setq gnus-large-newsgroup 10000)

-- 
Bastien

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

* Re: Gnus link BUGS
  2006-12-22  3:11 Gnus link BUGS Leo
  2006-12-22  3:39 ` Bastien
@ 2006-12-22  5:44 ` Leo
  2006-12-23  7:38   ` Carsten Dominik
  2006-12-24 11:48 ` Leo
  2007-01-08 17:53 ` [fixed in 4.61] " Leo
  3 siblings, 1 reply; 12+ messages in thread
From: Leo @ 2006-12-22  5:44 UTC (permalink / raw)
  To: emacs-orgmode

* Leo (2006-12-22 03:11 +0000) said:
  ^^^
>  .2.
>
> Opening gnus article link will prompt the user for how many articles
> to read, for example if a group has more than 200
> (`gnus-large-ephemeral-newsgroup') articles. This is unnecessary and
> obtrusive instead it should just go to that article.

The solution in planner-gnus.el is:
,----
| (let ((gnus-auto-select-first nil))
|         (condition-case err
|             (gnus-fetch-group group planner-gnus-group-threshold)
|           (error (gnus-fetch-group group))))
`----

The number of articles (`planner-gnus-group-threshold') is explicitly
passed to gnus-fetch-group.

-- 
Leo <sdl.web AT gmail.com>                         (GPG Key: 9283AA3F)

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

* Re: Re: Gnus link BUGS
  2006-12-22  5:44 ` Leo
@ 2006-12-23  7:38   ` Carsten Dominik
  0 siblings, 0 replies; 12+ messages in thread
From: Carsten Dominik @ 2006-12-23  7:38 UTC (permalink / raw)
  To: Leo; +Cc: emacs-orgmode

Thanks, I will use this approach in org-mode as well.

(I am in no way a gnus expert - so if there is other stuff to fix in the
gnus interface, please go ahead, maybe even send me patches).

- Carsten

On Dec 22, 2006, at 6:44, Leo wrote:

> * Leo (2006-12-22 03:11 +0000) said:
>   ^^^
>>  .2.
>>
>> Opening gnus article link will prompt the user for how many articles
>> to read, for example if a group has more than 200
>> (`gnus-large-ephemeral-newsgroup') articles. This is unnecessary and
>> obtrusive instead it should just go to that article.
>
> The solution in planner-gnus.el is:
> ,----
> | (let ((gnus-auto-select-first nil))
> |         (condition-case err
> |             (gnus-fetch-group group planner-gnus-group-threshold)
> |           (error (gnus-fetch-group group))))
> `----
>
> The number of articles (`planner-gnus-group-threshold') is explicitly
> passed to gnus-fetch-group.
>
> -- 
> Leo <sdl.web AT gmail.com>                         (GPG Key: 9283AA3F)
>
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
>

--
Carsten Dominik
Sterrenkundig Instituut "Anton Pannekoek"
Universiteit van Amsterdam
Kruislaan 403
NL-1098SJ Amsterdam
phone: +31 20 525 7477

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

* Re: Gnus link BUGS
  2006-12-22  3:39 ` Bastien
@ 2006-12-23 17:58   ` Leo
  2006-12-23 18:23     ` Leo
  0 siblings, 1 reply; 12+ messages in thread
From: Leo @ 2006-12-23 17:58 UTC (permalink / raw)
  To: emacs-orgmode; +Cc: carsten.dominik

Hi Carsten and Bastien,

Merry Christmas!

* Bastien (2006-12-22 04:39 +0100) said:
  ^^^^^^^
> I spent some time trying to circumvent this behavior and the easiest
> (but temporary) solution i've found is this one:
>
> (setq gnus-large-newsgroup 10000)

* Carsten Dominik (2006-12-23 08:38 +0100) said:
  ^^^^^^^^^^^^^^^
> Thanks, I will use this approach in org-mode as well.
>
> (I am in no way a gnus expert - so if there is other stuff to fix in
> the gnus interface, please go ahead, maybe even send me patches).
>
> - Carsten

I made a patch and test it. It seems working fine for me. What do you
think?


--- org.el	2006/12/23 14:59:06	1.1
+++ org.el	2006/12/23 17:44:59
@@ -9041,19 +9041,20 @@
           (Info-find-node (match-string 1 name) "Top")))
     (message (concat "Could not open: " name))))
 
+(defvar org-gnus-group-articles 10
+  "Number of articles to retrieve for gnus GROUP.")
+
 (defun org-follow-gnus-link (&optional group article)
   "Follow a Gnus link to GROUP and ARTICLE."
   (require 'gnus)
   (funcall (cdr (assq 'gnus org-link-frame-setup)))
   (if gnus-other-frame-object (select-frame gnus-other-frame-object))
-  (if group (gnus-fetch-group group))
-  (if article
-      (or (gnus-summary-goto-article article nil 'force)
-	  (if (fboundp 'gnus-summary-insert-cached-articles)
-	      (progn
-		(gnus-summary-insert-cached-articles)
-		(gnus-summary-goto-article article nil 'force))
-	    (message "Message could not be found.")))))
+  (when group
+    (gnus-fetch-group group org-gnus-group-articles)
+    (when article
+      (and (stringp article) (setq article (string-to-number article)))
+      (gnus-summary-goto-article article nil t)
+      (gnus-summary-limit (list article)))))
 
 (defun org-follow-vm-link (&optional folder article readonly)
   "Follow a VM link to FOLDER and ARTICLE."

-- 
Leo <sdl.web AT gmail.com>                         (GPG Key: 9283AA3F)

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

* Re: Gnus link BUGS
  2006-12-23 17:58   ` Leo
@ 2006-12-23 18:23     ` Leo
  2006-12-24  0:54       ` Bastien
  0 siblings, 1 reply; 12+ messages in thread
From: Leo @ 2006-12-23 18:23 UTC (permalink / raw)
  To: emacs-orgmode

Please try this one.

It handles the case when article number is invalid.

--- org.el	2006/12/23 14:59:06	1.1
+++ org.el	2006/12/23 18:20:40
@@ -9041,19 +9041,21 @@
           (Info-find-node (match-string 1 name) "Top")))
     (message (concat "Could not open: " name))))
 
+(defvar org-gnus-group-articles 10
+  "Number of articles to retrieve for Gnus group.")
+
 (defun org-follow-gnus-link (&optional group article)
   "Follow a Gnus link to GROUP and ARTICLE."
   (require 'gnus)
   (funcall (cdr (assq 'gnus org-link-frame-setup)))
   (if gnus-other-frame-object (select-frame gnus-other-frame-object))
-  (if group (gnus-fetch-group group))
-  (if article
-      (or (gnus-summary-goto-article article nil 'force)
-	  (if (fboundp 'gnus-summary-insert-cached-articles)
-	      (progn
-		(gnus-summary-insert-cached-articles)
-		(gnus-summary-goto-article article nil 'force))
-	    (message "Message could not be found.")))))
+  (when group
+    (gnus-fetch-group group org-gnus-group-articles)
+    (when article
+      (if (stringp article)
+	  (setq article (string-to-number article)))
+      (and (gnus-summary-goto-article article nil t)
+	   (gnus-summary-limit (list article))))))
 
 (defun org-follow-vm-link (&optional folder article readonly)
   "Follow a VM link to FOLDER and ARTICLE."

-- 
Leo <sdl.web AT gmail.com>                         (GPG Key: 9283AA3F)

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

* Re: Re: Gnus link BUGS
  2006-12-23 18:23     ` Leo
@ 2006-12-24  0:54       ` Bastien
  2006-12-24  2:37         ` Leo
  0 siblings, 1 reply; 12+ messages in thread
From: Bastien @ 2006-12-24  0:54 UTC (permalink / raw)
  To: emacs-orgmode

Hi Leo,

Leo <sdl.web@gmail.com> writes:

> It handles the case when article number is invalid.

The patch you provided didn't work for me (see the backtrace below),
but this one against org.el 4.60 does the job, please give it a try.
Note that i'm not using `org-gnus-group-articles'.

======================================================================
--- org.el	2006/12/23 22:50:54	0.2
+++ org.el	2006/12/24 00:36:13
@@ -9046,14 +9046,11 @@
   (require 'gnus)
   (funcall (cdr (assq 'gnus org-link-frame-setup)))
   (if gnus-other-frame-object (select-frame gnus-other-frame-object))
-  (if group (gnus-fetch-group group))
-  (if article
-      (or (gnus-summary-goto-article article nil 'force)
-	  (if (fboundp 'gnus-summary-insert-cached-articles)
-	      (progn
-		(gnus-summary-insert-cached-articles)
-		(gnus-summary-goto-article article nil 'force))
-	    (message "Message could not be found.")))))
+  (cond ((and group article)
+	 (gnus-fetch-group group (list (string-to-number article)))
+	 (gnus-summary-select-article))
+	(group (gnus-group-jump-to-group group)
+	       (gnus-group-select-group))))
 
 (defun org-follow-vm-link (&optional folder article readonly)
   "Follow a VM link to FOLDER and ARTICLE."
======================================================================

Debugger entered--Lisp error: (wrong-type-argument sequencep 10)
  gnus-select-newsgroup("nnml:mail.esf" t 10)
  gnus-summary-read-group-1("nnml:mail.esf" t nil nil nil 10)
  gnus-summary-read-group("nnml:mail.esf" t nil nil nil nil 10)
  gnus-group-read-group(nil nil "nnml:mail.esf" 10)
  gnus-fetch-group("nnml:mail.esf" 10)
  (progn (gnus-fetch-group group org-gnus-group-articles) (when article (if ... ...) (and ... ...)))
  (if group (progn (gnus-fetch-group group org-gnus-group-articles) (when article ... ...)))
  (when group (gnus-fetch-group group org-gnus-group-articles) (when article (if ... ...) (and ... ...)))
  org-follow-gnus-link("nnml:mail.esf" "1371")
  (let (group article) (if (not ...) (error "Error in Gnus link")) (setq group (match-string 1 path) article (match-string 3 path)) (org-follow-gnus-link group article))
  (cond ((equal type "mailto") (let ... ... ... ...)) ((member type ...) (browse-url ...)) ((string= type "tags") (org-tags-view in-emacs path)) ((or ... ...) (if in-emacs ... ...) (org-link-search path ...)) ((string= type "file") (if ... ... ...) (org-open-file path in-emacs line search)) ((string= type "news") (org-follow-gnus-link path)) ((string= type "bbdb") (org-follow-bbdb-link path)) ((string= type "info") (org-follow-info-link path)) ((string= type "gnus") (let ... ... ... ...)) ((string= type "vm") (let ... ... ... ...)) ((string= type "wl") (let ... ... ... ...)) ((string= type "mhe") (let ... ... ... ...)) ((string= type "rmail") (let ... ... ... ...)) ((string= type "shell") (let ... ... ... ...)) ((string= type "elisp") (let ... ...)) (t (browse-url-at-point)))
  (let (type path link line search (pos ...)) (catch (quote match) (save-excursion ... ...) (when ... ... ...) (save-excursion ... ... ...) (save-excursion ... ...) (save-excursion ... ... ...)) (unless path (error "No link found")) (if (string-match " +\\'" path) (setq path ...)) (cond (... ...) (... ...) (... ...) (... ... ...) (... ... ...) (... ...) (... ...) (... ...) (... ...) (... ...) (... ...) (... ...) (... ...) (... ...) (... ...) (t ...)))
  (if (org-at-timestamp-p t) (org-follow-timestamp-link) (let (type path link line search ...) (catch ... ... ... ... ... ...) (unless path ...) (if ... ...) (cond ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...)))
  org-open-at-point(nil)
  call-interactively(org-open-at-point)

-- 
Bastien

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

* Re: Gnus link BUGS
  2006-12-24  0:54       ` Bastien
@ 2006-12-24  2:37         ` Leo
  2006-12-24  8:37           ` Bastien
  0 siblings, 1 reply; 12+ messages in thread
From: Leo @ 2006-12-24  2:37 UTC (permalink / raw)
  To: emacs-orgmode

* Bastien (2006-12-24 01:54 +0100) said:
  ^^^^^^^
> Hi Leo,
>
> Leo <sdl.web@gmail.com> writes:
>
>> It handles the case when article number is invalid.
>
> The patch you provided didn't work for me (see the backtrace below),
> but this one against org.el 4.60 does the job, please give it a try.
> Note that i'm not using `org-gnus-group-articles'.

Thanks for the feedback. The backtrace is purely caused by the change
in gnus-fetch-group in NoGnus 0.6 (the development version of Gnus,
which might be included in Emacs 23).

I'd suggest drop gnus-fetch-group and use gnus-group-read-group so
that it will work in Gnus 5.11 as well. gnus-group-select-group should
also be dropped. It will interrupt user when the group is too big.

                                ......
  (cond ((and group article)
	 (gnus-group-read-group t nil group (list (string-to-number article)))
	 (gnus-summary-select-article))
	(group (gnus-group-jump-to-group group))))
                                ......

-- 
Leo <sdl.web AT gmail.com>                         (GPG Key: 9283AA3F)

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

* Re: Re: Gnus link BUGS
  2006-12-24  2:37         ` Leo
@ 2006-12-24  8:37           ` Bastien
  2006-12-24 11:48             ` Leo
  0 siblings, 1 reply; 12+ messages in thread
From: Bastien @ 2006-12-24  8:37 UTC (permalink / raw)
  To: emacs-orgmode

Leo <sdl.web@gmail.com> writes:

> Thanks for the feedback. The backtrace is purely caused by the
> change in gnus-fetch-group in NoGnus 0.6 (the development version of
> Gnus, which might be included in Emacs 23).

Right - i suspected something like this.

> I'd suggest drop gnus-fetch-group and use gnus-group-read-group so
> that it will work in Gnus 5.11 as well. gnus-group-select-group
> should also be dropped. It will interrupt user when the group is too
> big.

That's fine for me.  BTW, i think it's okay *not* to select the group
when we jump to it in the group buffer.

-- 
Bastien

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

* Re: Gnus link BUGS
  2006-12-24  8:37           ` Bastien
@ 2006-12-24 11:48             ` Leo
  0 siblings, 0 replies; 12+ messages in thread
From: Leo @ 2006-12-24 11:48 UTC (permalink / raw)
  To: emacs-orgmode

* Bastien (2006-12-24 09:37 +0100) said:
  ^^^^^^^
>> I'd suggest drop gnus-fetch-group and use gnus-group-read-group so
>> that it will work in Gnus 5.11 as well. gnus-group-select-group
>> should also be dropped. It will interrupt user when the group is
>> too big.
>
> That's fine for me.  BTW, i think it's okay *not* to select the
> group when we jump to it in the group buffer.

Agreed ;)

-- 
Leo <sdl.web AT gmail.com>                         (GPG Key: 9283AA3F)

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

* Re: Gnus link BUGS
  2006-12-22  3:11 Gnus link BUGS Leo
  2006-12-22  3:39 ` Bastien
  2006-12-22  5:44 ` Leo
@ 2006-12-24 11:48 ` Leo
  2007-01-08 17:53 ` [fixed in 4.61] " Leo
  3 siblings, 0 replies; 12+ messages in thread
From: Leo @ 2006-12-24 11:48 UTC (permalink / raw)
  To: emacs-orgmode

* Leo (2006-12-22 03:11 +0000) said:
  ^^^
>  .1.
>
> C-c l (bound to org-store-link) in Gnus summary buffer will store
> the link but also has the side-effect of reading the article. This
> is quite distracting.

This one is still open.

-- 
Leo <sdl.web AT gmail.com>                         (GPG Key: 9283AA3F)

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

* Re: [fixed in 4.61] Gnus link BUGS
  2006-12-22  3:11 Gnus link BUGS Leo
                   ` (2 preceding siblings ...)
  2006-12-24 11:48 ` Leo
@ 2007-01-08 17:53 ` Leo
  3 siblings, 0 replies; 12+ messages in thread
From: Leo @ 2007-01-08 17:53 UTC (permalink / raw)
  To: emacs-orgmode

In title.
-- 
Leo <sdl.web AT gmail.com>                         (GPG Key: 9283AA3F)

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

end of thread, other threads:[~2007-01-08 17:55 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-12-22  3:11 Gnus link BUGS Leo
2006-12-22  3:39 ` Bastien
2006-12-23 17:58   ` Leo
2006-12-23 18:23     ` Leo
2006-12-24  0:54       ` Bastien
2006-12-24  2:37         ` Leo
2006-12-24  8:37           ` Bastien
2006-12-24 11:48             ` Leo
2006-12-22  5:44 ` Leo
2006-12-23  7:38   ` Carsten Dominik
2006-12-24 11:48 ` Leo
2007-01-08 17:53 ` [fixed in 4.61] " Leo

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

	https://git.savannah.gnu.org/cgit/emacs/org-mode.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).