emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] org-export-string


From: Aidan Gauland
Subject: Re: [Orgmode] org-export-string
Date: Mon, 1 Nov 2010 21:02:55 +1300
User-agent: Mutt/1.5.20 (2009-06-14)

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
>> <address@hidden> 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

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]