unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Gnus: add group from server browse list
@ 2014-12-13  1:11 Emanuel Berg
  2014-12-15  9:05 ` Tassilo Horn
  0 siblings, 1 reply; 2+ messages in thread
From: Emanuel Berg @ 2014-12-13  1:11 UTC (permalink / raw)
  To: help-gnu-emacs

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-12-15  9:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-13  1:11 Gnus: add group from server browse list Emanuel Berg
2014-12-15  9:05 ` Tassilo Horn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).