diff options
| author | Carsten Dominik | 2006-04-21 13:45:58 +0000 |
|---|---|---|
| committer | Carsten Dominik | 2006-04-21 13:45:58 +0000 |
| commit | bea5b1ba9a248a9f4a12c3be34561ce5b69ccc94 (patch) | |
| tree | c8be91fb0ddb9ecc51a0704d84575f388a9209ed /lisp | |
| parent | 90c14869e23f763f11a7fa657999ef81713f903b (diff) | |
| download | emacs-bea5b1ba9a248a9f4a12c3be34561ce5b69ccc94.tar.gz emacs-bea5b1ba9a248a9f4a12c3be34561ce5b69ccc94.zip | |
(org-mode-map): Catch conflict with old allout.el.
(org-open-at-point): Remove the "...done" message to keep
output in the echo area visible.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/textmodes/org.el | 96 |
1 files changed, 19 insertions, 77 deletions
diff --git a/lisp/textmodes/org.el b/lisp/textmodes/org.el index 12359391f73..f175671e3f4 100644 --- a/lisp/textmodes/org.el +++ b/lisp/textmodes/org.el | |||
| @@ -5,7 +5,7 @@ | |||
| 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.25 | 8 | ;; Version: 4.26 |
| 9 | ;; | 9 | ;; |
| 10 | ;; This file is part of GNU Emacs. | 10 | ;; This file is part of GNU Emacs. |
| 11 | ;; | 11 | ;; |
| @@ -79,8 +79,11 @@ | |||
| 79 | ;; excellent reference card made by Philip Rooke. This card can be found | 79 | ;; excellent reference card made by Philip Rooke. This card can be found |
| 80 | ;; in the etc/ directory of Emacs 22. | 80 | ;; in the etc/ directory of Emacs 22. |
| 81 | ;; | 81 | ;; |
| 82 | ;; Changes since version 4.00: | 82 | ;; Changes since version 4.10: |
| 83 | ;; --------------------------- | 83 | ;; --------------------------- |
| 84 | ;; Version 4.26 | ||
| 85 | ;; - Bug fixes. | ||
| 86 | ;; | ||
| 84 | ;; Version 4.25 | 87 | ;; Version 4.25 |
| 85 | ;; - Revision of the font-lock faces section, with better tty support. | 88 | ;; - Revision of the font-lock faces section, with better tty support. |
| 86 | ;; - TODO keywords in Agenda buffer are fontified. | 89 | ;; - TODO keywords in Agenda buffer are fontified. |
| @@ -119,60 +122,6 @@ | |||
| 119 | ;; `org-time-stamp-rounding-minutes'. | 122 | ;; `org-time-stamp-rounding-minutes'. |
| 120 | ;; - Bug fixes (there are *always* more bugs). | 123 | ;; - Bug fixes (there are *always* more bugs). |
| 121 | ;; | 124 | ;; |
| 122 | ;; Version 4.10 | ||
| 123 | ;; - Bug fixes. | ||
| 124 | ;; | ||
| 125 | ;; Version 4.09 | ||
| 126 | ;; - Bug fixes. | ||
| 127 | ;; - Small improvements to font-lock support. | ||
| 128 | ;; - MHE support finalized. | ||
| 129 | ;; | ||
| 130 | ;; Version 4.08 | ||
| 131 | ;; - Bug fixes. | ||
| 132 | ;; - Improved MHE support | ||
| 133 | ;; | ||
| 134 | ;; Version 4.07 | ||
| 135 | ;; - Bug fixes. | ||
| 136 | ;; - Leading stars in headlines can be hidden, so make the outline look | ||
| 137 | ;; cleaner. | ||
| 138 | ;; - Mouse-1 can be used to follow links. | ||
| 139 | ;; | ||
| 140 | ;; Version 4.06 | ||
| 141 | ;; - HTML exporter treats targeted internal links. | ||
| 142 | ;; - Bug fixes. | ||
| 143 | ;; | ||
| 144 | ;; Version 4.05 | ||
| 145 | ;; - Changes to internal link system (thanks to David Wainberg for ideas). | ||
| 146 | ;; - in-file links: [[Search String]] instead of <file:::Search String> | ||
| 147 | ;; - automatic links to "radio targets". | ||
| 148 | ;; - CamelCase not longer active by default, configure org-activate-camels | ||
| 149 | ;; if you want to turn it back on. | ||
| 150 | ;; - After following a link, `C-c &' jumps back to it. | ||
| 151 | ;; - MH-E link support (thanks to Thomas Baumann). | ||
| 152 | ;; - Special table lines are no longer exported. | ||
| 153 | ;; - Bug fixes and minor improvements. | ||
| 154 | ;; | ||
| 155 | ;; Version 4.04 | ||
| 156 | ;; - Cleanup tags display in agenda. | ||
| 157 | ;; - Bug fixes. | ||
| 158 | ;; | ||
| 159 | ;; Version 4.03 | ||
| 160 | ;; - Table alignment fixed for use with wide characters. | ||
| 161 | ;; - `C-c -' leaves cursor in current table line. | ||
| 162 | ;; - The current TAG can be incorporated into the agenda prefix. | ||
| 163 | ;; See option `org-agenda-prefix-format' for details. | ||
| 164 | ;; | ||
| 165 | ;; Version 4.02 | ||
| 166 | ;; - Minor bug fixes and improvements around tag searches. | ||
| 167 | ;; - XEmacs compatibility fixes. | ||
| 168 | ;; | ||
| 169 | ;; Version 4.01 | ||
| 170 | ;; - Tags can also be set remotely from agenda buffer. | ||
| 171 | ;; - Boolean logic for tag searches. | ||
| 172 | ;; - Additional agenda commands can be configured through the variable | ||
| 173 | ;; `org-agenda-custom-commands'. | ||
| 174 | ;; - Minor bug fixes. | ||
| 175 | ;; | ||
| 176 | ;;; Code: | 125 | ;;; Code: |
| 177 | 126 | ||
| 178 | (eval-when-compile | 127 | (eval-when-compile |
| @@ -188,7 +137,7 @@ | |||
| 188 | 137 | ||
| 189 | ;;; Customization variables | 138 | ;;; Customization variables |
| 190 | 139 | ||
| 191 | (defvar org-version "4.25" | 140 | (defvar org-version "4.26" |
| 192 | "The version number of the file org.el.") | 141 | "The version number of the file org.el.") |
| 193 | (defun org-version () | 142 | (defun org-version () |
| 194 | (interactive) | 143 | (interactive) |
| @@ -198,7 +147,7 @@ | |||
| 198 | ;; of outline.el. | 147 | ;; of outline.el. |
| 199 | (defconst org-noutline-p (featurep 'noutline) | 148 | (defconst org-noutline-p (featurep 'noutline) |
| 200 | "Are we using the new outline mode?") | 149 | "Are we using the new outline mode?") |
| 201 | (defconst org-xemacs-p (featurep 'xemacs)) ;; FIXME: used by external code? | 150 | (defconst org-xemacs-p (featurep 'xemacs)) ; not used by org.el itself |
| 202 | (defconst org-format-transports-properties-p | 151 | (defconst org-format-transports-properties-p |
| 203 | (let ((x "a")) | 152 | (let ((x "a")) |
| 204 | (add-text-properties 0 1 '(test t) x) | 153 | (add-text-properties 0 1 '(test t) x) |
| @@ -2383,7 +2332,10 @@ This face is only used if `org-fontify-done-headline' is set." | |||
| 2383 | (defvar orgtbl-mode) ; defined later in this file | 2332 | (defvar orgtbl-mode) ; defined later in this file |
| 2384 | ;;; Define the mode | 2333 | ;;; Define the mode |
| 2385 | 2334 | ||
| 2386 | (defvar org-mode-map (copy-keymap outline-mode-map) | 2335 | (defvar org-mode-map |
| 2336 | (if (and (not (keymapp outline-mode-map)) (featurep 'allout)) | ||
| 2337 | (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.") | ||
| 2338 | (copy-keymap outline-mode-map)) | ||
| 2387 | "Keymap for Org-mode.") | 2339 | "Keymap for Org-mode.") |
| 2388 | 2340 | ||
| 2389 | (defvar org-struct-menu) ; defined later in this file | 2341 | (defvar org-struct-menu) ; defined later in this file |
| @@ -7448,9 +7400,8 @@ optional argument IN-EMACS is non-nil, Emacs will visit the file." | |||
| 7448 | (org-add-props cmd nil | 7400 | (org-add-props cmd nil |
| 7449 | 'face 'org-warning)))) | 7401 | 'face 'org-warning)))) |
| 7450 | (progn | 7402 | (progn |
| 7451 | (message "Executing %s..." cmd) | 7403 | (message "Executing %s" cmd) |
| 7452 | (shell-command cmd) | 7404 | (shell-command cmd)) |
| 7453 | (message "Executing %s...done" cmd)) | ||
| 7454 | (error "Abort")))) | 7405 | (error "Abort")))) |
| 7455 | 7406 | ||
| 7456 | (t | 7407 | (t |
| @@ -7904,8 +7855,7 @@ If the file does not exist, an error is thrown." | |||
| 7904 | (setq cmd 'emacs)))) | 7855 | (setq cmd 'emacs)))) |
| 7905 | (cond | 7856 | (cond |
| 7906 | ((and (stringp cmd) (not (string-match "^\\s-*$" cmd))) | 7857 | ((and (stringp cmd) (not (string-match "^\\s-*$" cmd))) |
| 7907 | ; (setq cmd (format cmd (concat "\"" file "\""))) | 7858 | ;; Normalize use of quote, this can vary. |
| 7908 | ;; FIXME: normalize use of quotes | ||
| 7909 | (if (string-match "['\"]%s['\"]" cmd) | 7859 | (if (string-match "['\"]%s['\"]" cmd) |
| 7910 | (setq cmd (replace-match "'%s'" t t cmd))) | 7860 | (setq cmd (replace-match "'%s'" t t cmd))) |
| 7911 | (setq cmd (format cmd file)) | 7861 | (setq cmd (format cmd file)) |
| @@ -8958,10 +8908,10 @@ Optional argument NEW may specify text to replace the current field content." | |||
| 8958 | e (not (= (match-beginning 2) (match-end 2)))) | 8908 | e (not (= (match-beginning 2) (match-end 2)))) |
| 8959 | (setq f (format (if num " %%%ds %s" " %%-%ds %s") | 8909 | (setq f (format (if num " %%%ds %s" " %%-%ds %s") |
| 8960 | l (if e "|" (setq org-table-may-need-update t) "")) | 8910 | l (if e "|" (setq org-table-may-need-update t) "")) |
| 8961 | n (format f s t t)) | 8911 | n (format f s)) |
| 8962 | (if new | 8912 | (if new |
| 8963 | (if (<= (length new) l) | 8913 | (if (<= (length new) l) ;; FIXME: length -> str-width? |
| 8964 | (setq n (format f new t t)) ;; FIXME: why t t????? | 8914 | (setq n (format f new t t)) ;; FIXME: t t? |
| 8965 | (setq n (concat new "|") org-table-may-need-update t))) | 8915 | (setq n (concat new "|") org-table-may-need-update t))) |
| 8966 | (or (equal n o) | 8916 | (or (equal n o) |
| 8967 | (let (org-table-may-need-update) | 8917 | (let (org-table-may-need-update) |
| @@ -12277,16 +12227,6 @@ stacked delimiters is N. Escaping delimiters is not possible." | |||
| 12277 | (setq string (replace-match (match-string 1 string) t t string)))) | 12227 | (setq string (replace-match (match-string 1 string) t t string)))) |
| 12278 | string) | 12228 | string) |
| 12279 | 12229 | ||
| 12280 | ;(defun org-export-html-convert-emphasize (string) | ||
| 12281 | ; (let (c (s 0)) | ||
| 12282 | ; (while (string-match "\\(\\W\\|^\\)\\([*/_]\\)\\(\\w+\\)\\2\\(\\W\\|$\\)" string s) | ||
| 12283 | ; (setq c (cdr (assoc (match-string 2 string) | ||
| 12284 | ; '(("*" . "b") ("/" . "i") ("_" . "u")))) | ||
| 12285 | ; s (+ (match-end 0) 3) | ||
| 12286 | ; string (replace-match | ||
| 12287 | ; (concat "\\1<" c ">\\3</" c ">\\4") t nil string))) | ||
| 12288 | ; string)) | ||
| 12289 | |||
| 12290 | (defun org-export-html-convert-emphasize (string) | 12230 | (defun org-export-html-convert-emphasize (string) |
| 12291 | (while (string-match org-italic-re string) | 12231 | (while (string-match org-italic-re string) |
| 12292 | (setq string (replace-match "\\1<i>\\3</i>\\4" t nil string))) | 12232 | (setq string (replace-match "\\1<i>\\3</i>\\4" t nil string))) |
| @@ -12719,6 +12659,8 @@ a time), or the day by one (if it does not contain a time)." | |||
| 12719 | (define-key org-mode-map [?\C-c ?\C-x (right)] 'org-shiftright) | 12659 | (define-key org-mode-map [?\C-c ?\C-x (right)] 'org-shiftright) |
| 12720 | 12660 | ||
| 12721 | ;; All the other keys | 12661 | ;; All the other keys |
| 12662 | |||
| 12663 | (define-key org-mode-map "\C-c\C-a" 'show-all) ; in case allout messed up. | ||
| 12722 | (define-key org-mode-map "\C-c$" 'org-archive-subtree) | 12664 | (define-key org-mode-map "\C-c$" 'org-archive-subtree) |
| 12723 | (define-key org-mode-map "\C-c\C-j" 'org-goto) | 12665 | (define-key org-mode-map "\C-c\C-j" 'org-goto) |
| 12724 | (define-key org-mode-map "\C-c\C-t" 'org-todo) | 12666 | (define-key org-mode-map "\C-c\C-t" 'org-todo) |