From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/24001 Path: main.gmane.org!not-for-mail From: Jon K Hellan Newsgroups: gmane.emacs.gnus.general Subject: Re: Can't select group created by copying Date: 08 Jul 1999 13:45:47 +0200 Sender: owner-ding@hpc.uh.edu Message-ID: <87wvwbnz4k.fsf@parus.itea.ntnu.no> References: <87r9mkvjg9.fsf@parus.itea.ntnu.no> <87vhbwlg95.fsf@parus.itea.ntnu.no> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: main.gmane.org 1035161646 6371 80.91.224.250 (21 Oct 2002 00:54:06 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 00:54:06 +0000 (UTC) Return-Path: Original-Received: from farabi.math.uh.edu (farabi.math.uh.edu [129.7.128.57]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id HAA14966 for ; Thu, 8 Jul 1999 07:45:39 -0400 (EDT) Original-Received: from sina.hpc.uh.edu (lists@Sina.HPC.UH.EDU [129.7.3.5]) by farabi.math.uh.edu (8.9.1/8.9.1) with ESMTP id GAB11198; Thu, 8 Jul 1999 06:45:23 -0500 (CDT) Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Thu, 08 Jul 1999 06:46:12 -0500 (CDT) Original-Received: from sclp3.sclp.com (root@sclp3.sclp.com [204.252.123.139]) by sina.hpc.uh.edu (8.9.3/8.9.3) with ESMTP id GAA24664 for ; Thu, 8 Jul 1999 06:46:01 -0500 (CDT) Original-Received: from newman.itea.ntnu.no (newman.itea.ntnu.no [129.241.18.18]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id HAA14956 for ; Thu, 8 Jul 1999 07:44:59 -0400 (EDT) Original-Received: from parus.itea.ntnu.no (isdn-b83.itea.ntnu.no [129.241.54.83]) by newman.itea.ntnu.no (8.9.1/8.9.1) with ESMTP id MAA02667 for ; Thu, 8 Jul 1999 12:44:57 +0100 (WET DST) Original-Received: (from jk@localhost) by parus.itea.ntnu.no (8.9.3/8.9.3/Debian/GNU) id NAA01647; Thu, 8 Jul 1999 13:45:47 +0200 Original-To: ding@gnus.org In-Reply-To: Jon K Hellan's message of "Wed, 07 Jul 1999 13:54:30 GMT" Original-Lines: 35 User-Agent: Gnus/5.070093 (Pterodactyl Gnus v0.93) Emacs/20.3 Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:24001 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:24001 --=-=-= 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 ) 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 --=-=-= Content-Type: text/patch Content-Disposition: attachment; filename=dr5 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 ) 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) --=-=-=--