From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/13750 Path: news.gmane.org!not-for-mail From: John MacFarlane Newsgroups: gmane.text.pandoc Subject: Re: Walk all blocks except inside footnotes Date: Sat, 17 Oct 2015 16:25:07 -0700 Message-ID: <20151017232507.GA37611@MacBook-Air.local> 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 X-Trace: ger.gmane.org 1445124333 10513 80.91.229.3 (17 Oct 2015 23:25:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 17 Oct 2015 23:25:33 +0000 (UTC) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBCJZJHG45QDBBYVRROYQKGQE2MPKDYI-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Sun Oct 18 01:25:24 2015 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane.org Original-Received: from mail-io0-f187.google.com ([209.85.223.187]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Znaqp-0003Xk-Sv for gtp-pandoc-discuss@m.gmane.org; Sun, 18 Oct 2015 01:25:24 +0200 Original-Received: by iodv82 with SMTP id v82sf28754196iod.0 for ; Sat, 17 Oct 2015 16:25:23 -0700 (PDT) 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:in-reply-to:user-agent :x-original-sender:x-original-authentication-results:reply-to :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post :list-help:list-archive:sender:list-subscribe:list-unsubscribe; bh=h1sdoWp8M+O2p/tJ5rqc9kg+brrn/cQ0RuNWsdYfM4M=; b=lpop2fhoWtT4i1bDPjij4A8TnpwIVUJdRu3cQR8UNMbJ3oQDVXSSaROX17KdDsXSXz +dQA/k++mckyZi3ad/+b6Po6wY1X+iA5NS3oQ79y/i9/kcTJIrrkR4J4LnrxoQg8acov S57/AwhjZSMlidHnlrOmvfnWwci90G3OdtTc2xALLLGHRY2wkluNAJ10rZHjg/k0HYFO 2rUZMOcLIzgyArGFvl6y3Qa/kxciLyjMGfF9aQt7kuBnsDpwstSm+kEboC3uDi25OgZk 3BIQGGmPUh94aC7k8LQFs4Ut8trRaSSnm4fYVZxWGfxS7gQdv0+1IlfJ7b0lExWbBC7t 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:in-reply-to :user-agent:x-original-sender:x-original-authentication-results :reply-to:precedence:mailing-list:list-id:x-spam-checked-in-group :list-post:list-help:list-archive:sender:list-subscribe :list-unsubscribe; bh=h1sdoWp8M+O2p/tJ5rqc9kg+brrn/cQ0RuNWsdYfM4M=; b=IiMp5YWA6qF67n3OzUpCfGpCF/R6Lgx05jIA59Cj8DyRw2tAHhFtS3ehZjfuIrXhN8 ep4qTckuMVukDtBnCOexm/PolFv6lVneZsdNLgyhkNBhgr4vMy/0V4dG9QeMaz+/7ESZ sA8xyMFzSJ6MkT3y5viH1BmiVneKzTuDpHQRT9nV2M8Tc3XZL0jBsbDmK0H2mWp9SEsh me96YhygaNrDZxocXyZ/T/niry7idfLmWJhA1TYoZNjgTYE9oIfVrsanCw+xuDOLK+dU oda5Cxn7EZxJQhMGjLic4a2zR0GKDnMd4LnnfAowtkbeqm X-Received: by 10.182.24.226 with SMTP id x2mr233732obf.8.1445124322988; Sat, 17 Oct 2015 16:25:22 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 10.182.131.196 with SMTP id oo4ls856804obb.53.gmail; Sat, 17 Oct 2015 16:25:22 -0700 (PDT) X-Received: by 10.182.46.132 with SMTP id v4mr19314584obm.10.1445124322327; Sat, 17 Oct 2015 16:25:22 -0700 (PDT) Original-Received: from mail-pa0-f48.google.com (mail-pa0-f48.google.com. [209.85.220.48]) by gmr-mx.google.com with ESMTPS id vy6si2597520pbc.1.2015.10.17.16.25.22 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 17 Oct 2015 16:25:22 -0700 (PDT) Received-SPF: pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 209.85.220.48 as permitted sender) client-ip=209.85.220.48; Original-Received: by pabrc13 with SMTP id rc13so153547279pab.0 for ; Sat, 17 Oct 2015 16:25:22 -0700 (PDT) X-Gm-Message-State: ALoCoQkk8VYn6Rvqei+/jei/EJDPoL4is5AeT/3Qg5QCP4T8CUSj0b7j/sEScXBBPhDmOTw3faFe X-Received: by 10.66.163.228 with SMTP id yl4mr25287245pab.112.1445124322047; Sat, 17 Oct 2015 16:25:22 -0700 (PDT) Original-Received: from johnmacfarlane.net (li55-134.members.linode.com. [74.82.3.134]) by smtp.gmail.com with ESMTPSA id ih4sm28433147pbc.28.2015.10.17.16.25.19 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 17 Oct 2015 16:25:19 -0700 (PDT) Original-Received: by johnmacfarlane.net (Postfix, from userid 1000) id D251DA312; Sat, 17 Oct 2015 19:25:08 -0400 (EDT) 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.220.48 as permitted sender) smtp.mailfrom=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-Spam-Checked-In-Group: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Google-Group-Id: 1007024079513 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Xref: news.gmane.org gmane.text.pandoc:13750 Archived-At: Have you looked at regular syb generics? Data.Generic.Schemes has some functions that look like good candidates, such as everywhereBut. +++ Elliott Slaughter [Oct 17 15 13:12 ]: > Hi, > I am using Text.Pandoc.Walk to transform all blocks of a certain type. > This works great, except that it recurses into blocks contained inside > footnotes and also applies the transformation there, which is not what > I want. > What I would like is a way to stop the recursion at footnotes to > prevent them from being transformed, as I have (to the best of my > knowledge) no way to tell that a block is inside a footnote when I'm > looking at it. However, I am struggling to do this within the structure > of Text.Pandoc.Walk because the function provides no mechanisms to > direct or abort recursion, and even if it did, the footnotes themselves > are inlines, not blocks. > I know I could write the traversal by hand in Haskell, but is time > consuming and would require much more code. Is there a better > alternative? > Thanks in advance. > -- > Elliott Slaughter > "Don't worry about what anybody else is going to do. The best way to > predict the future is to invent it." - Alan Kay > > -- > 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 [1]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To post to this group, send email to > [2]pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit > [3]https://groups.google.com/d/msgid/pandoc-discuss/CAJ9X%3DkbfnfzLzD3J > -yk0VgDCzPzep1fO2STyFnOSmmq14j%2BSPQ%40mail.gmail.com. > For more options, visit [4]https://groups.google.com/d/optout. > >References > > 1. mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > 2. mailto:pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > 3. https://groups.google.com/d/msgid/pandoc-discuss/CAJ9X=kbfnfzLzD3J-yk0VgDCzPzep1fO2STyFnOSmmq14j+SPQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org?utm_medium=email&utm_source=footer > 4. https://groups.google.com/d/optout