From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4030 invoked from network); 28 Mar 2002 10:16:10 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 28 Mar 2002 10:16:10 -0000 Received: (qmail 17631 invoked by alias); 28 Mar 2002 10:15:55 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 16921 Received: (qmail 17620 invoked from network); 28 Mar 2002 10:15:54 -0000 From: Sven Wischnowsky MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15522.60735.419805.36569@wischnow.berkom.de> Date: Thu, 28 Mar 2002 11:15:27 +0100 To: zsh-workers@sunsite.dk Subject: Re: adding the original string as a completion match In-Reply-To: <20020327111020.GA15630@logica.com> References: <20020327111020.GA15630@logica.com> X-Mailer: VM 6.95 under 21.5 (patch 3) "asparagus" XEmacs Lucid Oliver Kiddle wrote: > I thought it would be useful to have the original string added as a > possible completion in my _match based completion widget similar to how > _approximate adds it. So the patch below is a cut'n'paste job from > _approximate into _match which I won't commit unless someone says to. Nothing against that. > Thinking about it, the original match could be useful anywhere that it > goes into menu completion. Would it be possible to have a completer a > bit like _all_matches (and taking some of the same styles) to add the > original string? I tend to get the original string by hitting undo and > just like to see what the original string was so this completer might > optionally just mention the string in a message. Something like _all_matches is problematic because whether menu completion is to be used is decided very late, after all the completers have been called. It would be easier to add a style tested by _main_complete itself saying whether the original string should be added as a match or only as a description. Other function could probably rely on that then? Or at least that code should check whether the original string has been added by other means before. > And another question, is there any way with _all_matches that I can get > it to just insert all the matches and never list all the things which > _complete came up with? Something like a tag-order but that doesn't > work. There should be a possibility for this by setting compstate[insert]=-1 after _all_matches added that all-matches-match. Haven't tried, though... Bye Sven -- Sven Wischnowsky wischnow@berkom.de