From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/14525 Path: news.gmane.org!not-for-mail From: Jesse Rosenthal Newsgroups: gmane.text.pandoc Subject: Re: Can pandoc warn if a docx table includes merged cells? Date: Thu, 10 Mar 2016 09:22:14 -0500 Message-ID: References: <20160309161216.GF70376@MacBook-Air-2.local> 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 X-Trace: ger.gmane.org 1457619749 22350 80.91.229.3 (10 Mar 2016 14:22:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 10 Mar 2016 14:22:29 +0000 (UTC) To: John MacFarlane , pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBDF7DMU574PBBGMGQ23QKGQEJSBB4JI-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Thu Mar 10 15:22:20 2016 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane.org Original-Received: from mail-yw0-f188.google.com ([209.85.161.188]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ae1Tm-0008JB-Kn for gtp-pandoc-discuss@m.gmane.org; Thu, 10 Mar 2016 15:22:18 +0100 Original-Received: by mail-yw0-f188.google.com with SMTP id g127sf17632339ywf.0 for ; Thu, 10 Mar 2016 06:22:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20120806; h=from:to:subject:in-reply-to:references:user-agent:date:message-id :mime-version: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=VFFt9EmazkXsEcMld3UM8FAe+SAJZWp6yNK3Z8KMtd4=; b=Z9nMsmi8zitde4QxWAFCm1GA8G3rGTFoCFcKSxBdmJkRuRag7LxfdF3tFcz+CfXzNX wCA+3qKnrwQlWjTiCrcCcouiMpdvCuMyDYdl/C34uvl6QuuQGW8nO8X5dCwzQXINZuN3 PA8TOx9Vqw1EQH7GjkXcj7uN3kf7wt7GvTH8Y38yKtw84t1pg4FGdQ+1OLha6JqX6XcT f+hSUNiyKw4gi4Pq++Vsah7ChwJKOmsTXzjxbvtJvrl30mGJkwETDasIXXfjbmYg5XBX NmJqayiA5Pagb/VBZ71JqzHPKOEDcv82BvZt5zOJIRsxu6HZqRAExFKuO6dqw8K1SNve n9gg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:in-reply-to:references :user-agent:date:message-id:mime-version: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=VFFt9EmazkXsEcMld3UM8FAe+SAJZWp6yNK3Z8KMtd4=; b=IJUXyMkooEG05qpDpVwTSwFOfcdE11uQxE40wVnLHDs6iPSFem+9KC7r9RdHz/sSe0 JrvMicSgq69mksvRhMFVa6tzAoXd79v9tq3kQIuF1LYXahXHpaO6vuu1AWJSViyydh8i QnkCRSllUxsCE4oHsNjhJfJPK5wwJSQh3VCtPfgFCYf/i45fluZ4N18vsf5LdUlK9091 ZWcEZh2vUU7UQ1mTdE3lDMv1tJFlLm3frgv1TOUc25l0WntvzE4TihRlxzQoDhE1UzMu AF58iLk0Gh4GNFbXj6EpOubALCNQzOkQHBblA7rpF8F3SRYKypd71e6WW3oPIXjtLM5K aJ6Q== X-Gm-Message-State: AD7BkJK/HDnhQwfK6LRoATw5evJLQ/Gljjn8Gz8KmCEN8PQEA4tCb3OjNEVbPYLjlH/f4A== X-Received: by 10.140.109.182 with SMTP id l51mr78192qgf.10.1457619737711; Thu, 10 Mar 2016 06:22:17 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 10.140.33.162 with SMTP id j31ls1962193qgj.88.gmail; Thu, 10 Mar 2016 06:22:16 -0800 (PST) X-Received: by 10.140.150.210 with SMTP id 201mr2676360qhw.28.1457619736940; Thu, 10 Mar 2016 06:22:16 -0800 (PST) Original-Received: from smtpauth.johnshopkins.edu (smtpauth.johnshopkins.edu. [162.129.199.149]) by gmr-mx.google.com with ESMTPS id y131si233949ywc.0.2016.03.10.06.22.16 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 10 Mar 2016 06:22:16 -0800 (PST) Received-SPF: neutral (google.com: 162.129.199.149 is neither permitted nor denied by best guess record for domain of prvs=870b4af2f=jrosenthal-4GNroTWusrE@public.gmane.org) client-ip=162.129.199.149; X-IronPort-AV: E=Sophos;i="5.24,316,1454994000"; d="scan'208";a="145599750" Original-Received: from c-73-163-131-44.hsd1.md.comcast.net (HELO localhost) ([73.163.131.44]) by IronEB4.johnshopkins.edu with ESMTP/TLS/DHE-RSA-AES256-SHA; 10 Mar 2016 09:22:17 -0500 In-Reply-To: <20160309161216.GF70376-jF64zX8BO091tJRe0FUodcM6rOWSkUom@public.gmane.org> User-Agent: Notmuch/0.21+73~gf8cc320 (http://notmuchmail.org) Emacs/24.5.1 (x86_64-apple-darwin14.5.0) X-Original-Sender: jrosenthal-4GNroTWusrE@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 162.129.199.149 is neither permitted nor denied by best guess record for domain of prvs=870b4af2f=jrosenthal-4GNroTWusrE@public.gmane.org) smtp.mailfrom=prvs=870b4af2f=jrosenthal-4GNroTWusrE@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:14525 Archived-At: I'll look into it. It's not immediately obvious to me, though, what the best way to produce the warning would be. Most readers use `addWarning`, which adds to the Parsec state, but the docx reader doesn't use Parsec (and doesn't have StateT in its monad stack). I guess I could add WriterT or StateT to the stack, and then just tack on to `stateWarnings` the way `addWarning` does in the Parsec state. Easy enough, and since I'm using mtl, I shouldn't have to add any extra lifts. That seems preferable to just popping in a `hPutStr stderr "error\n" >> hFlush stderr` whenever we hit a warning situation, anyway. Best, Jesse