Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* Gnus: add group from server browse list
@ 2014-12-13  1:11 Emanuel Berg
  2014-12-13  8:13 ` Adam Sjøgren
       [not found] ` <mailman.15983.1418458438.1147.info-gnus-english@gnu.org>
  0 siblings, 2 replies; 5+ messages in thread
From: Emanuel Berg @ 2014-12-13  1:11 UTC (permalink / raw)
  To: info-gnus-english

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] 5+ 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-13  8:13 ` Adam Sjøgren
       [not found] ` <mailman.15983.1418458438.1147.info-gnus-english@gnu.org>
  1 sibling, 0 replies; 5+ messages in thread
From: Adam Sjøgren @ 2014-12-13  8:13 UTC (permalink / raw)
  To: info-gnus-english

Emanuel writes:

> I just wrote this for Gnus which makes it possible to add groups from
> the "server browse" list

"add" as in "create a new group", or "add" as in "subscribe to a group
in the list"?

> there *is* a function to unsubscribe a group, namely
> `gnus-browse-unsubscribe-group'

Bound to 'u' in the browse server buffer is
gnus-browse-unsubscribe-current-group, which toggles whether a group is
subscribed (despite the name):

,----[ C-h f gnus-browse-unsubscribe-current-group RET ]
| gnus-browse-unsubscribe-current-group is an interactive compiled Lisp
| function in `gnus-srvr.el'.
| 
| (gnus-browse-unsubscribe-current-group ARG)
| 
| (Un)subscribe to the next ARG groups.
| The variable `gnus-browse-subscribe-newsgroup-method' determines
| how new groups will be entered into the group buffer.
`----

The function you mention also toggles:

,----[ 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.
`----


  Best regards,

    Adam

-- 
 "Alla för alla, en för en                                    Adam Sjøgren
  Alla för alla, en för en                               asjo@koldfront.dk
  Så börjar vi om igen"


_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

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

* Re: Gnus: add group from server browse list
       [not found] ` <mailman.15983.1418458438.1147.info-gnus-english@gnu.org>
@ 2014-12-13 21:37   ` Emanuel Berg
  2014-12-13 22:16     ` Adam Sjøgren
       [not found]     ` <mailman.16004.1418509005.1147.info-gnus-english@gnu.org>
  0 siblings, 2 replies; 5+ messages in thread
From: Emanuel Berg @ 2014-12-13 21:37 UTC (permalink / raw)
  To: info-gnus-english

asjo@koldfront.dk (Adam Sjøgren) writes:

> "add" as in "create a new group", or "add" as in
> "subscribe to a group in the list"?

No, I mean subscribe, as you thought (or perhaps
derived from my code).

> Bound to 'u' in the browse server buffer is
> gnus-browse-unsubscribe-current-group, which toggles
> ... The function you mention also toggles ...
> gnus-browse-unsubscribe-group

Indeed! Ha, but this is good news, of course. Yes, I
was very surprised this "wasn't" there, as it is the
most natural thing in the world and as I showed very
easy to do as well.

But: Perhaps Gnus would benefit from an alias
gnus-browse-subscribe-... or
gnus-browse-toggle-subscription[-...] or a stub defun
that just calls the functions you mention?

-- 
underground experts united
_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

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

* Re: Gnus: add group from server browse list
  2014-12-13 21:37   ` Emanuel Berg
@ 2014-12-13 22:16     ` Adam Sjøgren
       [not found]     ` <mailman.16004.1418509005.1147.info-gnus-english@gnu.org>
  1 sibling, 0 replies; 5+ messages in thread
From: Adam Sjøgren @ 2014-12-13 22:16 UTC (permalink / raw)
  To: info-gnus-english

Emanuel writes:

> But: Perhaps Gnus would benefit from an alias
> gnus-browse-subscribe-... or gnus-browse-toggle-subscription[-...] or
> a stub defun that just calls the functions you mention?

I haven't heard of anyone that was confused by the toggling before...


  Best regards,

    Adam

-- 
 "Someone said ``look, it's Milli Vanilli!'' but              Adam Sjøgren
  that's totally unfair to Milli Vanilli: at least       asjo@koldfront.dk
  they danced."


_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

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

* Re: Gnus: add group from server browse list
       [not found]     ` <mailman.16004.1418509005.1147.info-gnus-english@gnu.org>
@ 2014-12-15  1:20       ` Emanuel Berg
  0 siblings, 0 replies; 5+ messages in thread
From: Emanuel Berg @ 2014-12-15  1:20 UTC (permalink / raw)
  To: info-gnus-english

asjo@koldfront.dk (Adam Sjøgren) writes:

>> But: Perhaps Gnus would benefit from an alias
>> gnus-browse-subscribe-... or
>> gnus-browse-toggle-subscription[-...] or a stub
>> defun that just calls the functions you mention?
>
> I haven't heard of anyone that was confused by the
> toggling before...

You still haven't: I just looked at the function name
and read 'unsubscribe' - but I'm confident it is
mentioned in the docs, actually I'm so confident I
won't even bother checking them out.

-- 
underground experts united
_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

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

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

Thread overview: 5+ 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-13  8:13 ` Adam Sjøgren
     [not found] ` <mailman.15983.1418458438.1147.info-gnus-english@gnu.org>
2014-12-13 21:37   ` Emanuel Berg
2014-12-13 22:16     ` Adam Sjøgren
     [not found]     ` <mailman.16004.1418509005.1147.info-gnus-english@gnu.org>
2014-12-15  1:20       ` Emanuel Berg

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 NNTP newsgroup(s).