From: David Kagedal <davidk@lysator.liu.se>
Subject: Re: IMAP server hierarchy as topics
Date: 15 Feb 2000 15:32:31 +0100 [thread overview]
Message-ID: <r9g0uuh6yo.fsf@shs4.idasys.se> (raw)
In-Reply-To: Steinar Bang's message of "14 Feb 2000 17:37:12 +0100"
Steinar Bang <sb@metis.no> writes:
> >>>>> David Kagedal <davidk@lysator.liu.se>:
>
> > Steinar Bang <sb@metis.no> writes:
> >> * make it possible to set a directory prefix for each IMAP server.
> >> This will make mail group names shorter when using the UoW imapd
>
> > Even better:
>
> > * Make it possible to duplicate the IMAP folder hierarchy with Gnus
> > topics, and only showing the last part of the group names, since the
> > full folder name (minus the root prefix) is available as the topic
> > path.
>
> On closer thought, the two requirements are separate.
>
> My requirment is to make nnimap work better with UoW imapd, running on
> a machine where the users' home directories are used for other things
> than mail.
>
> You would wish to set the directory prefix for a UoW imapd, even when
> you're presenting the IMAP folder hierarchy as topics (unless you wish
> to browse your entire home directory as mail folders... which I guess
> is possible, however I don't)
In a flash of inspiration, I decided to implement your first idea,
remove a prefix from the group names.
I have used %G in gnus-group-line-format, which would make all my
group names, exept for INBOX, start with "mail/".
An nnimap method does not really specify a prefix, but a list
pattern. So I decided that I needed to add the prefix to strip to the
method information. This is what I use:
(defconst lysator-imap-method
'(nnimap "lysator"
(nnimap-address "imap.lysator.liu.se")
(nnimap-list-pattern ("INBOX" "mail/*"))
(prefix "mail/")))
I implemented a user format function, and use %uG instead of %G.
(setq gnus-group-line-format "%m%M%S%p%5y: %(%uG%)\n")
The function does one more trick; if the group parameters contains a
'name parameter, its value is used instead.
(defun gnus-user-format-function-G (arg)
(let ((name (gnus-group-find-parameter gnus-tmp-group 'name)))
(if name
name
(let ((prefix (assq 'prefix (cddr gnus-tmp-method))))
(if (and prefix
(string-match (concat "^\\("
(regexp-quote (cadr prefix))
"\\)")
gnus-tmp-qualified-group))
(substring gnus-tmp-qualified-group (match-end 1))
gnus-tmp-qualified-group))))))
--
David Kågedal
next prev parent reply other threads:[~2000-02-15 14:32 UTC|newest]
Thread overview: 56+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <wtnn1pzpw2z.fsf@licia.dtek.chalmers.se>
2000-01-21 12:55 ` Wishlist for oGnus Kai Großjohann
2000-01-21 14:40 ` Editing articles in read-only backends (was: Wishlist for oGnus) Toby Speight
2000-01-21 14:43 ` Wishlist for oGnus David Z. Maze
2000-01-22 15:18 ` Alexandre Oliva
2000-01-23 15:58 ` Group parameters and splitting (Was: Re: Wishlist for oGnus) David Z. Maze
2000-01-21 14:45 ` MML editing improvements (was: " Toby Speight
2000-02-02 2:49 ` Wishlist for oGnus Rob Browning
2000-01-21 14:17 ` Robert Epprecht
2000-01-21 21:27 ` Kai Großjohann
2000-10-29 23:00 ` nnfolder NOV (was: Wishlist for oGnus) ShengHuo ZHU
2000-10-30 2:49 ` Dan Christensen
2000-10-30 3:35 ` ShengHuo ZHU
2000-10-30 4:05 ` Dan Christensen
2000-01-21 14:38 ` Wishlist for oGnus john s jacobs anderson
2000-01-21 14:55 ` Posting profiles David Kagedal
2000-01-21 15:00 ` john s jacobs anderson
2000-01-21 15:08 ` Wishlist for oGnus Alan Shutko
2000-01-21 15:22 ` Didier Verna
2000-01-21 16:15 ` Karl Kleinpaste
2000-01-21 16:46 ` Alan Shutko
2000-01-21 18:25 ` Michael Cook
2000-01-21 21:33 ` Kai Großjohann
2000-02-02 16:01 ` lconrad
2000-02-09 16:44 ` Alf-Ivar Holm
2000-01-22 2:44 ` Stainless Steel Rat
2000-01-22 15:12 ` Doug Bagley
2000-01-23 23:26 ` John Prevost
2000-01-27 17:42 ` Raja R Harinath
[not found] ` <wtnu2k7e4by.fsf@licia.dtek.chalmers.se>
2000-01-31 1:45 ` Justin Sheehy
2000-01-31 12:23 ` Steinar Bang
2000-01-31 22:32 ` Andrew J Cosgriff
2000-02-01 11:01 ` Andi Hechtbauer
2000-02-02 21:04 ` Andreas Fuchs
2000-02-04 11:06 ` Steinar Bang
2000-02-04 13:32 ` David Kagedal
2000-02-04 15:31 ` Simon Josefsson
2000-02-04 20:06 ` IMAP server hierarchy as topics Steinar Bang
2000-02-04 22:46 ` David Kagedal
2000-02-05 2:14 ` John Prevost
2000-02-14 16:37 ` Steinar Bang
2000-02-15 10:29 ` David Kagedal
2000-02-15 14:32 ` David Kagedal [this message]
2000-02-15 14:43 ` David Kagedal
2000-02-15 18:42 ` Arnd Kohrs
2000-02-16 12:26 ` David Kågedal
2000-02-16 14:56 ` Steinar Bang
2000-02-16 15:42 ` David Kågedal
2000-02-15 15:26 ` Chris Richards
2000-02-15 16:47 ` IMAP extra headers (was: IMAP server hierarchy as topics) Toby Speight
2000-02-19 2:36 ` IMAP server hierarchy as topics Justin Sheehy
2000-02-19 3:58 ` Chris Richards
2000-02-19 12:24 ` Simon Josefsson
2000-02-11 19:31 ` Wishlist for oGnus Anders Melchiorsen
2000-02-11 21:29 ` Kai Großjohann
2000-02-14 12:06 ` Multiple view interface (Re: Wishlist for oGnus) Anders Melchiorsen
2000-05-11 14:50 ` Wishlist for oGnus Kim-Minh Kaplan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=r9g0uuh6yo.fsf@shs4.idasys.se \
--to=davidk@lysator.liu.se \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).