From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27315 invoked by alias); 15 Dec 2017 18:45:56 -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: List-Unsubscribe: X-Seq: 42134 Received: (qmail 22337 invoked by uid 1010); 15 Dec 2017 18:45:56 -0000 X-Qmail-Scanner-Diagnostics: from mail-it0-f43.google.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(209.85.214.43):SA:0(-1.9/5.0):. Processed in 3.833616 secs); 15 Dec 2017 18:45:56 -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=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_PASS,T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.1 X-Envelope-From: dana@dana.is X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dana-is.20150623.gappssmtp.com; s=20150623; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=hFqst6i/zpTtlWkjnVh0mxnb2awUs+3Qobe5PbbcN/k=; b=pxOgK3QxMggVLdnv8TQ7EH8rM7gyVuWYRwZeRfP9D4gNY7v0C7po7HivWQh0KvTmrN NXH/n5zrtHu2GS72T3kqcujtmermOtk1nMJtDXHL9hPzJxrUS0oLNDEuab03B53+1cQq PH6giLysGrZmuUb2nfnhujxRDD/IRDrGS6DY2sEcNnH0z3xALqk9kPzPuYr+AZSZaW8e su+FdO6kJcfgRUC3N5FaXoaMTtmPSGVy0oC/Di37qZJt42gNTulzNkUvIozpqeCs6rEF +xeUCNorYND+QD/TsHtjxWNe89y0if2n0Z+UCO151/uXiBe8T2vcG5N6XR5TT948V8Fo FepA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=hFqst6i/zpTtlWkjnVh0mxnb2awUs+3Qobe5PbbcN/k=; b=MmTJoj1N2PtSXNRMv9sK0yChfWWyLXMMurc7rI2H+0Rpg672O3lAzro32LMxUyEDv3 PeLWzykieACr2UyicpCh5NMpFfshyj/nltAYhTwBaV+3tvmDGD+7uJ0q0WZBcHH91vBA +L4ou6086WMJtX8Z3eOo8akOHnQu05hLfTBDAu/V1anzdHUoloXllYFsKxahH95E7j4g PZVQptgslrN01P8joKgzKc8VEztsIEBUkn3dbmTgdi4Ab9b4Mz+B7eUPOX+9LGzpP6yG c0rmwL+vrQ127zi+BVgsAZBmBuwOZmAzH2vIKafErIZ1Khg5qoAD6rL+iG/TxMWUYyeq BVhg== X-Gm-Message-State: AKGB3mKvU7+Bdlx5O7cqDIykytLQA/hE+VA0nKqJOWOy5bRXGBpRr7d9 iJkwmmPtCttTttddooO1d6KN4w== X-Google-Smtp-Source: ACJfBovJRvcZ19zeskawrCjfNOhDEVWxlmtgFBG4BWvDyUTvdLJMM4kod6KQVCpYL7RJ93Th9fWP8Q== X-Received: by 10.36.79.75 with SMTP id c72mr9284382itb.146.1513363549804; Fri, 15 Dec 2017 10:45:49 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: [BUG] Anonymous functions cause funcfiletrace to produce function-relative line numbers From: dana In-Reply-To: <20171215102118.7bdfff2e@pwslap01u.europe.root.pri> Date: Fri, 15 Dec 2017 12:45:47 -0600 Cc: zsh-workers@zsh.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <20171211094116.48e29012@pwslap01u.europe.root.pri> <20171211101238.410a91b1@pwslap01u.europe.root.pri> <26AB704C-51B8-49FE-87E2-3BCDE5F7DF42@dana.is> <20171215102118.7bdfff2e@pwslap01u.europe.root.pri> To: Peter Stephenson X-Mailer: Apple Mail (2.3273) On 15 Dec 2017, at 04:21, Peter Stephenson = wrote: >See if this helps... Thanks. After applying the new patch, the line numbers all look good = with the test case i provided, whether it's executed from a file or from stdin. I = also tried it with the functions in separate files, and they look correct = there too... unless you use ksh-style definitions. Test case for that: % < panic panic() { print -rC2 -- $functrace $funcfiletrace exit 1 } % < puts # puts() { # # panic } % < tracetest.zsh fpath=3D( . ) autoload -Uz panic puts main() { () { puts } } main % ZDOTDIR=3D. Src/zsh tracetest.zsh puts:3 /Users/dana/.../zsh/puts:3 (anon):0 tracetest.zsh:4 main:1 tracetest.zsh:4 tracetest.zsh:6 tracetest.zsh:6 The file line number at the top should be 5. I tried a few 'real-world' cases and they matched the above =E2=80=94 = looks fine without the ksh-style definition, but if it's there it uses the = function-relative line number. I'm guessing that's also related to the difference i mentioned = seeing in my last e-mail. (I think i'll probably stop using ksh-style definitions....) dana