From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Newsgroups: gmane.lisp.guile.bugs Subject: bug#39854: Not correct line and column numbers associated to function. Date: Thu, 05 Mar 2020 22:54:17 +0100 Message-ID: <87v9ni5uye.fsf@gnu.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="117266"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) Cc: 39854@debbugs.gnu.org To: Stefan Israelsson Tampe Original-X-From: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Thu Mar 05 22:55:30 2020 Return-path: Envelope-to: guile-bugs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1j9ySn-000Tzl-G7 for guile-bugs@m.gmane-mx.org; Thu, 05 Mar 2020 22:55:29 +0100 Original-Received: from localhost ([::1]:56680 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j9ySS-0004y0-OB for guile-bugs@m.gmane-mx.org; Thu, 05 Mar 2020 16:55:08 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58876) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j9ySO-0004xt-It for bug-guile@gnu.org; Thu, 05 Mar 2020 16:55:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j9ySN-0007lu-Ff for bug-guile@gnu.org; Thu, 05 Mar 2020 16:55:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:37843) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j9ySN-0007lH-C7 for bug-guile@gnu.org; Thu, 05 Mar 2020 16:55:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1j9ySM-0001tQ-G8 for bug-guile@gnu.org; Thu, 05 Mar 2020 16:55:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Thu, 05 Mar 2020 21:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39854 X-GNU-PR-Package: guile Original-Received: via spool by 39854-submit@debbugs.gnu.org id=B39854.15834452777241 (code B ref 39854); Thu, 05 Mar 2020 21:55:02 +0000 Original-Received: (at 39854) by debbugs.gnu.org; 5 Mar 2020 21:54:37 +0000 Original-Received: from localhost ([127.0.0.1]:43816 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j9yRx-0001sj-44 for submit@debbugs.gnu.org; Thu, 05 Mar 2020 16:54:37 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:43707) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j9yRv-0001sX-F5 for 39854@debbugs.gnu.org; Thu, 05 Mar 2020 16:54:36 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:52609) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1j9yRq-0007Go-91; Thu, 05 Mar 2020 16:54:30 -0500 Original-Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=34780 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1j9yRj-0003Jf-4T; Thu, 05 Mar 2020 16:54:29 -0500 In-Reply-To: (Stefan Israelsson Tampe's message of "Sun, 1 Mar 2020 13:17:32 +0100") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Original-Sender: "bug-guile" Xref: news.gmane.io gmane.lisp.guile.bugs:9609 Archived-At: Hi, Stefan Israelsson Tampe skribis: > 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. loadi= ng > this source file an d quiring f lead to > > cheme@(guile-user)> f > $10 =3D # > > Why 4:2? the line number is much higher and column number as well. I wonder if it relates to and . Ludo=E2=80=99.