From 0283616a4a4e5c9770a9bf2247efad96dcf984f8 Mon Sep 17 00:00:00 2001
From: John MacFarlane <jgm@berkeley.edu>
Date: Thu, 10 Aug 2017 23:45:28 -0700
Subject: [PATCH] Remove writerUserDataDir from WriterOptions.

It is now carried in CommonState in PandocMonad instances.
(And thus it can be used by readers too.)
---
 src/Text/Pandoc/App.hs          | 1 -
 src/Text/Pandoc/Options.hs      | 2 --
 src/Text/Pandoc/Writers/Docx.hs | 1 -
 3 files changed, 4 deletions(-)

diff --git a/src/Text/Pandoc/App.hs b/src/Text/Pandoc/App.hs
index 3174fe738..47976a499 100644
--- a/src/Text/Pandoc/App.hs
+++ b/src/Text/Pandoc/App.hs
@@ -355,7 +355,6 @@ convertWithOpts opts = do
                             writerEmailObfuscation = optEmailObfuscation opts,
                             writerIdentifierPrefix = optIdentifierPrefix opts,
                             writerSourceURL        = sourceURL,
-                            writerUserDataDir      = datadir,
                             writerHtmlQTags        = optHtmlQTags opts,
                             writerTopLevelDivision = optTopLevelDivision opts,
                             writerListings         = optListings opts,
diff --git a/src/Text/Pandoc/Options.hs b/src/Text/Pandoc/Options.hs
index d7e77010e..89b26deb0 100644
--- a/src/Text/Pandoc/Options.hs
+++ b/src/Text/Pandoc/Options.hs
@@ -202,7 +202,6 @@ data WriterOptions = WriterOptions
   , writerIdentifierPrefix  :: String -- ^ Prefix for section & note ids in HTML
                                      -- and for footnote marks in markdown
   , writerSourceURL         :: Maybe String  -- ^ Absolute URL + directory of 1st source file
-  , writerUserDataDir       :: Maybe FilePath -- ^ Path of user data directory
   , writerCiteMethod        :: CiteMethod -- ^ How to print cites
   , writerHtmlQTags         :: Bool       -- ^ Use @<q>@ tags for quotes in HTML
   , writerSlideLevel        :: Maybe Int  -- ^ Force header level of slides
@@ -240,7 +239,6 @@ instance Default WriterOptions where
                       , writerEmailObfuscation = NoObfuscation
                       , writerIdentifierPrefix = ""
                       , writerSourceURL        = Nothing
-                      , writerUserDataDir      = Nothing
                       , writerCiteMethod       = Citeproc
                       , writerHtmlQTags        = False
                       , writerSlideLevel       = Nothing
diff --git a/src/Text/Pandoc/Writers/Docx.hs b/src/Text/Pandoc/Writers/Docx.hs
index f20edbfaa..166a09d4b 100644
--- a/src/Text/Pandoc/Writers/Docx.hs
+++ b/src/Text/Pandoc/Writers/Docx.hs
@@ -226,7 +226,6 @@ writeDocx :: (PandocMonad m)
           -> Pandoc         -- ^ Document to convert
           -> m BL.ByteString
 writeDocx opts doc@(Pandoc meta _) = do
-  let datadir = writerUserDataDir opts
   let doc' = walk fixDisplayMath $ doc
   username <- P.lookupEnv "USERNAME"
   utctime <- P.getCurrentTime