zsh-workers
 help / color / mirror / code / Atom feed
From: "Bart Schaefer" <schaefer@candle.brasslantern.com>
To: zsh-workers@sunsite.dk
Subject: Re: PATCH: MH for Mailboxes (TM)
Date: Sat, 24 Mar 2001 18:06:07 +0000	[thread overview]
Message-ID: <1010324180607.ZM29285@candle.brasslantern.com> (raw)
In-Reply-To: <Tc0a88d015278f21020@mailsweeper01.cambridgesiliconradio.com>

On Fri, 23 Mar 2001, Peter Stephenson wrote:
}
} This makes _mailboxes a bit happier about MH mailboxes.  I don't know
} whether to alter _mh_cache directly or change it at the point of use.

It needs to be changed at point of use, because other programs may use
_mailboxes that understand MH directory format without understanding the
MH `+folder' naming convention.  So _mh_cache needs to contain full path
names.

} It still doesn't handle the feature of MH (which I don't suppose anyone
} actually uses) that @folder is relative to the last folder you were looking
} at.

Where does one obtain the name of the last folder?  Fill it in to the
`lastmhbox' parameter below, and uncomment the corresponding lines.

The following patch is INSTEAD OF Peter's, because Peter hasn't committed
his yet.

By the way (Sven), when I complete after "mutt -f " (with no prefix in
the current word) I -still- get a blank item as the first menu-selection.
I thought we fixed that bug a long time ago?

Index: Completion/User/_mailboxes
===================================================================
--- Completion/User/_mailboxes	2000/11/11 21:49:59	1.20
+++ Completion/User/_mailboxes	2001/03/24 18:00:29
@@ -84,6 +84,7 @@
       _maildir_cache=( "${_maildir_cache[@]}" "$i" )
     elif j=( "$i"/<1-> ) && [[ -n "$j" ]]; then
       _mh_cache=( "${_mh_cache[@]}" "$i" )
+      dirboxes=( $dirboxes "$i"/*(/) )
     else
       _mbox_cache=( "${_mbox_cache[@]}" "$i"/*(.) )
       dirboxes=( $dirboxes "$i"/*(/) )
@@ -116,8 +117,17 @@
 		    "${_mailbox_cache[@]}" )
       fi
       ;;
-    (*:mh:*) # I've probably got this wrong, or at least incomplete
-      (( $#_mh_cache )) && _multi_parts "${expl[@]}" / _mh_cache && ret=0
+    (*:mh:*)
+#     local lastmhbox=???	# Where does this come from?
+      if compset -P +; then
+	mbox_names=( "${(@)_mh_cache#$~maildirectory/}" )
+#     elif compset -P @; then
+#	mbox_names=( "${(@)${(@M)_mh_cache:#$~lastmhbox/*}#$~lastmhbox/}" )
+      else
+	mbox_names=( +"${(@)^_mh_cache#$~maildirectory/}"
+#		     @"${(@)^${(@M)_mh_cache:#$~lastmhbox/*}#$~lastmhbox/}"
+		     "${_mh_cache[@]}" )
+      fi
       ;;
     (*:mush:*)
       if compset -P %; then

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   


  reply	other threads:[~2001-03-24 18:06 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-03-23 17:22 Peter Stephenson
2001-03-24 18:06 ` Bart Schaefer [this message]
2001-03-24 23:55   ` Peter Stephenson
2001-03-26  8:34 Sven Wischnowsky
2001-03-28  6:30 ` Bart Schaefer
2001-03-28 10:55 Sven Wischnowsky
2001-03-28 15:53 ` Bart Schaefer
2001-03-29  8:36 Sven Wischnowsky
2001-03-29  8:52 ` Bart Schaefer

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=1010324180607.ZM29285@candle.brasslantern.com \
    --to=schaefer@candle.brasslantern.com \
    --cc=zsh-workers@sunsite.dk \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

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