all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / 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

* Re: Gnus: add group from server browse list
  2014-12-13  1:11 Gnus: add group from server browse list Emanuel Berg
@ 2014-12-15  9:05 ` Tassilo Horn
  0 siblings, 0 replies; 2+ messages in thread
From: Tassilo Horn @ 2014-12-15  9:05 UTC (permalink / raw
  To: help-gnu-emacs

Emanuel Berg <embe8573@student.uu.se> writes:

> 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'

That command toggles the subscription state so you use it for both
subscribing and unsubscribing.

,----[ C-h f gnus-browse-unsubscribe-group RET ]
| gnus-browse-unsubscribe-group is a compiled Lisp function in `gnus-srvr.el'.
| 
| (gnus-browse-unsubscribe-group)
| 
| Toggle subscription of the current group in the browse buffer.
`----

Bye,
Tassilo



^ 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

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.