From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/56449 Path: main.gmane.org!not-for-mail From: Simon Josefsson Newsgroups: gmane.emacs.gnus.general Subject: Re: nnimap support for "NAMESPACE" (prefix "INBOX." on Date: Fri, 27 Feb 2004 20:42:56 +0100 Sender: ding-owner@lists.math.uh.edu Message-ID: References: <86u11ciczp.fsf@PECTOPAH.shenton.org> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1077911056 22484 80.91.224.253 (27 Feb 2004 19:44:16 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 27 Feb 2004 19:44:16 +0000 (UTC) Cc: ding@gnus.org Original-X-From: ding-owner+M4990@lists.math.uh.edu Fri Feb 27 20:44:05 2004 Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1Awnu0-0005uj-00 for ; Fri, 27 Feb 2004 20:44:05 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 1AwntG-0001cF-00; Fri, 27 Feb 2004 13:43:18 -0600 Original-Received: from justine.libertine.org ([66.139.78.221] ident=postfix) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1AwntB-0001cA-00 for ding@lists.math.uh.edu; Fri, 27 Feb 2004 13:43:13 -0600 Original-Received: from yxa.extundo.com (178.230.13.217.in-addr.dgcsystems.net [217.13.230.178]) by justine.libertine.org (Postfix) with ESMTP id F01873A0067 for ; Fri, 27 Feb 2004 13:43:10 -0600 (CST) Original-Received: from latte.josefsson.org (yxa.extundo.com [217.13.230.178]) (authenticated bits=0) by yxa.extundo.com (8.12.10/8.12.10) with ESMTP id i1RJh7Me001960 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Fri, 27 Feb 2004 20:43:08 +0100 Original-To: Chris Shenton Mail-Copies-To: nobody X-Hashcash: 0:040227:chris@shenton.org:cf5d8068c183b690 X-Hashcash: 0:040227:ding@gnus.org:9568b1b5325fb527 In-Reply-To: <86u11ciczp.fsf@PECTOPAH.shenton.org> (Chris Shenton's message of "Fri, 27 Feb 2004 13:38:50 -0500") User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (gnu/linux) Precedence: bulk Xref: main.gmane.org gmane.emacs.gnus.general:56449 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:56449 Chris Shenton 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' 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 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 * 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")