From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13834 invoked by alias); 29 Jan 2017 17:32:41 -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: 40457 Received: (qmail 4756 invoked from network); 29 Jan 2017 17:32:41 -0000 X-Qmail-Scanner-Diagnostics: from new2-smtp.messagingengine.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(66.111.4.224):SA:0(-0.4/5.0):. Processed in 1.342315 secs); 29 Jan 2017 17:32:41 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-0.4 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS,T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: psprint2@fastmail.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at spf.messagingengine.com designates 66.111.4.224 as permitted sender) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=mesmtp; bh=6P3s5hNzxWOShB0fDL5e4yI4je I=; b=MVb0rAFPzC4n+Djhu8WFwukUfA4Y9S8WlTxCzFFL7CnRkI+LcqQEGXY5GT aeNehJIRtG6JaNqtePR8UbGMQCoI/S1c84tkswlN/ApJ0KP7puZp4NVhUfFrRZQ0 duGWZn+Wct82nS+KdyrnhrKEKFQwUcruI8Ml/Gs8vnP3I4TrI= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=smtpout; bh=6P 3s5hNzxWOShB0fDL5e4yI4jeI=; b=JGwjdEdwyZS/Zg3H7Dng+T5l8a1INInL8T xe6q0fY4UYqia+U9VTTredpavsaQIYFcRbIbxviBzuygYBI8uI6oOgnE0Er8cVhE Hd4Px4U6XNsit3y9P01CV+3Z6qhucUfb4KHl3Y6rdMcY/mKPA22DkLEhvNuM9ZDB qb3zqcNJ4= X-ME-Sender: Message-Id: <1485711154.2495187.863317032.1E2B1AE2@webmail.messagingengine.com> From: Sebastian Gniazdowski To: zsh-workers@zsh.org MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" X-Mailer: MessagingEngine.com Webmail Interface - ajax-37809a74 Subject: Re: PATH: autoload with explicit path In-Reply-To: Date: Sun, 29 Jan 2017 09:32:34 -0800 References: <1485529979.987251.861563792.06CCDCAC@webmail.messagingengine.com> <20170127162440.10a5c85b@pwslap01u.europe.root.pri> <1485542415.1037033.861766968.196E6FB9@webmail.messagingengine.com> <20170127184448.5591e976@pwslap01u.europe.root.pri> <20170128191248.4718b24c@ntlworld.com> <1485692865.2441595.863153472.2F8272F0@webmail.messagingengine.com> On Sun, Jan 29, 2017, at 08:11 AM, Bart Schaefer wrote: > On Sun, 29 Jan 2017, Sebastian Gniazdowski wrote: > > > To make the new feature complete, absolute paths must descent to > > autoloaded functions. Keeping the absolute path only to directly > > autoloaded function is ersatz. It's a half-step. I autoload single > > function, and then FPATH again takes control and does the "imagine the > > layers" thing. This is a tragedy. > > Respectfully, Sebastian, I disagree. > > Consider for example that several of the autoloadable functions in the > zsh distribution rely on "autoload colors". > > If autoload behaved the way you suggest, this would break, because the > colors function would not be found at the absolute path from which the > calling function was loaded -- unless the writer of the calling function > has used "autoload -d", of course. I wrote earlier that -P (let's use your proposed option name) should prepend dirchache path to FPATH. In other words, -P causes any descent autoload to try dircache part first, then follow to process fpath. > But if we're now relying on the > author to use the correct options for autoload, we're right back where > we started -- might as well rely on the author to make his function > suite "relocatable" by way of $function_source as well, and that is > now possible. > > There's no magic solution that automatically covers all the variations > without cooperation from both the writer and the installer of the suite. I think -P is a complete idea, as you know it comes from problems with Zplugin, -P would solve those problems. So the idea has some real world experience to back it up. -- Sebastian Gniazdowski