From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11356 invoked by alias); 25 Nov 2012 06:24:36 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 30822 Received: (qmail 6459 invoked from network); 25 Nov 2012 06:24:22 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 Received-SPF: none (ns1.primenet.com.au: domain at closedmail.com does not designate permitted sender hosts) From: Bart Schaefer Message-id: <121124222353.ZM10425@torch.brasslantern.com> Date: Sat, 24 Nov 2012 22:23:53 -0800 In-reply-to: <20121124203305.4d2a2106@pws-pc.ntlworld.com> Comments: In reply to Peter Stephenson "Re: Bug with emulation in completion?" (Nov 24, 8:33pm) References: <121122094747.ZM7951@torch.brasslantern.com> <20121124203305.4d2a2106@pws-pc.ntlworld.com> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@zsh.org Subject: Re: Bug with emulation in completion? MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Nov 24, 8:33pm, Peter Stephenson wrote: } } It might be more useful to apply the stickiness to any function which } wasn't part of the normal completion system and needed e.g. ksh } emulation. Unfortunately what he wants to do is call zsh-mode functions from the ksh-mode functions. Unless we screw with the dynamic inheritence model [change stickyness rule #2 from the doc] so that the emulation mode is cleared when calling out to a function that does not have the equivalent stickyness -- something I'm loathe to advocate, for a number of reasons -- it's not really an option to make the ksh functions sticky. I suppose we could add another option or the like to "emulate" that has the effect of resetting the option state as if the current function had returned. E.g., some_function () { : do something } zsh_function () { emulate -L zsh ksh_function } ksh_function () { emulate -L ksh : do some stuff emulate -c caller some_function # called as if from zsh_function } Replace "-c caller" with -C or some other flag as you will, the above is just for example. But this gets into assorted questions such as whether "-c caller" has any effect when localoptions is not [yet] set, etc.