org-lparse.el & co: Bring over few commits

Bring over following commits:
- 97538eb9
- 5c53026d
- 3482284b
- 58f1dbcc
- 8b16fae4
- 106993d3
This commit is contained in:
Jambunathan K 2011-11-13 11:45:24 +05:30
parent 22b9e68782
commit c5081b8f14
3 changed files with 38 additions and 38 deletions

View File

@ -5,8 +5,7 @@
;; Author: Jambunathan K <kjambunathan at gmail dot com> ;; Author: Jambunathan K <kjambunathan at gmail dot com>
;; Keywords: outlines, hypermedia, calendar, wp ;; Keywords: outlines, hypermedia, calendar, wp
;; Homepage: http://orgmode.org ;; Homepage: http://orgmode.org
;; Version: 0.8 ;;
;; This file is not (yet) part of GNU Emacs. ;; This file is not (yet) part of GNU Emacs.
;; However, it is distributed under the same license. ;; However, it is distributed under the same license.
@ -996,7 +995,8 @@ version."
(setq line (org-lparse-format-org-link line opt-plist)) (setq line (org-lparse-format-org-link line opt-plist))
;; TODO items ;; TODO items
(if (and (string-match org-todo-line-regexp line) (if (and org-todo-line-regexp
(string-match org-todo-line-regexp line)
(match-beginning 2)) (match-beginning 2))
(setq line (concat (setq line (concat
(substring line 0 (match-beginning 2)) (substring line 0 (match-beginning 2))
@ -1409,24 +1409,26 @@ for further information."
"Format time stamps in string S, or remove them." "Format time stamps in string S, or remove them."
(catch 'exit (catch 'exit
(let (r b) (let (r b)
(while (string-match org-maybe-keyword-time-regexp s) (when org-maybe-keyword-time-regexp
(or b (setq b (substring s 0 (match-beginning 0)))) (while (string-match org-maybe-keyword-time-regexp s)
(setq r (concat (or b (setq b (substring s 0 (match-beginning 0))))
r (substring s 0 (match-beginning 0)) " " (setq r (concat
(org-lparse-format r (substring s 0 (match-beginning 0)) " "
'FONTIFY
(concat
(if (match-end 1)
(org-lparse-format
'FONTIFY
(match-string 1 s) "timestamp-kwd"))
" "
(org-lparse-format (org-lparse-format
'FONTIFY 'FONTIFY
(substring (org-translate-time (match-string 3 s)) 1 -1) (concat
"timestamp")) (if (match-end 1)
"timestamp-wrapper")) (org-lparse-format
s (substring s (match-end 0)))) 'FONTIFY
(match-string 1 s) "timestamp-kwd"))
" "
(org-lparse-format
'FONTIFY
(substring (org-translate-time (match-string 3 s)) 1 -1)
"timestamp"))
"timestamp-wrapper"))
s (substring s (match-end 0)))))
;; Line break if line started and ended with time stamp stuff ;; Line break if line started and ended with time stamp stuff
(if (not r) (if (not r)
s s

View File

@ -5,8 +5,7 @@
;; Author: Jambunathan K <kjambunathan at gmail dot com> ;; Author: Jambunathan K <kjambunathan at gmail dot com>
;; Keywords: outlines, hypermedia, calendar, wp ;; Keywords: outlines, hypermedia, calendar, wp
;; Homepage: http://orgmode.org ;; Homepage: http://orgmode.org
;; Version: 0.8 ;;
;; This file is not (yet) part of GNU Emacs. ;; This file is not (yet) part of GNU Emacs.
;; However, it is distributed under the same license. ;; However, it is distributed under the same license.
@ -1338,14 +1337,13 @@ value of `org-export-odt-fontify-srcblocks."
(defun org-odt-format-org-link (opt-plist type-1 path fragment desc attr (defun org-odt-format-org-link (opt-plist type-1 path fragment desc attr
descp) descp)
"Make an HTML link. "Make a OpenDocument link.
OPT-PLIST is an options list. OPT-PLIST is an options list.
TYPE is the device-type of the link (THIS://foo.html) TYPE-1 is the device-type of the link (THIS://foo.html).
PATH is the path of the link (http://THIS#locationx) PATH is the path of the link (http://THIS#location).
FRAGMENT is the fragment part of the link, if any (foo.html#THIS) FRAGMENT is the fragment part of the link, if any (foo.html#THIS).
DESC is the link description, if any. DESC is the link description, if any.
ATTR is a string of other attributes of the a element. ATTR is a string of other attributes of the a element."
MAY-INLINE-P allows inlining it as an image."
(declare (special org-lparse-par-open)) (declare (special org-lparse-par-open))
(save-match-data (save-match-data
(let* ((may-inline-p (let* ((may-inline-p

View File

@ -5,11 +5,10 @@
;; Author: Carsten Dominik <carsten at orgmode dot org> ;; Author: Carsten Dominik <carsten at orgmode dot org>
;; Keywords: outlines, hypermedia, calendar, wp ;; Keywords: outlines, hypermedia, calendar, wp
;; Homepage: http://orgmode.org ;; Homepage: http://orgmode.org
;; Version: 0.8 ;;
;; This file is not (yet) part of GNU Emacs. ;; This file is not (yet) part of GNU Emacs.
;; However, it is distributed under the same license. ;; However, it is distributed under the same license.
;;
;; GNU Emacs is free software: you can redistribute it and/or modify ;; GNU Emacs is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by ;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or ;; the Free Software Foundation, either version 3 of the License, or
@ -36,6 +35,8 @@
(declare-function org-id-find-id-file "org-id" (id)) (declare-function org-id-find-id-file "org-id" (id))
(declare-function htmlize-region "ext:htmlize" (beg end)) (declare-function htmlize-region "ext:htmlize" (beg end))
(declare-function org-pop-to-buffer-same-window
"org-compat" (&optional buffer-or-name norecord label))
(defgroup org-export-xhtml nil (defgroup org-export-xhtml nil
"Options specific for HTML export of Org-mode files." "Options specific for HTML export of Org-mode files."
@ -579,6 +580,7 @@ a file."
("<" . "&lt;") ("<" . "&lt;")
(">" . "&gt;")) (">" . "&gt;"))
"Alist of characters to be converted by `org-html-protect'." "Alist of characters to be converted by `org-html-protect'."
:group 'org-export-xhtml
:type '(repeat (cons (string :tag "Character") :type '(repeat (cons (string :tag "Character")
(string :tag "HTML equivalent")))) (string :tag "HTML equivalent"))))
@ -713,17 +715,15 @@ See variable `org-export-xhtml-link-org-files-as-html'"
"." "."
(plist-get opt-plist :html-extension))))))) (plist-get opt-plist :html-extension)))))))
;;; org-xhtml-format-org-link
(defun org-xhtml-format-org-link (opt-plist type-1 path fragment desc attr (defun org-xhtml-format-org-link (opt-plist type-1 path fragment desc attr
descp) descp)
"Make an HTML link. "Make an HTML link.
OPT-PLIST is an options list. OPT-PLIST is an options list.
TYPE is the device-type of the link (THIS://foo.html) TYPE is the device-type of the link (THIS://foo.html).
PATH is the path of the link (http://THIS#locationx) PATH is the path of the link (http://THIS#location).
FRAGMENT is the fragment part of the link, if any (foo.html#THIS) FRAGMENT is the fragment part of the link, if any (foo.html#THIS).
DESC is the link description, if any. DESC is the link description, if any.
ATTR is a string of other attributes of the a element. ATTR is a string of other attributes of the \"a\" element."
MAY-INLINE-P allows inlining it as an image."
(declare (special org-lparse-par-open)) (declare (special org-lparse-par-open))
(save-match-data (save-match-data
(when (string= type-1 "coderef") (when (string= type-1 "coderef")
@ -1751,7 +1751,7 @@ lang=\"%s\" xml:lang=\"%s\">
(format-spec html-pre `((?t . ,title) (?a . ,author) (format-spec html-pre `((?t . ,title) (?a . ,author)
(?d . ,date) (?e . ,email))))) (?d . ,date) (?e . ,email)))))
((functionp html-pre) ((functionp html-pre)
(funcall html-pre opt-plist)) (funcall html-pre))
(t (t
(insert (insert
(format-spec (format-spec
@ -1797,7 +1797,7 @@ lang=\"%s\" xml:lang=\"%s\">
(?v . ,html-validation-link)))) (?v . ,html-validation-link))))
(insert "</div>")) (insert "</div>"))
((functionp html-post) ((functionp html-post)
(funcall html-post opt-plist)) (funcall html-post))
((eq html-post 'auto) ((eq html-post 'auto)
;; fall back on default postamble ;; fall back on default postamble
(insert "<div id=\"postamble\">\n") (insert "<div id=\"postamble\">\n")