Gnus development mailing list
 help / color / mirror / Atom feed
From: Simon Josefsson <jas@extundo.com>
Cc: ding@gnus.org
Subject: Re: nnimap support for "NAMESPACE" (prefix "INBOX." on
Date: Fri, 27 Feb 2004 20:42:56 +0100	[thread overview]
Message-ID: <ilusmgwz4u7.fsf@latte.josefsson.org> (raw)
In-Reply-To: <86u11ciczp.fsf@PECTOPAH.shenton.org> (Chris Shenton's message of "Fri, 27 Feb 2004 13:38:50 -0500")

Chris Shenton <chris@shenton.org> writes:

> I'm "No Gnus v0.2" with a couple of courier-imap servers which use an
> IMAP namespace of "INBOX.":
>
>   * OK [CAPABILITY IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA IDLE NEWHORSE GRAPPA UMAMI LAPHROIG] Courier-IMAP ready. Copyright 1998-2003 Double Precision, Inc.  See COPYING for distribution information.
>   2 login USERNAME PASSW0RD
>   2 OK LOGIN Ok.
>   3 namespace
>   * NAMESPACE (("INBOX." ".")) NIL (("shared." "."))
>   3 OK NAMESPACE completed.
>
> Currently, when ever I want to refert to a server mailbox name (e.g.,
> to move from my main inbox to some other) I have to use something like:
>
>   nnimap+pectopah:INBOX.list.ding
>
> Gnus defaults the part up to the colon, which is usally good, but I
> have to type that INBOX. thing every time.   Is there a way to tell
> Gnus to find out the namespace from the server and use this as a
> prefix so I don't have to? 

You mean, you want it to default to the private namespace by default?
It is not clear this is always the best default (some people move mail
from private folders to shared folders), but I agree it would be nice
to offer this as a feature.

You do know about tab completion, right?  'I<TAB>' is sufficient for
me.  Further, the next time you have to enter the mailbox, there is
command line history, so you can retrieve the earlier value, and edit
it -- for example, I often do <UP><M-backspace> and write a new
mailbox name, then the INBOX prefix comes from an earlier value
prompt.

> Does Gnus have a way to determine this from the server? Have it
> configured manually? use it when referring to mailbox names, for
> retrieval, creation, moving, etc?

I have installed the following, at least it will allow you to hook in
your own function that return the default prefix used.

2004-02-27  Simon Josefsson  <jas@extundo.com>

	* gnus-sum.el (gnus-move-group-prefix-function): Add, default to
	gnus-group-real-prefix.
	(gnus-summary-move-article): Use it, instead of
	gnus-group-real-prefix.

Index: gnus-sum.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/gnus-sum.el,v
retrieving revision 7.20
retrieving revision 7.21
diff -u -p -r7.20 -r7.21
--- gnus-sum.el	14 Feb 2004 00:29:45 -0000	7.20
+++ gnus-sum.el	27 Feb 2004 19:40:52 -0000	7.21
@@ -422,6 +422,13 @@ this variable specifies group names."
 			 (cons :value ("" "") regexp (repeat string))
 			 (sexp :value nil))))
 
+(defcustom gnus-move-group-prefix-function 'gnus-group-real-prefix
+  "Function used to compute default prefix for article move/copy/etc prompts.
+The function should take one argument, a group name, and return a
+string with the suggested prefix."
+  :group 'gnus-summary-mail
+  :type 'function)
+
 (defcustom gnus-unread-mark ?           ;Whitespace
   "*Mark used for unread articles."
   :group 'gnus-summary-marks
@@ -8873,7 +8880,8 @@ ACTION can be either `move' (the default
   (let ((articles (gnus-summary-work-articles n))
 	(prefix (if (gnus-check-backend-function
 		     'request-move-article gnus-newsgroup-name)
-		    (gnus-group-real-prefix gnus-newsgroup-name)
+		    (funcall gnus-move-group-prefix-function
+			     gnus-newsgroup-name)
 		  ""))
 	(names '((move "Move" "Moving")
 		 (copy "Copy" "Copying")



  reply	other threads:[~2004-02-27 19:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-27 18:38 nnimap support for "NAMESPACE" (prefix "INBOX." on courier-imap) Chris Shenton
2004-02-27 19:42 ` Simon Josefsson [this message]
2004-03-01 20:57 ` nnimap support for "NAMESPACE" (prefix "INBOX." on Ted Zlatanov

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=ilusmgwz4u7.fsf@latte.josefsson.org \
    --to=jas@extundo.com \
    --cc=ding@gnus.org \
    /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).