emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Aidan Gauland <aidalgol@no8wireless.co.nz>
To: Eric Schulte <schulte.eric@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: org-export-string
Date: Mon, 1 Nov 2010 21:02:55 +1300	[thread overview]
Message-ID: <20101101080254.GA13127@neko> (raw)
In-Reply-To: <87mxpuwit8.fsf@gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 1881 bytes --]

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
>> <aidalgol@no8wireless.co.nz> 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 #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
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

      reply	other threads:[~2010-11-01  8:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-31  6:45 org-export-string Aidan Gauland
2010-10-31  7:04 ` org-export-string Puneeth
2010-10-31  7:46   ` org-export-string Aidan Gauland
2010-10-31  8:48 ` org-export-string Noorul Islam
2010-10-31 14:14   ` org-export-string Eric Schulte
2010-11-01  8:02     ` Aidan Gauland [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20101101080254.GA13127@neko \
    --to=aidalgol@no8wireless.co.nz \
    --cc=emacs-orgmode@gnu.org \
    --cc=schulte.eric@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).