Gnus development mailing list
 help / color / mirror / Atom feed
* Abbreviations for group names
@ 2006-06-26 23:37 Lloyd Zusman
  2006-06-27  4:40 ` Nelson Ferreira
  0 siblings, 1 reply; 3+ messages in thread
From: Lloyd Zusman @ 2006-06-26 23:37 UTC (permalink / raw)


I'm using a very recent cvs of Gnus v5.9.0.

What is the recommended way to alter the names of newsgroups as they
appear in the group buffer?

For example, I'd like `gmane.emacs.gnus.general' to appear in the group
buffer as `gmane.gnus'.

I have previously done via elisp within one of the gnus-group hooks, but
I'm wondering whether there's a more formal mechanism in place to
accomplish this.

Thanks in advance.


-- 
 Lloyd Zusman
 ljz@asfast.com
 God bless you.

    .---------, 0__0
   /           (  oo'---,
  /                    oo\
 ,\                      |
 | \                ,=__/
    \              /
    /  /------|  /|
    |__|-'    |__|'




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

* Re: Abbreviations for group names
  2006-06-26 23:37 Abbreviations for group names Lloyd Zusman
@ 2006-06-27  4:40 ` Nelson Ferreira
  2006-06-27 10:44   ` Lloyd Zusman
  0 siblings, 1 reply; 3+ messages in thread
From: Nelson Ferreira @ 2006-06-27  4:40 UTC (permalink / raw)


"Lloyd" == Lloyd Zusman <ljz@asfast.com> writes:


[...]

    Lloyd> For example, I'd like `gmane.emacs.gnus.general' to appear in the group
    Lloyd> buffer as `gmane.gnus'.

    Lloyd> I have previously done via elisp within one of the gnus-group hooks, but
    Lloyd> I'm wondering whether there's a more formal mechanism in place to
    Lloyd> accomplish this.


[...]

I do it like this:

(defun gnus-user-format-function-g (header)
  "Get the groups name in the right format."
  (njsf-abreviate-group-name gnus-tmp-group))

(setq gnus-group-line-format "%M%m%S%PP   %(%ug%) %y%l
")

And of course my njsf-abreviate-group-name mangles the group-name as I
want it.

-- 
Nelson Ferreira




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

* Re: Abbreviations for group names
  2006-06-27  4:40 ` Nelson Ferreira
@ 2006-06-27 10:44   ` Lloyd Zusman
  0 siblings, 0 replies; 3+ messages in thread
From: Lloyd Zusman @ 2006-06-27 10:44 UTC (permalink / raw)


Nelson Ferreira <nelson.ferreira@ieee.org> writes:

> "Lloyd" == Lloyd Zusman <ljz@asfast.com> writes:
>
>
>     [...]
>
>     Lloyd> For example, I'd like `gmane.emacs.gnus.general' to appear
>     Lloyd> in the group buffer as `gmane.gnus'.
>
>     [ ... ]
>
> I do it like this:
>
> (defun gnus-user-format-function-g (header)
>   "Get the groups name in the right format."
>   (njsf-abreviate-group-name gnus-tmp-group))
>
> (setq gnus-group-line-format "%M%m%S%PP   %(%ug%) %y%l
> ")
>
> And of course my njsf-abreviate-group-name mangles the group-name as I
> want it.

Thank you very much.  I also have used this method in the past, and it
indeed works fine.

I was just wondering whether there was a mechanism already built into
gnus which could accomplish this in a more formal manner ... something
vaguely analogous to `gnus-posting-styles', perhaps, but which operates
on the group names in the group buffer.  In my spare time, maybe I
should create something that would work more or less like this ...

  (setq gnus-group-abbreviations
        '(("^gmane\\..*\\([^.]*\\)\\.general$"
           "gmane.\\1")
          ("^comp\\.lang\\.\\(.*\\)$"
           "lang.\\1")))

-- 
 Lloyd Zusman
 ljz@asfast.com
 God bless you.




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

end of thread, other threads:[~2006-06-27 10:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-26 23:37 Abbreviations for group names Lloyd Zusman
2006-06-27  4:40 ` Nelson Ferreira
2006-06-27 10:44   ` Lloyd Zusman

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