diff options
| author | Carsten Dominik | 2007-10-24 05:37:11 +0000 |
|---|---|---|
| committer | Carsten Dominik | 2007-10-24 05:37:11 +0000 |
| commit | fbe6c10d9226935b993d54d5279ca9f5b8d1724b (patch) | |
| tree | 922a23f4fe4840a146f527a854b100a8d374ce16 | |
| parent | e6fc6b48c63269d52d63bddd0a6359068e645b6f (diff) | |
| download | emacs-fbe6c10d9226935b993d54d5279ca9f5b8d1724b.tar.gz emacs-fbe6c10d9226935b993d54d5279ca9f5b8d1724b.zip | |
* textmodes/org.el (org-version): Changed to 5.13e.
(org-agenda-file-regexp): Fixed typo in docstring.
(org-add-planning-info): Fixed bug in parenthesis settings.
(org-scan-tags): Catch the case of indirect buffers with no
filename.
(org-fast-tag-selection, org-export-as-ascii, org-export-as-html):
Re-installed switch to mapc, had been removed by accident.
(org-columns-map): New binding `C-c C-o'.
(org-columns-menu): Changed menu text and added new entry.
(org-columns-eval): Documented the use of `next-line'.
(org-columns-open-link): New function.
(org-columns-follow-link): Function removed.
(org-open-link-from-string): New function.
(org-read-date-get-relative): Fixed typo in docstring.
(org-read-date-get-relative): Leading +/- is not optional.
(org-agenda-get-restriction-and-command): Always resize window on
first loop cycle.
(org-agenda-open-link): Make sure the link abbreviations are
present in the agenda buffer.
(org-agenda-copy-local-variable): New function.
| -rw-r--r-- | lisp/textmodes/org.el | 351 |
1 files changed, 203 insertions, 148 deletions
diff --git a/lisp/textmodes/org.el b/lisp/textmodes/org.el index d2461a0aaa1..9bc0fbbafd6 100644 --- a/lisp/textmodes/org.el +++ b/lisp/textmodes/org.el | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | ;; Author: Carsten Dominik <carsten at orgmode dot org> | 5 | ;; Author: Carsten Dominik <carsten at orgmode dot org> |
| 6 | ;; Keywords: outlines, hypermedia, calendar, wp | 6 | ;; Keywords: outlines, hypermedia, calendar, wp |
| 7 | ;; Homepage: http://orgmode.org | 7 | ;; Homepage: http://orgmode.org |
| 8 | ;; Version: 5.13d | 8 | ;; Version: 5.13e |
| 9 | ;; | 9 | ;; |
| 10 | ;; This file is part of GNU Emacs. | 10 | ;; This file is part of GNU Emacs. |
| 11 | ;; | 11 | ;; |
| @@ -83,7 +83,7 @@ | |||
| 83 | 83 | ||
| 84 | ;;; Version | 84 | ;;; Version |
| 85 | 85 | ||
| 86 | (defconst org-version "5.13d" | 86 | (defconst org-version "5.13e" |
| 87 | "The version number of the file org.el.") | 87 | "The version number of the file org.el.") |
| 88 | (defun org-version () | 88 | (defun org-version () |
| 89 | (interactive) | 89 | (interactive) |
| @@ -129,7 +129,7 @@ | |||
| 129 | (progn | 129 | (progn |
| 130 | (if pc-mode (partial-completion-mode -1)) | 130 | (if pc-mode (partial-completion-mode -1)) |
| 131 | ,@body) | 131 | ,@body) |
| 132 | (if pc-mode (partial-completion-mode 1))))) | 132 | (if pc-mode (partial-completion-mode 1))))) |
| 133 | 133 | ||
| 134 | ;;; The custom variables | 134 | ;;; The custom variables |
| 135 | 135 | ||
| @@ -1403,7 +1403,7 @@ When this variable is nil, `C-c C-c' give you the prompts, and | |||
| 1403 | `C-u C-c C-c' trigger the fasttrack." | 1403 | `C-u C-c C-c' trigger the fasttrack." |
| 1404 | :group 'org-remember | 1404 | :group 'org-remember |
| 1405 | :type 'boolean) | 1405 | :type 'boolean) |
| 1406 | 1406 | ||
| 1407 | (defcustom org-remember-default-headline "" | 1407 | (defcustom org-remember-default-headline "" |
| 1408 | "The headline that should be the default location in the notes file. | 1408 | "The headline that should be the default location in the notes file. |
| 1409 | When filing remember notes, the cursor will start at that position. | 1409 | When filing remember notes, the cursor will start at that position. |
| @@ -2000,7 +2000,7 @@ agenda file per line." | |||
| 2000 | 2000 | ||
| 2001 | (defcustom org-agenda-file-regexp "\\.org\\'" | 2001 | (defcustom org-agenda-file-regexp "\\.org\\'" |
| 2002 | "Regular expression to match files for `org-agenda-files'. | 2002 | "Regular expression to match files for `org-agenda-files'. |
| 2003 | If ny element in the list in that variable contains a directory instead | 2003 | If any element in the list in that variable contains a directory instead |
| 2004 | of a normal file, all files in that directory that are matched by this | 2004 | of a normal file, all files in that directory that are matched by this |
| 2005 | regular expression will be included." | 2005 | regular expression will be included." |
| 2006 | :group 'org-agenda | 2006 | :group 'org-agenda |
| @@ -2825,7 +2825,7 @@ directory where the exported Org-mode files lives." | |||
| 2825 | (repeat | 2825 | (repeat |
| 2826 | (cons | 2826 | (cons |
| 2827 | (choice :tag "Type" | 2827 | (choice :tag "Type" |
| 2828 | (const :html) (const :LaTeX) | 2828 | (const :html) (const :LaTeX) |
| 2829 | (const :ascii) (const :ical) (const :xoxo)) | 2829 | (const :ascii) (const :ical) (const :xoxo)) |
| 2830 | (directory))))) | 2830 | (directory))))) |
| 2831 | 2831 | ||
| @@ -3644,7 +3644,7 @@ color of the frame." | |||
| 3644 | ;; Make sure that a fixed-width face is used when we have a column table. | 3644 | ;; Make sure that a fixed-width face is used when we have a column table. |
| 3645 | (set-face-attribute 'org-column nil | 3645 | (set-face-attribute 'org-column nil |
| 3646 | :height (face-attribute 'default :height) | 3646 | :height (face-attribute 'default :height) |
| 3647 | :family (face-attribute 'default :family))) | 3647 | :family (face-attribute 'default :family))) |
| 3648 | 3648 | ||
| 3649 | (defface org-warning | 3649 | (defface org-warning |
| 3650 | (org-compatible-face | 3650 | (org-compatible-face |
| @@ -5703,7 +5703,7 @@ Works for outline headings and for plain lists alike." | |||
| 5703 | (cond | 5703 | (cond |
| 5704 | ((org-on-heading-p) (org-do-demote)) | 5704 | ((org-on-heading-p) (org-do-demote)) |
| 5705 | ((org-at-item-p) (org-indent-item 1)))) | 5705 | ((org-at-item-p) (org-indent-item 1)))) |
| 5706 | 5706 | ||
| 5707 | ;;; Promotion and Demotion | 5707 | ;;; Promotion and Demotion |
| 5708 | 5708 | ||
| 5709 | (defun org-promote-subtree () | 5709 | (defun org-promote-subtree () |
| @@ -6186,7 +6186,7 @@ WITH-CASE, the sorting considers case as well." | |||
| 6186 | (completing-read "Sort using function: " | 6186 | (completing-read "Sort using function: " |
| 6187 | obarray 'fboundp t nil nil)) | 6187 | obarray 'fboundp t nil nil)) |
| 6188 | (setq getkey-func (intern getkey-func))) | 6188 | (setq getkey-func (intern getkey-func))) |
| 6189 | 6189 | ||
| 6190 | (and (= (downcase sorting-type) ?r) | 6190 | (and (= (downcase sorting-type) ?r) |
| 6191 | (setq property | 6191 | (setq property |
| 6192 | (completing-read "Property: " | 6192 | (completing-read "Property: " |
| @@ -7059,7 +7059,7 @@ off orgstruct-mode will *not* remove these additonal settings." | |||
| 7059 | (orgstruct-make-binding 'org-cycle 102 [(tab)] "\C-i")) | 7059 | (orgstruct-make-binding 'org-cycle 102 [(tab)] "\C-i")) |
| 7060 | (org-defkey orgstruct-mode-map "\C-i" | 7060 | (org-defkey orgstruct-mode-map "\C-i" |
| 7061 | (orgstruct-make-binding 'org-cycle 103 "\C-i" [(tab)])) | 7061 | (orgstruct-make-binding 'org-cycle 103 "\C-i" [(tab)])) |
| 7062 | 7062 | ||
| 7063 | (org-defkey orgstruct-mode-map "\M-\C-m" | 7063 | (org-defkey orgstruct-mode-map "\M-\C-m" |
| 7064 | (orgstruct-make-binding 'org-insert-heading 105 | 7064 | (orgstruct-make-binding 'org-insert-heading 105 |
| 7065 | "\M-\C-m" [(meta return)])) | 7065 | "\M-\C-m" [(meta return)])) |
| @@ -7070,10 +7070,10 @@ off orgstruct-mode will *not* remove these additonal settings." | |||
| 7070 | (org-defkey orgstruct-mode-map [(shift meta return)] | 7070 | (org-defkey orgstruct-mode-map [(shift meta return)] |
| 7071 | (orgstruct-make-binding 'org-insert-todo-heading 107 | 7071 | (orgstruct-make-binding 'org-insert-todo-heading 107 |
| 7072 | [(meta return)] "\M-\C-m")) | 7072 | [(meta return)] "\M-\C-m")) |
| 7073 | 7073 | ||
| 7074 | (unless org-local-vars | 7074 | (unless org-local-vars |
| 7075 | (setq org-local-vars (org-get-local-variables))) | 7075 | (setq org-local-vars (org-get-local-variables))) |
| 7076 | 7076 | ||
| 7077 | t)) | 7077 | t)) |
| 7078 | 7078 | ||
| 7079 | (defun orgstruct-make-binding (fun n &rest keys) | 7079 | (defun orgstruct-make-binding (fun n &rest keys) |
| @@ -7124,7 +7124,7 @@ Possible values in the list of contexts are `table', `headline', and `item'." | |||
| 7124 | (kill-buffer "*Org tmp*") | 7124 | (kill-buffer "*Org tmp*") |
| 7125 | (delq nil | 7125 | (delq nil |
| 7126 | (mapcar | 7126 | (mapcar |
| 7127 | (lambda (x) | 7127 | (lambda (x) |
| 7128 | (setq x | 7128 | (setq x |
| 7129 | (if (symbolp x) | 7129 | (if (symbolp x) |
| 7130 | (list x) | 7130 | (list x) |
| @@ -10337,7 +10337,7 @@ With prefix ARG, apply the new formulas to the table." | |||
| 10337 | (defun org-table-fedit-line-down () | 10337 | (defun org-table-fedit-line-down () |
| 10338 | "Move cursor one line down in the window showing the table." | 10338 | "Move cursor one line down in the window showing the table." |
| 10339 | (interactive) | 10339 | (interactive) |
| 10340 | (org-table-fedit-move 'next-line)) | 10340 | (org-table-fedit-move 'next-line)) |
| 10341 | 10341 | ||
| 10342 | (defun org-table-fedit-move (command) | 10342 | (defun org-table-fedit-move (command) |
| 10343 | "Move the cursor in the window shoinw the table. | 10343 | "Move the cursor in the window shoinw the table. |
| @@ -11545,12 +11545,12 @@ according to FMT (default from `org-email-link-description-format')." | |||
| 11545 | (if description (concat "[" description "]") "") | 11545 | (if description (concat "[" description "]") "") |
| 11546 | "]")) | 11546 | "]")) |
| 11547 | 11547 | ||
| 11548 | (defconst org-link-escape-chars | 11548 | (defconst org-link-escape-chars |
| 11549 | '((" " . "%20") | 11549 | '((" " . "%20") |
| 11550 | ("[" . "%5B") | 11550 | ("[" . "%5B") |
| 11551 | ("]" . "%5d") | 11551 | ("]" . "%5d") |
| 11552 | ("\340" . "%E0") ; `a | 11552 | ("\340" . "%E0") ; `a |
| 11553 | ("\342" . "%E2") ; ^a | 11553 | ("\342" . "%E2") ; ^a |
| 11554 | ("\347" . "%E7") ; ,c | 11554 | ("\347" . "%E7") ; ,c |
| 11555 | ("\350" . "%E8") ; `e | 11555 | ("\350" . "%E8") ; `e |
| 11556 | ("\351" . "%E9") ; 'e | 11556 | ("\351" . "%E9") ; 'e |
| @@ -11567,7 +11567,7 @@ according to FMT (default from `org-email-link-description-format')." | |||
| 11567 | "Association list of escapes for some characters problematic in links. | 11567 | "Association list of escapes for some characters problematic in links. |
| 11568 | This is the list that is used for internal purposes.") | 11568 | This is the list that is used for internal purposes.") |
| 11569 | 11569 | ||
| 11570 | (defconst org-link-escape-chars-browser | 11570 | (defconst org-link-escape-chars-browser |
| 11571 | '((" " . "%20")) | 11571 | '((" " . "%20")) |
| 11572 | "Association list of escapes for some characters problematic in links. | 11572 | "Association list of escapes for some characters problematic in links. |
| 11573 | This is the list that is used before handing over to the browser.") | 11573 | This is the list that is used before handing over to the browser.") |
| @@ -11746,7 +11746,7 @@ With three \\[universal-argument] prefixes, negate the meaning of | |||
| 11746 | (setq org-stored-links (delq (assoc link org-stored-links) | 11746 | (setq org-stored-links (delq (assoc link org-stored-links) |
| 11747 | org-stored-links))) | 11747 | org-stored-links))) |
| 11748 | (setq desc (or desc (nth 1 entry))))) | 11748 | (setq desc (or desc (nth 1 entry))))) |
| 11749 | 11749 | ||
| 11750 | (if (string-match org-plain-link-re link) | 11750 | (if (string-match org-plain-link-re link) |
| 11751 | ;; URL-like link, normalize the use of angular brackets. | 11751 | ;; URL-like link, normalize the use of angular brackets. |
| 11752 | (setq link (org-make-link (org-remove-angle-brackets link)))) | 11752 | (setq link (org-make-link (org-remove-angle-brackets link)))) |
| @@ -12841,7 +12841,7 @@ to be run from that hook to fucntion properly." | |||
| 12841 | (when (string-match "\\S-" ins) | 12841 | (when (string-match "\\S-" ins) |
| 12842 | (or (equal (char-before) ?:) (insert ":")) | 12842 | (or (equal (char-before) ?:) (insert ":")) |
| 12843 | (insert ins) | 12843 | (insert ins) |
| 12844 | (or (equal (char-after) ?:) (insert ":"))))) | 12844 | (or (equal (char-after) ?:) (insert ":"))))) |
| 12845 | (char | 12845 | (char |
| 12846 | (setq org-time-was-given (equal (upcase char) char)) | 12846 | (setq org-time-was-given (equal (upcase char) char)) |
| 12847 | (setq time (org-read-date (equal (upcase char) "U") t nil | 12847 | (setq time (org-read-date (equal (upcase char) "U") t nil |
| @@ -13017,7 +13017,7 @@ See also the variable `org-reverse-note-order'." | |||
| 13017 | (org-end-of-subtree t) | 13017 | (org-end-of-subtree t) |
| 13018 | (org-paste-subtree level txt)) | 13018 | (org-paste-subtree level txt)) |
| 13019 | (t (error "This should not happen")))) | 13019 | (t (error "This should not happen")))) |
| 13020 | 13020 | ||
| 13021 | ((and (bobp) (not reversed)) | 13021 | ((and (bobp) (not reversed)) |
| 13022 | ;; Put it at the end, one level below level 1 | 13022 | ;; Put it at the end, one level below level 1 |
| 13023 | (save-restriction | 13023 | (save-restriction |
| @@ -13025,7 +13025,7 @@ See also the variable `org-reverse-note-order'." | |||
| 13025 | (goto-char (point-max)) | 13025 | (goto-char (point-max)) |
| 13026 | (if (not (bolp)) (newline)) | 13026 | (if (not (bolp)) (newline)) |
| 13027 | (org-paste-subtree (org-get-legal-level 1 1) txt))) | 13027 | (org-paste-subtree (org-get-legal-level 1 1) txt))) |
| 13028 | 13028 | ||
| 13029 | ((and (bobp) reversed) | 13029 | ((and (bobp) reversed) |
| 13030 | ;; Put it at the start, as level 1 | 13030 | ;; Put it at the start, as level 1 |
| 13031 | (save-restriction | 13031 | (save-restriction |
| @@ -13366,7 +13366,7 @@ Each function gets as its single argument a property list with at least | |||
| 13366 | the following elements: | 13366 | the following elements: |
| 13367 | 13367 | ||
| 13368 | (:type type-of-change :position pos-at-entry-start | 13368 | (:type type-of-change :position pos-at-entry-start |
| 13369 | :from old-state :to new-state) | 13369 | :from old-state :to new-state) |
| 13370 | 13370 | ||
| 13371 | Depending on the type, more properties may be present. | 13371 | Depending on the type, more properties may be present. |
| 13372 | 13372 | ||
| @@ -13515,7 +13515,7 @@ For calling through lisp, arg is also interpreted in the following way: | |||
| 13515 | (setq dostates (and (listp org-log-done) (memq 'state org-log-done) | 13515 | (setq dostates (and (listp org-log-done) (memq 'state org-log-done) |
| 13516 | (or (not org-todo-log-states) | 13516 | (or (not org-todo-log-states) |
| 13517 | (member state org-todo-log-states)))) | 13517 | (member state org-todo-log-states)))) |
| 13518 | 13518 | ||
| 13519 | (cond | 13519 | (cond |
| 13520 | ((and state (member state org-not-done-keywords) | 13520 | ((and state (member state org-not-done-keywords) |
| 13521 | (not (member this org-not-done-keywords))) | 13521 | (not (member this org-not-done-keywords))) |
| @@ -13748,8 +13748,7 @@ be removed." | |||
| 13748 | (goto-char (match-end 1)) | 13748 | (goto-char (match-end 1)) |
| 13749 | (setq col (current-column)) | 13749 | (setq col (current-column)) |
| 13750 | (goto-char (match-end 0)) | 13750 | (goto-char (match-end 0)) |
| 13751 | (if (eobp) (insert "\n")) | 13751 | (if (eobp) (insert "\n") (forward-char 1)) |
| 13752 | (forward-char 1) | ||
| 13753 | (if (and (not (looking-at outline-regexp)) | 13752 | (if (and (not (looking-at outline-regexp)) |
| 13754 | (looking-at (concat "[^\r\n]*?" org-keyword-time-regexp | 13753 | (looking-at (concat "[^\r\n]*?" org-keyword-time-regexp |
| 13755 | "[^\r\n]*")) | 13754 | "[^\r\n]*")) |
| @@ -13924,7 +13923,7 @@ r Show entries matching a regular expression" | |||
| 13924 | ((equal ans ?T) | 13923 | ((equal ans ?T) |
| 13925 | (call-interactively 'org-tags-sparse-tree)) | 13924 | (call-interactively 'org-tags-sparse-tree)) |
| 13926 | ((member ans '(?p ?P)) | 13925 | ((member ans '(?p ?P)) |
| 13927 | (setq kwd (completing-read "Property: " | 13926 | (setq kwd (completing-read "Property: " |
| 13928 | (mapcar 'list (org-buffer-property-keys)))) | 13927 | (mapcar 'list (org-buffer-property-keys)))) |
| 13929 | (setq value (completing-read "Value: " | 13928 | (setq value (completing-read "Value: " |
| 13930 | (mapcar 'list (org-property-values kwd)))) | 13929 | (mapcar 'list (org-property-values kwd)))) |
| @@ -14143,7 +14142,9 @@ are included in the output." | |||
| 14143 | 'keymap org-agenda-keymap | 14142 | 'keymap org-agenda-keymap |
| 14144 | 'help-echo | 14143 | 'help-echo |
| 14145 | (format "mouse-2 or RET jump to org file %s" | 14144 | (format "mouse-2 or RET jump to org file %s" |
| 14146 | (abbreviate-file-name buffer-file-name)))) | 14145 | (abbreviate-file-name |
| 14146 | (or (buffer-file-name (buffer-base-buffer)) | ||
| 14147 | (buffer-name (buffer-base-buffer))))))) | ||
| 14147 | (case-fold-search nil) | 14148 | (case-fold-search nil) |
| 14148 | lspos | 14149 | lspos |
| 14149 | tags tags-list tags-alist (llast 0) rtn level category i txt | 14150 | tags tags-list tags-alist (llast 0) rtn level category i txt |
| @@ -14256,7 +14257,7 @@ also TODO lines." | |||
| 14256 | (setq match (completing-read | 14257 | (setq match (completing-read |
| 14257 | "Match: " 'org-tags-completion-function nil nil nil | 14258 | "Match: " 'org-tags-completion-function nil nil nil |
| 14258 | 'org-tags-history)))) | 14259 | 'org-tags-history)))) |
| 14259 | 14260 | ||
| 14260 | ;; Parse the string and create a lisp form | 14261 | ;; Parse the string and create a lisp form |
| 14261 | (let ((match0 match) | 14262 | (let ((match0 match) |
| 14262 | (re (org-re "^&?\\([-+:]\\)?\\({[^}]+}\\|LEVEL=\\([0-9]+\\)\\|\\([[:alnum:]_]+\\)=\\({[^}]+}\\|\"[^\"]+\"\\)\\|[[:alnum:]_@]+\\)")) | 14263 | (re (org-re "^&?\\([-+:]\\)?\\({[^}]+}\\|LEVEL=\\([0-9]+\\)\\|\\([[:alnum:]_]+\\)=\\({[^}]+}\\|\"[^\"]+\"\\)\\|[[:alnum:]_@]+\\)")) |
| @@ -14419,12 +14420,12 @@ With prefix ARG, realign all tags in headings in the current buffer." | |||
| 14419 | (while (string-match "[-+&]+" tags) | 14420 | (while (string-match "[-+&]+" tags) |
| 14420 | ;; No boolean logic, just a list | 14421 | ;; No boolean logic, just a list |
| 14421 | (setq tags (replace-match ":" t t tags)))) | 14422 | (setq tags (replace-match ":" t t tags)))) |
| 14422 | 14423 | ||
| 14423 | (if (string-match "\\`[\t ]*\\'" tags) | 14424 | (if (string-match "\\`[\t ]*\\'" tags) |
| 14424 | (setq tags "") | 14425 | (setq tags "") |
| 14425 | (unless (string-match ":$" tags) (setq tags (concat tags ":"))) | 14426 | (unless (string-match ":$" tags) (setq tags (concat tags ":"))) |
| 14426 | (unless (string-match "^:" tags) (setq tags (concat ":" tags)))) | 14427 | (unless (string-match "^:" tags) (setq tags (concat ":" tags)))) |
| 14427 | 14428 | ||
| 14428 | ;; Insert new tags at the correct column | 14429 | ;; Insert new tags at the correct column |
| 14429 | (beginning-of-line 1) | 14430 | (beginning-of-line 1) |
| 14430 | (cond | 14431 | (cond |
| @@ -14691,9 +14692,9 @@ Returns the new tags string, or nil to not change the current settings." | |||
| 14691 | (setq current (delete tg current)) | 14692 | (setq current (delete tg current)) |
| 14692 | (loop for g in groups do | 14693 | (loop for g in groups do |
| 14693 | (if (member tg g) | 14694 | (if (member tg g) |
| 14694 | (mapcar (lambda (x) | 14695 | (mapc (lambda (x) |
| 14695 | (setq current (delete x current))) | 14696 | (setq current (delete x current))) |
| 14696 | g))) | 14697 | g))) |
| 14697 | (push tg current)) | 14698 | (push tg current)) |
| 14698 | (if exit-after-next (setq exit-after-next 'now)))) | 14699 | (if exit-after-next (setq exit-after-next 'now)))) |
| 14699 | 14700 | ||
| @@ -14743,7 +14744,7 @@ Returns the new tags string, or nil to not change the current settings." | |||
| 14743 | (let (tags) | 14744 | (let (tags) |
| 14744 | (save-excursion | 14745 | (save-excursion |
| 14745 | (goto-char (point-min)) | 14746 | (goto-char (point-min)) |
| 14746 | (while (re-search-forward | 14747 | (while (re-search-forward |
| 14747 | (org-re "[ \t]:\\([[:alnum:]_@:]+\\):[ \t\r\n]") nil t) | 14748 | (org-re "[ \t]:\\([[:alnum:]_@:]+\\):[ \t\r\n]") nil t) |
| 14748 | (when (equal (char-after (point-at-bol 0)) ?*) | 14749 | (when (equal (char-after (point-at-bol 0)) ?*) |
| 14749 | (mapc (lambda (x) (add-to-list 'tags x)) | 14750 | (mapc (lambda (x) (add-to-list 'tags x)) |
| @@ -14896,7 +14897,7 @@ If WHICH is nil or `all', get all properties. If WHICH is | |||
| 14896 | (unless (member key excluded) | 14897 | (unless (member key excluded) |
| 14897 | (push (cons key (or value "")) props))))) | 14898 | (push (cons key (or value "")) props))))) |
| 14898 | (append sum-props (nreverse props))))))) | 14899 | (append sum-props (nreverse props))))))) |
| 14899 | 14900 | ||
| 14900 | (defun org-entry-get (pom property &optional inherit) | 14901 | (defun org-entry-get (pom property &optional inherit) |
| 14901 | "Get value of PROPERTY for entry at point-or-marker POM. | 14902 | "Get value of PROPERTY for entry at point-or-marker POM. |
| 14902 | If INHERIT is non-nil and the entry does not have the property, | 14903 | If INHERIT is non-nil and the entry does not have the property, |
| @@ -14979,7 +14980,7 @@ If the property is not present at all, nil is returned." | |||
| 14979 | (or (org-up-heading-safe) (throw 'ex nil))))) | 14980 | (or (org-up-heading-safe) (throw 'ex nil))))) |
| 14980 | (or tmp (cdr (assoc property org-local-properties)) | 14981 | (or tmp (cdr (assoc property org-local-properties)) |
| 14981 | (cdr (assoc property org-global-properties)))))) | 14982 | (cdr (assoc property org-global-properties)))))) |
| 14982 | 14983 | ||
| 14983 | (defun org-entry-put (pom property value) | 14984 | (defun org-entry-put (pom property value) |
| 14984 | "Set PROPERTY to VALUE for entry at point-or-marker POM." | 14985 | "Set PROPERTY to VALUE for entry at point-or-marker POM." |
| 14985 | (org-with-point-at pom | 14986 | (org-with-point-at pom |
| @@ -15056,10 +15057,10 @@ internally: ARCHIVE, CATEGORY, SUMMARY, DESCRIPTION, LOCATION, and LOGGING." | |||
| 15056 | 15057 | ||
| 15057 | (when include-specials | 15058 | (when include-specials |
| 15058 | (setq rtn (append org-special-properties rtn))) | 15059 | (setq rtn (append org-special-properties rtn))) |
| 15059 | 15060 | ||
| 15060 | (when include-defaults | 15061 | (when include-defaults |
| 15061 | (mapc (lambda (x) (add-to-list 'rtn x)) org-default-properties)) | 15062 | (mapc (lambda (x) (add-to-list 'rtn x)) org-default-properties)) |
| 15062 | 15063 | ||
| 15063 | (sort rtn (lambda (a b) (string< (upcase a) (upcase b)))))) | 15064 | (sort rtn (lambda (a b) (string< (upcase a) (upcase b)))))) |
| 15064 | 15065 | ||
| 15065 | (defun org-property-values (key) | 15066 | (defun org-property-values (key) |
| @@ -15134,7 +15135,7 @@ in the current file." | |||
| 15134 | (let* ((prop (completing-read | 15135 | (let* ((prop (completing-read |
| 15135 | "Property: " (org-entry-properties nil 'standard)))) | 15136 | "Property: " (org-entry-properties nil 'standard)))) |
| 15136 | (list prop))) | 15137 | (list prop))) |
| 15137 | (message (concat "Property " property | 15138 | (message (concat "Property " property |
| 15138 | (if (org-entry-delete nil property) | 15139 | (if (org-entry-delete nil property) |
| 15139 | " deleted" | 15140 | " deleted" |
| 15140 | " was not present in the entry")))) | 15141 | " was not present in the entry")))) |
| @@ -15143,7 +15144,7 @@ in the current file." | |||
| 15143 | "Remove PROPERTY globally, from all entries." | 15144 | "Remove PROPERTY globally, from all entries." |
| 15144 | (interactive | 15145 | (interactive |
| 15145 | (let* ((prop (completing-read | 15146 | (let* ((prop (completing-read |
| 15146 | "Globally remove property: " | 15147 | "Globally remove property: " |
| 15147 | (mapcar 'list (org-buffer-property-keys))))) | 15148 | (mapcar 'list (org-buffer-property-keys))))) |
| 15148 | (list prop))) | 15149 | (list prop))) |
| 15149 | (save-excursion | 15150 | (save-excursion |
| @@ -15180,7 +15181,7 @@ completion." | |||
| 15180 | (let (vals) | 15181 | (let (vals) |
| 15181 | (cond | 15182 | (cond |
| 15182 | ((equal property "TODO") | 15183 | ((equal property "TODO") |
| 15183 | (setq vals (org-with-point-at pom | 15184 | (setq vals (org-with-point-at pom |
| 15184 | (append org-todo-keywords-1 '(""))))) | 15185 | (append org-todo-keywords-1 '(""))))) |
| 15185 | ((equal property "PRIORITY") | 15186 | ((equal property "PRIORITY") |
| 15186 | (let ((n org-lowest-priority)) | 15187 | (let ((n org-lowest-priority)) |
| @@ -15190,7 +15191,7 @@ completion." | |||
| 15190 | ((member property org-special-properties)) | 15191 | ((member property org-special-properties)) |
| 15191 | (t | 15192 | (t |
| 15192 | (setq vals (org-entry-get pom (concat property "_ALL") 'inherit)) | 15193 | (setq vals (org-entry-get pom (concat property "_ALL") 'inherit)) |
| 15193 | 15194 | ||
| 15194 | (when (and vals (string-match "\\S-" vals)) | 15195 | (when (and vals (string-match "\\S-" vals)) |
| 15195 | (setq vals (car (read-from-string (concat "(" vals ")")))) | 15196 | (setq vals (car (read-from-string (concat "(" vals ")")))) |
| 15196 | (setq vals (mapcar (lambda (x) | 15197 | (setq vals (mapcar (lambda (x) |
| @@ -15284,6 +15285,7 @@ This is the compiled version of the format.") | |||
| 15284 | (org-defkey org-columns-map "e" 'org-columns-edit-value) | 15285 | (org-defkey org-columns-map "e" 'org-columns-edit-value) |
| 15285 | (org-defkey org-columns-map "\C-c\C-t" 'org-columns-todo) | 15286 | (org-defkey org-columns-map "\C-c\C-t" 'org-columns-todo) |
| 15286 | (org-defkey org-columns-map "\C-c\C-c" 'org-columns-set-tags-or-toggle) | 15287 | (org-defkey org-columns-map "\C-c\C-c" 'org-columns-set-tags-or-toggle) |
| 15288 | (org-defkey org-columns-map "\C-c\C-o" 'org-columns-open-link) | ||
| 15287 | (org-defkey org-columns-map "v" 'org-columns-show-value) | 15289 | (org-defkey org-columns-map "v" 'org-columns-show-value) |
| 15288 | (org-defkey org-columns-map "q" 'org-columns-quit) | 15290 | (org-defkey org-columns-map "q" 'org-columns-quit) |
| 15289 | (org-defkey org-columns-map "r" 'org-columns-redo) | 15291 | (org-defkey org-columns-map "r" 'org-columns-redo) |
| @@ -15310,7 +15312,7 @@ This is the compiled version of the format.") | |||
| 15310 | ["Next allowed value" org-columns-next-allowed-value t] | 15312 | ["Next allowed value" org-columns-next-allowed-value t] |
| 15311 | ["Previous allowed value" org-columns-previous-allowed-value t] | 15313 | ["Previous allowed value" org-columns-previous-allowed-value t] |
| 15312 | ["Show full value" org-columns-show-value t] | 15314 | ["Show full value" org-columns-show-value t] |
| 15313 | ["Edit allowed" org-columns-edit-allowed t] | 15315 | ["Edit allowed values" org-columns-edit-allowed t] |
| 15314 | "--" | 15316 | "--" |
| 15315 | ["Edit column attributes" org-columns-edit-attributes t] | 15317 | ["Edit column attributes" org-columns-edit-attributes t] |
| 15316 | ["Increase column width" org-columns-widen t] | 15318 | ["Increase column width" org-columns-widen t] |
| @@ -15325,6 +15327,8 @@ This is the compiled version of the format.") | |||
| 15325 | ["OVERVIEW" org-overview t] | 15327 | ["OVERVIEW" org-overview t] |
| 15326 | ["Refresh columns display" org-columns-redo t] | 15328 | ["Refresh columns display" org-columns-redo t] |
| 15327 | "--" | 15329 | "--" |
| 15330 | ["Open link" org-columns-open-link t] | ||
| 15331 | "--" | ||
| 15328 | ["Quit" org-columns-quit t])) | 15332 | ["Quit" org-columns-quit t])) |
| 15329 | 15333 | ||
| 15330 | (defun org-columns-new-overlay (beg end &optional string face) | 15334 | (defun org-columns-new-overlay (beg end &optional string face) |
| @@ -15344,7 +15348,7 @@ This is the compiled version of the format.") | |||
| 15344 | (beginning-of-line 1) | 15348 | (beginning-of-line 1) |
| 15345 | (and (looking-at "\\(\\**\\)\\(\\* \\)") | 15349 | (and (looking-at "\\(\\**\\)\\(\\* \\)") |
| 15346 | (org-get-level-face 2)))) | 15350 | (org-get-level-face 2)))) |
| 15347 | (color (list :foreground | 15351 | (color (list :foreground |
| 15348 | (face-attribute (or level-face 'default) :foreground))) | 15352 | (face-attribute (or level-face 'default) :foreground))) |
| 15349 | props pom property ass width f string ov column val modval) | 15353 | props pom property ass width f string ov column val modval) |
| 15350 | ;; Check if the entry is in another buffer. | 15354 | ;; Check if the entry is in another buffer. |
| @@ -15464,7 +15468,7 @@ This is the compiled version of the format.") | |||
| 15464 | (and (match-end 3) (not (assoc "PRIORITY" fmt)) (concat " " (match-string 3 item))) | 15468 | (and (match-end 3) (not (assoc "PRIORITY" fmt)) (concat " " (match-string 3 item))) |
| 15465 | " " (match-string 4 item) | 15469 | " " (match-string 4 item) |
| 15466 | (and (match-end 5) (not (assoc "TAGS" fmt)) (concat " " (match-string 5 item))))))) | 15470 | (and (match-end 5) (not (assoc "TAGS" fmt)) (concat " " (match-string 5 item))))))) |
| 15467 | 15471 | ||
| 15468 | (defun org-columns-show-value () | 15472 | (defun org-columns-show-value () |
| 15469 | "Show the full value of the property." | 15473 | "Show the full value of the property." |
| 15470 | (interactive) | 15474 | (interactive) |
| @@ -15560,7 +15564,7 @@ Where possible, use the standard interface for changing this line." | |||
| 15560 | (remove-text-properties (max (point-min) (1- bol)) eol '(read-only t)) | 15564 | (remove-text-properties (max (point-min) (1- bol)) eol '(read-only t)) |
| 15561 | (unwind-protect | 15565 | (unwind-protect |
| 15562 | (progn | 15566 | (progn |
| 15563 | (setq org-columns-overlays | 15567 | (setq org-columns-overlays |
| 15564 | (org-delete-all line-overlays org-columns-overlays)) | 15568 | (org-delete-all line-overlays org-columns-overlays)) |
| 15565 | (mapc 'org-delete-overlay line-overlays) | 15569 | (mapc 'org-delete-overlay line-overlays) |
| 15566 | (org-columns-eval eval)) | 15570 | (org-columns-eval eval)) |
| @@ -15576,7 +15580,7 @@ Where possible, use the standard interface for changing this line." | |||
| 15576 | (let ((pre (buffer-substring (match-beginning 0) (match-beginning 3))) | 15580 | (let ((pre (buffer-substring (match-beginning 0) (match-beginning 3))) |
| 15577 | (txt (match-string 3)) | 15581 | (txt (match-string 3)) |
| 15578 | (post "") | 15582 | (post "") |
| 15579 | txt2) | 15583 | txt2) |
| 15580 | (if (string-match (org-re "[ \t]+:[[:alnum:]:_@]+:[ \t]*$") txt) | 15584 | (if (string-match (org-re "[ \t]+:[[:alnum:]:_@]+:[ \t]*$") txt) |
| 15581 | (setq post (match-string 0 txt) | 15585 | (setq post (match-string 0 txt) |
| 15582 | txt (substring txt 0 (match-beginning 0)))) | 15586 | txt (substring txt 0 (match-beginning 0)))) |
| @@ -15594,8 +15598,9 @@ Where possible, use the standard interface for changing this line." | |||
| 15594 | (key1 (concat key "_ALL")) | 15598 | (key1 (concat key "_ALL")) |
| 15595 | (allowed (org-entry-get (point) key1 t)) | 15599 | (allowed (org-entry-get (point) key1 t)) |
| 15596 | nval) | 15600 | nval) |
| 15601 | ;; FIXME: Cover editing TODO, TAGS etc inbuffer settings.???? | ||
| 15597 | (setq nval (read-string "Allowed: " allowed)) | 15602 | (setq nval (read-string "Allowed: " allowed)) |
| 15598 | (org-entry-put | 15603 | (org-entry-put |
| 15599 | (cond ((marker-position org-entry-property-inherited-from) | 15604 | (cond ((marker-position org-entry-property-inherited-from) |
| 15600 | org-entry-property-inherited-from) | 15605 | org-entry-property-inherited-from) |
| 15601 | ((marker-position org-columns-top-level-marker) | 15606 | ((marker-position org-columns-top-level-marker) |
| @@ -15606,6 +15611,9 @@ Where possible, use the standard interface for changing this line." | |||
| 15606 | (let (hidep) | 15611 | (let (hidep) |
| 15607 | (save-excursion | 15612 | (save-excursion |
| 15608 | (beginning-of-line 1) | 15613 | (beginning-of-line 1) |
| 15614 | ;; `next-line' is needed here, because it skips invisible line. | ||
| 15615 | ;; FIXME: RMS says this should be wrapped into `with-no-warnings' | ||
| 15616 | ;; but I don't know how to do this and keep the code XEmacs compatible. | ||
| 15609 | (condition-case nil (next-line 1) (error nil)) | 15617 | (condition-case nil (next-line 1) (error nil)) |
| 15610 | (setq hidep (org-on-heading-p 1))) | 15618 | (setq hidep (org-on-heading-p 1))) |
| 15611 | (eval form) | 15619 | (eval form) |
| @@ -15654,7 +15662,7 @@ Where possible, use the standard interface for changing this line." | |||
| 15654 | (remove-text-properties (1- bol) eol '(read-only t)) | 15662 | (remove-text-properties (1- bol) eol '(read-only t)) |
| 15655 | (unwind-protect | 15663 | (unwind-protect |
| 15656 | (progn | 15664 | (progn |
| 15657 | (setq org-columns-overlays | 15665 | (setq org-columns-overlays |
| 15658 | (org-delete-all line-overlays org-columns-overlays)) | 15666 | (org-delete-all line-overlays org-columns-overlays)) |
| 15659 | (mapc 'org-delete-overlay line-overlays) | 15667 | (mapc 'org-delete-overlay line-overlays) |
| 15660 | (org-columns-eval '(org-entry-put pom key nval))) | 15668 | (org-columns-eval '(org-entry-put pom key nval))) |
| @@ -15670,15 +15678,21 @@ Where possible, use the standard interface for changing this line." | |||
| 15670 | (< emacs-major-version 22)) | 15678 | (< emacs-major-version 22)) |
| 15671 | (error "Emacs 22 is required for the columns feature"))))) | 15679 | (error "Emacs 22 is required for the columns feature"))))) |
| 15672 | 15680 | ||
| 15673 | ;; FIXME: does not yet work | 15681 | (defun org-columns-open-link (&optional arg) |
| 15674 | (defun org-columns-follow-link () | 15682 | (interactive "P") |
| 15675 | (let ((key (get-char-property (point) 'org-columns-key)) | 15683 | (let ((key (get-char-property (point) 'org-columns-key)) |
| 15676 | (value (get-char-property (point) 'org-columns-value))) | 15684 | (value (get-char-property (point) 'org-columns-value))) |
| 15677 | (if (or (string-match org-bracket-link-regexp value) | 15685 | (org-open-link-from-string arg))) |
| 15678 | (string-match org-angle-link-re value) | 15686 | |
| 15679 | (string-match org-plain-link-re value)) | 15687 | (defun org-open-link-from-string (s &optional arg) |
| 15680 | (org-open-at-point) ; fixme | 15688 | "Open a link in the string S, as if it was in Org-mode." |
| 15681 | (error "No link in this value")))) | 15689 | (interactive) |
| 15690 | (with-temp-buffer | ||
| 15691 | (let ((org-inhibit-startup t)) | ||
| 15692 | (org-mode) | ||
| 15693 | (insert s) | ||
| 15694 | (goto-char (point-min)) | ||
| 15695 | (org-open-at-point arg)))) | ||
| 15682 | 15696 | ||
| 15683 | (defun org-columns-get-format-and-top-level () | 15697 | (defun org-columns-get-format-and-top-level () |
| 15684 | (let (fmt) | 15698 | (let (fmt) |
| @@ -15815,7 +15829,7 @@ Where possible, use the standard interface for changing this line." | |||
| 15815 | (error "Cannot shift this column further to the left")) | 15829 | (error "Cannot shift this column further to the left")) |
| 15816 | (backward-char 1) | 15830 | (backward-char 1) |
| 15817 | (org-columns-move-right) | 15831 | (org-columns-move-right) |
| 15818 | (backward-char 1))) | 15832 | (backward-char 1))) |
| 15819 | 15833 | ||
| 15820 | (defun org-columns-store-format () | 15834 | (defun org-columns-store-format () |
| 15821 | "Store the text version of the current columns format in appropriate place. | 15835 | "Store the text version of the current columns format in appropriate place. |
| @@ -15922,7 +15936,7 @@ display, or in the #+COLUMNS line of the current buffer." | |||
| 15922 | (setq pos (org-overlay-start ov)) | 15936 | (setq pos (org-overlay-start ov)) |
| 15923 | (goto-char pos) | 15937 | (goto-char pos) |
| 15924 | (when (setq val (cdr (assoc property | 15938 | (when (setq val (cdr (assoc property |
| 15925 | (get-text-property | 15939 | (get-text-property |
| 15926 | (point-at-bol) 'org-summaries)))) | 15940 | (point-at-bol) 'org-summaries)))) |
| 15927 | (setq fmt (org-overlay-get ov 'org-columns-format)) | 15941 | (setq fmt (org-overlay-get ov 'org-columns-format)) |
| 15928 | (org-overlay-put ov 'org-columns-value val) | 15942 | (org-overlay-put ov 'org-columns-value val) |
| @@ -15978,7 +15992,7 @@ display, or in the #+COLUMNS line of the current buffer." | |||
| 15978 | (if flag str val) format)))) | 15992 | (if flag str val) format)))) |
| 15979 | (aset lflag level t)) | 15993 | (aset lflag level t)) |
| 15980 | ;; clear accumulators for deeper levels | 15994 | ;; clear accumulators for deeper levels |
| 15981 | (loop for l from (1+ level) to (1- lmax) do | 15995 | (loop for l from (1+ level) to (1- lmax) do |
| 15982 | (aset lsum l 0) | 15996 | (aset lsum l 0) |
| 15983 | (aset lflag l nil))) | 15997 | (aset lflag l nil))) |
| 15984 | ((>= level last-level) | 15998 | ((>= level last-level) |
| @@ -16187,12 +16201,12 @@ and tailing newline characters." | |||
| 16187 | "Create a dynamic block capturing a column view table." | 16201 | "Create a dynamic block capturing a column view table." |
| 16188 | (interactive) | 16202 | (interactive) |
| 16189 | (let ((defaults '(:name "columnview" :hlines 1)) | 16203 | (let ((defaults '(:name "columnview" :hlines 1)) |
| 16190 | (id (completing-read | 16204 | (id (completing-read |
| 16191 | "Capture columns (local, global, entry with :ID: property) [local]: " | 16205 | "Capture columns (local, global, entry with :ID: property) [local]: " |
| 16192 | (append '(("global") ("local")) | 16206 | (append '(("global") ("local")) |
| 16193 | (mapcar 'list (org-property-values "ID")))))) | 16207 | (mapcar 'list (org-property-values "ID")))))) |
| 16194 | (if (equal id "") (setq id 'local)) | 16208 | (if (equal id "") (setq id 'local)) |
| 16195 | (if (equal id "global") (setq id 'global)) | 16209 | (if (equal id "global") (setq id 'global)) |
| 16196 | (setq defaults (append defaults (list :id id))) | 16210 | (setq defaults (append defaults (list :id id))) |
| 16197 | (org-create-dblock defaults) | 16211 | (org-create-dblock defaults) |
| 16198 | (org-update-dblock))) | 16212 | (org-update-dblock))) |
| @@ -16323,6 +16337,7 @@ user." | |||
| 16323 | (if (equal with-time '(16)) 0 org-time-stamp-rounding-minutes)) | 16337 | (if (equal with-time '(16)) 0 org-time-stamp-rounding-minutes)) |
| 16324 | (ct (org-current-time)) | 16338 | (ct (org-current-time)) |
| 16325 | (def (or default-time ct)) | 16339 | (def (or default-time ct)) |
| 16340 | ; (defdecode (decode-time def)) | ||
| 16326 | (calendar-move-hook nil) | 16341 | (calendar-move-hook nil) |
| 16327 | (view-diary-entries-initially nil) | 16342 | (view-diary-entries-initially nil) |
| 16328 | (view-calendar-holidays-initially nil) | 16343 | (view-calendar-holidays-initially nil) |
| @@ -16415,7 +16430,7 @@ user." | |||
| 16415 | minute (if (match-end 3) | 16430 | minute (if (match-end 3) |
| 16416 | (string-to-number (match-string 3 ans)) | 16431 | (string-to-number (match-string 3 ans)) |
| 16417 | 0) | 16432 | 0) |
| 16418 | pm (equal ?p | 16433 | pm (equal ?p |
| 16419 | (string-to-char (downcase (match-string 4 ans))))) | 16434 | (string-to-char (downcase (match-string 4 ans))))) |
| 16420 | (if (and (= hour 12) (not pm)) | 16435 | (if (and (= hour 12) (not pm)) |
| 16421 | (setq hour 0) | 16436 | (setq hour 0) |
| @@ -16440,9 +16455,9 @@ user." | |||
| 16440 | (substring ans (match-end 7))))) | 16455 | (substring ans (match-end 7))))) |
| 16441 | 16456 | ||
| 16442 | (setq tl (parse-time-string ans) | 16457 | (setq tl (parse-time-string ans) |
| 16443 | year (or (nth 5 tl) (string-to-number (format-time-string "%Y" def))) | ||
| 16444 | month (or (nth 4 tl) (string-to-number (format-time-string "%m" def))) | ||
| 16445 | day (or (nth 3 tl) (string-to-number (format-time-string "%d" def))) | 16458 | day (or (nth 3 tl) (string-to-number (format-time-string "%d" def))) |
| 16459 | month (or (nth 4 tl) (string-to-number (format-time-string "%m" def))) | ||
| 16460 | year (or (nth 5 tl) (string-to-number (format-time-string "%Y" def))) | ||
| 16446 | hour (or (nth 2 tl) (string-to-number (format-time-string "%H" def))) | 16461 | hour (or (nth 2 tl) (string-to-number (format-time-string "%H" def))) |
| 16447 | minute (or (nth 1 tl) (string-to-number (format-time-string "%M" def))) | 16462 | minute (or (nth 1 tl) (string-to-number (format-time-string "%M" def))) |
| 16448 | second (or (nth 0 tl) 0) | 16463 | second (or (nth 0 tl) 0) |
| @@ -16471,11 +16486,25 @@ user." | |||
| 16471 | (format "%04d-%02d-%02d %02d:%02d" year month day hour minute) | 16486 | (format "%04d-%02d-%02d %02d:%02d" year month day hour minute) |
| 16472 | (format "%04d-%02d-%02d" year month day))))) | 16487 | (format "%04d-%02d-%02d" year month day))))) |
| 16473 | 16488 | ||
| 16489 | ;(defun org-parse-for-shift (n1 n2 given-dec default-dec) | ||
| 16490 | ; (cond | ||
| 16491 | ; ((not (nth n1 given-dec)) | ||
| 16492 | ; (nth n1 default-dec)) | ||
| 16493 | ; ((or (> (nth n1 given-dec) (nth n1 (default-dec))) | ||
| 16494 | ; (not org-read-date-prefer-future)) | ||
| 16495 | ; (nth n1 given-dec)) | ||
| 16496 | ; (t (1+ | ||
| 16497 | ; (if (nth 3 given-dec) | ||
| 16498 | ; (nth 3 given-dec) | ||
| 16499 | ; (if (> (nth | ||
| 16500 | ; (setq given | ||
| 16501 | ; (if (and | ||
| 16502 | |||
| 16474 | (defvar parse-time-weekdays) | 16503 | (defvar parse-time-weekdays) |
| 16475 | 16504 | ||
| 16476 | (defun org-read-date-get-relative (s today default) | 16505 | (defun org-read-date-get-relative (s today default) |
| 16477 | "Check string S for special relative date string. | 16506 | "Check string S for special relative date string. |
| 16478 | TODAY and DEFAULT are ionternal times, for today and for a default. | 16507 | TODAY and DEFAULT are internal times, for today and for a default. |
| 16479 | Return shift list (N what def-flag) | 16508 | Return shift list (N what def-flag) |
| 16480 | WHAT is \"d\", \"w\", \"m\", or \"y\" for day. week, month, year. | 16509 | WHAT is \"d\", \"w\", \"m\", or \"y\" for day. week, month, year. |
| 16481 | N is the number if WHATs to shift | 16510 | N is the number if WHATs to shift |
| @@ -16483,7 +16512,7 @@ DEF-FLAG is t when a double ++ or -- indicates shift relative to | |||
| 16483 | the DEFAULT date rather than TODAY." | 16512 | the DEFAULT date rather than TODAY." |
| 16484 | (when (string-match | 16513 | (when (string-match |
| 16485 | (concat | 16514 | (concat |
| 16486 | "\\`[ \t]*\\([-+]\\{1,2\\}\\)?" | 16515 | "\\`[ \t]*\\([-+]\\{1,2\\}\\)" |
| 16487 | "\\([0-9]+\\)?" | 16516 | "\\([0-9]+\\)?" |
| 16488 | "\\([dwmy]\\|\\(" (mapconcat 'car parse-time-weekdays "\\|") "\\)\\)?" | 16517 | "\\([dwmy]\\|\\(" (mapconcat 'car parse-time-weekdays "\\|") "\\)\\)?" |
| 16489 | "\\([ \t]\\|$\\)") s) | 16518 | "\\([ \t]\\|$\\)") s) |
| @@ -17101,7 +17130,7 @@ in the timestamp determines what will be changed." | |||
| 17101 | (setq ng 6 new (car (rassoc (+ n (cdr (assoc (match-string 6 s) idx))) idx)))) | 17130 | (setq ng 6 new (car (rassoc (+ n (cdr (assoc (match-string 6 s) idx))) idx)))) |
| 17102 | ((org-pos-in-match-range pos 5) | 17131 | ((org-pos-in-match-range pos 5) |
| 17103 | (setq ng 5 new (format "%d" (max 1 (+ n (string-to-number (match-string 5 s)))))))) | 17132 | (setq ng 5 new (format "%d" (max 1 (+ n (string-to-number (match-string 5 s)))))))) |
| 17104 | 17133 | ||
| 17105 | (when ng | 17134 | (when ng |
| 17106 | (setq s (concat | 17135 | (setq s (concat |
| 17107 | (substring s 0 (match-beginning ng)) | 17136 | (substring s 0 (match-beginning ng)) |
| @@ -17180,19 +17209,19 @@ belonging to the category \"Work\"." | |||
| 17180 | (if (equal filter '(4)) | 17209 | (if (equal filter '(4)) |
| 17181 | (setq filter (read-from-minibuffer "Regexp filter: "))) | 17210 | (setq filter (read-from-minibuffer "Regexp filter: "))) |
| 17182 | (let* ((cnt 0) ; count added events | 17211 | (let* ((cnt 0) ; count added events |
| 17183 | (today (org-date-to-gregorian | 17212 | (today (org-date-to-gregorian |
| 17184 | (time-to-days (current-time)))) | 17213 | (time-to-days (current-time)))) |
| 17185 | (files (org-agenda-files)) entries file) | 17214 | (files (org-agenda-files)) entries file) |
| 17186 | ;; Get all entries which may contain an appt | 17215 | ;; Get all entries which may contain an appt |
| 17187 | (while (setq file (pop files)) | 17216 | (while (setq file (pop files)) |
| 17188 | (setq entries | 17217 | (setq entries |
| 17189 | (append entries | 17218 | (append entries |
| 17190 | (org-agenda-get-day-entries | 17219 | (org-agenda-get-day-entries |
| 17191 | file today | 17220 | file today |
| 17192 | :timestamp :scheduled :deadline)))) | 17221 | :timestamp :scheduled :deadline)))) |
| 17193 | (setq entries (delq nil entries)) | 17222 | (setq entries (delq nil entries)) |
| 17194 | ;; Map thru entries and find if they pass thru the filter | 17223 | ;; Map thru entries and find if they pass thru the filter |
| 17195 | (mapc | 17224 | (mapc |
| 17196 | (lambda(x) | 17225 | (lambda(x) |
| 17197 | (let* ((evt (org-trim (get-text-property 1 'txt x))) | 17226 | (let* ((evt (org-trim (get-text-property 1 'txt x))) |
| 17198 | (cat (get-text-property 1 'org-category x)) | 17227 | (cat (get-text-property 1 'org-category x)) |
| @@ -17200,15 +17229,15 @@ belonging to the category \"Work\"." | |||
| 17200 | (ok (or (null filter) | 17229 | (ok (or (null filter) |
| 17201 | (and (stringp filter) (string-match filter evt)) | 17230 | (and (stringp filter) (string-match filter evt)) |
| 17202 | (and (listp filter) | 17231 | (and (listp filter) |
| 17203 | (or (string-match | 17232 | (or (string-match |
| 17204 | (cadr (assoc 'category filter)) cat) | 17233 | (cadr (assoc 'category filter)) cat) |
| 17205 | (string-match | 17234 | (string-match |
| 17206 | (cadr (assoc 'headline filter)) evt)))))) | 17235 | (cadr (assoc 'headline filter)) evt)))))) |
| 17207 | ;; FIXME Shall we remove text-properties for the appt text? | 17236 | ;; FIXME Shall we remove text-properties for the appt text? |
| 17208 | ;; (setq evt (set-text-properties 0 (length evt) nil evt)) | 17237 | ;; (setq evt (set-text-properties 0 (length evt) nil evt)) |
| 17209 | (when (and ok tod) | 17238 | (when (and ok tod) |
| 17210 | (setq tod (number-to-string tod) | 17239 | (setq tod (number-to-string tod) |
| 17211 | tod (when (string-match | 17240 | tod (when (string-match |
| 17212 | "\\([0-9]\\{1,2\\}\\)\\([0-9]\\{2\\}\\)" tod) | 17241 | "\\([0-9]\\{1,2\\}\\)\\([0-9]\\{2\\}\\)" tod) |
| 17213 | (concat (match-string 1 tod) ":" | 17242 | (concat (match-string 1 tod) ":" |
| 17214 | (match-string 2 tod)))) | 17243 | (match-string 2 tod)))) |
| @@ -17690,7 +17719,7 @@ the returned times will be formatted strings." | |||
| 17690 | (setq total-time (+ (or total-time 0) | 17719 | (setq total-time (+ (or total-time 0) |
| 17691 | org-clock-file-total-minutes))))))) | 17720 | org-clock-file-total-minutes))))))) |
| 17692 | (goto-char pos) | 17721 | (goto-char pos) |
| 17693 | 17722 | ||
| 17694 | (unless (eq scope 'agenda) | 17723 | (unless (eq scope 'agenda) |
| 17695 | (org-clock-sum ts te) | 17724 | (org-clock-sum ts te) |
| 17696 | (goto-char (point-min)) | 17725 | (goto-char (point-min)) |
| @@ -17735,7 +17764,7 @@ the returned times will be formatted strings." | |||
| 17735 | (insert-before-markers | 17764 | (insert-before-markers |
| 17736 | "|-\n|" | 17765 | "|-\n|" |
| 17737 | (if (eq scope 'agenda) "|" "") | 17766 | (if (eq scope 'agenda) "|" "") |
| 17738 | "|" | 17767 | "|" |
| 17739 | "*Total time*| " | 17768 | "*Total time*| " |
| 17740 | (format "*%d:%02d*" h m) | 17769 | (format "*%d:%02d*" h m) |
| 17741 | "|\n|-\n") | 17770 | "|\n|-\n") |
| @@ -18260,7 +18289,7 @@ Pressing `<' twice means to restrict to the current subtree or region | |||
| 18260 | (region-p (org-region-active-p)) | 18289 | (region-p (org-region-active-p)) |
| 18261 | (custom org-agenda-custom-commands) | 18290 | (custom org-agenda-custom-commands) |
| 18262 | (selstring "") | 18291 | (selstring "") |
| 18263 | restriction | 18292 | restriction second-time |
| 18264 | c entry key type match prefixes rmheader header-end custom1 desc) | 18293 | c entry key type match prefixes rmheader header-end custom1 desc) |
| 18265 | (save-window-excursion | 18294 | (save-window-excursion |
| 18266 | (delete-other-windows) | 18295 | (delete-other-windows) |
| @@ -18298,7 +18327,7 @@ L Timeline for current buffer # List stuck projects (!=configure) | |||
| 18298 | (goto-char header-end) | 18327 | (goto-char header-end) |
| 18299 | (delete-region (point) (point-max)) | 18328 | (delete-region (point) (point-max)) |
| 18300 | (while (setq entry (pop custom1)) | 18329 | (while (setq entry (pop custom1)) |
| 18301 | (setq key (car entry) desc (nth 1 entry) | 18330 | (setq key (car entry) desc (nth 1 entry) |
| 18302 | type (nth 2 entry) match (nth 3 entry)) | 18331 | type (nth 2 entry) match (nth 3 entry)) |
| 18303 | (if (> (length key) 1) | 18332 | (if (> (length key) 1) |
| 18304 | (add-to-list 'prefixes (string-to-char key)) | 18333 | (add-to-list 'prefixes (string-to-char key)) |
| @@ -18339,9 +18368,12 @@ L Timeline for current buffer # List stuck projects (!=configure) | |||
| 18339 | "Prefix key")))) | 18368 | "Prefix key")))) |
| 18340 | prefixes)) | 18369 | prefixes)) |
| 18341 | (goto-char (point-min)) | 18370 | (goto-char (point-min)) |
| 18342 | (if (and (fboundp 'fit-window-to-buffer) | 18371 | (when (fboundp 'fit-window-to-buffer) |
| 18343 | (not (pos-visible-in-window-p (point-max)))) | 18372 | (if second-time |
| 18344 | (fit-window-to-buffer)) | 18373 | (if (not (pos-visible-in-window-p (point-max))) |
| 18374 | (fit-window-to-buffer)) | ||
| 18375 | (setq second-time t) | ||
| 18376 | (fit-window-to-buffer))) | ||
| 18345 | (message "Press key for agenda command%s:" | 18377 | (message "Press key for agenda command%s:" |
| 18346 | (if restrict-ok | 18378 | (if restrict-ok |
| 18347 | (if restriction | 18379 | (if restriction |
| @@ -20694,7 +20726,7 @@ With prefix ARG, go forward that many times the current span." | |||
| 20694 | (list (car org-agenda-last-arguments) sd nd t))) | 20726 | (list (car org-agenda-last-arguments) sd nd t))) |
| 20695 | (org-agenda-redo) | 20727 | (org-agenda-redo) |
| 20696 | (org-agenda-find-same-or-today-or-agenda cnt)))) | 20728 | (org-agenda-find-same-or-today-or-agenda cnt)))) |
| 20697 | 20729 | ||
| 20698 | (defun org-agenda-earlier (arg) | 20730 | (defun org-agenda-earlier (arg) |
| 20699 | "Go backward in time by the current span. | 20731 | "Go backward in time by the current span. |
| 20700 | With prefix ARG, go backward that many times the current span." | 20732 | With prefix ARG, go backward that many times the current span." |
| @@ -20988,11 +21020,19 @@ If this information is not given, the function uses the tree at point." | |||
| 20988 | (defun org-agenda-open-link () | 21020 | (defun org-agenda-open-link () |
| 20989 | "Follow the link in the current line, if any." | 21021 | "Follow the link in the current line, if any." |
| 20990 | (interactive) | 21022 | (interactive) |
| 21023 | (org-agenda-copy-local-variable 'org-link-abbrev-alist-local) | ||
| 20991 | (save-excursion | 21024 | (save-excursion |
| 20992 | (save-restriction | 21025 | (save-restriction |
| 20993 | (narrow-to-region (point-at-bol) (point-at-eol)) | 21026 | (narrow-to-region (point-at-bol) (point-at-eol)) |
| 20994 | (org-open-at-point)))) | 21027 | (org-open-at-point)))) |
| 20995 | 21028 | ||
| 21029 | (defun org-agenda-copy-local-variable (var) | ||
| 21030 | "Get a variable from a referenced buffer and install it here." | ||
| 21031 | (let ((m (get-text-property (point) 'org-marker))) | ||
| 21032 | (when (and m (buffer-live-p (marker-buffer m))) | ||
| 21033 | (org-set-local var (with-current-buffer (marker-buffer m) | ||
| 21034 | (symbol-value var)))))) | ||
| 21035 | |||
| 20996 | (defun org-agenda-switch-to (&optional delete-other-windows) | 21036 | (defun org-agenda-switch-to (&optional delete-other-windows) |
| 20997 | "Go to the Org-mode file which contains the item at point." | 21037 | "Go to the Org-mode file which contains the item at point." |
| 20998 | (interactive) | 21038 | (interactive) |
| @@ -21405,7 +21445,7 @@ be used to request time specification in the time stamp." | |||
| 21405 | (save-excursion | 21445 | (save-excursion |
| 21406 | (org-back-to-heading t) | 21446 | (org-back-to-heading t) |
| 21407 | (if (looking-at | 21447 | (if (looking-at |
| 21408 | (if no-tags | 21448 | (if no-tags |
| 21409 | (org-re "\\*+[ \t]+\\([^\n\r]*?\\)\\([ \t]+:[[:alnum:]:_@]+:[ \t]*\\)?$") | 21449 | (org-re "\\*+[ \t]+\\([^\n\r]*?\\)\\([ \t]+:[[:alnum:]:_@]+:[ \t]*\\)?$") |
| 21410 | "\\*+[ \t]+\\([^\r\n]*\\)")) | 21450 | "\\*+[ \t]+\\([^\r\n]*\\)")) |
| 21411 | (match-string 1) ""))) | 21451 | (match-string 1) ""))) |
| @@ -22464,7 +22504,7 @@ translations. There is currently no way for users to extend this.") | |||
| 22464 | (setq fmt (pop formatters)) | 22504 | (setq fmt (pop formatters)) |
| 22465 | (when (car fmt) | 22505 | (when (car fmt) |
| 22466 | (goto-char (point-min)) | 22506 | (goto-char (point-min)) |
| 22467 | (while (re-search-forward (concat "^#\\+" (cadr fmt) | 22507 | (while (re-search-forward (concat "^#\\+" (cadr fmt) |
| 22468 | ":[ \t]*\\(.*\\)") nil t) | 22508 | ":[ \t]*\\(.*\\)") nil t) |
| 22469 | (replace-match "\\1" t) | 22509 | (replace-match "\\1" t) |
| 22470 | (add-text-properties | 22510 | (add-text-properties |
| @@ -22472,7 +22512,7 @@ translations. There is currently no way for users to extend this.") | |||
| 22472 | '(org-protected t)))) | 22512 | '(org-protected t)))) |
| 22473 | (goto-char (point-min)) | 22513 | (goto-char (point-min)) |
| 22474 | (while (re-search-forward | 22514 | (while (re-search-forward |
| 22475 | (concat "^#\\+" | 22515 | (concat "^#\\+" |
| 22476 | (caddr fmt) "\\>.*\\(\\(\n.*\\)*?\n\\)#\\+" | 22516 | (caddr fmt) "\\>.*\\(\\(\n.*\\)*?\n\\)#\\+" |
| 22477 | (cadddr fmt) "\\>.*\n?") nil t) | 22517 | (cadddr fmt) "\\>.*\n?") nil t) |
| 22478 | (if (car fmt) | 22518 | (if (car fmt) |
| @@ -22623,7 +22663,7 @@ translations. There is currently no way for users to extend this.") | |||
| 22623 | (add-text-properties (point) (1+ (point-at-eol)) | 22663 | (add-text-properties (point) (1+ (point-at-eol)) |
| 22624 | (list :org-license-to-kill t))))) | 22664 | (list :org-license-to-kill t))))) |
| 22625 | title)) | 22665 | title)) |
| 22626 | 22666 | ||
| 22627 | (defun org-solidify-link-text (s &optional alist) | 22667 | (defun org-solidify-link-text (s &optional alist) |
| 22628 | "Take link text and make a safe target out of it." | 22668 | "Take link text and make a safe target out of it." |
| 22629 | (save-match-data | 22669 | (save-match-data |
| @@ -22783,10 +22823,10 @@ underlined headlines. The default is 3." | |||
| 22783 | (fundamental-mode) | 22823 | (fundamental-mode) |
| 22784 | ;; create local variables for all options, to make sure all called | 22824 | ;; create local variables for all options, to make sure all called |
| 22785 | ;; functions get the correct information | 22825 | ;; functions get the correct information |
| 22786 | (mapcar (lambda (x) | 22826 | (mapc (lambda (x) |
| 22787 | (set (make-local-variable (cdr x)) | 22827 | (set (make-local-variable (cdr x)) |
| 22788 | (plist-get opt-plist (car x)))) | 22828 | (plist-get opt-plist (car x)))) |
| 22789 | org-export-plist-vars) | 22829 | org-export-plist-vars) |
| 22790 | (org-set-local 'org-odd-levels-only odd) | 22830 | (org-set-local 'org-odd-levels-only odd) |
| 22791 | (setq umax (if arg (prefix-numeric-value arg) | 22831 | (setq umax (if arg (prefix-numeric-value arg) |
| 22792 | org-export-headline-levels)) | 22832 | org-export-headline-levels)) |
| @@ -22818,55 +22858,55 @@ underlined headlines. The default is 3." | |||
| 22818 | (progn | 22858 | (progn |
| 22819 | (push (concat (nth 3 lang-words) "\n") thetoc) | 22859 | (push (concat (nth 3 lang-words) "\n") thetoc) |
| 22820 | (push (concat (make-string (length (nth 3 lang-words)) ?=) "\n") thetoc) | 22860 | (push (concat (make-string (length (nth 3 lang-words)) ?=) "\n") thetoc) |
| 22821 | (mapcar '(lambda (line) | 22861 | (mapc '(lambda (line) |
| 22822 | (if (string-match org-todo-line-regexp | 22862 | (if (string-match org-todo-line-regexp |
| 22823 | line) | 22863 | line) |
| 22824 | ;; This is a headline | 22864 | ;; This is a headline |
| 22825 | (progn | 22865 | (progn |
| 22826 | (setq have-headings t) | 22866 | (setq have-headings t) |
| 22827 | (setq level (- (match-end 1) (match-beginning 1)) | 22867 | (setq level (- (match-end 1) (match-beginning 1)) |
| 22828 | level (org-tr-level level) | 22868 | level (org-tr-level level) |
| 22829 | txt (match-string 3 line) | 22869 | txt (match-string 3 line) |
| 22830 | todo | 22870 | todo |
| 22831 | (or (and org-export-mark-todo-in-toc | 22871 | (or (and org-export-mark-todo-in-toc |
| 22832 | (match-beginning 2) | 22872 | (match-beginning 2) |
| 22833 | (not (member (match-string 2 line) | 22873 | (not (member (match-string 2 line) |
| 22834 | org-done-keywords))) | 22874 | org-done-keywords))) |
| 22835 | ; TODO, not DONE | 22875 | ; TODO, not DONE |
| 22836 | (and org-export-mark-todo-in-toc | 22876 | (and org-export-mark-todo-in-toc |
| 22837 | (= level umax-toc) | 22877 | (= level umax-toc) |
| 22838 | (org-search-todo-below | 22878 | (org-search-todo-below |
| 22839 | line lines level)))) | 22879 | line lines level)))) |
| 22840 | (setq txt (org-html-expand-for-ascii txt)) | 22880 | (setq txt (org-html-expand-for-ascii txt)) |
| 22841 | 22881 | ||
| 22842 | (while (string-match org-bracket-link-regexp txt) | 22882 | (while (string-match org-bracket-link-regexp txt) |
| 22843 | (setq txt | 22883 | (setq txt |
| 22844 | (replace-match | 22884 | (replace-match |
| 22845 | (match-string (if (match-end 2) 3 1) txt) | 22885 | (match-string (if (match-end 2) 3 1) txt) |
| 22846 | t t txt))) | 22886 | t t txt))) |
| 22847 | 22887 | ||
| 22848 | (if (and (memq org-export-with-tags '(not-in-toc nil)) | 22888 | (if (and (memq org-export-with-tags '(not-in-toc nil)) |
| 22849 | (string-match | 22889 | (string-match |
| 22850 | (org-re "[ \t]+:[[:alnum:]_@:]+:[ \t]*$") | 22890 | (org-re "[ \t]+:[[:alnum:]_@:]+:[ \t]*$") |
| 22851 | txt)) | 22891 | txt)) |
| 22852 | (setq txt (replace-match "" t t txt))) | 22892 | (setq txt (replace-match "" t t txt))) |
| 22853 | (if (string-match quote-re0 txt) | 22893 | (if (string-match quote-re0 txt) |
| 22854 | (setq txt (replace-match "" t t txt))) | 22894 | (setq txt (replace-match "" t t txt))) |
| 22855 | 22895 | ||
| 22856 | (if org-export-with-section-numbers | 22896 | (if org-export-with-section-numbers |
| 22857 | (setq txt (concat (org-section-number level) | 22897 | (setq txt (concat (org-section-number level) |
| 22858 | " " txt))) | 22898 | " " txt))) |
| 22859 | (if (<= level umax-toc) | 22899 | (if (<= level umax-toc) |
| 22860 | (progn | 22900 | (progn |
| 22861 | (push | 22901 | (push |
| 22862 | (concat | 22902 | (concat |
| 22863 | (make-string | 22903 | (make-string |
| 22864 | (* (max 0 (- level org-min-level)) 4) ?\ ) | 22904 | (* (max 0 (- level org-min-level)) 4) ?\ ) |
| 22865 | (format (if todo "%s (*)\n" "%s\n") txt)) | 22905 | (format (if todo "%s (*)\n" "%s\n") txt)) |
| 22866 | thetoc) | 22906 | thetoc) |
| 22867 | (setq org-last-level level)) | 22907 | (setq org-last-level level)) |
| 22868 | )))) | 22908 | )))) |
| 22869 | lines) | 22909 | lines) |
| 22870 | (setq thetoc (if have-headings (nreverse thetoc) nil)))) | 22910 | (setq thetoc (if have-headings (nreverse thetoc) nil)))) |
| 22871 | 22911 | ||
| 22872 | (org-init-section-numbers) | 22912 | (org-init-section-numbers) |
| @@ -23450,10 +23490,10 @@ the body tags themselves." | |||
| 23450 | (org-odd-levels-only odd)) | 23490 | (org-odd-levels-only odd)) |
| 23451 | ;; create local variables for all options, to make sure all called | 23491 | ;; create local variables for all options, to make sure all called |
| 23452 | ;; functions get the correct information | 23492 | ;; functions get the correct information |
| 23453 | (mapcar (lambda (x) | 23493 | (mapc (lambda (x) |
| 23454 | (set (make-local-variable (cdr x)) | 23494 | (set (make-local-variable (cdr x)) |
| 23455 | (plist-get opt-plist (car x)))) | 23495 | (plist-get opt-plist (car x)))) |
| 23456 | org-export-plist-vars) | 23496 | org-export-plist-vars) |
| 23457 | (setq umax (if arg (prefix-numeric-value arg) | 23497 | (setq umax (if arg (prefix-numeric-value arg) |
| 23458 | org-export-headline-levels)) | 23498 | org-export-headline-levels)) |
| 23459 | (setq umax-toc (if (integerp org-export-with-toc) | 23499 | (setq umax-toc (if (integerp org-export-with-toc) |
| @@ -23728,7 +23768,7 @@ lang=\"%s\" xml:lang=\"%s\"> | |||
| 23728 | (if (and (string-match org-todo-line-regexp line) | 23768 | (if (and (string-match org-todo-line-regexp line) |
| 23729 | (match-beginning 2)) | 23769 | (match-beginning 2)) |
| 23730 | 23770 | ||
| 23731 | (setq line | 23771 | (setq line |
| 23732 | (concat (substring line 0 (match-beginning 2)) | 23772 | (concat (substring line 0 (match-beginning 2)) |
| 23733 | "<span class=\"" | 23773 | "<span class=\"" |
| 23734 | (if (member (match-string 2 line) | 23774 | (if (member (match-string 2 line) |
| @@ -23938,7 +23978,7 @@ lang=\"%s\" xml:lang=\"%s\"> | |||
| 23938 | (delete-region beg end) | 23978 | (delete-region beg end) |
| 23939 | (insert (format "<span style=\"visibility:hidden;\">%s</span>" | 23979 | (insert (format "<span style=\"visibility:hidden;\">%s</span>" |
| 23940 | (make-string n ?x))))) | 23980 | (make-string n ?x))))) |
| 23941 | 23981 | ||
| 23942 | (or to-buffer (save-buffer)) | 23982 | (or to-buffer (save-buffer)) |
| 23943 | (goto-char (point-min)) | 23983 | (goto-char (point-min)) |
| 23944 | (message "Exporting... done") | 23984 | (message "Exporting... done") |
| @@ -24077,14 +24117,14 @@ lang=\"%s\" xml:lang=\"%s\"> | |||
| 24077 | (lambda (x) | 24117 | (lambda (x) |
| 24078 | (setq gr (pop org-table-colgroup-info)) | 24118 | (setq gr (pop org-table-colgroup-info)) |
| 24079 | (format "%s<COL align=\"%s\"></COL>%s" | 24119 | (format "%s<COL align=\"%s\"></COL>%s" |
| 24080 | (if (memq gr '(:start :startend)) | 24120 | (if (memq gr '(:start :startend)) |
| 24081 | (prog1 | 24121 | (prog1 |
| 24082 | (if colgropen "</colgroup>\n<colgroup>" "<colgroup>") | 24122 | (if colgropen "</colgroup>\n<colgroup>" "<colgroup>") |
| 24083 | (setq colgropen t)) | 24123 | (setq colgropen t)) |
| 24084 | "") | 24124 | "") |
| 24085 | (if (> (/ (float x) nlines) org-table-number-fraction) | 24125 | (if (> (/ (float x) nlines) org-table-number-fraction) |
| 24086 | "right" "left") | 24126 | "right" "left") |
| 24087 | (if (memq gr '(:end :startend)) | 24127 | (if (memq gr '(:end :startend)) |
| 24088 | (progn (setq colgropen nil) "</colgroup>") | 24128 | (progn (setq colgropen nil) "</colgroup>") |
| 24089 | ""))) | 24129 | ""))) |
| 24090 | fnum "") | 24130 | fnum "") |
| @@ -26412,6 +26452,21 @@ Respect keys that are already there." | |||
| 26412 | (push (cons k c) new)))) | 26452 | (push (cons k c) new)))) |
| 26413 | (nreverse new))) | 26453 | (nreverse new))) |
| 26414 | 26454 | ||
| 26455 | ;(defcustom org-read-date-prefer-future nil | ||
| 26456 | ; "Non-nil means, when reading an incomplete date from the user, assume future. | ||
| 26457 | ;This affects the following situations: | ||
| 26458 | ;1. The user give a day, but no month. | ||
| 26459 | ; In this case, if the day number if after today, the current month will | ||
| 26460 | ; be used, otherwise the next month. | ||
| 26461 | ;2. The user gives a month but not a year. | ||
| 26462 | ; In this case, the the given month is after the current month, the current | ||
| 26463 | ; year will be used. Otherwise the next year will be used.; | ||
| 26464 | ; | ||
| 26465 | ;When nil, always the current month and year will be used." | ||
| 26466 | ; :group 'org-time ;???? | ||
| 26467 | ; :type 'boolean) | ||
| 26468 | |||
| 26469 | |||
| 26415 | ;;;; Finish up | 26470 | ;;;; Finish up |
| 26416 | 26471 | ||
| 26417 | (provide 'org) | 26472 | (provide 'org) |