Gnus development mailing list
 help / color / mirror / Atom feed
From: Jon K Hellan <Jon.K.Hellan@item.ntnu.no>
Subject: Re: Can't select group created by copying
Date: 08 Jul 1999 13:52:06 +0200	[thread overview]
Message-ID: <87pv23nyu1.fsf@parus.itea.ntnu.no> (raw)
In-Reply-To: Jon K Hellan's message of "Thu, 08 Jul 1999 11:45:35 GMT"

Trying again

When I read my previous message from the
"nntp+sunsite.auc.dk:emacs.ding" archive, I get 
"Wrong number of arguments: #<subr assoc>" when I try to open the
attachment.

So here we go again

Here is my original problem:

> When I create a new group by copying a message into it, I can't
> select that group unless I do M-g (gnus-group-get-new-news-this-group).

> I use B c - gnus-summary-copy-article, and enter the name of a group
> that does not exist. When prompted, I confirm that I want to create
> it.

> gnus-read-move-group-name creates the group, and activates it. Of
> course, it is empty, and this is what (gnus-active <group-name>) will
> report from now on.

> When I subscribe the group in the Group buffer, and try to select it, the
> active info is never updated. So gnus believes that it is still empty,
> and refuses to enter it. "Can't select group".

I considered a few other solutions

1. Don't activate group when creating it.

2. Refresh active info of newly created groups in gnus-summary-move-article

3. Refresh active info when changing group level or selecting an
   ephemeral group.

2 seems to be most consistent with the current design - not that I
understand it well. Here is a patch. Is it OK?

It makes a separate list of copy destinations which do not have info,
and updates their active info.

--

Jon

--
Here is my original problem:

> When I create a new group by copying a message into it, I can't
> select that group unless I do M-g (gnus-group-get-new-news-this-group).

> I use B c - gnus-summary-copy-article, and enter the name of a group
> that does not exist. When prompted, I confirm that I want to create
> it.

> gnus-read-move-group-name creates the group, and activates it. Of
> course, it is empty, and this is what (gnus-active <group-name>) will
> report from now on.

> When I subscribe the group in the Group buffer, and try to select it, the
> active info is never updated. So gnus believes that it is still empty,
> and refuses to enter it. "Can't select group".

I considered a few other solutions

1. Don't activate group when creating it.

2. Refresh active info of newly created groups in gnus-summary-move-article

3. Refresh active info when changing group level or selecting an
   ephemeral group.

2 seems to be most consistent with the current design - not that I
understand it well. Here is a patch. Is it OK?

It makes a separate list of copy destinations which do not have info,
and updates their active info.


*** /home/jk/pgnus-0.93/lisp/gnus-sum.el	Thu Jul  8 13:31:21 1999
--- /home/jk/pgnus-jk/lisp/gnus-sum.el	Thu Jul  8 13:31:21 1999
***************
*** 7185,7191 ****
  		 (crosspost "Crosspost" "Crossposting")))
  	(copy-buf (save-excursion
  		    (nnheader-set-temp-buffer " *copy article*")))
! 	art-group to-method new-xref article to-groups)
      (unless (assq action names)
        (error "Unknown action %s" action))
      ;; Read the newsgroup name.
--- 7185,7191 ----
  		 (crosspost "Crosspost" "Crossposting")))
  	(copy-buf (save-excursion
  		    (nnheader-set-temp-buffer " *copy article*")))
!  	art-group to-method new-xref article to-groups new-groups)
      (unless (assq action names)
        (error "Unknown action %s" action))
      ;; Read the newsgroup name.
***************
*** 7280,7290 ****
                 (to-group (gnus-info-group info))
  	       to-marks)
  	  ;; Update the group that has been moved to.
  	  (when (and info
  		     (memq action '(move copy)))
- 	    (unless (member to-group to-groups)
- 	      (push to-group to-groups))
- 
  	    (unless (memq article gnus-newsgroup-unreads)
  	      (push 'read to-marks)
  	      (gnus-info-set-read
--- 7280,7294 ----
                 (to-group (gnus-info-group info))
  	       to-marks)
  	  ;; Update the group that has been moved to.
+ 	  (when (memq action '(move copy))
+ 	    (if info
+ 		(unless (member to-group to-groups)
+ 		  (push to-group to-groups))
+ 	      (unless (member pto-group new-groups)
+ 		(push pto-group new-groups))))
+ 
  	  (when (and info
  		     (memq action '(move copy)))
  	    (unless (memq article gnus-newsgroup-unreads)
  	      (push 'read to-marks)
  	      (gnus-info-set-read
***************
*** 7361,7366 ****
--- 7365,7373 ----
  	(when (gnus-group-goto-group (car to-groups) t)
  	  (gnus-group-get-new-news-this-group 1 t))
  	(pop to-groups)))
+ 
+     (while new-groups		; Update active info
+ 	(gnus-activate-group (pop new-groups) nil nil to-method))
  
      (gnus-kill-buffer copy-buf)
      (gnus-summary-position-point)



  reply	other threads:[~1999-07-08 11:52 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-07-07 10:32 Jon K Hellan
1999-07-07 13:51 ` Jon K Hellan
1999-07-07 19:15   ` Simon Josefsson
1999-07-07 20:44     ` Jon K Hellan
1999-07-08 11:45   ` Jon K Hellan
1999-07-08 11:52     ` Jon K Hellan [this message]
     [not found] ` <wtnzp18a9wb.fsf@licia.dtek.chalmers.se>
1999-07-07 13:56   ` Jon K Hellan
1999-07-07 14:00   ` Kai.Grossjohann
     [not found]     ` <wtnr9mkph6s.fsf_-_@licia.dtek.chalmers.se>
1999-07-08  9:37       ` nnmh, delete next last article (Was: Re: Can't select group created by copying) Kai.Grossjohann
1999-07-08 19:26         ` Stainless Steel Rat
1999-07-09  7:54           ` Kai.Grossjohann
1999-07-09 18:56             ` Stainless Steel Rat
     [not found]             ` <wtng12ytcb0.fsf@licia.dtek.chalmers.se>
     [not found]               ` <wtnr9m6t6qk.fsf@licia.dtek.chalmers.se>
1999-08-27 19:57                 ` Lars Magne Ingebrigtsen
1999-07-09 17:16           ` Lars Magne Ingebrigtsen

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

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

  git send-email \
    --in-reply-to=87pv23nyu1.fsf@parus.itea.ntnu.no \
    --to=jon.k.hellan@item.ntnu.no \
    /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.
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 NNTP newsgroup(s).