From mboxrd@z Thu Jan 1 00:00:00 1970 From: Aidan Gauland Subject: Re: org-export-string Date: Mon, 1 Nov 2010 21:02:55 +1300 Message-ID: <20101101080254.GA13127@neko> References: <87mxpuwit8.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0282021289==" Return-path: Received: from [140.186.70.92] (port=53391 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PCpLr-0007SW-FO for emacs-orgmode@gnu.org; Mon, 01 Nov 2010 04:02:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PCpLq-0005T2-8F for emacs-orgmode@gnu.org; Mon, 01 Nov 2010 04:02:47 -0400 Received: from jersey.rurallink.co.nz ([114.134.15.197]:54554 helo=smtp.rurallink.co.nz) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PCpLp-0005Rm-Pe for emacs-orgmode@gnu.org; Mon, 01 Nov 2010 04:02:46 -0400 In-Reply-To: <87mxpuwit8.fsf@gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Eric Schulte Cc: emacs-orgmode@gnu.org --===============0282021289== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="bp/iNruPH9dso1Pn" Content-Disposition: inline --bp/iNruPH9dso1Pn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sun, Oct 31, 2010 at 08:14:27AM -0600, Eric Schulte wrote: > It should be possible to use edebug to locate the source of this prompt. > > Evaluate the definition of `org-export-string' with a prefix argument > (i.e. C-u C-M-x). Then when you call `org-export-string' you can step > through all S-expressions in the definition, until you reach the one > which is generating the prompt. Then evaluate *that* function with > edebug and recurse. > > This should lead you to the prompt and from there we should be able to > figure out how to avoid it. > > Best -- Eric > >> On Sun, Oct 31, 2010 at 12:15 PM, Aidan Gauland >> wrote: >> Evaluating (org-export-string "plain plain *bold* plain" "html") >> prompts me (in the minibuffer) with... >> >> File to save in: /tmp/ The prompt came up when evaluating (run-hooks 'org-export-html-after-blockquotes-hook) (which is in the function org-export-as-html). I had the following export hook that was a workaround for a problem with footnotes (which I need to try and fix when I get a chance). Removing this hook restores sane behaviour (i.e. no prompt). (add-hook 'org-export-html-final-hook 'gio/replace-square-brackets) (add-hook 'org-export-ascii-final-hook 'gio/replace-square-brackets) (defun gio/replace-square-brackets () "Replace #91; with [ and #93; with ] " (interactive) (setq a "#91;") ; use "\[" for LaTeX export (setq b "#93;") ; use "\]" for LaTeX export (setq a1 "[") (setq b1 "]") (ignore-errors (goto-char 1) (setq p (point)) (while (< p (point-max)) (re-search-forward a nil nil) (replace-match a1) (setq p (point)) ) ) (ignore-errors (goto-char 1) (setq p (point)) (while (< p (point-max)) (re-search-forward b nil nil) (replace-match b1) (setq p (point)) ) ) (save-buffer)) --Aidan --bp/iNruPH9dso1Pn Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iEYEARECAAYFAkzOdC4ACgkQjyzTRvYJmaWINQCeOt3MhFjtcqmv/5jc21pDQtwJ TNYAnitsmahGO3It28W4neBVaVzPgY65 =IGZB -----END PGP SIGNATURE----- --bp/iNruPH9dso1Pn-- --===============0282021289== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --===============0282021289==--