Gnus development mailing list
 help / color / mirror / Atom feed
* goto-group
@ 2011-04-18 12:42 Peter Münster
  2011-05-01 16:02 ` goto-group Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 4+ messages in thread
From: Peter Münster @ 2011-04-18 12:42 UTC (permalink / raw)
  To: ding

Hello,

Here is a little function, that allows one to switch to another group
from any gnus buffer (group, summary or article):

--8<---------------cut here---------------start------------->8---
(defvar gnus-current-goto-group nil)
(defun gnus-goto-group ()
  (interactive)
  (setq to-group (gnus-read-move-group-name
                  "Go to group"
                  (symbol-value (intern "gnus-current-goto-group")) nil
                  ""))
  (set (intern "gnus-current-goto-group") to-group)
  (gnus-group-read-group nil t to-group))
--8<---------------cut here---------------end--------------->8---

It's not very clean but it satisfies one of my needs (see also
http://article.gmane.org/gmane.emacs.gnus.user/14486 )

Perhaps you could add a better version to gnus please?

-- 
           Peter




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

* Re: goto-group
  2011-04-18 12:42 goto-group Peter Münster
@ 2011-05-01 16:02 ` Lars Magne Ingebrigtsen
  2011-05-02  7:40   ` goto-group Peter Münster
  0 siblings, 1 reply; 4+ messages in thread
From: Lars Magne Ingebrigtsen @ 2011-05-01 16:02 UTC (permalink / raw)
  To: ding

pmlists@free.fr (Peter Münster) writes:

> Here is a little function, that allows one to switch to another group
> from any gnus buffer (group, summary or article):
> (defvar gnus-current-goto-group nil)
> (defun gnus-goto-group ()

This is what `gnus-fetch-group' does, isn't it?

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/




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

* Re: goto-group
  2011-05-01 16:02 ` goto-group Lars Magne Ingebrigtsen
@ 2011-05-02  7:40   ` Peter Münster
  2011-05-02  8:49     ` goto-group Andreas Schwab
  0 siblings, 1 reply; 4+ messages in thread
From: Peter Münster @ 2011-05-02  7:40 UTC (permalink / raw)
  To: ding

Lars Magne Ingebrigtsen <larsi@gnus.org> writes:

> pmlists@free.fr (Peter Münster) writes:
>
>> Here is a little function, that allows one to switch to another group
>> from any gnus buffer (group, summary or article):
>> (defvar gnus-current-goto-group nil)
>> (defun gnus-goto-group ()
>
> This is what `gnus-fetch-group' does, isn't it?

Indeed, thanks! I had been looking only for "goto", "switch", "select",
etc...

Now I use this one, because when switching from one group to another, I
want to close the old group and rescan the groups:

--8<---------------cut here---------------start------------->8---
(defun my-goto-group ()
  (interactive)
  (setq to-group
        (gnus-group-completing-read nil nil nil (gnus-group-name-at-point)
                                    nil gnus-newsgroup-name))
  (gnus-summary-exit)
  (gnus-group-get-new-news)
  (gnus-group-read-group nil t to-group))
--8<---------------cut here---------------end--------------->8---

I suppose, that this is a very personal need, that wouldn't make sense
to include into gnus...?!

-- 
           Peter




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

* Re: goto-group
  2011-05-02  7:40   ` goto-group Peter Münster
@ 2011-05-02  8:49     ` Andreas Schwab
  0 siblings, 0 replies; 4+ messages in thread
From: Andreas Schwab @ 2011-05-02  8:49 UTC (permalink / raw)
  To: Peter Münster; +Cc: ding

pmlists@free.fr (Peter Münster) writes:

> (defun my-goto-group ()
>   (interactive)
>   (setq to-group
>         (gnus-group-completing-read nil nil nil (gnus-group-name-at-point)
>                                     nil gnus-newsgroup-name))

You should make to-group a parameter and read it in the interactive
spec.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



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

end of thread, other threads:[~2011-05-02  8:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-18 12:42 goto-group Peter Münster
2011-05-01 16:02 ` goto-group Lars Magne Ingebrigtsen
2011-05-02  7:40   ` goto-group Peter Münster
2011-05-02  8:49     ` goto-group Andreas Schwab

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).