[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Gnus: add group from server browse list

From: Emanuel Berg
Subject: Gnus: add group from server browse list
Date: Sat, 13 Dec 2014 02:11:38 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

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 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 who are into Elisp,
but may not be Gnusers themselves. Gnus obviously
isn't OT on, 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, 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 ()
    (format "%s" (get-text-property (point) 'gnus-group)) ))

(defun gnus-browse-add-group ()
  (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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]