From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24535 invoked by alias); 27 Jan 2017 19:00:32 -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: 40433 Received: (qmail 26164 invoked from network); 27 Jan 2017 19:00:32 -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.185898 secs); 27 Jan 2017 19:00:32 -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=N3UAA4NA3mbsj2Jt3+S5eejHT1 A=; b=Ng48kcstVhLNOk+3BlenbwfH2QupHAdwDpzmRrtLV8vcuk61tj+ZeHEOOr ESwHkvrX5w2Jj0sFCwxSvF8GLKrlqmIGmhoh1kpS7J4Z3kGP/QThLq5vxqq6lCLC VSKR/3VNDUf8PGpikpY2uob3cjzArsOJMY8DZ/l6UBzJiBTQ4= 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=N3 UAA4NA3mbsj2Jt3+S5eejHT1A=; b=KhpweD3vVwZ/N5xf5p6owyRpj1yFHafNpe 3SBqx1UkiWi6767rEQej074fbkMIp4yge/PoCoNLyimQjvuV5F6eSBKT3H1l9aUS fHx95zUibbxmSldjC8r7OVesb0DjET+dlh+sbEZX9wFekpuy7uvpKEHio/DmDBnh J1SHWJ0Gg= X-ME-Sender: Message-Id: <1485543626.1042782.861836584.43D44B76@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: <20170127184448.5591e976@pwslap01u.europe.root.pri> Date: Fri, 27 Jan 2017 11:00:26 -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> On Fri, Jan 27, 2017, at 10:44 AM, Peter Stephenson wrote: > On Fri, 27 Jan 2017 10:40:15 -0800 > Sebastian Gniazdowski wrote: > > Internally via autoload it will be easy to create custom versions of > > multiple functions. For example calendar does: > > > > autoload -Uz calendar_{add,parse,read,scandate,show,lockfiles} > > > > With the requested feature > > I'm still not clear if your "requested feature" is what I'm talking > about or not, i.e. what you can do already with $funcsourcetrace. We talk about the same thing, though I want to remove requirement of using absolute paths in any function files. You wrote: > # definition of fun1 > autoload -Uz /fun2 > fun2 The point is to make not needed at all. The path is to be taken from "dircache" (that's the name used in previous messages). Autoload should use dircache of fun1 to find fun2, then follow to process fpath. There can be an option to enable/disable this. I've described how flexible and clean would be management of custom version of functions this way. It's like having packages of software instead of functions. Requiring the part will make this difficult. > > Sounds nice, though it's nice that current implementation of the > > absolute-path feature uses pointers to paths to limit memory usage, a > > new parameter would probably spend that. > > The new parameter would only look up the internal information when you > refer to it, there's nothing permanent additional to be stored. Thought about it, it's a cool approach. -- Sebastian Gniazdowski