From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/101050 Path: news.gmane.org!.POSTED!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: Using goto in lua Date: Fri, 22 Jun 2018 13:57:05 +0200 Message-ID: <5B2CE411.9000303@gmail.com> References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============4362582911216304537==" X-Trace: blaine.gmane.org 1529668542 31517 195.159.176.226 (22 Jun 2018 11:55:42 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 22 Jun 2018 11:55:42 +0000 (UTC) User-Agent: Postbox 5.0.25 (Macintosh/20180328) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri Jun 22 13:55:38 2018 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fWKfB-00083C-8K for gctc-ntg-context-518@m.gmane.org; Fri, 22 Jun 2018 13:55:37 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id A55AB38ED1; Fri, 22 Jun 2018 13:57:20 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id lb3Gnt_4a1hw; Fri, 22 Jun 2018 13:57:20 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [IPv6:::1]) by zapf.ntg.nl (Postfix) with ESMTP id 069EE38ED3; Fri, 22 Jun 2018 13:57:20 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 6DCF138E9C for ; Fri, 22 Jun 2018 13:57:19 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id WZZPTAdQeXS1 for ; Fri, 22 Jun 2018 13:57:18 +0200 (CEST) Original-Received: from mail-wm0-f52.google.com (mail-wm0-f52.google.com [74.125.82.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id A72AF38E06 for ; Fri, 22 Jun 2018 13:57:08 +0200 (CEST) Original-Received: by mail-wm0-f52.google.com with SMTP id v131-v6so2293380wma.1 for ; Fri, 22 Jun 2018 04:57:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to; bh=CbRfuS420But712FngsOcCuhy5xH7k0X03byUnjXfag=; b=NYPf81t3/E1k8vaRniLoEjpwVaHj2+0cd1mawVem/1Ry+74+EyDPIEzBjkHGbZIT/W AlfH0s8qaJbkynu5gORj9iQ5wfR1vbFuax2Ag20Rr8Pz40vq2bIoGG1SRzp8/DqIhZjG YQiS6ogYTMVnQKh8qBKnZzSzK/+D13VV4hWukCffXdO22D2WYUdS9lEI+XQ5X1MITI1J 6M6ynRGdSDKOAVbTMmgFAn/xGux6R3FGngIccXsSMqeV/K1W+dVEkBROQKGNm+eq2kid CfUH4GOKKxX1SUkZDYDy2wpkVqom7mTGEdh/fZjCRXSbRmCahhmxLCIdXuRApbkzMUQX ZaXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to; bh=CbRfuS420But712FngsOcCuhy5xH7k0X03byUnjXfag=; b=aLCqnCChEkNMiynYdVJLY2L8hk0xRR5K1ynF50VrqxM4bqC0AJV7PlSgWm84VMRcYf D+gn7C7clRBJZmvxeQ2fkv+7oSuL/5VJbsX52zhNnGmdsjGI/4J+h0oaalFNzVvklfhi ZSU4Dp1NOkGBhU5m6AJt/aC3+6n5JggM3p9IlcmAH+Q+SDBvVYWhLYuPxSlMPGdxcG4z jCuQyaE2q8NBY6pJJFYqN84R1IsSkyAfTW39ZwQBH2WbbC9j1h3avxV0LiWrXOlbFQ0F UjdtQRfw/P3o6Fx9Ipvc+WftDs8nK+6T45BRd/e3+LiZqju6RB+4qgGApwqwU86KU/eX 6IHA== X-Gm-Message-State: APt69E0J16S88z0P3DmqFITZOzHcOXVndrZoBuFeA1aA5JFMSxLL6ITC i2DtTTrzqKjlZG9gqoHUGV1WShA4 X-Google-Smtp-Source: ADUXVKKQhZeaXYKeMPFIC+B1TEeS5Fe2jW9Ab7lMwnRIWf0vAYg3pc7TNycPlecoW7byxVuF6p3FaQ== X-Received: by 2002:a1c:eecd:: with SMTP id j74-v6mr1616368wmi.137.1529668628127; Fri, 22 Jun 2018 04:57:08 -0700 (PDT) Original-Received: from [192.168.1.12] (x4dbe6c20.dyn.telefonica.de. [77.190.108.32]) by smtp.gmail.com with ESMTPSA id s3-v6sm6262379wrp.76.2018.06.22.04.57.07 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Jun 2018 04:57:07 -0700 (PDT) In-Reply-To: X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.16 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: "ntg-context" Xref: news.gmane.org gmane.comp.tex.context:101050 Archived-At: This is a multi-part message in MIME format. --===============4362582911216304537== Content-Type: multipart/alternative; boundary="------------020504080604010907090102" This is a multi-part message in MIME format. --------------020504080604010907090102 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hans gave a solution to this a while ago: https://mailman.ntg.nl/pipermail/ntg-context/2018/090833.html Wolfgang > Christoph Reller > 22. Juni 2018 um 13:52 > Hi, > > As mentioned in cld-mkiv.pdf, the entire ConTeXt interface can be > called from lua: This is great! > > Unfortunately the ConTeXt command \goto is a little problematic > because goto is a lua keyword. Therefore, the following leads to a lua > error: > > context.goto("text", { "label" }) > > I guess the only way to call goto from lua is > > context(false, "\\goto{text}[label]") > > Am I correct? > > Cheers, > > Christoph > > ___________________________________________________________________________________ > If your question is of interest to others as well, please add an entry > to the Wiki! > > maillist : ntg-context@ntg.nl / > http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > ___________________________________________________________________________________ --------------020504080604010907090102 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit Hans gave a solution to this a while ago: https://mailman.ntg.nl/pipermail/ntg-context/2018/090833.html

Wolfgang
22. Juni 2018 um 13:52
Hi,

As mentioned in cld-mkiv.pdf, the entire ConTeXt interface can be called from lua: This is great!

Unfortunately the ConTeXt command \goto is a little problematic because goto is a lua keyword. Therefore, the following leads to a lua error:

    context.goto("text", { "label" })

I guess the only way to call goto from lua is

    context(false, "\\goto{text}[label]")

Am I correct?

Cheers,

Christoph

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________

--------------020504080604010907090102-- --===============4362582911216304537== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly9jb250ZXh0LmFhbmhldC5uZXQKYXJjaGl2ZSAgOiBodHRwczovL2JpdGJ1Y2tldC5v cmcvcGhnL2NvbnRleHQtbWlycm9yL2NvbW1pdHMvCndpa2kgICAgIDogaHR0cDovL2NvbnRleHRn YXJkZW4ubmV0Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f --===============4362582911216304537==--