From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Emanuel Berg Newsgroups: gmane.emacs.help Subject: Gnus: add group from server browse list Date: Sat, 13 Dec 2014 02:11:38 +0100 Organization: Aioe.org NNTP Server Message-ID: <87bnn8e4l1.fsf@debian.uxu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1418433033 9112 80.91.229.3 (13 Dec 2014 01:10:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 13 Dec 2014 01:10:33 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Dec 13 02:10:23 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XzbDy-0007MI-D2 for geh-help-gnu-emacs@m.gmane.org; Sat, 13 Dec 2014 02:10:22 +0100 Original-Received: from localhost ([::1]:59927 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XzbDx-0002bm-U3 for geh-help-gnu-emacs@m.gmane.org; Fri, 12 Dec 2014 20:10:21 -0500 Original-Path: usenet.stanford.edu!goblin1!goblin2!goblin.stu.neva.ru!aioe.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help,gnu.emacs.gnus Original-Followup-To: gnu.emacs.gnus Original-Lines: 46 Original-NNTP-Posting-Host: feB02bRejf23rfBm51Mt7Q.user.speranza.aioe.org Original-X-Complaints-To: abuse@aioe.org User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) X-Notice: Filtered by postfilter v. 0.8.2 Cancel-Lock: sha1:Q6FYvW5+jfG5puEKeY464XMMPJw= Mail-Copies-To: never Original-Xref: usenet.stanford.edu gnu.emacs.help:209274 gnu.emacs.gnus:88418 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:101554 Archived-At: Hello friday night party people, I just wrote this for Gnus which makes it possible to add groups from the "server browse" list - surprisingly, there isn't such a function already, especially since there *is* a function to unsubscribe a group, namely `gnus-browse-unsubscribe-group' (indeed, in itself a double-buffered bag, if that Swengishism is understandable in Anglo-American). I'm also trying a bold approach, to cross-post this to gnu.emacs.help as well as gnu.emacs.gnus - the reason is there are so few people at gnu.emacs.gnus - while those of course are held in the highest esteem, there are many people at gnu.emacs.help who are into Elisp, but may not be Gnusers themselves. Gnus obviously isn't OT on gnu.emacs.help, and any newsroller should be able to not show the same post twice, for people who are on both groups (indeed, Gnus does this, and I suspect most people on gnu.emacs.gnus do use Gnus). If you feel like a purist, how about acting like one by commenting on the Elisp stuff on gnu.emacs.help, and the Gnus stuff on gnu.emacs.gnus! (And if you think this is over-evidence for such a bubble as is a Usenet thread, *you* go ahead and break a taboo and see how easy it is...) (require 'gnus) (require 'gnus-srvr) (defun gnus-browse-short-group-name () (save-excursion (beginning-of-line) (format "%s" (get-text-property (point) 'gnus-group)) )) (defun gnus-browse-add-group () (interactive) (let*((protocol (car gnus-browse-current-method)) (server (cadr gnus-browse-current-method)) (method-str (format "%s:%s" protocol server)) (group (gnus-browse-short-group-name) )) (with-current-buffer gnus-group-buffer (gnus-group-make-group group method-str) ))) -- underground experts united