Mercurial > emacs
comparison lisp/textmodes/org.el @ 90650:02cf29720f31
Merge from emacs--devo--0
Patches applied:
* emacs--devo--0 (patch 490-504)
- Update from CVS
- Merge from gnus--rel--5.10
* gnus--rel--5.10 (patch 161-163)
- Update from CVS
- Merge from emacs--devo--0
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-130
author | Miles Bader <miles@gnu.org> |
---|---|
date | Tue, 07 Nov 2006 23:22:48 +0000 |
parents | 8dd8c8286063 b4a91f7c761c |
children | dbe3f29e61d6 |
comparison
equal
deleted
inserted
replaced
90649:d53934e7ddef | 90650:02cf29720f31 |
---|---|
1101 The system \"open\" is known as a default, but we use X11 applications | 1101 The system \"open\" is known as a default, but we use X11 applications |
1102 for some files for which the OS does not have a good default. | 1102 for some files for which the OS does not have a good default. |
1103 See `org-file-apps'.") | 1103 See `org-file-apps'.") |
1104 | 1104 |
1105 (defconst org-file-apps-defaults-windowsnt | 1105 (defconst org-file-apps-defaults-windowsnt |
1106 (list | 1106 (list |
1107 '(remote . emacs) | 1107 '(remote . emacs) |
1108 (cons t | 1108 (cons t |
1109 (list (if (featurep 'xemacs) | 1109 (list (if (featurep 'xemacs) |
1110 'mswindows-shell-execute | 1110 'mswindows-shell-execute |
1111 'w32-shell-execute) | 1111 'w32-shell-execute) |
1130 files and the cdr the corresponding command. Possible values for the | 1130 files and the cdr the corresponding command. Possible values for the |
1131 file identifier are | 1131 file identifier are |
1132 \"ext\" A string identifying an extension | 1132 \"ext\" A string identifying an extension |
1133 `directory' Matches a directory | 1133 `directory' Matches a directory |
1134 `remote' Matches a remote file, accessible through tramp or efs. | 1134 `remote' Matches a remote file, accessible through tramp or efs. |
1135 Remote files most likely should be visited through emacs | 1135 Remote files most likely should be visited through Emacs |
1136 because external applications cannot handle such paths. | 1136 because external applications cannot handle such paths. |
1137 t Default for all remaining files | 1137 t Default for all remaining files |
1138 | 1138 |
1139 Possible values for the command are: | 1139 Possible values for the command are: |
1140 `emacs' The file will be visited by the current Emacs process. | 1140 `emacs' The file will be visited by the current Emacs process. |
2340 newline The maximum number of newlines allowed in an emphasis exp. | 2340 newline The maximum number of newlines allowed in an emphasis exp. |
2341 stacked Non-nil means, allow stacked styles. This works only in HTML | 2341 stacked Non-nil means, allow stacked styles. This works only in HTML |
2342 export. When this is set, all marker characters (as given in | 2342 export. When this is set, all marker characters (as given in |
2343 `org-emphasis-alist') will be allowed as pre/post, aiding | 2343 `org-emphasis-alist') will be allowed as pre/post, aiding |
2344 inside-out matching. | 2344 inside-out matching. |
2345 Use customize to modify this, or restart emacs after changing it." | 2345 Use customize to modify this, or restart Emacs after changing it." |
2346 :group 'org-font-lock | 2346 :group 'org-font-lock |
2347 :set 'org-set-emph-re | 2347 :set 'org-set-emph-re |
2348 :type '(list | 2348 :type '(list |
2349 (sexp :tag "Allowed chars in pre ") | 2349 (sexp :tag "Allowed chars in pre ") |
2350 (sexp :tag "Allowed chars in post ") | 2350 (sexp :tag "Allowed chars in post ") |
2358 ("/" italic "<i>" "</i>") | 2358 ("/" italic "<i>" "</i>") |
2359 ("_" underline "<u>" "</u>") | 2359 ("_" underline "<u>" "</u>") |
2360 ("=" shadow "<code>" "</code>") | 2360 ("=" shadow "<code>" "</code>") |
2361 ("+" (:strike-through t) "<del>" "</del>") | 2361 ("+" (:strike-through t) "<del>" "</del>") |
2362 ) | 2362 ) |
2363 "Special syntax for emphasised text. | 2363 "Special syntax for emphasized text. |
2364 Text starting and ending with a special character will be emphasized, for | 2364 Text starting and ending with a special character will be emphasized, for |
2365 example *bold*, _underlined_ and /italic/. This variable sets the marker | 2365 example *bold*, _underlined_ and /italic/. This variable sets the marker |
2366 characters, the face to bbe used by font-lock for highlighting in Org-mode | 2366 characters, the face to bbe used by font-lock for highlighting in Org-mode |
2367 emacs buffers, and the HTML tags to be used for this. | 2367 Emacs buffers, and the HTML tags to be used for this. |
2368 Use customize to modify this, or restart emacs after changing it." | 2368 Use customize to modify this, or restart Emacs after changing it." |
2369 :group 'org-font-lock | 2369 :group 'org-font-lock |
2370 :set 'org-set-emph-re | 2370 :set 'org-set-emph-re |
2371 :type '(repeat | 2371 :type '(repeat |
2372 (list | 2372 (list |
2373 (string :tag "Marker character") | 2373 (string :tag "Marker character") |
2895 (defvar texmathp-why) ; from texmathp.el | 2895 (defvar texmathp-why) ; from texmathp.el |
2896 (defvar org-latex-regexps) | 2896 (defvar org-latex-regexps) |
2897 | 2897 |
2898 ;;; Define the mode | 2898 ;;; Define the mode |
2899 | 2899 |
2900 (defvar org-mode-map | 2900 (if (and (not (keymapp outline-mode-map)) (featurep 'allout)) |
2901 (if (and (not (keymapp outline-mode-map)) (featurep 'allout)) | 2901 (error "Conflict with outdated version of allout.el. Load org.el before allout.el, or ugrade to newer allout, for example by switching to Emacs 22.")) |
2902 (error "Conflict with outdated version of allout.el. Load org.el before allout.el, or ugrade to newer allout, for example by switching to Emacs 22.") | |
2903 (copy-keymap outline-mode-map)) | |
2904 "Keymap for Org-mode.") | |
2905 | 2902 |
2906 (defvar org-struct-menu) ; defined later in this file | 2903 (defvar org-struct-menu) ; defined later in this file |
2907 (defvar org-org-menu) ; defined later in this file | 2904 (defvar org-org-menu) ; defined later in this file |
2908 (defvar org-tbl-menu) ; defined later in this file | 2905 (defvar org-tbl-menu) ; defined later in this file |
2909 | 2906 |
2911 ;; an update. | 2908 ;; an update. |
2912 (defvar org-table-may-need-update t | 2909 (defvar org-table-may-need-update t |
2913 "Indicates that a table might need an update. | 2910 "Indicates that a table might need an update. |
2914 This variable is set by `org-before-change-function'. | 2911 This variable is set by `org-before-change-function'. |
2915 `org-table-align' sets it back to nil.") | 2912 `org-table-align' sets it back to nil.") |
2913 (defvar org-mode-map) | |
2916 (defvar org-mode-hook nil) | 2914 (defvar org-mode-hook nil) |
2917 (defvar org-inhibit-startup nil) ; Dynamically-scoped param. | 2915 (defvar org-inhibit-startup nil) ; Dynamically-scoped param. |
2918 (defvar org-agenda-keep-modes nil) ; Dynamically-scoped param. | 2916 (defvar org-agenda-keep-modes nil) ; Dynamically-scoped param. |
2919 | 2917 |
2920 | 2918 |
3451 (if arg (org-table-edit-field t) | 3449 (if arg (org-table-edit-field t) |
3452 (org-table-justify-field-maybe) | 3450 (org-table-justify-field-maybe) |
3453 (call-interactively 'org-table-next-field))))) | 3451 (call-interactively 'org-table-next-field))))) |
3454 | 3452 |
3455 ((eq arg t) ;; Global cycling | 3453 ((eq arg t) ;; Global cycling |
3456 | 3454 |
3457 (cond | 3455 (cond |
3458 ((and (eq last-command this-command) | 3456 ((and (eq last-command this-command) |
3459 (eq org-cycle-global-status 'overview)) | 3457 (eq org-cycle-global-status 'overview)) |
3460 ;; We just created the overview - now do table of contents | 3458 ;; We just created the overview - now do table of contents |
3461 ;; This can be slow in very large buffers, so indicate action | 3459 ;; This can be slow in very large buffers, so indicate action |
3951 would end up with no indentation after the change, nothing at all is done." | 3949 would end up with no indentation after the change, nothing at all is done." |
3952 (save-excursion | 3950 (save-excursion |
3953 (let ((end (save-excursion (outline-next-heading) | 3951 (let ((end (save-excursion (outline-next-heading) |
3954 (point-marker))) | 3952 (point-marker))) |
3955 (prohibit (if (> diff 0) | 3953 (prohibit (if (> diff 0) |
3956 "^\\S-" | 3954 "^\\S-" |
3957 (concat "^ \\{0," (int-to-string (- diff)) "\\}\\S-"))) | 3955 (concat "^ \\{0," (int-to-string (- diff)) "\\}\\S-"))) |
3958 col) | 3956 col) |
3959 (unless (save-excursion (re-search-forward prohibit end t)) | 3957 (unless (save-excursion (re-search-forward prohibit end t)) |
3960 (while (re-search-forward "^[ \t]+" end t) | 3958 (while (re-search-forward "^[ \t]+" end t) |
3961 (goto-char (match-end 0)) | 3959 (goto-char (match-end 0)) |
4027 (org-copy-subtree 'cut)) | 4025 (org-copy-subtree 'cut)) |
4028 | 4026 |
4029 (defun org-copy-subtree (&optional cut) | 4027 (defun org-copy-subtree (&optional cut) |
4030 "Cut the current subtree into the clipboard. | 4028 "Cut the current subtree into the clipboard. |
4031 This is a short-hand for marking the subtree and then copying it. | 4029 This is a short-hand for marking the subtree and then copying it. |
4032 If CUT is non nil, actually cut the subtree." | 4030 If CUT is non-nil, actually cut the subtree." |
4033 (interactive) | 4031 (interactive) |
4034 (let (beg end folded) | 4032 (let (beg end folded) |
4035 (org-back-to-heading) | 4033 (org-back-to-heading) |
4036 (setq beg (point)) | 4034 (setq beg (point)) |
4037 (save-match-data | 4035 (save-match-data |
4215 (while (< (point) end) | 4213 (while (< (point) end) |
4216 (when (org-at-item-checkbox-p) | 4214 (when (org-at-item-checkbox-p) |
4217 (setq status (equal (match-string 0) "[X]")) | 4215 (setq status (equal (match-string 0) "[X]")) |
4218 (when (eq firstnew 'unknown) | 4216 (when (eq firstnew 'unknown) |
4219 (setq firstnew (not status))) | 4217 (setq firstnew (not status))) |
4220 (replace-match | 4218 (replace-match |
4221 (if (if arg (not status) firstnew) "[X]" "[ ]") t t)) | 4219 (if (if arg (not status) firstnew) "[X]" "[ ]") t t)) |
4222 (beginning-of-line 2)))))) | 4220 (beginning-of-line 2)))))) |
4223 | 4221 |
4224 (defun org-get-indentation (&optional line) | 4222 (defun org-get-indentation (&optional line) |
4225 "Get the indentation of the current line, interpreting tabs. | 4223 "Get the indentation of the current line, interpreting tabs. |
4511 this heading. " | 4509 this heading. " |
4512 (interactive "P") | 4510 (interactive "P") |
4513 (if find-done | 4511 (if find-done |
4514 (org-archive-all-done) | 4512 (org-archive-all-done) |
4515 ;; Save all relevant TODO keyword-relatex variables | 4513 ;; Save all relevant TODO keyword-relatex variables |
4516 | 4514 |
4517 (let ((tr-org-todo-line-regexp org-todo-line-regexp) ; keep despite compiler | 4515 (let ((tr-org-todo-line-regexp org-todo-line-regexp) ; keep despite compiler |
4518 (tr-org-todo-keywords org-todo-keywords) | 4516 (tr-org-todo-keywords org-todo-keywords) |
4519 (tr-org-todo-interpretation org-todo-interpretation) | 4517 (tr-org-todo-interpretation org-todo-interpretation) |
4520 (tr-org-done-string org-done-string) | 4518 (tr-org-done-string org-done-string) |
4521 (tr-org-todo-regexp org-todo-regexp) | 4519 (tr-org-todo-regexp org-todo-regexp) |
4618 "Move subtree to archive (no open TODO items)? ")) | 4616 "Move subtree to archive (no open TODO items)? ")) |
4619 beg end (cntarch 0)) | 4617 beg end (cntarch 0)) |
4620 (if (org-on-heading-p) | 4618 (if (org-on-heading-p) |
4621 (progn | 4619 (progn |
4622 (setq re1 (concat "^" (regexp-quote | 4620 (setq re1 (concat "^" (regexp-quote |
4623 (make-string | 4621 (make-string |
4624 (1+ (- (match-end 0) (match-beginning 0))) | 4622 (1+ (- (match-end 0) (match-beginning 0))) |
4625 ?*)) | 4623 ?*)) |
4626 " ")) | 4624 " ")) |
4627 (move-marker begm (point)) | 4625 (move-marker begm (point)) |
4628 (move-marker endm (org-end-of-subtree))) | 4626 (move-marker endm (org-end-of-subtree))) |
4749 (throw :skip t)) | 4747 (throw :skip t)) |
4750 (and (get-text-property p :org-comment) | 4748 (and (get-text-property p :org-comment) |
4751 (org-end-of-subtree) | 4749 (org-end-of-subtree) |
4752 (throw :skip t)) | 4750 (throw :skip t)) |
4753 (if (equal (char-after p) ?#) (throw :skip t)))) | 4751 (if (equal (char-after p) ?#) (throw :skip t)))) |
4754 | 4752 |
4755 (defun org-agenda-toggle-archive-tag () | 4753 (defun org-agenda-toggle-archive-tag () |
4756 "Toggle the archive tag for the current entry." | 4754 "Toggle the archive tag for the current entry." |
4757 (interactive) | 4755 (interactive) |
4758 (org-agenda-check-no-diary) | 4756 (org-agenda-check-no-diary) |
4759 (org-agenda-show) ;;; FIXME This is a stupid hack and should not be needed | 4757 (org-agenda-show) ;;; FIXME This is a stupid hack and should not be needed |
6190 (apply 'encode-time (org-parse-time-string ts))))) | 6188 (apply 'encode-time (org-parse-time-string ts))))) |
6191 (if te (setq te (time-to-seconds | 6189 (if te (setq te (time-to-seconds |
6192 (apply 'encode-time (org-parse-time-string te))))) | 6190 (apply 'encode-time (org-parse-time-string te))))) |
6193 (move-marker ins (point)) | 6191 (move-marker ins (point)) |
6194 (setq ipos (point)) | 6192 (setq ipos (point)) |
6195 (insert-before-markers "Clock summary at [" | 6193 (insert-before-markers "Clock summary at [" |
6196 (substring | 6194 (substring |
6197 (format-time-string (cdr org-time-stamp-formats)) | 6195 (format-time-string (cdr org-time-stamp-formats)) |
6198 1 -1) | 6196 1 -1) |
6199 "]." | 6197 "]." |
6200 (if block | 6198 (if block |
6201 (format " Considered range is /%s/." block) | 6199 (format " Considered range is /%s/." block) |
6202 "") | 6200 "") |
6203 "\n\n|L|Headline|Time|\n") | 6201 "\n\n|L|Headline|Time|\n") |
6204 (org-clock-sum ts te) | 6202 (org-clock-sum ts te) |
6205 (setq h (/ org-clock-file-total-minutes 60) | 6203 (setq h (/ org-clock-file-total-minutes 60) |
6221 h (/ time 60) | 6219 h (/ time 60) |
6222 m (- time (* 60 h))) | 6220 m (- time (* 60 h))) |
6223 (goto-char ins) | 6221 (goto-char ins) |
6224 (if (= level 1) (insert-before-markers "|-\n")) | 6222 (if (= level 1) (insert-before-markers "|-\n")) |
6225 (insert-before-markers | 6223 (insert-before-markers |
6226 "| " (int-to-string level) "|" hlc hdl hlc " |" | 6224 "| " (int-to-string level) "|" hlc hdl hlc " |" |
6227 (make-string (1- level) ?|) | 6225 (make-string (1- level) ?|) |
6228 hlc | 6226 hlc |
6229 (format "%d:%02d" h m) | 6227 (format "%d:%02d" h m) |
6230 hlc | 6228 hlc |
6231 " |\n"))))) | 6229 " |\n"))))) |
8816 (let ((org-add-colon-after-tag-completion t)) | 8814 (let ((org-add-colon-after-tag-completion t)) |
8817 (completing-read "Tags: " 'org-tags-completion-function | 8815 (completing-read "Tags: " 'org-tags-completion-function |
8818 nil nil current 'org-tags-history)))) | 8816 nil nil current 'org-tags-history)))) |
8819 (while (string-match "[-+&]+" tags) | 8817 (while (string-match "[-+&]+" tags) |
8820 (setq tags (replace-match ":" t t tags)))) | 8818 (setq tags (replace-match ":" t t tags)))) |
8821 | 8819 |
8822 (unless (setq empty (string-match "\\`[\t ]*\\'" tags)) | 8820 (unless (setq empty (string-match "\\`[\t ]*\\'" tags)) |
8823 (unless (string-match ":$" tags) (setq tags (concat tags ":"))) | 8821 (unless (string-match ":$" tags) (setq tags (concat tags ":"))) |
8824 (unless (string-match "^:" tags) (setq tags (concat ":" tags)))) | 8822 (unless (string-match "^:" tags) (setq tags (concat ":" tags)))) |
8825 (if (equal current "") | 8823 (if (equal current "") |
8826 (progn | 8824 (progn |
9969 (setq cpltxt (or description link))) | 9967 (setq cpltxt (or description link))) |
9970 | 9968 |
9971 ((eq major-mode 'image-mode) | 9969 ((eq major-mode 'image-mode) |
9972 (setq cpltxt (concat "file:" | 9970 (setq cpltxt (concat "file:" |
9973 (abbreviate-file-name buffer-file-name)) | 9971 (abbreviate-file-name buffer-file-name)) |
9974 link (org-make-link cpltxt))) | 9972 link (org-make-link cpltxt))) |
9975 | 9973 |
9976 ((org-mode-p) | 9974 ((org-mode-p) |
9977 ;; Just link to current headline | 9975 ;; Just link to current headline |
9978 (setq cpltxt (concat "file:" | 9976 (setq cpltxt (concat "file:" |
9979 (abbreviate-file-name buffer-file-name))) | 9977 (abbreviate-file-name buffer-file-name))) |
13352 (replace-match "\\1 \\3") | 13350 (replace-match "\\1 \\3") |
13353 (goto-char (match-beginning 0))) | 13351 (goto-char (match-beginning 0))) |
13354 | 13352 |
13355 ;; Convert LaTeX fragments to images | 13353 ;; Convert LaTeX fragments to images |
13356 (when (memq :LaTeX-fragments parameters) | 13354 (when (memq :LaTeX-fragments parameters) |
13357 (org-format-latex | 13355 (org-format-latex |
13358 (concat "ltxpng/" (file-name-sans-extension | 13356 (concat "ltxpng/" (file-name-sans-extension |
13359 (file-name-nondirectory | 13357 (file-name-nondirectory |
13360 org-current-export-file))) | 13358 org-current-export-file))) |
13361 org-current-export-dir nil "Creating LaTeX image %s")) | 13359 org-current-export-dir nil "Creating LaTeX image %s")) |
13362 (message "Exporting...") | 13360 (message "Exporting...") |
13871 (org-current-export-dir (org-export-directory :html opt-plist)) | 13869 (org-current-export-dir (org-export-directory :html opt-plist)) |
13872 (org-current-export-file buffer-file-name) | 13870 (org-current-export-file buffer-file-name) |
13873 (all_lines | 13871 (all_lines |
13874 (org-skip-comments (org-split-string | 13872 (org-skip-comments (org-split-string |
13875 (org-cleaned-string-for-export | 13873 (org-cleaned-string-for-export |
13876 region :emph-multiline | 13874 region :emph-multiline |
13877 (if (plist-get opt-plist :LaTeX-fragments) | 13875 (if (plist-get opt-plist :LaTeX-fragments) |
13878 :LaTeX-fragments)) | 13876 :LaTeX-fragments)) |
13879 "[\r\n]"))) | 13877 "[\r\n]"))) |
13880 (lines (org-export-find-first-heading-line all_lines)) | 13878 (lines (org-export-find-first-heading-line all_lines)) |
13881 (level 0) (line "") (origline "") txt todo | 13879 (level 0) (line "") (origline "") txt todo |
14135 (setq search (match-string 1 filename) | 14133 (setq search (match-string 1 filename) |
14136 filename (replace-match "" t nil filename))) | 14134 filename (replace-match "" t nil filename))) |
14137 (setq valid | 14135 (setq valid |
14138 (if (functionp link-validate) | 14136 (if (functionp link-validate) |
14139 (funcall link-validate filename current-dir) | 14137 (funcall link-validate filename current-dir) |
14140 t)) | 14138 t)) |
14141 (setq file-is-image-p | 14139 (setq file-is-image-p |
14142 (string-match (org-image-file-name-regexp) filename)) | 14140 (string-match (org-image-file-name-regexp) filename)) |
14143 (setq thefile (if abs-p (expand-file-name filename) filename)) | 14141 (setq thefile (if abs-p (expand-file-name filename) filename)) |
14144 (when (and org-export-html-link-org-files-as-html | 14142 (when (and org-export-html-link-org-files-as-html |
14145 (string-match "\\.org$" thefile)) | 14143 (string-match "\\.org$" thefile)) |
14991 (define-key org-cdlatex-mode-map "\C-c{" 'cdlatex-environment) | 14989 (define-key org-cdlatex-mode-map "\C-c{" 'cdlatex-environment) |
14992 | 14990 |
14993 (defvar org-cdlatex-texmathp-advice-is-done nil | 14991 (defvar org-cdlatex-texmathp-advice-is-done nil |
14994 "Flag remembering if we have applied the advice to texmathp already.") | 14992 "Flag remembering if we have applied the advice to texmathp already.") |
14995 | 14993 |
14996 (define-minor-mode org-cdlatex-mode | 14994 (define-minor-mode org-cdlatex-mode |
14997 "Toggle the minor `org-cdlatex-mode'. | 14995 "Toggle the minor `org-cdlatex-mode'. |
14998 This mode supports entering LaTeX environment and math in LaTeX fragments | 14996 This mode supports entering LaTeX environment and math in LaTeX fragments |
14999 in Org-mode. | 14997 in Org-mode. |
15000 \\{org-cdlatex-mode-map}" | 14998 \\{org-cdlatex-mode-map}" |
15001 nil " OCDL" nil | 14999 nil " OCDL" nil |
15119 (defun org-preview-latex-fragment (&optional subtree) | 15117 (defun org-preview-latex-fragment (&optional subtree) |
15120 "Preview the LaTeX fragment at point, or all locally or globally. | 15118 "Preview the LaTeX fragment at point, or all locally or globally. |
15121 If the cursor is in a LaTeX fragment, create the image and overlay | 15119 If the cursor is in a LaTeX fragment, create the image and overlay |
15122 it over the source code. If there is no fragment at point, display | 15120 it over the source code. If there is no fragment at point, display |
15123 all fragments in the current text, from one headline to the next. With | 15121 all fragments in the current text, from one headline to the next. With |
15124 prefix SUBTREE, display all fragments in the current subtree. With a | 15122 prefix SUBTREE, display all fragments in the current subtree. With a |
15125 double prefix `C-u C-u', or when the cursor is before the first headline, | 15123 double prefix `C-u C-u', or when the cursor is before the first headline, |
15126 display all fragments in the buffer. | 15124 display all fragments in the buffer. |
15127 The images can be removed again with \\[org-ctrl-c-ctrl-c]." | 15125 The images can be removed again with \\[org-ctrl-c-ctrl-c]." |
15128 (interactive "P") | 15126 (interactive "P") |
15129 (org-remove-latex-fragment-image-overlays) | 15127 (org-remove-latex-fragment-image-overlays) |
15207 (setq ov (org-make-overlay beg end)) | 15205 (setq ov (org-make-overlay beg end)) |
15208 (if (featurep 'xemacs) | 15206 (if (featurep 'xemacs) |
15209 (progn | 15207 (progn |
15210 (org-overlay-put ov 'invisible t) | 15208 (org-overlay-put ov 'invisible t) |
15211 (org-overlay-put | 15209 (org-overlay-put |
15212 ov 'end-glyph | 15210 ov 'end-glyph |
15213 (make-glyph (vector 'png :file movefile)))) | 15211 (make-glyph (vector 'png :file movefile)))) |
15214 (org-overlay-put | 15212 (org-overlay-put |
15215 ov 'display | 15213 ov 'display |
15216 (list 'image :type 'png :file movefile :ascent 'center))) | 15214 (list 'image :type 'png :file movefile :ascent 'center))) |
15217 (push ov org-latex-fragment-image-overlays) | 15215 (push ov org-latex-fragment-image-overlays) |
15218 (goto-char end)) | 15216 (goto-char end)) |
15219 (delete-region beg end) | 15217 (delete-region beg end) |
15220 (insert link)))))))) | 15218 (insert link)))))))) |
15221 | 15219 |
15222 ;; This function borrows from Ganesh Swami's latex2png.el | 15220 ;; This function borrows from Ganesh Swami's latex2png.el |
15223 (defun org-create-formula-image (string tofile options) | 15221 (defun org-create-formula-image (string tofile options) |
15224 (let* ((tmpdir (if (featurep 'xemacs) | 15222 (let* ((tmpdir (if (featurep 'xemacs) |
15225 (temp-directory) | 15223 (temp-directory) |
15226 temporary-file-directory)) | 15224 temporary-file-directory)) |
15868 ["Agenda includes ARCHIVE trees" | 15866 ["Agenda includes ARCHIVE trees" |
15869 (setq org-agenda-skip-archived-trees (not org-agenda-skip-archived-trees)) | 15867 (setq org-agenda-skip-archived-trees (not org-agenda-skip-archived-trees)) |
15870 :style toggle :selected (not org-agenda-skip-archived-trees)] | 15868 :style toggle :selected (not org-agenda-skip-archived-trees)] |
15871 "--" | 15869 "--" |
15872 ["Move Subtree to Archive" org-archive-subtree t] | 15870 ["Move Subtree to Archive" org-archive-subtree t] |
15873 ["Check and Move Children" (org-archive-subtree '(4)) | 15871 ["Check and Move Children" (org-archive-subtree '(4)) |
15874 :active t :keys "C-u C-c $"]) | 15872 :active t :keys "C-u C-c $"]) |
15875 "--" | 15873 "--" |
15876 ("TODO Lists" | 15874 ("TODO Lists" |
15877 ["TODO/DONE/-" org-todo t] | 15875 ["TODO/DONE/-" org-todo t] |
15878 ("Select keyword" | 15876 ("Select keyword" |
15938 (save-excursion (goto-char (point-min)) | 15936 (save-excursion (goto-char (point-min)) |
15939 (re-search-forward "<[a-z]+:" nil t))]) | 15937 (re-search-forward "<[a-z]+:" nil t))]) |
15940 "--" | 15938 "--" |
15941 ["Export/Publish" org-export t] | 15939 ["Export/Publish" org-export t] |
15942 ("LaTeX" | 15940 ("LaTeX" |
15943 ["Org CDLaTeX mode" org-cdlatex-mode :style toggle | 15941 ["Org CDLaTeX mode" org-cdlatex-mode :style toggle |
15944 :selected org-cdlatex-mode] | 15942 :selected org-cdlatex-mode] |
15945 ["Insert Environment" cdlatex-environment (fboundp 'cdlatex-environment)] | 15943 ["Insert Environment" cdlatex-environment (fboundp 'cdlatex-environment)] |
15946 ["Insert math symbol" cdlatex-math-symbol (fboundp 'cdlatex-math-symbol)] | 15944 ["Insert math symbol" cdlatex-math-symbol (fboundp 'cdlatex-math-symbol)] |
15947 ["Modify math symbol" org-cdlatex-math-modify | 15945 ["Modify math symbol" org-cdlatex-math-modify |
15948 (org-inside-LaTeX-fragment-p)] | 15946 (org-inside-LaTeX-fragment-p)] |
15949 ["Export LaTeX fragments as images" | 15947 ["Export LaTeX fragments as images" |
15950 (setq org-export-with-LaTeX-fragments (not org-export-with-LaTeX-fragments)) | 15948 (setq org-export-with-LaTeX-fragments (not org-export-with-LaTeX-fragments)) |
15951 :style toggle :selected org-export-with-LaTeX-fragments]) | 15949 :style toggle :selected org-export-with-LaTeX-fragments]) |
15952 "--" | 15950 "--" |
15953 ("Documentation" | 15951 ("Documentation" |
15954 ["Show Version" org-version t] | 15952 ["Show Version" org-version t] |
15955 ["Info Documentation" org-info t]) | 15953 ["Info Documentation" org-info t]) |
16095 (goto-char (1- (match-beginning 0))) | 16093 (goto-char (1- (match-beginning 0))) |
16096 (if (looking-at org-radio-target-regexp) | 16094 (if (looking-at org-radio-target-regexp) |
16097 (push (org-point-in-group p 0 :radio-target) clist)) | 16095 (push (org-point-in-group p 0 :radio-target) clist)) |
16098 (goto-char p)) | 16096 (goto-char p)) |
16099 ((setq o (car (delq nil | 16097 ((setq o (car (delq nil |
16100 (mapcar | 16098 (mapcar |
16101 (lambda (x) | 16099 (lambda (x) |
16102 (if (memq x org-latex-fragment-image-overlays) x)) | 16100 (if (memq x org-latex-fragment-image-overlays) x)) |
16103 (org-overlays-at (point)))))) | 16101 (org-overlays-at (point)))))) |
16104 (push (list :latex-fragment | 16102 (push (list :latex-fragment |
16105 (org-overlay-start o) (org-overlay-end o)) clist) | 16103 (org-overlay-start o) (org-overlay-end o)) clist) |
16106 (push (list :latex-preview | 16104 (push (list :latex-preview |
16107 (org-overlay-start o) (org-overlay-end o)) clist)) | 16105 (org-overlay-start o) (org-overlay-end o)) clist)) |
16108 ((org-inside-LaTeX-fragment-p) | 16106 ((org-inside-LaTeX-fragment-p) |
16109 ;; FIXME: positions wring. | 16107 ;; FIXME: positions wring. |
16110 (push (list :latex-fragment (point) (point)) clist))) | 16108 (push (list :latex-fragment (point) (point)) clist))) |
16111 | 16109 |
16411 | 16409 |
16412 ;;; Experimental code | 16410 ;;; Experimental code |
16413 | 16411 |
16414 | 16412 |
16415 ;;; Finish up | 16413 ;;; Finish up |
16416 | 16414 |
16417 (provide 'org) | 16415 (provide 'org) |
16418 | 16416 |
16419 (run-hooks 'org-load-hook) | 16417 (run-hooks 'org-load-hook) |
16420 | 16418 |
16421 ;; arch-tag: e77da1a7-acc7-4336-b19e-efa25af3f9fd | 16419 ;; arch-tag: e77da1a7-acc7-4336-b19e-efa25af3f9fd |