From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/32516 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: ThomasH Newsgroups: gmane.text.pandoc Subject: Line number of input file Date: Tue, 2 May 2023 23:16:11 -0700 (PDT) Message-ID: <4b09ae5e-99be-4772-b65d-62c5ffe68ccfn@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_2446_755833500.1683094571687" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11977"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBCOJJAXZ7EPBBLHYY6RAMGQEUMXRTDI-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Wed May 03 08:16:16 2023 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-ot1-f62.google.com ([209.85.210.62]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pu5mh-0002va-RE for gtp-pandoc-discuss@m.gmane-mx.org; Wed, 03 May 2023 08:16:15 +0200 Original-Received: by mail-ot1-f62.google.com with SMTP id 46e09a7af769-6a5ec1ad3absf4495201a34.2 for ; Tue, 02 May 2023 23:16:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20221208; t=1683094574; x=1685686574; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:x-original-sender :mime-version:subject:message-id:to:from:date:sender:from:to:cc :subject:date:message-id:reply-to; bh=K0Vcg9VMC0yqasr4BFv1/jh6TZJPPgpHSSryAjDffI8=; b=VRcUiiskBCzdrgl+hw8JrfMjxHJqxH9UsNxEN7bvA5no/FmcKLelfy1hOSc9yLYLeP 6vIyTHSkCW1d+qj7itFUS+hcdzERfF22xx8ERQ/b1Nu+5XFlegf+9aHFaKLz//MUkcXg DzIailzhMUQq0S71PlcnRqEuRD6RAfttrGCS/HGDm1EiYegTC4ZqgcBZ9sTDyCZEkFu6 lJCGv0E3SS7xEqP8a3qbRa2zV4siv8kZShN4MD3XL37bVfbaIq0rhAHJkwnV/IKJ3o27 D9qSOKIY2owUfWhcySot+RSVe3upn/T9Jjm+hyqDrU9YMLE7lffQWaVZ/3NcpMcS2v36 SXYw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683094574; x=1685686574; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:x-original-sender :mime-version:subject:message-id:to:from:date:from:to:cc:subject :date:message-id:reply-to; bh=K0Vcg9VMC0yqasr4BFv1/jh6TZJPPgpHSSryAjDffI8=; b=IN3SirV2DZgQ1t+lKoLcyrRcBjbPHy2PtKX9f1zqn03z8EMqMT04icM3DDWeeQlGHB 411wRLayFLMhNMUfGzZ+e0hhHh9cj8G9h3KGBrWct0/uukGcylQifUDJRUvsbrm+E4CK UMRnzvtKogRsumfmtdWwxhoe/Ac69k12Jz2sehFsQGp3toi38/08pJklPSwVyJvFDKPe bspMZ4nJKaBmZNHomeZeqjF4Kal0E/2R/pJ4RWPEJoitaIIRZAXrm4WmqVYOwgBXyYNQ QvWtMeAuL5Rd1GdtCaIWk+EVOnzZu0H0R50TEPAHQtG4gqDz4j5Ky2wSI5xI2AXXzcek eWFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683094574; x=1685686574; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence:reply-to :x-original-sender:mime-version:subject:message-id:to:from:date :x-beenthere:x-gm-message-state:sender:from:to:cc:subject:date :message-id:reply-to; bh=K0Vcg9VMC0yqasr4BFv1/jh6TZJPPgpHSSryAjDffI8=; b=UBrShkVgznpFY4AjG0k5S/lpLEajj99VrPewf6CF7jXz+Isu9D2iBP9GllnzuwLSHa Qiy6fyLUYuZd89QXJ7fJfwtMOEAFKQgbL8fBMvtZd7r6xlRMpPEWwfywz0fyngmC0fGY jis4suQABlgPD7hUHgr4G6ybvmD+ekCnIGx9/UBxVqn6VBVT0XImqpPHdQL1IS208sU4 TYYb6ATAFEEtI79WBdSBZkIN1uXFNXHakdvu1wBzYVeQKeIoL9hHyNfe7pnnKT8eJ+9m A9FIjSlTYM5h0DaGtpnRM80pmwbi2mI8Ll942hw3DwigwdctqF5DYtqeq1b5Ve6posAd Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AC+VfDx7ql5Kbaacl08U8oPoScqkZ84cwXPt2IMtCr1GGsjRpMuqshYV 0wZN6L+FCUn7wqIVQmSU6fs= X-Google-Smtp-Source: ACHHUZ7nzZve2N+lcx7GcKmMnZHliZXypzsf98Z+FAy4alQLsa25oPiYI9wNoOPwS0i+HqxG7xzA8g== X-Received: by 2002:a05:6830:13c9:b0:6a4:4e5a:61ac with SMTP id e9-20020a05683013c900b006a44e5a61acmr5189428otq.2.1683094574518; Tue, 02 May 2023 23:16:14 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6830:6607:b0:69f:b065:771a with SMTP id cp7-20020a056830660700b0069fb065771als2497199otb.11.-pod-prod-gmail; Tue, 02 May 2023 23:16:12 -0700 (PDT) X-Received: by 2002:a9d:4807:0:b0:6a6:38a6:e1ba with SMTP id c7-20020a9d4807000000b006a638a6e1bamr5181387otf.5.1683094572229; Tue, 02 May 2023 23:16:12 -0700 (PDT) X-Original-Sender: therch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org Precedence: list Mailing-list: list pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; contact pandoc-discuss+owners-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-ID: X-Google-Group-Id: 1007024079513 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Xref: news.gmane.io gmane.text.pandoc:32516 Archived-At: ------=_Part_2446_755833500.1683094571687 Content-Type: multipart/alternative; boundary="----=_Part_2447_991369537.1683094571687" ------=_Part_2447_991369537.1683094571687 Content-Type: text/plain; charset="UTF-8" Is there a way to get at the current line number of the current input file in a Lua filter? I can get the input file via PANDOC_STATE.input_files alright, but what about the input line? I understand that Lua filters work on Pandoc ASTs, so the raw string input is already transformed. I used to save input line numbers with AST nodes when I wrote parsers. Is there such facility in Pandoc's ASTs? Writing a custom reader? T. -- You received this message because you are subscribed to the Google Groups "pandoc-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/4b09ae5e-99be-4772-b65d-62c5ffe68ccfn%40googlegroups.com. ------=_Part_2447_991369537.1683094571687 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Is there a way to get at the current line number of the current input = file in a Lua filter?

I can get the input file v= ia PANDOC_STATE.input_files alright, but what about the input line?

I understand that Lua filters work on Pandoc ASTs, so t= he raw string input is already transformed. I used to save input line numbe= rs with AST nodes when I wrote parsers. Is there such facility in Pandoc's = ASTs? Writing a custom reader?

T.

--
You received this message because you are subscribed to the Google Groups &= quot;pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to pand= oc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d= /msgid/pandoc-discuss/4b09ae5e-99be-4772-b65d-62c5ffe68ccfn%40googlegroups.= com.
------=_Part_2447_991369537.1683094571687-- ------=_Part_2446_755833500.1683094571687--