comparison lisp/textmodes/org.el @ 70953:971aad463b69

(org-next-item, org-previous-item): Emit more compact error message. (org-tags-view): Refresh category table in each file. (org-table-justify-field-maybe): Removed superfluous arguments to `format'. (org-export-as-html): Insert "<p>" before postamble. (org-paste-subtree, org-kill-is-subtree-p): Check for empty kill ring.
author Carsten Dominik <dominik@science.uva.nl>
date Fri, 26 May 2006 05:37:59 +0000
parents 7d0efe895341
children d26859871d39
comparison
equal deleted inserted replaced
70952:a887dafc4dd1 70953:971aad463b69
3 ;; Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc. 3 ;; Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
4 ;; 4 ;;
5 ;; Author: Carsten Dominik <dominik at science dot uva dot nl> 5 ;; Author: Carsten Dominik <dominik at science dot uva dot nl>
6 ;; Keywords: outlines, hypermedia, calendar, wp 6 ;; Keywords: outlines, hypermedia, calendar, wp
7 ;; Homepage: http://www.astro.uva.nl/~dominik/Tools/org/ 7 ;; Homepage: http://www.astro.uva.nl/~dominik/Tools/org/
8 ;; Version: 4.33 8 ;; Version: 4.34
9 ;; 9 ;;
10 ;; This file is part of GNU Emacs. 10 ;; This file is part of GNU Emacs.
11 ;; 11 ;;
12 ;; GNU Emacs is free software; you can redistribute it and/or modify 12 ;; GNU Emacs is free software; you can redistribute it and/or modify
13 ;; it under the terms of the GNU General Public License as published by 13 ;; it under the terms of the GNU General Public License as published by
28 ;;; Commentary: 28 ;;; Commentary:
29 ;; 29 ;;
30 ;; Org-mode is a mode for keeping notes, maintaining ToDo lists, and doing 30 ;; Org-mode is a mode for keeping notes, maintaining ToDo lists, and doing
31 ;; project planning with a fast and effective plain-text system. 31 ;; project planning with a fast and effective plain-text system.
32 ;; 32 ;;
33 ;; Org-mode develops organizational tasks around a NOTES file that contains 33 ;; Org-mode develops organizational tasks around NOTES files that contain
34 ;; information about projects as plain text. Org-mode is implemented on top 34 ;; information about projects as plain text. Org-mode is implemented on
35 ;; of outline-mode - ideal to keep the content of large files well structured. 35 ;; top of outline-mode, which makes it possible to keep the content of
36 ;; It supports ToDo items, deadlines and time stamps, which can be extracted 36 ;; large files well structured. Visibility cycling and structure editing
37 ;; to create a daily/weekly agenda that also integrates the diary of the Emacs 37 ;; help to work with the tree. Tables are easily created with a built-in
38 ;; calendar. Tables are easily created with a built-in table editor. Plain 38 ;; table editor. Org-mode supports ToDo items, deadlines, time stamps,
39 ;; text URL-like links connect to websites, emails (VM, RMAIL, WANDERLUST), 39 ;; and scheduling. It dynamically compiles entries into an agenda that
40 ;; Usenet messages (Gnus), BBDB entries, and any files related to the 40 ;; utilizes and smoothly integrates much of the Emacs calendar and diary.
41 ;; projects. For printing and sharing of notes, an Org-mode file (or a part 41 ;; Plain text URL-like links connect to websites, emails, Usenet
42 ;; of it) can be exported as a structured ASCII file, or as HTML. 42 ;; messages, BBDB entries, and any files related to the projects. For
43 ;; printing and sharing of notes, an Org-mode file can be exported as a
44 ;; structured ASCII file, as HTML, or (todo and agenda items only) as an
45 ;; iCalendar file. It can also serve as a publishing tool for a set of
46 ;; linked webpages.
47 ;;
43 ;; 48 ;;
44 ;; Installation 49 ;; Installation
45 ;; ------------ 50 ;; ------------
46 ;; If Org-mode is part of the Emacs distribution or an XEmacs package, you 51 ;; If Org-mode is part of the Emacs distribution or an XEmacs package, you
47 ;; only need to copy the following lines to your .emacs file. The last two 52 ;; only need to copy the following lines to your .emacs file. The last two
62 ;; action: Byte-compile org.el and org-publish.el and put them together with 67 ;; action: Byte-compile org.el and org-publish.el and put them together with
63 ;; org-install.el on your load path. Then also add to your .emacs file: 68 ;; org-install.el on your load path. Then also add to your .emacs file:
64 ;; 69 ;;
65 ;; (require 'org-install) 70 ;; (require 'org-install)
66 ;; 71 ;;
67 ;; This setup will put all files with extension ".org" into Org-mode. As 72 ;;
68 ;; an alternative, make the first line of a file look like this: 73 ;; Activation
74 ;; ----------
75 ;; The setup above will put all files with extension ".org" into Org-mode.
76 ;; As an alternative, make the first line of a file look like this:
69 ;; 77 ;;
70 ;; MY PROJECTS -*- mode: org; -*- 78 ;; MY PROJECTS -*- mode: org; -*-
71 ;; 79 ;;
72 ;; which will select Org-mode for this buffer no matter what the file's 80 ;; which will select Org-mode for this buffer no matter what the file's
73 ;; name is. 81 ;; name is.
78 ;; distribution also contains a PDF version of it. At the homepage of 86 ;; distribution also contains a PDF version of it. At the homepage of
79 ;; Org-mode, you can read the same text online as HTML. There is also an 87 ;; Org-mode, you can read the same text online as HTML. There is also an
80 ;; excellent reference card made by Philip Rooke. This card can be found 88 ;; excellent reference card made by Philip Rooke. This card can be found
81 ;; in the etc/ directory of Emacs 22. 89 ;; in the etc/ directory of Emacs 22.
82 ;; 90 ;;
83 ;; Changes since version 4.10: 91 ;; Recent changes
84 ;; --------------------------- 92 ;; --------------
93 ;; Version 4.34
94 ;; - Bug fixes.
95 ;;
85 ;; Version 4.33 96 ;; Version 4.33
86 ;; - New commands to move through plain lists: S-up and S-down. 97 ;; - New commands to move through plain lists: S-up and S-down.
87 ;; - Bug fixes and documentation update. 98 ;; - Bug fixes and documentation update.
88 ;; 99 ;;
89 ;; Version 4.32 100 ;; Version 4.32
131 ;; - Support for customizable file search in file links. 142 ;; - Support for customizable file search in file links.
132 ;; - BibTeX database links as first application of the above. 143 ;; - BibTeX database links as first application of the above.
133 ;; - New option `org-agenda-todo-list-sublevels' to turn off listing TODO 144 ;; - New option `org-agenda-todo-list-sublevels' to turn off listing TODO
134 ;; entries that are sublevels of another TODO entry. 145 ;; entries that are sublevels of another TODO entry.
135 ;; 146 ;;
136 ;; Version 4.26
137 ;; - Bug fixes.
138 ;;
139 ;; Version 4.25
140 ;; - Revision of the font-lock faces section, with better tty support.
141 ;; - TODO keywords in Agenda buffer are fontified.
142 ;; - Export converts links between .org files to links between .html files.
143 ;; - Better support for bold/italic/underline emphasis.
144 ;;
145 ;; Version 4.24
146 ;; - Bug fixes.
147 ;;
148 ;; Version 4.23
149 ;; - Bug fixes.
150 ;;
151 ;; Version 4.22
152 ;; - Bug fixes.
153 ;; - In agenda buffer, mouse-1 no longer follows link.
154 ;; See `org-agenda-mouse-1-follows-link' and `org-mouse-1-follows-link'.
155 ;;
156 ;; Version 4.20
157 ;; - Links use now the [[link][description]] format by default.
158 ;; When inserting links, the user is prompted for a description.
159 ;; - If a link has a description, only the description is displayed
160 ;; the link part is hidden. Use C-c C-l to edit the link part.
161 ;; - TAGS are now bold, but in the same color as the headline.
162 ;; - The width of a table column can be limited by using a field "<N>".
163 ;; - New structure for the customization tree.
164 ;; - Bug fixes.
165 ;;
166 ;; Version 4.13
167 ;; - The list of agenda files can be maintainted in an external file.
168 ;; - Bug fixes.
169 ;;
170 ;; Version 4.12
171 ;; - Templates for remember buffer. Note that the remember setup changes.
172 ;; To set up templates, see `org-remember-templates'.
173 ;; - The time in new time stamps can be rounded, see new option
174 ;; `org-time-stamp-rounding-minutes'.
175 ;; - Bug fixes (there are *always* more bugs).
176 ;; 147 ;;
177 ;;; Code: 148 ;;; Code:
178 149
179 (eval-when-compile 150 (eval-when-compile
180 (require 'cl) 151 (require 'cl)
181 (require 'calendar)) 152 (require 'calendar))
182 (require 'outline) 153 (require 'outline)
183 (require 'time-date) 154 (require 'time-date)
184 (require 'easymenu) 155 (require 'easymenu)
185 156
186 (defvar calc-embedded-close-formula) ; defined by the calc package
187 (defvar calc-embedded-open-formula) ; defined by the calc package
188 (defvar font-lock-unfontify-region-function) ; defined by font-lock.el
189
190 ;;; Customization variables 157 ;;; Customization variables
191 158
192 (defvar org-version "4.33" 159 (defvar org-version "4.34"
193 "The version number of the file org.el.") 160 "The version number of the file org.el.")
194 (defun org-version () 161 (defun org-version ()
195 (interactive) 162 (interactive)
196 (message "Org-mode version %s" org-version)) 163 (message "Org-mode version %s" org-version))
197 164
2546 (concat "\\<" org-closed-string " *\\[\\([^]]+\\)\\]") 2513 (concat "\\<" org-closed-string " *\\[\\([^]]+\\)\\]")
2547 org-keyword-time-regexp 2514 org-keyword-time-regexp
2548 (concat "\\<\\(" org-scheduled-string 2515 (concat "\\<\\(" org-scheduled-string
2549 "\\|" org-deadline-string 2516 "\\|" org-deadline-string
2550 "\\|" org-closed-string "\\)" 2517 "\\|" org-closed-string "\\)"
2551 " *[[<]\\([^]>]+\\)[]>]") ;; FIXME: is this correct? 2518 " *[[<]\\([^]>]+\\)[]>]")
2552 org-maybe-keyword-time-regexp 2519 org-maybe-keyword-time-regexp
2553 (concat "\\(\\<\\(" org-scheduled-string 2520 (concat "\\(\\<\\(" org-scheduled-string
2554 "\\|" org-deadline-string 2521 "\\|" org-deadline-string
2555 "\\|" org-closed-string "\\)\\)?" 2522 "\\|" org-closed-string "\\)\\)?"
2556 " *\\([[<][0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\}[^]\r\n>]*?[]>]\\)")) ;; FIXME: is this correct? 2523 " *\\([[<][0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\}[^]\r\n>]*?[]>]\\)"))
2557 2524
2558 (org-set-font-lock-defaults))) 2525 (org-set-font-lock-defaults)))
2559 2526
2560 ;; Tell the compiler about dynamically scoped variables, 2527 ;; Tell the compiler about dynamically scoped variables,
2561 ;; and variables from other packages 2528 ;; and variables from other packages
2529 (defvar calc-embedded-close-formula) ; defined by the calc package
2530 (defvar calc-embedded-open-formula) ; defined by the calc package
2531 (defvar font-lock-unfontify-region-function) ; defined by font-lock.el
2562 (defvar zmacs-regions) ; XEmacs regions 2532 (defvar zmacs-regions) ; XEmacs regions
2563 (defvar original-date) ; dynamically scoped in calendar 2533 (defvar original-date) ; dynamically scoped in calendar
2564 (defvar org-old-auto-fill-inhibit-regexp) ; local variable used by `orgtbl-mode' 2534 (defvar org-old-auto-fill-inhibit-regexp) ; local variable used by `orgtbl-mode'
2565 (defvar orgtbl-mode-menu) ; defined when orgtbl mode get initialized 2535 (defvar orgtbl-mode-menu) ; defined when orgtbl mode get initialized
2566 (defvar org-html-entities) ; defined later in this file 2536 (defvar org-html-entities) ; defined later in this file
3732 (interactive "P") 3702 (interactive "P")
3733 (unless (org-kill-is-subtree-p tree) 3703 (unless (org-kill-is-subtree-p tree)
3734 (error 3704 (error
3735 (substitute-command-keys 3705 (substitute-command-keys
3736 "The kill is not a (set of) tree(s) - please use \\[yank] to yank anyway"))) 3706 "The kill is not a (set of) tree(s) - please use \\[yank] to yank anyway")))
3737 (let* ((txt (or tree (current-kill 0))) 3707 (let* ((txt (or tree (and kill-ring (current-kill 0))))
3738 (^re (concat "^\\(" outline-regexp "\\)")) 3708 (^re (concat "^\\(" outline-regexp "\\)"))
3739 (re (concat "\\(" outline-regexp "\\)")) 3709 (re (concat "\\(" outline-regexp "\\)"))
3740 (^re_ (concat "\\(" outline-regexp "\\)[ \t]*")) 3710 (^re_ (concat "\\(" outline-regexp "\\)[ \t]*"))
3741 3711
3742 (old-level (if (string-match ^re txt) 3712 (old-level (if (string-match ^re txt)
3795 (org-map-region func (point-min) (point-max)) 3765 (org-map-region func (point-min) (point-max))
3796 (setq shift (+ delta shift))) 3766 (setq shift (+ delta shift)))
3797 (goto-char (point-min)) 3767 (goto-char (point-min))
3798 (message "Pasted at level %d, with shift by %d levels" 3768 (message "Pasted at level %d, with shift by %d levels"
3799 new-level shift1))) 3769 new-level shift1)))
3800 (if (and (eq org-subtree-clip (current-kill 0)) 3770 (if (and kill-ring
3771 (eq org-subtree-clip (current-kill 0))
3801 org-subtree-clip-folded) 3772 org-subtree-clip-folded)
3802 ;; The tree was folded before it was killed/copied 3773 ;; The tree was folded before it was killed/copied
3803 (hide-subtree)))) 3774 (hide-subtree))))
3804 3775
3805 (defun org-kill-is-subtree-p (&optional txt) 3776 (defun org-kill-is-subtree-p (&optional txt)
3807 Returns nil if kill does not start with a headline, or if the first 3778 Returns nil if kill does not start with a headline, or if the first
3808 headline level is not the largest headline level in the tree. 3779 headline level is not the largest headline level in the tree.
3809 So this will actually accept several entries of equal levels as well, 3780 So this will actually accept several entries of equal levels as well,
3810 which is OK for `org-paste-subtree'. 3781 which is OK for `org-paste-subtree'.
3811 If optional TXT is given, check this string instead of the current kill." 3782 If optional TXT is given, check this string instead of the current kill."
3812 (let* ((kill (or txt (current-kill 0) "")) 3783 (let* ((kill (or txt (and kill-ring (current-kill 0)) ""))
3813 (start-level (and (string-match (concat "\\`" outline-regexp) kill) 3784 (start-level (and kill
3785 (string-match (concat "\\`" outline-regexp) kill)
3814 (- (match-end 0) (match-beginning 0)))) 3786 (- (match-end 0) (match-beginning 0))))
3815 (re (concat "^" outline-regexp)) 3787 (re (concat "^" outline-regexp))
3816 (start 1)) 3788 (start 1))
3817 (if (not start-level) 3789 (if (not start-level)
3818 nil ;; does not even start with a heading 3790 nil ;; does not even start with a heading
3918 (org-end-of-item) 3890 (org-end-of-item)
3919 (setq end (point)) 3891 (setq end (point))
3920 (setq ind1 (org-get-indentation)) 3892 (setq ind1 (org-get-indentation))
3921 (unless (and (org-at-item-p) (= ind ind1)) 3893 (unless (and (org-at-item-p) (= ind ind1))
3922 (goto-char pos) 3894 (goto-char pos)
3923 (error "This is already the last item in the list")))) 3895 (error "On last item"))))
3924 3896
3925 (defun org-previous-item () 3897 (defun org-previous-item ()
3926 "Move to the beginning of the previous item in the current plain list. 3898 "Move to the beginning of the previous item in the current plain list.
3927 Error if not at a plain list, or if this is the last item in the list." 3899 Error if not at a plain list, or if this is the last item in the list."
3928 (interactive) 3900 (interactive)
3939 (if (<= (setq ind1 (org-get-indentation)) ind) 3911 (if (<= (setq ind1 (org-get-indentation)) ind)
3940 (throw 'exit t))))) 3912 (throw 'exit t)))))
3941 (condition-case nil 3913 (condition-case nil
3942 (org-beginning-of-item) 3914 (org-beginning-of-item)
3943 (error (goto-char pos) 3915 (error (goto-char pos)
3944 (error "This is already the first item in the list"))))) 3916 (error "On first item")))))
3945 3917
3946 (defun org-move-item-down () 3918 (defun org-move-item-down ()
3947 "Move the plain list item at point down, i.e. swap with following item. 3919 "Move the plain list item at point down, i.e. swap with following item.
3948 Subitems (items with larger indentation) are considered part of the item, 3920 Subitems (items with larger indentation) are considered part of the item,
3949 so this really moves item trees." 3921 so this really moves item trees."
6432 1))) 6404 1)))
6433 (org-add-props txt props 6405 (org-add-props txt props
6434 'org-marker marker 'org-hd-marker marker 6406 'org-marker marker 'org-hd-marker marker
6435 'priority priority 'category category) 6407 'priority priority 'category category)
6436 (push txt ee) 6408 (push txt ee)
6437 (if org-agenda-todo-list-sublevels ; FIXME???? Change needed? 6409 (if org-agenda-todo-list-sublevels
6438 (goto-char (match-end 1)) 6410 (goto-char (match-end 1))
6439 (org-end-of-subtree 'invisible)))) 6411 (org-end-of-subtree 'invisible))))
6440 (nreverse ee))) 6412 (nreverse ee)))
6441 6413
6442 (defconst org-agenda-no-heading-message 6414 (defconst org-agenda-no-heading-message
6791 (setq txt (replace-match "" nil nil txt)))) 6763 (setq txt (replace-match "" nil nil txt))))
6792 ;; Normalize the time(s) to 24 hour 6764 ;; Normalize the time(s) to 24 hour
6793 (if s1 (setq s1 (org-get-time-of-day s1 'string))) 6765 (if s1 (setq s1 (org-get-time-of-day s1 'string)))
6794 (if s2 (setq s2 (org-get-time-of-day s2 'string)))) 6766 (if s2 (setq s2 (org-get-time-of-day s2 'string))))
6795 6767
6796 ; (when (and (or (eq org-agenda-remove-tags-when-in-prefix t)
6797 ; (and org-agenda-remove-tags-when-in-prefix
6798 ; org-prefix-has-tag))
6799 ; (string-match ":[a-zA-Z_@0-9:]+:[ \t]*$" txt))
6800 ; (setq txt (replace-match "" t t txt)))
6801
6802 ;; FIXME!!!
6803 (when (string-match "\\([ \t]+\\)\\(:[a-zA-Z_@0-9:]+:\\)[ \t]*$" txt) 6768 (when (string-match "\\([ \t]+\\)\\(:[a-zA-Z_@0-9:]+:\\)[ \t]*$" txt)
6804 ;; Tags are in the string 6769 ;; Tags are in the string
6805 (if (or (eq org-agenda-remove-tags-when-in-prefix t) 6770 (if (or (eq org-agenda-remove-tags-when-in-prefix t)
6806 (and org-agenda-remove-tags-when-in-prefix 6771 (and org-agenda-remove-tags-when-in-prefix
6807 org-prefix-has-tag)) 6772 org-prefix-has-tag))
7594 (format "ORG-AGENDA-ERROR: No such org-file %s" file)) 7559 (format "ORG-AGENDA-ERROR: No such org-file %s" file))
7595 rtnall (append rtnall rtn)) 7560 rtnall (append rtnall rtn))
7596 (with-current-buffer buffer 7561 (with-current-buffer buffer
7597 (unless (eq major-mode 'org-mode) 7562 (unless (eq major-mode 'org-mode)
7598 (error "Agenda file %s is not in `org-mode'" file)) 7563 (error "Agenda file %s is not in `org-mode'" file))
7564 (setq org-category-table (org-get-category-table))
7599 (save-excursion 7565 (save-excursion
7600 (save-restriction 7566 (save-restriction
7601 (if org-respect-restriction 7567 (if org-respect-restriction
7602 (if (org-region-active-p) 7568 (if (org-region-active-p)
7603 ;; Respect a region to restrict search 7569 ;; Respect a region to restrict search
8114 (org-search-not-link re2a nil t) 8080 (org-search-not-link re2a nil t)
8115 (org-search-not-link re3 nil t) 8081 (org-search-not-link re3 nil t)
8116 (org-search-not-link re4 nil t) 8082 (org-search-not-link re4 nil t)
8117 (org-search-not-link re5 nil t) 8083 (org-search-not-link re5 nil t)
8118 ) 8084 )
8119 (goto-char (match-beginning 1)) ;; Fixme: does every re have group 1? 8085 (goto-char (match-beginning 1))
8120 (goto-char pos) 8086 (goto-char pos)
8121 (error "No match"))))) 8087 (error "No match")))))
8122 (t 8088 (t
8123 ;; Normal string-search 8089 ;; Normal string-search
8124 (goto-char (point-min)) 8090 (goto-char (point-min))
9660 (setq f (format (if num " %%%ds %s" " %%-%ds %s") 9626 (setq f (format (if num " %%%ds %s" " %%-%ds %s")
9661 l (if e "|" (setq org-table-may-need-update t) "")) 9627 l (if e "|" (setq org-table-may-need-update t) ""))
9662 n (format f s)) 9628 n (format f s))
9663 (if new 9629 (if new
9664 (if (<= (length new) l) ;; FIXME: length -> str-width? 9630 (if (<= (length new) l) ;; FIXME: length -> str-width?
9665 (setq n (format f new t t)) ;; FIXME: t t? 9631 (setq n (format f new))
9666 (setq n (concat new "|") org-table-may-need-update t))) 9632 (setq n (concat new "|") org-table-may-need-update t)))
9667 (or (equal n o) 9633 (or (equal n o)
9668 (let (org-table-may-need-update) 9634 (let (org-table-may-need-update)
9669 (replace-match n)))) 9635 (replace-match n))))
9670 (setq org-table-may-need-update t)) 9636 (setq org-table-may-need-update t))
11019 (setq form (replace-match 10985 (setq form (replace-match
11020 (save-match-data 10986 (save-match-data
11021 (org-table-get-vertical-vector (match-string 0 form) 10987 (org-table-get-vertical-vector (match-string 0 form)
11022 nil n0)) 10988 nil n0))
11023 t t form))) 10989 t t form)))
11024 ;; (setq ev (calc-eval (cons form modes)
11025 ;; FIXME (if org-table-formula-numbers-only 'num)))
11026
11027 (if lispp 10990 (if lispp
11028 (setq ev (eval (eval (read form))) 10991 (setq ev (eval (eval (read form)))
11029 ev (if (numberp ev) (number-to-string ev) ev)) 10992 ev (if (numberp ev) (number-to-string ev) ev))
11030 (setq ev (calc-eval (cons form modes) 10993 (setq ev (calc-eval (cons form modes)
11031 (if org-table-formula-numbers-only 'num)))) 10994 (if org-table-formula-numbers-only 'num))))
12759 12722
12760 (setq line (org-html-handle-time-stamps line)) 12723 (setq line (org-html-handle-time-stamps line))
12761 12724
12762 ;; replace "&" by "&amp;", "<" and ">" by "&lt;" and "&gt;" 12725 ;; replace "&" by "&amp;", "<" and ">" by "&lt;" and "&gt;"
12763 ;; handle @<..> HTML tags (replace "@&gt;..&lt;" by "<..>") 12726 ;; handle @<..> HTML tags (replace "@&gt;..&lt;" by "<..>")
12764 ;; Also handle sub_superscripts and checkboxes FIXME 12727 ;; Also handle sub_superscripts and checkboxes
12728 ;; FIXME: is there no better place for checkboxes
12765 (setq line (org-html-expand line)) 12729 (setq line (org-html-expand line))
12766 12730
12767 ;; Format the links 12731 ;; Format the links
12768 (setq start 0) 12732 (setq start 0)
12769 (while (string-match org-bracket-link-analytic-regexp line start) 12733 (while (string-match org-bracket-link-analytic-regexp line start)
12938 (org-html-level-start 1 nil umax 12902 (org-html-level-start 1 nil umax
12939 (and org-export-with-toc (<= level umax)) 12903 (and org-export-with-toc (<= level umax))
12940 head-count) 12904 head-count)
12941 12905
12942 (when (plist-get opt-plist :auto-postamble) 12906 (when (plist-get opt-plist :auto-postamble)
12907 (insert "<p>")
12943 (if author (insert (concat (nth 1 lang-words) ": " author "\n"))) 12908 (if author (insert (concat (nth 1 lang-words) ": " author "\n")))
12944 (if email (insert (concat "<a href=\"mailto:" email "\">&lt;" 12909 (if email (insert (concat "<a href=\"mailto:" email "\">&lt;"
12945 email "&gt;</a>\n"))) 12910 email "&gt;</a>\n")))
12946 (if (or author email) (insert "<br>\n")) 12911 (if (or author email) (insert "<br>\n"))
12947 (if (and date time) (insert (concat (nth 2 lang-words) ": " 12912 (if (and date time) (insert (concat (nth 2 lang-words) ": "
13206 "\\(" (org-create-multibrace-regexp "{" "}" org-match-sexp-depth) "\\)" 13171 "\\(" (org-create-multibrace-regexp "{" "}" org-match-sexp-depth) "\\)"
13207 "\\|" 13172 "\\|"
13208 "\\(" (org-create-multibrace-regexp "(" ")" org-match-sexp-depth) "\\)" 13173 "\\(" (org-create-multibrace-regexp "(" ")" org-match-sexp-depth) "\\)"
13209 "\\|" 13174 "\\|"
13210 "\\(\\(?:\\*\\|[-+]?[^-+*!@#$%^_ \t\r\n,:\"?<>~;./{}=()]+\\)\\)\\)") 13175 "\\(\\(?:\\*\\|[-+]?[^-+*!@#$%^_ \t\r\n,:\"?<>~;./{}=()]+\\)\\)\\)")
13211 ;;;;;;;;;;;;;;;;;;;;;;;;;^ FIXME
13212 "The regular expression matching a sub- or superscript.") 13176 "The regular expression matching a sub- or superscript.")
13213 13177
13214 (defun org-export-html-convert-sub-super (string) 13178 (defun org-export-html-convert-sub-super (string)
13215 "Convert sub- and superscripts in STRING to HTML." 13179 "Convert sub- and superscripts in STRING to HTML."
13216 (let (key c) 13180 (let (key c)
13256 (aset levels-open (1- level) t) 13220 (aset levels-open (1- level) t)
13257 (insert "<ul><li>" title "<p>\n"))) 13221 (insert "<ul><li>" title "<p>\n")))
13258 (if org-export-with-section-numbers 13222 (if org-export-with-section-numbers
13259 (setq title (concat (org-section-number level) " " title))) 13223 (setq title (concat (org-section-number level) " " title)))
13260 (setq level (+ level 1)) 13224 (setq level (+ level 1))
13261 ;; FIXME: here we need to handle the tags, somehow.
13262 (when (string-match "\\(:[a-zA-Z0-9_@:]+:\\)[ \t]*$" title) 13225 (when (string-match "\\(:[a-zA-Z0-9_@:]+:\\)[ \t]*$" title)
13263 (setq title (replace-match 13226 (setq title (replace-match
13264 (if org-export-with-tags 13227 (if org-export-with-tags
13265 (save-match-data 13228 (save-match-data
13266 (concat 13229 (concat
14682 14645
14683 (provide 'org) 14646 (provide 'org)
14684 14647
14685 (run-hooks 'org-load-hook) 14648 (run-hooks 'org-load-hook)
14686 14649
14687
14688 ;; arch-tag: e77da1a7-acc7-4336-b19e-efa25af3f9fd 14650 ;; arch-tag: e77da1a7-acc7-4336-b19e-efa25af3f9fd
14689 ;;; org.el ends here 14651 ;;; org.el ends here