From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/11577 Path: news.gmane.org!not-for-mail From: John MacFarlane Newsgroups: gmane.text.pandoc Subject: Re: =?utf-8?B?4oCcUEFOSUM=?= =?utf-8?B?4oCd?= error message with custom writer Date: Mon, 22 Dec 2014 09:35:51 -0700 Message-ID: <20141222163550.GC95411@localhost.hsd1.nm.comcast.net> References: Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1419266173 19168 80.91.229.3 (22 Dec 2014 16:36:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 22 Dec 2014 16:36:13 +0000 (UTC) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBCJZJHG45QDBB5MQ4GSAKGQE2BPEL5I-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mon Dec 22 17:36:08 2014 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane.org Original-Received: from mail-qa0-f64.google.com ([209.85.216.64]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Y35xm-0005JA-A9 for gtp-pandoc-discuss@m.gmane.org; Mon, 22 Dec 2014 17:36:06 +0100 Original-Received: by mail-qa0-f64.google.com with SMTP id n8sf749188qaq.19 for ; Mon, 22 Dec 2014 08:36:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20120806; h=from:date:to:subject:message-id:references:mime-version :content-type:content-disposition:content-transfer-encoding :in-reply-to:user-agent:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:list-post:list-help:list-archive:sender:list-subscribe :list-unsubscribe; bh=QM+3t3fuedHE+E4yUPcKmTwQY0KbnYLNfYf7W8ywSUw=; b=YXtQB8HaebAGukGg5gJEaxtvVmOGBth49QSPU57X1CxwxzYN+Q3dOjxvSpHuXkrWQr kNaIxPWFoL6JfUrOG+fJzEGW6TiETVDbkZdVAypBM2CRyiZlDlzM5HOlBYxvLHaEkZxI iSmIS+AlJus19iuOwSxRcDPhdMgM43PSHZdwu8zZvcnTpAtKtd79ZekeuLHfc9tRmmr4 QSKgoG/OZ/dsS16FjL2vgtr6135BbRlr61E6I2JcFMh7WdHiDTg0NDD5uYNmtANNA7Xy SAkL6qqtf6yDeifqmoDPDrPEuGgVEoc/E2pcjlERPjwgOObkHDuJq1vs1shuIhhut X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:date:to:subject:message-id:references :mime-version:content-type:content-disposition :content-transfer-encoding:in-reply-to:user-agent:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:list-post:list-help:list-archive:sender:list-subscribe :list-unsubscribe; bh=QM+3t3fuedHE+E4yUPcKmTwQY0KbnYLNfYf7W8ywSUw=; b=MerxeQRgVFCXGivnOtWAaXzjsL057gNPlyAU/yMSXXdl3dHnV+ShYulgx78OCMNFoy /j1b3pm8DTqbTsQ4rCz6bsHPVMLucPYNvP20AQGQEOzZXsGFb1lFlq5VbQhLhveET4Vd TGhdaP3RQrzGKi4ZfsPEjU/0JsicVRlKwYHifhSCDqst1xiDCvRNk55BXacrz8rE1zpY VtDfQwPxLFc0imgENPogeZkmvZvRX/RqNeFTdozSfESJ/ORX4LLZxXNdmE3qjbALo0l0 OkIs1RkwYr+T5GFEG00whkOCAlbDRMF6eiuubOP5OcDF X-Received: by 10.50.32.37 with SMTP id f5mr252980igi.4.1419266165678; Mon, 22 Dec 2014 08:36:05 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 10.107.11.93 with SMTP id v90ls3201720ioi.31.gmail; Mon, 22 Dec 2014 08:36:05 -0800 (PST) X-Received: by 10.66.156.2 with SMTP id wa2mr18309688pab.26.1419266165361; Mon, 22 Dec 2014 08:36:05 -0800 (PST) Original-Received: from mail-pd0-f177.google.com (mail-pd0-f177.google.com. [209.85.192.177]) by gmr-mx.google.com with ESMTPS id i11si2292565pat.2.2014.12.22.08.36.05 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 22 Dec 2014 08:36:05 -0800 (PST) Received-SPF: pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 209.85.192.177 as permitted sender) client-ip=209.85.192.177; Original-Received: by mail-pd0-f177.google.com with SMTP id ft15so6107184pdb.36 for ; Mon, 22 Dec 2014 08:36:05 -0800 (PST) X-Gm-Message-State: ALoCoQlF0ujf2rA3Tdmfrv9ipkK6njaTM81zJJJi1a3GLXiZMhim4haiku9afh4FwWwlLDpQA5Hh X-Received: by 10.66.235.163 with SMTP id un3mr18703627pac.109.1419266165194; Mon, 22 Dec 2014 08:36:05 -0800 (PST) Original-Received: from johnmacfarlane.net (li55-134.members.linode.com. [74.82.3.134]) by mx.google.com with ESMTPSA id b11sm17660829pdl.56.2014.12.22.08.36.03 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 22 Dec 2014 08:36:03 -0800 (PST) Original-Received: by johnmacfarlane.net (Postfix, from userid 1000) id AD3BDA27B; Mon, 22 Dec 2014 11:42:07 -0500 (EST) Content-Disposition: inline In-Reply-To: X-PGP-Key: http://johnmacfarlane.net/jgm.asc User-Agent: Mutt/1.5.23 (2014-03-12) X-Original-Sender: jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 209.85.192.177 as permitted sender) smtp.mail=jgm-TVLZxgkOlNX2fBVCVOL8/A@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.org gmane.text.pandoc:11577 Archived-At: The erorr message you're getting, >> PANIC: unprotected error in call to Lua API (attempt to call a string >value) means that you're using a variable that actually has a string value as if it's a function value. Example of the sort of thing that would trigger this error: x =3D "hi" x(2) Maybe this clue will help you to debug your script? Look closely at the places your script diverges from sample.lua. Most likely you're assigning a string somewhere that a function is expected. >First was the fact that nowhere is it apparently documented what directory >the =E2=80=9C-t path/to/custom_writer.lua=E2=80=9D is relative to (it defi= nitely isn=E2=80=99t the >same directory the =E2=80=9Ctemplates=E2=80=9D folder lives in), and using= =E2=80=9C~=E2=80=9D as an >abbreviation for my home directory is apparently not supported. I finally >got around that one by specifying an absolute path from the root of my >filesystem, which seems unnecessarily fragile and inflexible. You need to provide the path to the script (as usual for paths, this is interpreted relative to the working directory). As the User's Guide says: > To use a custom writer, simply specify the path to the lua script > in place of the output format. For example: > > pandoc -t data/sample.lua Using `~` for home directory should work, if your shell supports this (this part is interpreted by the shell's processing of the command-line arguments, not by pandoc itself). > % pandoc -t ~/src/pandoc/data/sample.lua > hi >

hi

--=20 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 e= mail to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/= pandoc-discuss/20141222163550.GC95411%40localhost.hsd1.nm.comcast.net. For more options, visit https://groups.google.com/d/optout.