Fix bug with handling of targets in ASCII export.
Target text used to disappear, now it is kept as it should be.
This commit is contained in:
parent
825fdfa95e
commit
c0a779bd9d
|
@ -1,3 +1,10 @@
|
||||||
|
2008-11-26 Carsten Dominik <carsten.dominik@gmail.com>
|
||||||
|
|
||||||
|
* org-exp.el (org-export-as-ascii): Remove the handling of
|
||||||
|
targets.
|
||||||
|
(org-export-ascii-preprocess): Handle targets already in this
|
||||||
|
function.
|
||||||
|
|
||||||
2008-11-25 Carsten Dominik <carsten.dominik@gmail.com>
|
2008-11-25 Carsten Dominik <carsten.dominik@gmail.com>
|
||||||
|
|
||||||
* org-timer.el (org-timer-start-time): Define this variable.
|
* org-timer.el (org-timer-start-time): Define this variable.
|
||||||
|
|
|
@ -2397,10 +2397,7 @@ underlined headlines. The default is 3."
|
||||||
(while (setq line (pop lines))
|
(while (setq line (pop lines))
|
||||||
;; Remove the quoted HTML tags.
|
;; Remove the quoted HTML tags.
|
||||||
(setq line (org-html-expand-for-ascii line))
|
(setq line (org-html-expand-for-ascii line))
|
||||||
;; Remove targets
|
;; Replace links with the description when possible
|
||||||
(while (string-match "<<<?[^<>]*>>>?[ \t]*\n?" line)
|
|
||||||
(setq line (replace-match "" t t line)))
|
|
||||||
;; Replace internal links
|
|
||||||
(while (string-match org-bracket-link-regexp line)
|
(while (string-match org-bracket-link-regexp line)
|
||||||
(setq line (replace-match
|
(setq line (replace-match
|
||||||
(if (match-end 3) "[\\3]" "[\\1]")
|
(if (match-end 3) "[\\3]" "[\\1]")
|
||||||
|
@ -2483,13 +2480,18 @@ underlined headlines. The default is 3."
|
||||||
|
|
||||||
(defun org-export-ascii-preprocess ()
|
(defun org-export-ascii-preprocess ()
|
||||||
"Do extra work for ASCII export"
|
"Do extra work for ASCII export"
|
||||||
|
;; Put quotes around verbatim text
|
||||||
(goto-char (point-min))
|
(goto-char (point-min))
|
||||||
(while (re-search-forward org-verbatim-re nil t)
|
(while (re-search-forward org-verbatim-re nil t)
|
||||||
(goto-char (match-end 2))
|
(goto-char (match-end 2))
|
||||||
(backward-delete-char 1) (insert "'")
|
(backward-delete-char 1) (insert "'")
|
||||||
(goto-char (match-beginning 2))
|
(goto-char (match-beginning 2))
|
||||||
(delete-char 1) (insert "`")
|
(delete-char 1) (insert "`")
|
||||||
(goto-char (match-end 2))))
|
(goto-char (match-end 2)))
|
||||||
|
(goto-char (point-min))
|
||||||
|
;; Remove target markers
|
||||||
|
(while (re-search-forward "<<<?\\([^<>]*\\)>>>?\\([ \t]*\\)" nil t)
|
||||||
|
(replace-match "\\1\\2")))
|
||||||
|
|
||||||
(defun org-search-todo-below (line lines level)
|
(defun org-search-todo-below (line lines level)
|
||||||
"Search the subtree below LINE for any TODO entries."
|
"Search the subtree below LINE for any TODO entries."
|
||||||
|
|
Loading…
Reference in New Issue