X-Loop: help-debbugs@HIDDEN Subject: bug#39854: Not correct line and column numbers associated to function. Resent-From: Stefan Israelsson Tampe <stefan.itampe@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-guile@HIDDEN Resent-Date: Sun, 01 Mar 2020 12:18:02 +0000 Resent-Message-ID: <handler.39854.B.158306507121879 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: report 39854 X-GNU-PR-Package: guile X-GNU-PR-Keywords: To: 39854 <at> debbugs.gnu.org X-Debbugs-Original-To: bug-guile@HIDDEN Received: via spool by submit <at> debbugs.gnu.org id=B.158306507121879 (code B ref -1); Sun, 01 Mar 2020 12:18:02 +0000 Received: (at submit) by debbugs.gnu.org; 1 Mar 2020 12:17:51 +0000 Received: from localhost ([127.0.0.1]:35821 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1j8NXb-0005gp-4k for submit <at> debbugs.gnu.org; Sun, 01 Mar 2020 07:17:51 -0500 Received: from lists.gnu.org ([209.51.188.17]:46735) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <stefan.itampe@HIDDEN>) id 1j8NXY-0005gg-AA for submit <at> debbugs.gnu.org; Sun, 01 Mar 2020 07:17:49 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:60838) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <stefan.itampe@HIDDEN>) id 1j8NXX-0000Es-4X for bug-guile@HIDDEN; Sun, 01 Mar 2020 07:17:48 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, HTML_MESSAGE autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <stefan.itampe@HIDDEN>) id 1j8NXW-000722-22 for bug-guile@HIDDEN; Sun, 01 Mar 2020 07:17:46 -0500 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]:43614) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from <stefan.itampe@HIDDEN>) id 1j8NXV-00071H-PY for bug-guile@HIDDEN; Sun, 01 Mar 2020 07:17:46 -0500 Received: by mail-wr1-x429.google.com with SMTP id e10so7526047wrr.10 for <bug-guile@HIDDEN>; Sun, 01 Mar 2020 04:17:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=z657yLL2GtESiAO8uSOaHNcRagI5x1rZcr73sc5jo6c=; b=n6Wk43iwChIoTRs/au/e1K/W5IUxrir/H2g8xS596ICFNPvSU4NUJ+GbJIC3DyhGdg nis+v89WBqJrpG/aQLqK1k4RYNz+yWcAiIr+2yCEKIU/vEKP4Zci8AjELsh0vwTNapRL MJkYP6gbpHAlLK7+Y5ueXwAty2Wcrv2SlNncJA23UfF+LkSK/nCw1KzPBo6T4DF9IleJ J4aJ3+w0rbnxYgEAWGN5geNosTVcSTmH2BUFaVDdZImAqCj8fF4CNKdZLGxzNVB9VSVi hxQNx4Ic5BMjQQ007o9gnQhL/gmtzE3it4yKw1wPAdeZFILFKUM/u7knHrGkO+4saxxe au3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=z657yLL2GtESiAO8uSOaHNcRagI5x1rZcr73sc5jo6c=; b=C5qrC8phEG2042ySerWTbkqm44th03RI927laCe4IOe38Wz4Wv75AwcnF3B//lK90q xbW2VNFIKRUN7M6TXHLL9sPo2tAqbygvTu2+66PQpFljHU95vqfugtxbbURT8Nsc8kDW afYmtVhT/e4i+BcihFQO24uGUdC535OensZbGtYSEi+DPYsCcMy/X050GZvCRMQzm4wC Wt23Bdq/b4PB0/KVMW/Vha9AFWXfMc3Kfsro4aZHAP51D60/lp3gAm3pZC/W3SAxneJi pKVYGgKBII2KZh/0Fy8Bp2SKgERDR4Zs0VTMHDCEW5lgisfXSRmd4qR3676R9cN5eLLr 1Wqw== X-Gm-Message-State: APjAAAXzi6mMYNTqoet166HCZMYRZXDKJxxh/zLgQoeDIzWC4PW3RVi2 q3DKTiLTYKx8EKISXAhmCmS3HwQXvJKNeW8Ci5TsieCZ X-Google-Smtp-Source: APXvYqzxeAwjkJNVEWoqGgO/5sZiOzVlCzmb/HTy3ZDmuURQisKjmWR5azgnArYoM/5Ip8xcy74IFUrvbYXkmwNSU4Q= X-Received: by 2002:a5d:56c4:: with SMTP id m4mr16467794wrw.6.1583065063166; Sun, 01 Mar 2020 04:17:43 -0800 (PST) MIME-Version: 1.0 From: Stefan Israelsson Tampe <stefan.itampe@HIDDEN> Date: Sun, 1 Mar 2020 13:17:32 +0100 Message-ID: <CAGua6m048qEZz03SfQaARX9xrH3WVTSH7SP0q_M_AZy1kzCN+A@HIDDEN> Content-Type: multipart/alternative; boundary="000000000000bf1683059fca0e1d" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::429 X-Spam-Score: 0.3 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -0.7 (/) --000000000000bf1683059fca0e1d Content-Type: text/plain; charset="UTF-8" Consider this source file: test.scm: (use-modules (language python def) (system syntax internal) ((oop dict) #:select (slask-it))) (define-syntax m (lambda (x) (syntax-case x () ((_ n m y) (let* ((xx (syntax-expression x)) (yy (pk 'yy (source-properties xx))) (zz (syntax-expression #'y)) (ww (pk 'ww (source-properties zz))) (nn (assoc 'line yy)) (mm (assoc 'column yy)) (ii (assoc 'line ww)) (jj (assoc 'column ww))) (if nn (set-cdr! nn (syntax->datum #'n))) (if mm (set-cdr! mm (syntax->datum #'m))) (if ii (set-cdr! ii (syntax->datum #'n))) (if jj (set-cdr! jj (syntax->datum #'m))) (set-source-properties! xx (pk yy)) (set-source-properties! zz (pk ww)) #'y))))) (define f (slask-it (lambda () 1))) ;;----------------------------------------------------- Never mind the m macro and concentrate on the last define of f. slask-it is an imported function and equivalent to (lambda (x) x) (just to make sure to annynmous f. loading this source file an d quiring f lead to cheme@(guile-user)> f $10 = #<procedure 7fa3c1db93b0 at test.scm:4:2 ()> Why 4:2? the line number is much higher and column number as well. Regards Stefan --000000000000bf1683059fca0e1d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">Consider this source file: test.scm:<div><br></div><div>(u= se-modules (language python def) (system syntax internal) ((oop dict) #:sel= ect (slask-it)))<br><br>(define-syntax m<br>=C2=A0 (lambda (x)<br>=C2=A0 = =C2=A0 (syntax-case x ()<br>=C2=A0 =C2=A0 =C2=A0 ((_ n m y)<br>=C2=A0 =C2= =A0 =C2=A0 =C2=A0(let* ((xx (syntax-expression x))<br>=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 (yy (pk 'yy (source-properties xx)))<br>=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (zz (syntax-expression #'= y))<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (ww (pk 'ww (so= urce-properties zz)))<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (= nn (assoc 'line =C2=A0 yy))<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 (mm (assoc 'column yy))<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 (ii (assoc 'line =C2=A0 ww))<br>=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 (jj (assoc 'column ww)))<br>=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0(if nn (set-cdr! nn (syntax->datum #'n)))<br>=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(if mm (set-cdr! mm (syntax->datum #'= m)))<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(if ii (set-cdr! ii (syntax->d= atum #'n)))<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(if jj (set-cdr! jj (s= yntax->datum #'m)))<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(set-source= -properties! xx (pk yy))<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(set-source-p= roperties! zz (pk ww))<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0#'y)))))<br= ><br>(define f (slask-it (lambda () 1)))<br></div><div><br></div><div>;;---= --------------------------------------------------</div><div><br></div><div= >Never mind the m macro and concentrate on the last define of f. slask-it i= s an imported function</div><div>and equivalent to (lambda (x) x) (just to = make sure to annynmous f. loading this source file an d quiring f lead to</= div><div><br></div><div><span style=3D"font-family:monospace"><span style= =3D"color:rgb(0,0,0)">cheme@(guile-user)> f </span><br>$10 =3D #<procedure 7fa3c1db93b0 at test.scm:4:2 ()> <br><br></span></div><div><span style=3D"font-family:monospace">Why 4:2? th= e line number is much higher and column number as well.</span></div><div><s= pan style=3D"font-family:monospace"><br></span></div><div><span style=3D"fo= nt-family:monospace">Regards</span></div><div><span style=3D"font-family:mo= nospace">Stefan</span></div></div> --000000000000bf1683059fca0e1d--
Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) Content-Type: text/plain; charset=utf-8 X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: Stefan Israelsson Tampe <stefan.itampe@HIDDEN> Subject: bug#39854: Acknowledgement (Not correct line and column numbers associated to function.) Message-ID: <handler.39854.B.158306507121879.ack <at> debbugs.gnu.org> References: <CAGua6m048qEZz03SfQaARX9xrH3WVTSH7SP0q_M_AZy1kzCN+A@HIDDEN> X-Gnu-PR-Message: ack 39854 X-Gnu-PR-Package: guile Reply-To: 39854 <at> debbugs.gnu.org Date: Sun, 01 Mar 2020 12:18:02 +0000 Thank you for filing a new bug report with debbugs.gnu.org. This is an automatically generated reply to let you know your message has been received. Your message is being forwarded to the package maintainers and other interested parties for their attention; they will reply in due course. Your message has been sent to the package maintainer(s): bug-guile@HIDDEN If you wish to submit further information on this problem, please send it to 39854 <at> debbugs.gnu.org. Please do not send mail to help-debbugs@HIDDEN unless you wish to report a problem with the Bug-tracking system. --=20 39854: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D39854 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.