From: Emanuel Berg <embe8573@student.uu.se>
To: help-gnu-emacs@gnu.org
Subject: Gnus: add group from server browse list
Date: Sat, 13 Dec 2014 02:11:38 +0100 [thread overview]
Message-ID: <87bnn8e4l1.fsf@debian.uxu> (raw)
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
next reply other threads:[~2014-12-13 1:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-13 1:11 Emanuel Berg [this message]
2014-12-15 9:05 ` Gnus: add group from server browse list Tassilo Horn
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=87bnn8e4l1.fsf@debian.uxu \
--to=embe8573@student.uu.se \
--cc=help-gnu-emacs@gnu.org \
/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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.