Release 5.11

This commit is contained in:
Carsten Dominik 2008-01-31 11:36:29 +01:00
parent 52c4f74b5f
commit 4019309baf
12 changed files with 1454 additions and 946 deletions

View File

@ -1,3 +1,71 @@
2007-10-05 Carsten Dominik <dominik@science.uva.nl>
* org.el (org-additional-option-like-keywords): New constant.
(org-complete): Use `org-additional-option-like-keywords'.
(org-parse-local-options): New function.
2007-10-04 Carsten Dominik <dominik@science.uva.nl>
* org.el (org-in-clocktable-p): New function.
(org-clock-report): Only update the table at point, or insert a
new one.
(org-clock-goto): New function.
(org-open-file): Use `start-process-shell-command' instead of
`shell-command' with an ampersand.
(org-deadline, org-schedule): New argument REMOVE to remove the
date from the entry.
(org-agenda-schedule, org-agenda-deadline): Pass the prefix
argument to `org-schedule' and `org-deadline'.
(org-trim): Use the correct expressions for beginning and end of
the string.
(org-get-cleaned-entry): Trim the string before returning it.
(org-clock-find-position): New function.
(org-clock-into-drawer): New option.
(org-agenda-tags-column): Renamed from
`org-agenda-align-tags-to-column'.
(org-agenda-align-tags): Allow negative values for
`org-agenda-tags-column'.
(org-insert-labeled-timestamps-before-properties-drawer): Variable
removed.
(org-agenda-to-appt): new optional argument FILTER.
(org-completion-fallback-command): New variable.
(org-complete): Use `org-completion-fallback-command'.
(org-find-base-buffer-visiting): Catch the case that there is no
buffer visiting the file.
(org-property-or-variable-value): New function.
(org-todo): Use `org-property-or-variable-value'
(org-agenda-compact-blocks): New option.
(org-prepare-agenda, org-agenda-list): Use
`org-agenda-compact-blocks'.
(org-agenda-schedule, org-agenda-deadline): Call
`org-agenda-show-new-time'.
(org-agenda-show-new-time): New argument PREFIX.
(org-colgroup-info-to-vline-list): Fixed but that cause a
shift in the vertical lines.
(org-buffer-property-keys): New argument INCLUDE-DEFAULTS.
(org-maybe-renumber-ordered-list, org-cycle-list-bullet)
(org-indent-item): No arg in call to `org-fix-bullet-type'.
(org-fix-bullet-type): Removed argument.
(org-read-date): Check for am/pm twice, to catch the end time.
(org-goto-map): Use `suppress-keymap'.
(org-remember-apply-template): Respect the dynamically scoped
selection character.
* org.texi (Appointment reminders): New section.
2007-10-05 Bastien Guerry <Bastien.Guerry@ens.fr>
* org-export-latex.el (org-export-latex-protect-string):
Renaming of `org-latex-protect'.
(org-export-latex-emphasis-alist): By default, don't protect
any emphasis formatter from further conversion.
(org-export-latex-tables): honor column grouping for tables.
(org-export-latex-title-command): New option.
(org-export-latex-treat-backslash-char): Use \textbackslash{} to
export backslash character.
------------------------------------------------------------
Installed as 5.10
2007-09-26 Carsten Dominik <dominik@science.uva.nl>

View File

@ -28,7 +28,7 @@ infodir = $(prefix)/info
# Using emacs in batch mode.
# BATCH=$(EMACS) -batch -q
BATCH=$(EMACS) -batch -q -eval "(add-to-list (quote load-path) \"$(lispdir)\")"
BATCH=$(EMACS) -batch -q -eval "(add-to-list (quote load-path) \".\")"
# Specify the byte-compiler for compiling org-mode files
ELC= $(BATCH) -f batch-byte-compile

845
org

File diff suppressed because it is too large Load Diff

View File

@ -1,10 +1,15 @@
;;; org-export-latex.el --- latex exporter for org-mode
;;; org-export-latex.el --- LaTeX exporter for org-mode
;;
;; copyright (c) 2007 free software foundation, inc.
;;
;; Emacs Lisp Archive Entry
;; Filename: org-export-latex.el
;; Version: 5.11
;; Author: Bastien Guerry <bzg AT altern DOT org>
;; Keywords: Org organizer latex export convert
;; Homepage: http://www.cognition.ens.fr/~guerry/u/org-export-latex.el
;; Version: 5.10
;; Maintainer: Bastien Guerry <bzg AT altern DOT org>
;; Keywords: org, wp, tex
;; Description: Converts an org-mode buffer into LaTeX
;; URL: http://www.cognition.ens.fr/~guerry/u/org-export-latex.el
;;
;; This file is part of GNU Emacs.
;;
@ -87,12 +92,12 @@ The %s formatter will be replaced by the title of the section."
("/" "\\emph{%s}" nil)
("_" "\\underline{%s}" nil)
("+" "\\texttt{%s}" nil)
("=" "\\texttt{%s}" t))
("=" "\\texttt{%s}" nil))
"Alist of LaTeX expressions to convert emphasis fontifiers.
Each element of the list is a list of three elements.
The first element is the character used as a marker for fontification.
The second element is a formatting string to wrap fontified text with.
If non-nil the third element tells to protect converted text from other
The third element decides whether to protect converted text from other
conversions."
:group 'org-export-latex
:type 'alist)
@ -106,6 +111,14 @@ conversions."
:group 'org-export-latex
:type 'string)
(defcustom org-export-latex-title-command "\\maketitle"
"The command used to insert the title just after \\begin{document}.
If this string contains the formatting specification \"%s\" then
it will be used as a formatting string, passing the title as an
argument."
:group 'org-export-latex
:type 'string)
(defcustom org-export-latex-date-format
"%d %B %Y"
"Format string for \\date{...}."
@ -129,11 +142,14 @@ For example:
:type 'alist)
(defcustom org-export-latex-low-levels 'description
"Choice for converting sections that are below the current
admitted level of sectioning. This can be either nil (ignore the
sections), 'description (convert them as description lists) or a
string to be used instead of \\section{%s} (a %s for inserted the
headline is mandatory)."
"How to convert sections below the current level of sectioning,
as specified by `org-export-headline-levels' or the value of \"H:\"
in Org's #+OPTION line.
This can be either nil (skip the sections), 'description (convert
the sections as descriptive lists) or a string to be used instead
of \\section{%s}. In this latter case, the %s stands here for the
inserted headline and is mandatory."
:group 'org-export-latex
:type '(choice (const :tag "Ignore" nil)
(symbol :tag "Convert as descriptive list" description)
@ -253,7 +269,8 @@ in a window. A non-interactive call will only retunr the buffer."
(message "Exporting to LaTeX...")
(org-update-radio-target-regexp)
(org-export-latex-set-initial-vars ext-plist)
(let* ((opt-plist org-latex-options-plist)
(let* ((wcf (current-window-configuration))
(opt-plist org-latex-options-plist)
(filename (concat (file-name-as-directory
(org-export-directory :LaTeX ext-plist))
(file-name-sans-extension
@ -289,15 +306,27 @@ in a window. A non-interactive call will only retunr the buffer."
region :emph-multiline t
:for-LaTeX t
:comments nil
:add-text text
:add-text (if (eq to-buffer 'string) nil text)
:skip-before-1st-heading skip
:LaTeX-fragments nil)))
(set-buffer buffer)
(set-buffer buffer)
(erase-buffer)
(unless body-only (insert preamble))
(when text (insert (org-export-latex-content text) "\n\n"))
(unless skip (insert first-lines))
(and (fboundp 'set-buffer-file-coding-system)
(set-buffer-file-coding-system coding-system-for-write))
;; insert the preamble and initial document commands
(unless (or (eq to-buffer 'string) body-only)
(insert preamble))
;; insert text found in #+TEXT
(when (and text (not (eq to-buffer 'string)))
(insert (org-export-latex-content text) "\n\n"))
;; insert lines before the first headline
(unless (or skip (eq to-buffer 'string))
(insert first-lines))
;; handle the case where the region does not begin with a section
(when region-p
@ -305,25 +334,29 @@ in a window. A non-interactive call will only retunr the buffer."
(insert string-for-export)
(org-export-latex-first-lines))))
;; export the content of headlines
(org-export-latex-global
(with-temp-buffer
(insert string-for-export)
(goto-char (point-min))
(re-search-forward "^\\(\\*+\\) " nil t)
(let* ((asters (length (match-string 1)))
(level (if odd (- asters 2) (- asters 1))))
(setq org-latex-add-level
(if odd (1- (/ (1+ asters) 2)) (1- asters)))
(org-export-latex-parse-global level odd))))
(when (re-search-forward "^\\(\\*+\\) " nil t)
(let* ((asters (length (match-string 1)))
(level (if odd (- asters 2) (- asters 1))))
(setq org-latex-add-level
(if odd (1- (/ (1+ asters) 2)) (1- asters)))
(org-export-latex-parse-global level odd)))))
;; finalization
(unless body-only (insert "\n\\end{document}"))
(or to-buffer (save-buffer))
(goto-char (point-min))
(message "Exporting to LaTeX...done")
(if (eq to-buffer 'string)
(prog1 (buffer-substring (point-min) (point-max))
(kill-buffer (current-buffer)))
(current-buffer))))
(prog1
(if (eq to-buffer 'string)
(prog1 (buffer-substring (point-min) (point-max))
(kill-buffer (current-buffer)))
(current-buffer))
(set-window-configuration wcf))))
;;; Parsing functions:
@ -490,8 +523,11 @@ and its content."
;;; Exporting internals:
(defun org-latex-protect (string)
(add-text-properties 0 (length string) '(org-protected t) string) string)
(defun org-export-latex-protect-string (string)
"Prevent further conversion for STRING by adding the
org-protect property."
(add-text-properties
0 (length string) '(org-protected t) string) string)
(defun org-export-latex-protect-char-in-string (char-list string)
"Add org-protected text-property to char from CHAR-LIST in STRING."
@ -524,54 +560,65 @@ EXT-PLIST is an optional additional plist."
"Make the LaTeX preamble and return it as a string.
Argument OPT-PLIST is the options plist for current buffer."
(let ((toc (plist-get opt-plist :table-of-contents)))
(concat (if (plist-get opt-plist :time-stamp-file)
(format-time-string "% Created %Y-%m-%d %a %H:%M\n"))
;; LaTeX custom preamble
org-export-latex-preamble "\n"
;; LaTeX packages
(if org-export-latex-packages-alist
(mapconcat (lambda(p)
(if (equal "" (car p))
(format "\\usepackage{%s}" (cadr p))
(format "\\usepackage[%s]{%s}"
(car p) (cadr p))))
org-export-latex-packages-alist "\n") "")
"\n\\begin{document}\n\n"
;; title
(format
"\\title{%s}\n"
(or (plist-get opt-plist :title)
(and (not
(plist-get opt-plist :skip-before-1st-heading))
(org-export-grab-title-from-buffer))
(and buffer-file-name
(file-name-sans-extension
(file-name-nondirectory buffer-file-name)))
"UNTITLED"))
;; author info
(if (plist-get opt-plist :author-info)
(format "\\author{%s}\n"
(or (plist-get opt-plist :author) user-full-name))
(format "%%\\author{%s}\n"
(or (plist-get opt-plist :author) user-full-name)))
;; date
(format "\\date{%s}\n"
(format-time-string
(or (plist-get opt-plist :date)
org-export-latex-date-format)))
"\\maketitle\n\n"
;; table of contents
(if (and (plist-get opt-plist :section-numbers) toc)
(format "\\setcounter{tocdepth}{%s}\n"
(min toc (plist-get opt-plist :headline-levels))) "")
(if (and (plist-get opt-plist :section-numbers) toc)
"\\tableofcontents\n" "\n"))))
(concat
(if (plist-get opt-plist :time-stamp-file)
(format-time-string "% Created %Y-%m-%d %a %H:%M\n"))
;; insert LaTeX custom preamble
org-export-latex-preamble "\n"
;; insert information on LaTeX packages
(when org-export-latex-packages-alist
(mapconcat (lambda(p)
(if (equal "" (car p))
(format "\\usepackage{%s}" (cadr p))
(format "\\usepackage[%s]{%s}"
(car p) (cadr p))))
org-export-latex-packages-alist "\n"))
;; insert the title
(format
"\\title{%s}\n"
(or (plist-get opt-plist :title)
(and (not
(plist-get opt-plist :skip-before-1st-heading))
(org-export-grab-title-from-buffer))
(and buffer-file-name
(file-name-sans-extension
(file-name-nondirectory buffer-file-name)))
"UNTITLED"))
;; insert author info
(if (plist-get opt-plist :author-info)
(format "\\author{%s}\n"
(or (plist-get opt-plist :author) user-full-name))
(format "%%\\author{%s}\n"
(or (plist-get opt-plist :author) user-full-name)))
;; insert the date
(format "\\date{%s}\n"
(format-time-string
(or (plist-get opt-plist :date)
org-export-latex-date-format)))
;; beginning of the document
"\n\\begin{document}\n\n"
;; insert the title command
(if (string-match "%s" org-export-latex-title-command)
(format org-export-latex-title-command
(plist-get opt-plist :title))
org-export-latex-title-command)
"\n\n"
;; table of contents
(when (and org-export-with-toc
(plist-get opt-plist :section-numbers))
(cond ((numberp toc)
(format "\\setcounter{tocdepth}{%s}\n\\tableofcontents\n\n"
(min toc (plist-get opt-plist :headline-levels))))
(toc (format "\\setcounter{tocdepth}{%s}\n\\tableofcontents\n\n"
(plist-get opt-plist :headline-levels))))))))
(defun org-export-latex-first-lines (&optional comments)
"Export the first lines before first headline.
@ -646,6 +693,7 @@ formatting string like %%%%s if we want to comment them out."
(plist-get org-latex-options-plist :tables))
(org-export-latex-fixed-width
(plist-get org-latex-options-plist :fixed-width))
;; return string
(buffer-substring (point-min) (point-max))))
(defun org-export-latex-quotation-marks ()
@ -664,7 +712,7 @@ Local definition of the language overrides
(mapc (lambda(l) (goto-char (point-min))
(while (re-search-forward (car l) nil t)
(let ((rpl (concat (match-string 1) (cadr l))))
(org-latex-protect rpl)
(org-export-latex-protect-string rpl)
(org-if-unprotected
(replace-match rpl t t))))) quote-rpl)))
@ -694,42 +742,42 @@ See the `org-export-latex.el' code for a complete conversion table."
;; Put the point where to check for org-protected
(unless (get-text-property (match-beginning 2) 'org-protected)
(cond ((member (match-string 2) '("\\$" "$"))
(if (equal (match-string 2) "\\$")
(replace-match (concat (match-string 1) "$"
(match-string 3)) t t)
(replace-match (concat (match-string 1) "\\$"
(match-string 3)) t t)))
((member (match-string 2) '("&" "#" "%"))
(if (equal (match-string 1) "\\")
(replace-match (match-string 2) t t)
(replace-match (concat (match-string 1) "\\"
(match-string 2)) t t)))
((equal (match-string 2) "~")
(cond ((equal (match-string 1) "\\") nil)
((eq 'org-link (get-text-property 0 'face (match-string 2)))
(replace-match (concat (match-string 1) "\\~") t t))
(t (replace-match
(org-latex-protect
(concat (match-string 1) "\\~{}")) t t))))
((member (match-string 2) '("{" "}"))
(unless (save-match-data (org-inside-LaTeX-fragment-p))
(if (equal (match-string 1) "\\")
(replace-match (match-string 2) t t)
(replace-match (concat (match-string 1) "\\"
(match-string 2)) t t)))))
(if (equal (match-string 2) "\\$")
(replace-match (concat (match-string 1) "$"
(match-string 3)) t t)
(replace-match (concat (match-string 1) "\\$"
(match-string 3)) t t)))
((member (match-string 2) '("&" "%" "#"))
(if (equal (match-string 1) "\\")
(replace-match (match-string 2) t t)
(replace-match (concat (match-string 1) "\\"
(match-string 2)) t t)))
((equal (match-string 2) "~")
(cond ((equal (match-string 1) "\\") nil)
((eq 'org-link (get-text-property 0 'face (match-string 2)))
(replace-match (concat (match-string 1) "\\~") t t))
(t (replace-match
(org-export-latex-protect-string
(concat (match-string 1) "\\~{}")) t t))))
((member (match-string 2) '("{" "}"))
(unless (save-match-data (org-inside-LaTeX-fragment-p))
(if (equal (match-string 1) "\\")
(replace-match (match-string 2) t t)
(replace-match (concat (match-string 1) "\\"
(match-string 2)) t t)))))
(unless (save-match-data (org-inside-LaTeX-fragment-p))
(cond ((equal (match-string 2) "\\")
(replace-match (or (save-match-data
(org-export-latex-treat-backslash-char
(match-string 1)
(match-string 3))) "") t t))
((member (match-string 2) '("_" "^"))
(replace-match (or (save-match-data
(org-export-latex-treat-sub-super-char
sub-superscript
(match-string 1)
(match-string 2)
(match-string 3))) "") t t)))))))
(cond ((equal (match-string 2) "\\")
(replace-match (or (save-match-data
(org-export-latex-treat-backslash-char
(match-string 1)
(match-string 3))) "") t t))
((member (match-string 2) '("_" "^"))
(replace-match (or (save-match-data
(org-export-latex-treat-sub-super-char
sub-superscript
(match-string 1)
(match-string 2)
(match-string 3))) "") t t)))))))
'("^\\([^\n$]*?\\|^\\)\\(\\\\?\\$\\)\\([^\n$]*\\)$"
"\\([a-za-z0-9]+\\|[ \t\n]\\|\\b\\|\\\\\\)\\(_\\|\\^\\)\\([a-za-z0-9]+\\|[ \t\n]\\|[:punct:]\\|{[a-za-z0-9]+}\\|([a-za-z0-9]+)\\)"
"\\(.\\|^\\)\\(\\\\\\)\\([ \t\n]\\|[a-zA-Z&#%{}\"]+\\)"
@ -738,7 +786,10 @@ See the `org-export-latex.el' code for a complete conversion table."
"\\(.\\|^\\)\\(%\\)"
"\\(.\\|^\\)\\({\\)"
"\\(.\\|^\\)\\(}\\)"
"\\(.\\|^\\)\\(~\\)")))
"\\(.\\|^\\)\\(~\\)"
;; (?\< . "\\textless{}")
;; (?\> . "\\textgreater{}")
)))
(defun org-export-latex-treat-sub-super-char
(subsup string-before char string-after)
@ -765,9 +816,9 @@ Convert CHAR depending on STRING-BEFORE and STRING-AFTER."
(format "$%s%s{%s}$" string-before char
(match-string 1 string-after)))
(subsup (concat "$" string-before char string-after "$"))
(t (org-latex-protect
(t (org-export-latex-protect-string
(concat string-before "\\" char "{}" string-after)))))
(t (org-latex-protect
(t (org-export-latex-protect-string
(concat string-before "\\" char "{}" string-after)))))
(defun org-export-latex-treat-backslash-char (string-before string-after)
@ -781,17 +832,21 @@ The conversion is made depending of STRING-BEFORE and STRING-AFTER."
((and (not (string-match "^[ \n\t]" string-after))
(not (string-match "[ \t]\\'\\|^" string-before)))
;; backslash is inside a word
(concat string-before "$\\backslash$" string-after))
(org-export-latex-protect-string
(concat string-before "\\textbackslash{}" string-after)))
((not (or (equal string-after "")
(string-match "^[ \t\n]" string-after)))
;; backslash might escape a character (like \#) or a user TeX
;; macro (like \setcounter)
(concat string-before "\\" string-after))
(org-export-latex-protect-string
(concat string-before "\\" string-after)))
((and (string-match "^[ \t\n]" string-after)
(string-match "[ \t\n]\\'" string-before))
;; backslash is alone, convert it to $\backslash$
(concat string-before "$\\backslash$" string-after))
(t (concat string-before "$\\backslash$" string-after))))
(org-export-latex-protect-string
(concat string-before "\\textbackslash{}" string-after)))
(t (org-export-latex-protect-string
(concat string-before "\\textbackslash{}" string-after)))))
(defun org-export-latex-keywords (timestamps)
"Convert special keywords to LaTeX.
@ -807,6 +862,7 @@ Regexps are those from `org-latex-special-string-regexps'."
(defun org-export-latex-fixed-width (opt)
"When OPT is non-nil convert fixed-width sections to LaTeX."
(goto-char (point-min))
;; FIXME the search shouldn't be performed on already converted text
(while (re-search-forward "^[ \t]*:" nil t)
(if opt
(progn (goto-char (match-beginning 0))
@ -822,7 +878,6 @@ Regexps are those from `org-latex-special-string-regexps'."
(match-string 2)) t t)
(forward-line))))))
;; FIXME Use org-export-highlight-first-table-line ?
(defun org-export-latex-lists ()
"Convert lists to LaTeX."
(goto-char (point-min))
@ -889,35 +944,68 @@ Valid parameters are
;; Add a trailing \n after list conversion
"\n"))
(defun org-export-latex-tables (opt)
"When OPT is non-nil convert tables to LaTeX."
;; FIXME Use org-export-highlight-first-table-line ?
(defun org-export-latex-tables (insert)
"Convert tables to LaTeX and INSERT it."
(goto-char (point-min))
(while (re-search-forward "^\\([ \t]*\\)|" nil t)
;; Re-align the table to update org-table-last-alignment
(save-excursion (save-match-data (org-table-align)))
(let (tbl-list
(beg (match-beginning 0))
(end (save-excursion
(re-search-forward
(concat "^" (regexp-quote (match-string 1))
"[^|]\\|\\'") nil t) (match-beginning 0))))
(beginning-of-line)
;; FIXME really need to save-excursion?
(save-excursion (org-table-align))
(let* ((beg (org-table-begin))
(end (org-table-end))
(raw-table (buffer-substring-no-properties beg end))
fnum line lines olines gr colgropen line-fmt alignment)
(if org-export-latex-tables-verbatim
(let* ((raw-table (buffer-substring beg end))
(tbl (concat "\\begin{verbatim}\n" raw-table
(let* ((tbl (concat "\\begin{verbatim}\n" raw-table
"\\end{verbatim}\n")))
(apply 'delete-region (list beg end))
(insert tbl))
(progn
(while (not (eq end (point)))
(if (looking-at "[ \t]*|\\([^-|].+\\)|[ \t]*$")
(push (split-string (org-trim (match-string 1)) "|") tbl-list)
(push 'hline tbl-list))
(forward-line))
;; comment region out instead of deleting it ?
(progn
(setq lines (split-string raw-table "\n" t))
(apply 'delete-region (list beg end))
(when opt (insert (orgtbl-to-latex (nreverse tbl-list)
nil) "\n\n")))))))
(when org-export-table-remove-special-lines
(setq lines (org-table-clean-before-export lines)))
;; make a formatting string to reflect aligment
(setq olines lines)
(while (and (not line-fmt) (setq line (pop olines)))
(unless (string-match "^[ \t]*|-" line)
(setq fields (org-split-string line "[ \t]*|[ \t]*"))
(setq fnum (make-vector (length fields) 0))
(setq line-fmt
(mapconcat
(lambda (x)
(setq gr (pop org-table-colgroup-info))
(format "%s%%s%s"
(cond ((eq gr ':start)
(prog1 (if colgropen "|" "")
(setq colgropen t)))
((eq gr ':startend)
(prog1 (if colgropen "|" "|")
(setq colgropen nil)))
(t ""))
(if (memq gr '(:end :startend))
(progn (setq colgropen nil) "|")
"")))
fnum ""))))
;; maybe remove the first and last "|"
(when (string-match "^\\(|\\)?\\(.+\\)|$" line-fmt)
(setq line-fmt (match-string 2 line-fmt)))
;; format alignment
(setq align (apply 'format
(cons line-fmt
(mapcar (lambda (x) (if x "r" "l"))
org-table-last-alignment))))
;; prepare the table to send to orgtbl-to-latex
(setq lines
(mapcar
(lambda(elem)
(or (and (string-match "[ \t]*|-+" elem) 'hline)
(split-string (org-trim elem) "|" t)))
lines))
(when insert
(insert (orgtbl-to-latex
lines `(:tstart ,(concat "\\begin{tabular}{" align "}")))
"\n\n")))))))
(defun org-export-latex-fontify ()
"Convert fontification to LaTeX."
@ -933,7 +1021,8 @@ Valid parameters are
'("\\" "{" "}") (cadr emph))
(match-string 4))
(match-string 5)))
(if (caddr emph) (setq rpl (org-latex-protect rpl)))
(if (caddr emph)
(setq rpl (org-export-latex-protect-string rpl)))
(replace-match rpl t t)))
(backward-char)))
@ -999,13 +1088,13 @@ Valid parameters are
(goto-char (point-min))
(let ((case-fold-search nil) rpl)
(while (re-search-forward "\\([^+_]\\)LaTeX" nil t)
(replace-match (org-latex-protect
(replace-match (org-export-latex-protect-string
(concat (match-string 1) "\\LaTeX{}")) t t)))
;; Convert horizontal rules
(goto-char (point-min))
(while (re-search-forward "^----+.$" nil t)
(replace-match (org-latex-protect "\\hrule") t t))
(replace-match (org-export-latex-protect-string "\\hrule") t t))
;; Protect LaTeX \commands{...}
(goto-char (point-min))
@ -1019,7 +1108,7 @@ Valid parameters are
(concat "<<<?" org-latex-all-targets-regexp
">>>?\\((INVISIBLE)\\)?") nil t)
(replace-match
(org-latex-protect
(org-export-latex-protect-string
(format "\\label{%s}%s"(match-string 1)
(if (match-string 2) "" (match-string 1)))) t t))

View File

@ -4,7 +4,7 @@
;;
;; Author: Piotr Zielinski <piotr dot zielinski at gmail dot com>
;; Maintainer: Carsten Dominik <carsten at orgmode dot org>
;; Version: 5.10
;; Version: 5.11
;;
;; This file is part of GNU Emacs.
;;

View File

@ -4,7 +4,7 @@
;; Author: David O'Toole <dto@gnu.org>
;; Keywords: hypermedia, outlines
;; Version: 1.80
;; Version: 1.80a
;; This file is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by

983
org.el

File diff suppressed because it is too large Load Diff

BIN
org.pdf

Binary file not shown.

106
org.texi
View File

@ -3,8 +3,8 @@
@setfilename ../info/org
@settitle Org Mode Manual
@set VERSION 5.10
@set DATE September 2007
@set VERSION 5.11
@set DATE October 2007
@dircategory Emacs
@direntry
@ -2316,20 +2316,21 @@ Insert a link. This prompts for a link to be inserted into the buffer.
You can just type a link, using text for an internal link, or one of the
link type prefixes mentioned in the examples above. All links stored
during the current session are part of the history for this prompt, so
you can access them with @key{up} and @key{down}. Completion, on the
other hand, will help you to insert valid link prefixes like
@samp{http:} or @samp{ftp:}, including the prefixes defined through link
abbreviations (@pxref{Link abbreviations}). The link will be inserted
into the buffer@footnote{After insertion of a stored link, the link will
be removed from the list of stored links. To keep it in the list later
use, use a triple @kbd{C-u} prefix to @kbd{C-c C-l}, or configure the
option @code{org-keep-stored-link-after-insertion}.}, along with a
descriptive text. If some text was selected when this command is
called, the selected text becomes the default description.@* Note that
you don't have to use this command to insert a link. Links in Org-mode
are plain text, and you can type or paste them straight into the buffer.
By using this command, the links are automatically enclosed in double
brackets, and you will be asked for the optional descriptive text.
you can access them with @key{up} and @key{down} (or @kbd{M-p/n}).
Completion, on the other hand, will help you to insert valid link
prefixes like @samp{http:} or @samp{ftp:}, including the prefixes
defined through link abbreviations (@pxref{Link abbreviations}). The
link will be inserted into the buffer@footnote{After insertion of a
stored link, the link will be removed from the list of stored links. To
keep it in the list later use, use a triple @kbd{C-u} prefix to @kbd{C-c
C-l}, or configure the option
@code{org-keep-stored-link-after-insertion}.}, along with a descriptive
text. If some text was selected when this command is called, the
selected text becomes the default description.@* Note that you don't
have to use this command to insert a link. Links in Org-mode are plain
text, and you can type or paste them straight into the buffer. By using
this command, the links are automatically enclosed in double brackets,
and you will be asked for the optional descriptive text.
@c
@c If the link is a @samp{file:} link and
@c the linked file is located in the same directory as the current file or
@ -2855,6 +2856,7 @@ special faces for some of them. This can be done using the variable
("CANCELED" . (:foreground "blue" :weight bold))))
@end lisp
@page
@node Progress logging, Priorities, TODO extensions, TODO items
@section Progress Logging
@cindex progress logging
@ -2874,7 +2876,9 @@ a TODO item.
If you want to keep track of @emph{when} a certain TODO item was
finished, turn on logging with@footnote{The corresponding in-buffer
setting is: @code{#+STARTUP: logdone}}
setting is: @code{#+STARTUP: logdone}. You may also set this for the
scope of a subtree by adding a @code{LOGGING} property with one or more
of the logging keywords in the value.}
@lisp
(setq org-log-done t)
@ -2901,7 +2905,8 @@ setting is: @code{#+STARTUP: lognotedone}}
When TODO keywords are used as workflow states (@pxref{Workflow
states}), you might want to keep track of when a state change occurred
and record a note about this change. With the setting
and record a note about this change. With the setting@footnote{The
corresponding in-buffer setting is: @code{#+STARTUP: lognotestate}.}
@lisp
(setq org-log-done '(state))
@ -3421,6 +3426,9 @@ Switch property at point to the next/previous allowed value.
Remove a property from the current entry.
@item C-c C-c D
Globally remove a property, from all entries in the current file.
@item C-c C-c c
Compute the property at point, using the operator and scope from the
nearest column format definition.
@end table
@node Special properties, Property searches, Property syntax, Properties and columns
@ -3987,7 +3995,8 @@ an item:
@kindex C-c C-d
@item C-c C-d
Insert @samp{DEADLINE} keyword along with a stamp. The insertion will
happen in the line directly following the headline.
happen in the line directly following the headline. When called with a
prefix arg, an existing deadline will be removed from the entry.
@c FIXME Any CLOSED timestamp will be removed.????????
@c
@kindex C-c C-w
@ -4003,7 +4012,8 @@ all deadlines due tomorrow.
@item C-c C-s
Insert @samp{SCHEDULED} keyword along with a stamp. The insertion will
happen in the line directly following the headline. Any CLOSED
timestamp will be removed.
timestamp will be removed. When called with a prefix argument, remove
the scheduling date from the entry.
@end table
@node Repeated tasks, , Inserting deadline/schedule, Deadlines and scheduling
@ -4034,9 +4044,11 @@ actually switch the date like this:
DEADLINE: <2005-11-01 Tue +1m>
@end example
You will also be prompted for a note that will be put under the DEADLINE
line to keep a record that you actually acted on the previous instance
of this deadline.
You will also be prompted for a note@footnote{You can change this using
the option @code{org-log-repeat}, or the @code{#+STARTUP} options
@code{logrepeat} and @code{nologrepeat}.} that will be put under the
DEADLINE line to keep a record that you actually acted on the previous
instance of this deadline.
As a consequence of shifting the base date, this entry will no longer be
visible in the agenda when checking past dates, but all future instances
@ -4058,7 +4070,10 @@ also computes the total time spent on each subtree of a project.
@kindex C-c C-x C-i
@item C-c C-x C-i
Start the clock on the current item (clock-in). This inserts the CLOCK
keyword together with a timestamp.
keyword together with a timestamp. If this is not the first clocking of
this item, the multiple CLOCK lines will be wrapped into a
@code{:CLOCK:} drawer (see also the variable
@code{org-clock-into-drawer}.
@kindex C-c C-x C-o
@item C-c C-x C-o
Stop the clock (clock-out). The inserts another timestamp at the same
@ -4081,6 +4096,10 @@ if it is running in this same item.
@item C-c C-x C-x
Cancel the current clock. This is useful if a clock was started by
mistake, or if you ended up working on something else.
@kindex C-c C-x C-j
@item C-c C-x C-j
Jump to the entry that contains the currently running clock, an another
window.
@kindex C-c C-x C-d
@item C-c C-x C-d
Display time summaries for each subtree in the current buffer. This
@ -4094,13 +4113,13 @@ when you change the buffer (see variable
Insert a dynamic block (@pxref{Dynamic blocks}) containing a clock
report as an org-mode table into the current file.
@example
#+BEGIN: clocktable :maxlevel 2 :emphasize nil
#+BEGIN: clocktable :maxlevel 2 :emphasize nil :scope file
#+END: clocktable
@end example
@noindent
If such a block already exists, its content is replaced by the new
table. The @samp{BEGIN} line can specify options:
If such a block already exists at point, its content is replaced by the
new table. The @samp{BEGIN} line can specify options:
@example
:maxlevel @r{Maximum level depth to which times are listed in the table.}
:emphasize @r{When @code{t}, emphasize level one and level two items}
@ -4552,6 +4571,18 @@ will be made in the agenda:
%%(diary-anniversary 2 10 1869) Mahatma Gandhi would be %d years old
@end example
@subsubheading Appointment reminders
@cindex @file{appt.el}
@cindex appointment reminders
Org can interact with Emacs appointments notification facility.
To add all the appointments of your agenda files, use the command
@code{org-agenda-to-appt}. This commands also lets you filter through
the list of your appointments and add only those belonging to a specific
category or matching a regular expression. See the docstring for
details.
@node Global TODO list, Matching tags and properties, Weekly/Daily agenda, Built-in agenda views
@subsection The global TODO list
@cindex global TODO list
@ -4843,10 +4874,10 @@ the other commands, the cursor needs to be in the desired line.
@cindex motion commands in agenda
@kindex n
@item n
Next line (same as @key{up}).
Next line (same as @key{up} and @kbd{C-p}).
@kindex p
@item p
Previous line (same as @key{down}).
Previous line (same as @key{down} and @kbd{C-n}).
@tsubheading{View/GoTo org file}
@kindex mouse-3
@kindex @key{SPC}
@ -4925,7 +4956,9 @@ argument is interpreted to create a selective list for a specific TODO
keyword.
@c
@kindex s
@kindex C-x C-s
@item s
@itemx C-x C-s
Save all Org-mode buffers in the current Emacs session.
@c
@kindex @key{right}
@ -5050,6 +5083,10 @@ Stop the previously started clock.
@item X
Cancel the currently running clock.
@kindex J
@item J
Jump to the running clock in another window.
@tsubheading{Calendar commands}
@cindex calendar commands, from agenda
@kindex c
@ -6104,6 +6141,11 @@ Create a single large iCalendar file from all files in
@code{org-combined-agenda-icalendar-file}.
@end table
The export will honor SUMMARY, DESCRIPTION and LOCATION properties if
the selected entries have them. If not, the summary will be derived
from the headline, and the description from the body (limited to
@code{org-icalendar-include-body} characters).
How this calendar is best read and updated, depends on the application
you are using. The FAQ covers this issue.
@ -6843,8 +6885,9 @@ variable is @code{org-startup-align-all-tables}, with a default value
align @r{align all tables}
noalign @r{don't align tables on startup}
@end example
Logging TODO state changes and clock intervals (variable
@code{org-log-done}) can be configured using these options.
Logging TODO state changes and clock intervals (variables
@code{org-log-done} and @code{org-log-repeat}) can be configured using
these options.
@cindex @code{logdone}, STARTUP keyword
@cindex @code{nologging}, STARTUP keyword
@cindex @code{lognotedone}, STARTUP keyword
@ -7948,7 +7991,6 @@ around a match in a hidden outline tree.
@item
@i{Bastien Guerry} wrote the La@TeX{} exporter and has been prolific
with patches, ideas, and bug reports.
to Org-mode.
@item
@i{Kai Grossjohann} pointed out key-binding conflicts with other packages.
@item

Binary file not shown.

View File

@ -1,5 +1,5 @@
% Reference Card for Org Mode
\def\orgversionnumber{5.10}
\def\orgversionnumber{5.11}
\def\versionyear{2007} % latest update
\def\year{2007} % latest copyright year
@ -664,9 +664,8 @@ after ``{\tt :}'', and dictionary words elsewhere.
\key{insert new entry into diary}{i}
\newcolumn
\key{start the clock on current item (clock-in)}{I}
\key{stop the clock (clock-out)}{O}
\key{cancel current clock}{X}
\key{start/stop/cancel the clock on current item}{I / O / X}
\key{jump to running clock entry}{J}
{\bf Misc}

Binary file not shown.