From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/67534 Path: news.gmane.org!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.gnus.general Subject: Re: easiest way to subscribe to 10 groups at once Date: Tue, 07 Oct 2008 10:31:07 -0500 Organization: =?utf-8?B?0KLQtdC+0LTQvtGAINCX0LvQsNGC0LDQvdC+0LI=?= @ Cienfuegos Message-ID: <86y710v2v8.fsf@lifelogs.com> References: <87myhh2qrs.fsf@jidanni.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1223394212 5304 80.91.229.12 (7 Oct 2008 15:43:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 7 Oct 2008 15:43:32 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M15985@lists.math.uh.edu Tue Oct 07 17:44:29 2008 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.50) id 1KnEYC-0006Om-37 for ding-account@gmane.org; Tue, 07 Oct 2008 17:32:40 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1KnEX0-0003qu-SS; Tue, 07 Oct 2008 10:31:26 -0500 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1KnEWz-0003qd-KL for ding@lists.math.uh.edu; Tue, 07 Oct 2008 10:31:25 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtp (Exim 4.69) (envelope-from ) id 1KnEWw-0004Wc-OP for ding@lists.math.uh.edu; Tue, 07 Oct 2008 10:31:25 -0500 Original-Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by quimby.gnus.org with esmtp (Exim 3.36 #1 (Debian)) id 1KnEX2-0001iW-00 for ; Tue, 07 Oct 2008 17:31:28 +0200 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1KnEWp-0002k0-5L for ding@gnus.org; Tue, 07 Oct 2008 15:31:15 +0000 Original-Received: from 38.98.147.130 ([38.98.147.130]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 07 Oct 2008 15:31:15 +0000 Original-Received: from tzz by 38.98.147.130 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 07 Oct 2008 15:31:15 +0000 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 44 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 38.98.147.130 User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.0.60 (gnu/linux) X-Face: bd.DQ~'29fIs`T_%O%C\g%6jW)yi[zuz6;d4V0`@y-~$#3P_Ng{@m+e4o<4P'#(_GJQ%TT= D}[Ep*b!\e,fBZ'j_+#"Ps?s2!4H2-Y"sx" Cancel-Lock: sha1:6fNaA/xr+5vn4L/qgV6+BfOwnrM= X-Spam-Score: -1.5 (-) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:67534 Archived-At: On Tue, 07 Oct 2008 08:27:35 +0800 jidanni@jidanni.org wrote: j> This step was easy enough: j> # xargs -n 1 noffle -s < additional_groups_I_want_to_subscribe_to j> Next I attempted to use j> F runs the command gnus-group-find-new-groups j> which merely chomped CPU and made a giant buffer in the buffer list, j> until I hit ^G. No wonder F is disabled. j> (As I don't use .newsrc, I didn't investigate importing from there.) j> OK, then I did j> # perl -nlwe 'print "(gnus-group-jump-to-group \"$_\")"' < additional_groups... j> (gnus-group-jump-to-group "gmane.comp.handhelds.openmoko.announce") j> (gnus-group-jump-to-group "gmane.comp.handhelds.openmoko.apps") j> (gnus-group-jump-to-group "gmane.comp.handhelds.openmoko.buglog")... j> Which I pasted into the minibuffer of j> M-: (translated from :) runs the command eval-expression j> whereupon I was finally able to use uuuuu... to subscribe them. Jeez. It seems useful to have a "mapfile" function similar to mapcar which would feed every line from a file into a list and then mapcar on the list. Something like this: (defun file-to-list (file) "Get contents of FILE as a list of nonempty strings. Blank lines are skipped." (with-temp-buffer (let ((list)) (insert-file-contents file) (while (not (eobp)) (let ((line (buffer-substring (line-beginning-position) (line-end-position)))) (when (< 0 (length line)) (push line list))) (forward-line)) list))) (defun mapfile (function file) (mapcar function (file-to-list file))) (mapfile 'insert "/etc/hosts") ; side effect--insert every line as a string I don't know if my version is optimal (for large files it's definitely not), but it seems generally a very useful idea. Ted