diff options
| author | Carsten Dominik | 2009-09-02 12:59:52 +0000 |
|---|---|---|
| committer | Carsten Dominik | 2009-09-02 12:59:52 +0000 |
| commit | 54a0dee5730ebe50f1f14c0ebc5976ff062e6193 (patch) | |
| tree | 28457349f27e484d7768f940d5c7d7fef9a76170 | |
| parent | e5aa47f99367af4663ebf0a87bae83e23cc4085e (diff) | |
| download | emacs-54a0dee5730ebe50f1f14c0ebc5976ff062e6193.tar.gz emacs-54a0dee5730ebe50f1f14c0ebc5976ff062e6193.zip | |
2009-09-02 Carsten Dominik <carsten.dominik@gmail.com>
* org-protocol.el (org-protocol-store-link)
(org-protocol-remember, org-protocol-open-source): Add autoloads.
* org-compat.el (org-float-time): New function.
* org.el (org-clock-update-time-maybe)
(org-sort-entries-or-items, org-do-sort)
(org-evaluate-time-range, org-time-string-to-seconds)
(org-closed-in-range): Use `org-float-time'.
* org-timer.el (org-timer-start, org-timer-pause-or-continue)
(org-timer-seconds): Use `org-float-time'.
* org-clock.el (org-clock-get-clocked-time, org-clock-out)
(org-clock-sum, org-dblock-write:clocktable)
(org-clocktable-steps): Use `org-float-time'.
* org-agenda.el (org-agenda-last-marker-time)
(org-agenda-new-marker, org-diary): Use `org-float-time'.
* org-compat.el (w32-focus-frame): Declare the w32-focus-frame
function.
* org-exp.el (org-get-file-contents): Only protect lines that
really need it.
* org-html.el (require): Require cl for compilation.
* org.el: Avoid using `default-major-mode'.
* org-plot.el (require): Require CL only at compile time.
* org-exp.el (require): Require CL only at compile time.
* org-agenda.el (org-agenda-quit): When the agenda window is
dedicated, remove other windows before exiting, so that the frame
really will be killed.
* org-exp.el (org-export-handle-include-files): Reset START and
END for each loop cycle.
2009-09-02 Carsten Dominik <carsten.dominik@gmail.com>
* org.el (org-eval-in-calendar): Use
`org-select-frame-set-input-focus'.
* org-compat.el (org-select-frame-set-input-focus): New function.
* org.el (org-update-statistics-cookies): New function.
(org-mode-map): Bind `C-c #' to `org-update-statistics-cookies'.
2009-09-02 Carsten Dominik <carsten.dominik@gmail.com>
* org-src.el (org-edit-fixed-width-region): Set org-src-mode only
after the local variables are set.
* org-latex.el (org-export-latex-protect-amp): New function.
(org-export-latex-links): Protect link ampersands in tables.
* org-exp.el (org-export-select-backend-specific-text): Match in
two steps, to avoid regexp problems.
* org.el (org-offer-links-in-entry): Improve working with many and
duplicate links.
* org-agenda.el (org-agenda-show-1): Make more consistent with
normal cycling.
(org-agenda-cycle-show): Make more consistent with normal cycling.
* org-gnus.el (org-gnus-store-link): Restore the linking to a
website.
2009-09-02 Bastien Guerry <bzg@altern.org>
* org-latex.el (org-export-latex-first-lines): Bugfix.
2009-09-02 Carsten Dominik <carsten.dominik@gmail.com>
* org-clock.el (org-clock-modify-effort-estimate): Emit message
about new effort.
* org.el (org-set-effort): New function.
(org-mode-map): New key for effort setting command.
* org-agenda.el (org-agenda): Keep window setup when calling
agenda from within agenda window.
(org-agenda-mode-map): New keys for effort setting commands.
(org-agenda-menu): Add effort setting commands to menu.
(org-agenda-set-property, org-agenda-set-effort): New functions.
* org-latex.el (org-export-latex-tables): Fix
`org-table-last-alignment' and `org-table-last-column-widths' if
the first column has been removed.
2009-09-02 Carsten Dominik <carsten.dominik@gmail.com>
* org.el (org-remove-timestamp-with-keyword): Only remove in
entry, not in subtree.
* org-src.el (org-src-lang-modes): Add abbreviation elisp for
emacs lisp.
* org.el (org-open-at-point): When on headline, offer all strings
in entry.
* org-remember.el (org-remember-templates): Documentation fix.
* org.el (org-move-subtree-down): Use `org-get-next-sibling' and
`org-get-last-sibling' instead of the outline versions of these
functions.
(org-get-last-sibling): New function.
(org-refile): Use `org-get-next-sibling' instead of the outline
version of this function.
(org-clean-visibility-after-subtree-move): Use
`org-get-next-sibling' and `org-get-last-sibling' instead of the
outline versions of these functions.
2009-09-02 Carsten Dominik <carsten.dominik@gmail.com>
* org-agenda.el (org-prepare-agenda): When creating a new frame
for the agenda, make the window dedicated.
* org-agenda.el (org-agenda-mode-map): New keys for time motion.
* org-table.el (org-table-align): Change the order of reinsertion
and deletion, to avoid problems with overlays following the table.
* org.el (org-parse-time-string): Better error message.
(org-show-subtree): Use org-end-of-subtree.
* org-macs.el (org-goto-line): New defsubst.
* org.el (org-open-file, org-change-tag-in-region)
(org-fast-tag-show-exit): Don't use `goto-line'.
* org-table.el (org-table-align, org-table-insert-column)
(org-table-delete-column, org-table-move-column)
(org-table-sort-lines, org-table-copy-region)
(org-table-paste-rectangle, org-table-wrap-region)
(org-table-get-specials, org-table-rotate-recalc-marks)
(org-table-get-range, org-table-recalculate)
(org-table-edit-formulas, org-table-fedit-convert-buffer)
(org-table-show-reference, org-table-highlight-rectangle): Don't
use `goto-line'.
* org-src.el (org-edit-src-code, org-edit-fixed-width-region)
(org-edit-src-exit): Don't use `goto-line'.
* org-macs.el (org-preserve-lc): Don't use `goto-line'.
* org-list.el (org-renumber-ordered-list, org-fix-bullet-type):
Don't use `goto-line'.
* org-exp.el (org-export-number-lines): Don't use `goto-line'.
* org-colview.el (org-columns, org-columns-redo)
(org-agenda-columns): Don't use `goto-line'.
* org-colview-xemacs.el (org-columns, org-agenda-columns): Don't
use `goto-line'.
* org-agenda.el (org-agenda-mode): Force visual line motion off.
(org-agenda-add-entry-text-maxlines): Improve docstring.
(org-agenda-start-with-entry-text-mode): New option.
(org-agenda-entry-text-maxlines): New option.
(org-agenda-entry-text-mode): New variable.
(org-agenda-mode): Set initial value of
`org-agenda-entry-text-mode'.
(org-agenda-mode-map): Add the `E' key.
(org-agenda-menu): Add entry text mode to the menu.
(org-agenda-get-some-entry-text): Fix line count bug.
(org-finalize-agenda): Apply entry text mode if appropriate.
(org-agenda-entry-text-show-here): New function.
(org-agenda-entry-text-show): New function.
(org-agenda-entry-text-hide): New function.
(org-agenda-view-mode-dispatch): Add entry text mode to the view
key menu.
(org-agenda-entry-text-mode): New command.
(org-agenda-set-mode-name): Add entry text mode to the mode line
string.
(org-agenda-undo, org-agenda-get-restriction-and-command)
(org-agenda-get-some-entry-text, org-agenda-redo): Don't use
`goto-line'.
2009-09-02 Bernt Hansen <bernt@norang.ca>
* org-clock.el (org-notify): Bugfix.
2009-09-02 Carsten Dominik <carsten.dominik@gmail.com>
* org-agenda.el (org-agenda-open-link): Handle multiple links and
check for after-string.
* org-gnus.el (org-gnus-store-link): Simplify.
* org.el (org-latex-regexps): Don't add extra empty lines for
display formulas.
2009-09-02 Carsten Dominik <carsten.dominik@gmail.com>
* org-agenda.el (org-agenda-get-some-entry-text): New function.
(org-agenda-add-entry-text): Use
`org-agenda-get-some-entry-text'.
* org.el (org-cycle-separator-lines): Update docstring.
(org-cycle-show-empty-lines): Handle negative values for
`org-cycle-show-empty-lines'.
* org-exp.el (org-export-protect-sub-super): New function.
(org-export-normalize-links): Protect the url of plain links from
supscript and superscript processing.
* org-remember.el (org-remember-escaped-%): New function.
(org-remember-apply-template): Use `org-remember-escaped-%' to
detect escaped % signs.
2009-09-02 Bastien Guerry <bzg@altern.org>
* org-timer.el (org-timer-set-timer): Use `org-notify' and play a
sound when showing the notification.
* org-clock.el (org-notify): New function.
(org-clock-notify-once-if-expired): Use `org-notify'.
* org-gnus.el (org-gnus-store-link): Handle `gnus-summary-mode'
and `gnus-article-mode' separately.
(gnus-summary-article-header): Fix the declare-function.
2009-09-02 Carsten Dominik <carsten.dominik@gmail.com>
* org-exp.el (org-export-format-source-code-or-example): Translate
language.
* org-src.el (org-src-lang-modes): New variable
(org-edit-src-code): Translate language.
* org-exp.el (org-export-format-source-code-or-example): Deal wit
the new structure of the `org-export-latex-listings-langs'
variable.
* org-latex.el (org-export-latex-listings-langs): Change structure
of the variable from plist to alist.
2009-09-02 Carsten Dominik <carsten.dominik@gmail.com>
* org.el (org-in-commented-line): New function.
2009-09-02 Carsten Dominik <carsten.dominik@gmail.com>
* org.el (org-hide-block-toggle): Make folded blocks searchable.
2009-09-02 Friedrich Delgado Friedrichs <friedel@nomaden.org> (tiny change)
* org.el (org-flag-drawer): More useful error.
2009-09-02 Carsten Dominik <carsten.dominik@gmail.com>
* org-remember.el (org-remember-apply-template): Use
org-icompleting-read.
* org-publish.el (org-publish): Use org-icompleting-read.
* org-colview.el (org-columns-edit-value, org-columns-new)
(org-insert-columns-dblock): Use org-icompleting-read.
* org-colview-xemacs.el (org-columns-edit-value)
(org-columns-new, org-insert-columns-dblock): Use
org-icompleting-read.
* org-attach.el (org-attach-delete-one, org-attach-open): Use
org-icompleting-read.
2009-09-02 Carsten Dominik <carsten.dominik@gmail.com>
* org.el (org-hierarchical-todo-statistics): Improve docstring.
(org-version): Return the version text.
(org-org-menu): Add a menu entry for the new bug reporter.
(org-submit-bug-report): New command.
* org-list.el (org-hierarchical-checkbox-statistics): Improve
docstring.
* org.el (org-emphasis-regexp-components): Add "`" to set of
pre-emphasis characters.
* org-latex.el (org-export-latex-classes): Always include the soul
package.
(org-export-latex-emphasis-alist): Use \st for strikethough.
* org-exp-blocks.el (org-export-blocks-preprocess): Use
`indent-code-rigidly' to indent.
* org-agenda.el (org-agenda-get-restriction-and-command): Remove
properties only if MATCH really is a string.
2009-09-02 Carsten Dominik <carsten.dominik@gmail.com>
* org-latex.el (org-export-latex-packages-alist): Fix
customization type.
* org.el (org-create-formula-image): Also use
`org-export-latex-packages-alist'.
* org-html.el (org-export-as-html): Fix bug in footnote regexp.
(org-export-as-html): Format footnotes correctly.
2009-09-02 Carsten Dominik <carsten.dominik@gmail.com>
* org.el (org-fast-tag-selection): Avoid text properties on tags
in the alist.
* org-agenda.el (org-agenda-get-restriction-and-command): Avoid
text properties on the match element.
2009-09-02 Carsten Dominik <carsten.dominik@gmail.com>
* org.el (org-set-regexps-and-options): Make sure the list of done
keywords is not invalid.
* org-exp.el (org-export-interpolate-newlines): New function.
2009-09-02 Carsten Dominik <carsten.dominik@gmail.com>
* org.el (org-format-latex): Avoid nested overlays.
* org-latex.el (org-export-latex-listings-langs): Add a few more
languages.
* org-exp.el (org-export-preprocess-apply-macros): Make sure to
ignore newlines and space before the first macro argument.
* org-latex.el (org-export-latex-tables): Remove save-excursion
around `org-table-align'.
2009-09-02 Carsten Dominik <carsten.dominik@gmail.com>
* org.el (org-export-html-special-string-regexps): Definition
moved into org.el
* org-exp.el (org-export-preprocess-apply-macros): Allow newlines
in macro calls.
2009-09-02 Carsten Dominik <carsten.dominik@gmail.com>
* org-latex.el (org-export-latex-listings)
(org-export-latex-listings-langs): New options.
* org-exp.el (org-export-format-source-code-or-example): Use
listing package if requested by the user.
2009-09-02 Bastien Guerry <bzg@altern.org>
* org.el (org-iswitchb): Fix bug when aborting the `org-iswitchb'
command before actually switching to a buffer.
2009-09-02 Carsten Dominik <carsten.dominik@gmail.com>
* org-exp.el (org-get-file-contents): Only quote org lines when
the markup is src or example.
* org-agenda.el (org-agenda-skip-scheduled-if-deadline-is-shown):
New option
(org-agenda-get-day-entries): Remember deadline results and pass
them on into the function getting the scheduling information.
(org-agenda-get-scheduled): Accept deadline results as parameters
and maybe skip some entries.
(org-agenda-skip-scheduled-if-deadline-is-shown): New option.
* org.el (org-insert-heading): When respecting content, do not
convert current line to headline.
* org-clock.el (org-clock-save-markers-for-cut-and-paste): Also
cheeeeeck the hd marker
(org-clock-in): Also set the hd marker.
(org-clock-out): Also set the hd marker.
(org-clock-cancel): Reset markers.
* org.el (org-clock-hd-marker): New marker.
* org-faces.el (org-agenda-clocking): New face.
* org-agenda.el (org-agenda-mark-clocking-task): New function.
(org-finalize-agenda): call `org-agenda-mark-clocking-task'.
* org.el (org-modules): Add org-track.el.
* org-agenda.el (org-agenda-bulk-marked-p): New function.
(org-agenda-bulk-mark, org-agenda-bulk-unmark): Use
`org-agenda-bulk-marked-p'.
(org-agenda-bulk-toggle): New command.
2009-09-02 Carsten Dominik <carsten.dominik@gmail.com>
* org.el (org-move-subtree-down): Hide subtree if it was folded,
not just the body.
* org-remember.el (org-remember-finalize): Avoid buffer-modified
messages.
44 files changed, 1886 insertions, 759 deletions
diff --git a/lisp/org/ChangeLog b/lisp/org/ChangeLog index 133e35c5613..5c03fd40730 100644 --- a/lisp/org/ChangeLog +++ b/lisp/org/ChangeLog | |||
| @@ -1,3 +1,404 @@ | |||
| 1 | 2009-09-02 Carsten Dominik <carsten.dominik@gmail.com> | ||
| 2 | |||
| 3 | * org-protocol.el (org-protocol-store-link) | ||
| 4 | (org-protocol-remember, org-protocol-open-source): Add autoloads. | ||
| 5 | |||
| 6 | * org-compat.el (org-float-time): New function. | ||
| 7 | |||
| 8 | * org.el (org-clock-update-time-maybe) | ||
| 9 | (org-sort-entries-or-items, org-do-sort) | ||
| 10 | (org-evaluate-time-range, org-time-string-to-seconds) | ||
| 11 | (org-closed-in-range): Use `org-float-time'. | ||
| 12 | |||
| 13 | * org-timer.el (org-timer-start, org-timer-pause-or-continue) | ||
| 14 | (org-timer-seconds): Use `org-float-time'. | ||
| 15 | |||
| 16 | * org-clock.el (org-clock-get-clocked-time, org-clock-out) | ||
| 17 | (org-clock-sum, org-dblock-write:clocktable) | ||
| 18 | (org-clocktable-steps): Use `org-float-time'. | ||
| 19 | |||
| 20 | * org-agenda.el (org-agenda-last-marker-time) | ||
| 21 | (org-agenda-new-marker, org-diary): Use `org-float-time'. | ||
| 22 | |||
| 23 | * org-compat.el (w32-focus-frame): Declare the w32-focus-frame | ||
| 24 | function. | ||
| 25 | |||
| 26 | * org-exp.el (org-get-file-contents): Only protect lines that | ||
| 27 | really need it. | ||
| 28 | |||
| 29 | * org-html.el (require): Require cl for compilation. | ||
| 30 | |||
| 31 | * org.el: Avoid using `default-major-mode'. | ||
| 32 | |||
| 33 | * org-plot.el (require): Require CL only at compile time. | ||
| 34 | |||
| 35 | * org-exp.el (require): Require CL only at compile time. | ||
| 36 | |||
| 37 | * org-agenda.el (org-agenda-quit): When the agenda window is | ||
| 38 | dedicated, remove other windows before exiting, so that the frame | ||
| 39 | really will be killed. | ||
| 40 | |||
| 41 | * org-exp.el (org-export-handle-include-files): Reset START and | ||
| 42 | END for each loop cycle. | ||
| 43 | |||
| 44 | 2009-09-02 Carsten Dominik <carsten.dominik@gmail.com> | ||
| 45 | |||
| 46 | * org.el (org-eval-in-calendar): Use | ||
| 47 | `org-select-frame-set-input-focus'. | ||
| 48 | |||
| 49 | * org-compat.el (org-select-frame-set-input-focus): New function. | ||
| 50 | |||
| 51 | * org.el (org-update-statistics-cookies): New function. | ||
| 52 | (org-mode-map): Bind `C-c #' to `org-update-statistics-cookies'. | ||
| 53 | |||
| 54 | 2009-09-02 Carsten Dominik <carsten.dominik@gmail.com> | ||
| 55 | |||
| 56 | * org-src.el (org-edit-fixed-width-region): Set org-src-mode only | ||
| 57 | after the local variables are set. | ||
| 58 | |||
| 59 | * org-latex.el (org-export-latex-protect-amp): New function. | ||
| 60 | (org-export-latex-links): Protect link ampersands in tables. | ||
| 61 | |||
| 62 | * org-exp.el (org-export-select-backend-specific-text): Match in | ||
| 63 | two steps, to avoid regexp problems. | ||
| 64 | |||
| 65 | * org.el (org-offer-links-in-entry): Improve working with many and | ||
| 66 | duplicate links. | ||
| 67 | |||
| 68 | * org-agenda.el (org-agenda-show-1): Make more consistent with | ||
| 69 | normal cycling. | ||
| 70 | (org-agenda-cycle-show): Make more consistent with normal cycling. | ||
| 71 | |||
| 72 | * org-gnus.el (org-gnus-store-link): Restore the linking to a | ||
| 73 | website. | ||
| 74 | |||
| 75 | 2009-09-02 Bastien Guerry <bzg@altern.org> | ||
| 76 | |||
| 77 | * org-latex.el (org-export-latex-first-lines): Bugfix. | ||
| 78 | |||
| 79 | 2009-09-02 Carsten Dominik <carsten.dominik@gmail.com> | ||
| 80 | |||
| 81 | * org-clock.el (org-clock-modify-effort-estimate): Emit message | ||
| 82 | about new effort. | ||
| 83 | |||
| 84 | * org.el (org-set-effort): New function. | ||
| 85 | (org-mode-map): New key for effort setting command. | ||
| 86 | |||
| 87 | * org-agenda.el (org-agenda): Keep window setup when calling | ||
| 88 | agenda from within agenda window. | ||
| 89 | (org-agenda-mode-map): New keys for effort setting commands. | ||
| 90 | (org-agenda-menu): Add effort setting commands to menu. | ||
| 91 | (org-agenda-set-property, org-agenda-set-effort): New functions. | ||
| 92 | |||
| 93 | * org-latex.el (org-export-latex-tables): Fix | ||
| 94 | `org-table-last-alignment' and `org-table-last-column-widths' if | ||
| 95 | the first column has been removed. | ||
| 96 | |||
| 97 | 2009-09-02 Carsten Dominik <carsten.dominik@gmail.com> | ||
| 98 | |||
| 99 | * org.el (org-remove-timestamp-with-keyword): Only remove in | ||
| 100 | entry, not in subtree. | ||
| 101 | |||
| 102 | * org-src.el (org-src-lang-modes): Add abbreviation elisp for | ||
| 103 | emacs lisp. | ||
| 104 | |||
| 105 | * org.el (org-open-at-point): When on headline, offer all strings | ||
| 106 | in entry. | ||
| 107 | |||
| 108 | * org-remember.el (org-remember-templates): Documentation fix. | ||
| 109 | |||
| 110 | * org.el (org-move-subtree-down): Use `org-get-next-sibling' and | ||
| 111 | `org-get-last-sibling' instead of the outline versions of these | ||
| 112 | functions. | ||
| 113 | (org-get-last-sibling): New function. | ||
| 114 | (org-refile): Use `org-get-next-sibling' instead of the outline | ||
| 115 | version of this function. | ||
| 116 | (org-clean-visibility-after-subtree-move): Use | ||
| 117 | `org-get-next-sibling' and `org-get-last-sibling' instead of the | ||
| 118 | outline versions of these functions. | ||
| 119 | |||
| 120 | 2009-09-02 Carsten Dominik <carsten.dominik@gmail.com> | ||
| 121 | |||
| 122 | * org-agenda.el (org-prepare-agenda): When creating a new frame | ||
| 123 | for the agenda, make the window dedicated. | ||
| 124 | |||
| 125 | * org-agenda.el (org-agenda-mode-map): New keys for time motion. | ||
| 126 | |||
| 127 | * org-table.el (org-table-align): Change the order of reinsertion | ||
| 128 | and deletion, to avoid problems with overlays following the table. | ||
| 129 | |||
| 130 | * org.el (org-parse-time-string): Better error message. | ||
| 131 | (org-show-subtree): Use org-end-of-subtree. | ||
| 132 | |||
| 133 | * org-macs.el (org-goto-line): New defsubst. | ||
| 134 | |||
| 135 | * org.el (org-open-file, org-change-tag-in-region) | ||
| 136 | (org-fast-tag-show-exit): Don't use `goto-line'. | ||
| 137 | |||
| 138 | * org-table.el (org-table-align, org-table-insert-column) | ||
| 139 | (org-table-delete-column, org-table-move-column) | ||
| 140 | (org-table-sort-lines, org-table-copy-region) | ||
| 141 | (org-table-paste-rectangle, org-table-wrap-region) | ||
| 142 | (org-table-get-specials, org-table-rotate-recalc-marks) | ||
| 143 | (org-table-get-range, org-table-recalculate) | ||
| 144 | (org-table-edit-formulas, org-table-fedit-convert-buffer) | ||
| 145 | (org-table-show-reference, org-table-highlight-rectangle): Don't | ||
| 146 | use `goto-line'. | ||
| 147 | |||
| 148 | * org-src.el (org-edit-src-code, org-edit-fixed-width-region) | ||
| 149 | (org-edit-src-exit): Don't use `goto-line'. | ||
| 150 | |||
| 151 | * org-macs.el (org-preserve-lc): Don't use `goto-line'. | ||
| 152 | |||
| 153 | * org-list.el (org-renumber-ordered-list, org-fix-bullet-type): | ||
| 154 | Don't use `goto-line'. | ||
| 155 | |||
| 156 | * org-exp.el (org-export-number-lines): Don't use `goto-line'. | ||
| 157 | |||
| 158 | * org-colview.el (org-columns, org-columns-redo) | ||
| 159 | (org-agenda-columns): Don't use `goto-line'. | ||
| 160 | |||
| 161 | * org-colview-xemacs.el (org-columns, org-agenda-columns): Don't | ||
| 162 | use `goto-line'. | ||
| 163 | |||
| 164 | * org-agenda.el (org-agenda-mode): Force visual line motion off. | ||
| 165 | (org-agenda-add-entry-text-maxlines): Improve docstring. | ||
| 166 | (org-agenda-start-with-entry-text-mode): New option. | ||
| 167 | (org-agenda-entry-text-maxlines): New option. | ||
| 168 | (org-agenda-entry-text-mode): New variable. | ||
| 169 | (org-agenda-mode): Set initial value of | ||
| 170 | `org-agenda-entry-text-mode'. | ||
| 171 | (org-agenda-mode-map): Add the `E' key. | ||
| 172 | (org-agenda-menu): Add entry text mode to the menu. | ||
| 173 | (org-agenda-get-some-entry-text): Fix line count bug. | ||
| 174 | (org-finalize-agenda): Apply entry text mode if appropriate. | ||
| 175 | (org-agenda-entry-text-show-here): New function. | ||
| 176 | (org-agenda-entry-text-show): New function. | ||
| 177 | (org-agenda-entry-text-hide): New function. | ||
| 178 | (org-agenda-view-mode-dispatch): Add entry text mode to the view | ||
| 179 | key menu. | ||
| 180 | (org-agenda-entry-text-mode): New command. | ||
| 181 | (org-agenda-set-mode-name): Add entry text mode to the mode line | ||
| 182 | string. | ||
| 183 | (org-agenda-undo, org-agenda-get-restriction-and-command) | ||
| 184 | (org-agenda-get-some-entry-text, org-agenda-redo): Don't use | ||
| 185 | `goto-line'. | ||
| 186 | |||
| 187 | 2009-09-02 Bernt Hansen <bernt@norang.ca> | ||
| 188 | |||
| 189 | * org-clock.el (org-notify): Bugfix. | ||
| 190 | |||
| 191 | 2009-09-02 Carsten Dominik <carsten.dominik@gmail.com> | ||
| 192 | |||
| 193 | * org-agenda.el (org-agenda-open-link): Handle multiple links and | ||
| 194 | check for after-string. | ||
| 195 | |||
| 196 | * org-gnus.el (org-gnus-store-link): Simplify. | ||
| 197 | |||
| 198 | * org.el (org-latex-regexps): Don't add extra empty lines for | ||
| 199 | display formulas. | ||
| 200 | |||
| 201 | 2009-09-02 Carsten Dominik <carsten.dominik@gmail.com> | ||
| 202 | |||
| 203 | * org-agenda.el (org-agenda-get-some-entry-text): New function. | ||
| 204 | (org-agenda-add-entry-text): Use | ||
| 205 | `org-agenda-get-some-entry-text'. | ||
| 206 | |||
| 207 | * org.el (org-cycle-separator-lines): Update docstring. | ||
| 208 | (org-cycle-show-empty-lines): Handle negative values for | ||
| 209 | `org-cycle-show-empty-lines'. | ||
| 210 | |||
| 211 | * org-exp.el (org-export-protect-sub-super): New function. | ||
| 212 | (org-export-normalize-links): Protect the url of plain links from | ||
| 213 | supscript and superscript processing. | ||
| 214 | |||
| 215 | * org-remember.el (org-remember-escaped-%): New function. | ||
| 216 | (org-remember-apply-template): Use `org-remember-escaped-%' to | ||
| 217 | detect escaped % signs. | ||
| 218 | |||
| 219 | 2009-09-02 Bastien Guerry <bzg@altern.org> | ||
| 220 | |||
| 221 | * org-timer.el (org-timer-set-timer): Use `org-notify' and play a | ||
| 222 | sound when showing the notification. | ||
| 223 | |||
| 224 | * org-clock.el (org-notify): New function. | ||
| 225 | (org-clock-notify-once-if-expired): Use `org-notify'. | ||
| 226 | |||
| 227 | * org-gnus.el (org-gnus-store-link): Handle `gnus-summary-mode' | ||
| 228 | and `gnus-article-mode' separately. | ||
| 229 | (gnus-summary-article-header): Fix the declare-function. | ||
| 230 | |||
| 231 | 2009-09-02 Carsten Dominik <carsten.dominik@gmail.com> | ||
| 232 | |||
| 233 | * org-exp.el (org-export-format-source-code-or-example): Translate | ||
| 234 | language. | ||
| 235 | |||
| 236 | * org-src.el (org-src-lang-modes): New variable | ||
| 237 | (org-edit-src-code): Translate language. | ||
| 238 | |||
| 239 | * org-exp.el (org-export-format-source-code-or-example): Deal wit | ||
| 240 | the new structure of the `org-export-latex-listings-langs' | ||
| 241 | variable. | ||
| 242 | |||
| 243 | * org-latex.el (org-export-latex-listings-langs): Change structure | ||
| 244 | of the variable from plist to alist. | ||
| 245 | |||
| 246 | 2009-09-02 Carsten Dominik <carsten.dominik@gmail.com> | ||
| 247 | |||
| 248 | * org.el (org-in-commented-line): New function. | ||
| 249 | |||
| 250 | 2009-09-02 Carsten Dominik <carsten.dominik@gmail.com> | ||
| 251 | |||
| 252 | * org.el (org-hide-block-toggle): Make folded blocks searchable. | ||
| 253 | |||
| 254 | 2009-09-02 Friedrich Delgado Friedrichs <friedel@nomaden.org> (tiny change) | ||
| 255 | |||
| 256 | * org.el (org-flag-drawer): More useful error. | ||
| 257 | |||
| 258 | 2009-09-02 Carsten Dominik <carsten.dominik@gmail.com> | ||
| 259 | |||
| 260 | * org-remember.el (org-remember-apply-template): Use | ||
| 261 | org-icompleting-read. | ||
| 262 | |||
| 263 | * org-publish.el (org-publish): Use org-icompleting-read. | ||
| 264 | |||
| 265 | * org-colview.el (org-columns-edit-value, org-columns-new) | ||
| 266 | (org-insert-columns-dblock): Use org-icompleting-read. | ||
| 267 | |||
| 268 | * org-colview-xemacs.el (org-columns-edit-value) | ||
| 269 | (org-columns-new, org-insert-columns-dblock): Use | ||
| 270 | org-icompleting-read. | ||
| 271 | |||
| 272 | * org-attach.el (org-attach-delete-one, org-attach-open): Use | ||
| 273 | org-icompleting-read. | ||
| 274 | |||
| 275 | 2009-09-02 Carsten Dominik <carsten.dominik@gmail.com> | ||
| 276 | |||
| 277 | * org.el (org-hierarchical-todo-statistics): Improve docstring. | ||
| 278 | (org-version): Return the version text. | ||
| 279 | (org-org-menu): Add a menu entry for the new bug reporter. | ||
| 280 | (org-submit-bug-report): New command. | ||
| 281 | |||
| 282 | * org-list.el (org-hierarchical-checkbox-statistics): Improve | ||
| 283 | docstring. | ||
| 284 | |||
| 285 | * org.el (org-emphasis-regexp-components): Add "`" to set of | ||
| 286 | pre-emphasis characters. | ||
| 287 | |||
| 288 | * org-latex.el (org-export-latex-classes): Always include the soul | ||
| 289 | package. | ||
| 290 | (org-export-latex-emphasis-alist): Use \st for strikethough. | ||
| 291 | |||
| 292 | * org-exp-blocks.el (org-export-blocks-preprocess): Use | ||
| 293 | `indent-code-rigidly' to indent. | ||
| 294 | |||
| 295 | * org-agenda.el (org-agenda-get-restriction-and-command): Remove | ||
| 296 | properties only if MATCH really is a string. | ||
| 297 | |||
| 298 | 2009-09-02 Carsten Dominik <carsten.dominik@gmail.com> | ||
| 299 | |||
| 300 | * org-latex.el (org-export-latex-packages-alist): Fix | ||
| 301 | customization type. | ||
| 302 | |||
| 303 | * org.el (org-create-formula-image): Also use | ||
| 304 | `org-export-latex-packages-alist'. | ||
| 305 | |||
| 306 | * org-html.el (org-export-as-html): Fix bug in footnote regexp. | ||
| 307 | (org-export-as-html): Format footnotes correctly. | ||
| 308 | |||
| 309 | 2009-09-02 Carsten Dominik <carsten.dominik@gmail.com> | ||
| 310 | |||
| 311 | * org.el (org-fast-tag-selection): Avoid text properties on tags | ||
| 312 | in the alist. | ||
| 313 | |||
| 314 | * org-agenda.el (org-agenda-get-restriction-and-command): Avoid | ||
| 315 | text properties on the match element. | ||
| 316 | |||
| 317 | 2009-09-02 Carsten Dominik <carsten.dominik@gmail.com> | ||
| 318 | |||
| 319 | * org.el (org-set-regexps-and-options): Make sure the list of done | ||
| 320 | keywords is not invalid. | ||
| 321 | |||
| 322 | * org-exp.el (org-export-interpolate-newlines): New function. | ||
| 323 | |||
| 324 | 2009-09-02 Carsten Dominik <carsten.dominik@gmail.com> | ||
| 325 | |||
| 326 | * org.el (org-format-latex): Avoid nested overlays. | ||
| 327 | |||
| 328 | * org-latex.el (org-export-latex-listings-langs): Add a few more | ||
| 329 | languages. | ||
| 330 | |||
| 331 | * org-exp.el (org-export-preprocess-apply-macros): Make sure to | ||
| 332 | ignore newlines and space before the first macro argument. | ||
| 333 | |||
| 334 | * org-latex.el (org-export-latex-tables): Remove save-excursion | ||
| 335 | around `org-table-align'. | ||
| 336 | |||
| 337 | 2009-09-02 Carsten Dominik <carsten.dominik@gmail.com> | ||
| 338 | |||
| 339 | * org.el (org-export-html-special-string-regexps): Definition | ||
| 340 | moved into org.el | ||
| 341 | |||
| 342 | * org-exp.el (org-export-preprocess-apply-macros): Allow newlines | ||
| 343 | in macro calls. | ||
| 344 | |||
| 345 | 2009-09-02 Carsten Dominik <carsten.dominik@gmail.com> | ||
| 346 | |||
| 347 | * org-latex.el (org-export-latex-listings) | ||
| 348 | (org-export-latex-listings-langs): New options. | ||
| 349 | |||
| 350 | * org-exp.el (org-export-format-source-code-or-example): Use | ||
| 351 | listing package if requested by the user. | ||
| 352 | |||
| 353 | 2009-09-02 Bastien Guerry <bzg@altern.org> | ||
| 354 | |||
| 355 | * org.el (org-iswitchb): Fix bug when aborting the `org-iswitchb' | ||
| 356 | command before actually switching to a buffer. | ||
| 357 | |||
| 358 | 2009-09-02 Carsten Dominik <carsten.dominik@gmail.com> | ||
| 359 | |||
| 360 | * org-exp.el (org-get-file-contents): Only quote org lines when | ||
| 361 | the markup is src or example. | ||
| 362 | |||
| 363 | * org-agenda.el (org-agenda-skip-scheduled-if-deadline-is-shown): | ||
| 364 | New option | ||
| 365 | (org-agenda-get-day-entries): Remember deadline results and pass | ||
| 366 | them on into the function getting the scheduling information. | ||
| 367 | (org-agenda-get-scheduled): Accept deadline results as parameters | ||
| 368 | and maybe skip some entries. | ||
| 369 | (org-agenda-skip-scheduled-if-deadline-is-shown): New option. | ||
| 370 | |||
| 371 | * org.el (org-insert-heading): When respecting content, do not | ||
| 372 | convert current line to headline. | ||
| 373 | |||
| 374 | * org-clock.el (org-clock-save-markers-for-cut-and-paste): Also | ||
| 375 | cheeeeeck the hd marker | ||
| 376 | (org-clock-in): Also set the hd marker. | ||
| 377 | (org-clock-out): Also set the hd marker. | ||
| 378 | (org-clock-cancel): Reset markers. | ||
| 379 | |||
| 380 | * org.el (org-clock-hd-marker): New marker. | ||
| 381 | |||
| 382 | * org-faces.el (org-agenda-clocking): New face. | ||
| 383 | |||
| 384 | * org-agenda.el (org-agenda-mark-clocking-task): New function. | ||
| 385 | (org-finalize-agenda): call `org-agenda-mark-clocking-task'. | ||
| 386 | |||
| 387 | * org.el (org-modules): Add org-track.el. | ||
| 388 | |||
| 389 | * org-agenda.el (org-agenda-bulk-marked-p): New function. | ||
| 390 | (org-agenda-bulk-mark, org-agenda-bulk-unmark): Use | ||
| 391 | `org-agenda-bulk-marked-p'. | ||
| 392 | (org-agenda-bulk-toggle): New command. | ||
| 393 | |||
| 394 | 2009-09-02 Carsten Dominik <carsten.dominik@gmail.com> | ||
| 395 | |||
| 396 | * org.el (org-move-subtree-down): Hide subtree if it was folded, | ||
| 397 | not just the body. | ||
| 398 | |||
| 399 | * org-remember.el (org-remember-finalize): Avoid buffer-modified | ||
| 400 | messages. | ||
| 401 | |||
| 1 | 2009-08-28 Stefan Monnier <monnier@iro.umontreal.ca> | 402 | 2009-08-28 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 403 | ||
| 3 | * org-html.el (org-export-as-html): | 404 | * org-html.el (org-export-as-html): |
diff --git a/lisp/org/org-agenda.el b/lisp/org/org-agenda.el index 29f708b8af2..c776e33c38d 100644 --- a/lisp/org/org-agenda.el +++ b/lisp/org/org-agenda.el | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | ;; Author: Carsten Dominik <carsten at orgmode dot org> | 6 | ;; Author: Carsten Dominik <carsten at orgmode dot org> |
| 7 | ;; Keywords: outlines, hypermedia, calendar, wp | 7 | ;; Keywords: outlines, hypermedia, calendar, wp |
| 8 | ;; Homepage: http://orgmode.org | 8 | ;; Homepage: http://orgmode.org |
| 9 | ;; Version: 6.29c | 9 | ;; Version: 6.30c |
| 10 | ;; | 10 | ;; |
| 11 | ;; This file is part of GNU Emacs. | 11 | ;; This file is part of GNU Emacs. |
| 12 | ;; | 12 | ;; |
| @@ -128,7 +128,11 @@ This is only relevant when `org-agenda-add-entry-text' is part of | |||
| 128 | `org-agenda-before-write-hook', which it is by default. | 128 | `org-agenda-before-write-hook', which it is by default. |
| 129 | When this is 0, nothing will happen. When it is greater than 0, it | 129 | When this is 0, nothing will happen. When it is greater than 0, it |
| 130 | specifies the maximum number of lines that will be added for each entry | 130 | specifies the maximum number of lines that will be added for each entry |
| 131 | that is listed in the agenda view." | 131 | that is listed in the agenda view. |
| 132 | |||
| 133 | Note that this variable is not used during display, only when exporting | ||
| 134 | the agenda. For agenda display, see org-agenda-entry-text-mode and the | ||
| 135 | variable `org-agenda-entry-text-maxlines'." | ||
| 132 | :group 'org-agenda | 136 | :group 'org-agenda |
| 133 | :type 'integer) | 137 | :type 'integer) |
| 134 | 138 | ||
| @@ -555,6 +559,23 @@ is DONE." | |||
| 555 | :group 'org-agenda-daily/weekly | 559 | :group 'org-agenda-daily/weekly |
| 556 | :type 'boolean) | 560 | :type 'boolean) |
| 557 | 561 | ||
| 562 | (defcustom org-agenda-skip-scheduled-if-deadline-is-shown nil | ||
| 563 | "Non-nil means skip scheduling line if same entry shows because of deadline. | ||
| 564 | In the agenda of today, an entry can show up multiple times because | ||
| 565 | it is both scheduled and has a nearby deadline, and maybe a plain time | ||
| 566 | stamp as well. | ||
| 567 | When this variable is t, then only the deadline is shown and the fact that | ||
| 568 | the entry is scheduled today or was scheduled previously is not shown. | ||
| 569 | When this variable is nil, the entry will be shown several times. When | ||
| 570 | the variable is the symbol `not-today', then skip scheduled previously, | ||
| 571 | but not scheduled today." | ||
| 572 | :group 'org-agenda-skip | ||
| 573 | :group 'org-agenda-daily/weekly | ||
| 574 | :type '(choice | ||
| 575 | (const :tag "Never" nil) | ||
| 576 | (const :tag "Always" t) | ||
| 577 | (const :tag "Not when scheduled today" not-today))) | ||
| 578 | |||
| 558 | (defcustom org-agenda-skip-deadline-if-done nil | 579 | (defcustom org-agenda-skip-deadline-if-done nil |
| 559 | "Non-nil means don't show deadlines when the corresponding item is done. | 580 | "Non-nil means don't show deadlines when the corresponding item is done. |
| 560 | When nil, the deadline is still shown and should give you a happy feeling. | 581 | When nil, the deadline is still shown and should give you a happy feeling. |
| @@ -634,6 +655,20 @@ Needs to be set before org.el is loaded." | |||
| 634 | :group 'org-agenda-startup | 655 | :group 'org-agenda-startup |
| 635 | :type 'boolean) | 656 | :type 'boolean) |
| 636 | 657 | ||
| 658 | (defcustom org-agenda-start-with-entry-text-mode nil | ||
| 659 | "The initial value of entry-text-mode in a newly created agenda window." | ||
| 660 | :group 'org-agenda-startup | ||
| 661 | :type 'boolean) | ||
| 662 | |||
| 663 | (defcustom org-agenda-entry-text-maxlines 5 | ||
| 664 | "Number of text lines to be added when `E' is presed in the agenda. | ||
| 665 | |||
| 666 | Note that this variable only used during agenda display. Add add entry text | ||
| 667 | when exporting the agenda, configure the variable | ||
| 668 | `org-agenda-add-entry-ext-maxlines'." | ||
| 669 | :group 'org-agenda | ||
| 670 | :type 'integer) | ||
| 671 | |||
| 637 | (defvar org-agenda-include-inactive-timestamps nil | 672 | (defvar org-agenda-include-inactive-timestamps nil |
| 638 | "Non-nil means, include inactive time stamps in agenda and timeline.") | 673 | "Non-nil means, include inactive time stamps in agenda and timeline.") |
| 639 | 674 | ||
| @@ -1228,6 +1263,7 @@ works you probably want to add it to `org-agenda-custom-commands' for good." | |||
| 1228 | (defvar org-agenda-menu) ; defined later in this file. | 1263 | (defvar org-agenda-menu) ; defined later in this file. |
| 1229 | (defvar org-agenda-restrict) ; defined later in this file. | 1264 | (defvar org-agenda-restrict) ; defined later in this file. |
| 1230 | (defvar org-agenda-follow-mode nil) | 1265 | (defvar org-agenda-follow-mode nil) |
| 1266 | (defvar org-agenda-entry-text-mode nil) | ||
| 1231 | (defvar org-agenda-clockreport-mode nil) | 1267 | (defvar org-agenda-clockreport-mode nil) |
| 1232 | (defvar org-agenda-show-log nil) | 1268 | (defvar org-agenda-show-log nil) |
| 1233 | (defvar org-agenda-redo-command nil) | 1269 | (defvar org-agenda-redo-command nil) |
| @@ -1256,6 +1292,7 @@ The following commands are available: | |||
| 1256 | (use-local-map org-agenda-mode-map) | 1292 | (use-local-map org-agenda-mode-map) |
| 1257 | (easy-menu-add org-agenda-menu) | 1293 | (easy-menu-add org-agenda-menu) |
| 1258 | (if org-startup-truncated (setq truncate-lines t)) | 1294 | (if org-startup-truncated (setq truncate-lines t)) |
| 1295 | (org-set-local 'line-move-visual nil) | ||
| 1259 | (org-add-hook 'post-command-hook 'org-agenda-post-command-hook nil 'local) | 1296 | (org-add-hook 'post-command-hook 'org-agenda-post-command-hook nil 'local) |
| 1260 | (org-add-hook 'pre-command-hook 'org-unhighlight nil 'local) | 1297 | (org-add-hook 'pre-command-hook 'org-unhighlight nil 'local) |
| 1261 | ;; Make sure properties are removed when copying text | 1298 | ;; Make sure properties are removed when copying text |
| @@ -1266,6 +1303,7 @@ The following commands are available: | |||
| 1266 | buffer-substring-filters))) | 1303 | buffer-substring-filters))) |
| 1267 | (unless org-agenda-keep-modes | 1304 | (unless org-agenda-keep-modes |
| 1268 | (setq org-agenda-follow-mode org-agenda-start-with-follow-mode | 1305 | (setq org-agenda-follow-mode org-agenda-start-with-follow-mode |
| 1306 | org-agenda-entry-text-mode org-agenda-start-with-entry-text-mode | ||
| 1269 | org-agenda-clockreport-mode org-agenda-start-with-clockreport-mode | 1307 | org-agenda-clockreport-mode org-agenda-start-with-clockreport-mode |
| 1270 | org-agenda-show-log org-agenda-start-with-log-mode)) | 1308 | org-agenda-show-log org-agenda-start-with-log-mode)) |
| 1271 | 1309 | ||
| @@ -1292,25 +1330,24 @@ The following commands are available: | |||
| 1292 | (org-defkey org-agenda-mode-map [(tab)] 'org-agenda-goto) | 1330 | (org-defkey org-agenda-mode-map [(tab)] 'org-agenda-goto) |
| 1293 | (org-defkey org-agenda-mode-map "\C-m" 'org-agenda-switch-to) | 1331 | (org-defkey org-agenda-mode-map "\C-m" 'org-agenda-switch-to) |
| 1294 | (org-defkey org-agenda-mode-map "\C-k" 'org-agenda-kill) | 1332 | (org-defkey org-agenda-mode-map "\C-k" 'org-agenda-kill) |
| 1295 | (org-defkey org-agenda-mode-map "\C-c$" 'org-agenda-archive) | ||
| 1296 | (org-defkey org-agenda-mode-map "\C-c\C-x\C-s" 'org-agenda-archive) | ||
| 1297 | (org-defkey org-agenda-mode-map "\C-c\C-w" 'org-agenda-refile) | 1333 | (org-defkey org-agenda-mode-map "\C-c\C-w" 'org-agenda-refile) |
| 1298 | (org-defkey org-agenda-mode-map "m" 'org-agenda-bulk-mark) | 1334 | (org-defkey org-agenda-mode-map "m" 'org-agenda-bulk-mark) |
| 1299 | (org-defkey org-agenda-mode-map "u" 'org-agenda-bulk-unmark) | 1335 | (org-defkey org-agenda-mode-map "u" 'org-agenda-bulk-unmark) |
| 1300 | (org-defkey org-agenda-mode-map "U" 'org-agenda-bulk-remove-all-marks) | 1336 | (org-defkey org-agenda-mode-map "U" 'org-agenda-bulk-remove-all-marks) |
| 1301 | (org-defkey org-agenda-mode-map "B" 'org-agenda-bulk-action) | 1337 | (org-defkey org-agenda-mode-map "B" 'org-agenda-bulk-action) |
| 1302 | (org-defkey org-agenda-mode-map "\C-c\C-x!" 'org-reload) | 1338 | (org-defkey org-agenda-mode-map "\C-c\C-x!" 'org-reload) |
| 1339 | (org-defkey org-agenda-mode-map "\C-c$" 'org-agenda-archive) | ||
| 1340 | (org-defkey org-agenda-mode-map "\C-c\C-x\C-s" 'org-agenda-archive) | ||
| 1303 | (org-defkey org-agenda-mode-map "$" 'org-agenda-archive) | 1341 | (org-defkey org-agenda-mode-map "$" 'org-agenda-archive) |
| 1304 | (org-defkey org-agenda-mode-map "A" 'org-agenda-archive-to-archive-sibling) | 1342 | (org-defkey org-agenda-mode-map "A" 'org-agenda-archive-to-archive-sibling) |
| 1305 | (org-defkey org-agenda-mode-map "\C-c\C-o" 'org-agenda-open-link) | 1343 | (org-defkey org-agenda-mode-map "\C-c\C-o" 'org-agenda-open-link) |
| 1306 | (org-defkey org-agenda-mode-map " " 'org-agenda-show) | 1344 | (org-defkey org-agenda-mode-map " " 'org-agenda-show) |
| 1307 | (org-defkey org-agenda-mode-map "\C-c\C-t" 'org-agenda-todo) | ||
| 1308 | (org-defkey org-agenda-mode-map [(control shift right)] 'org-agenda-todo-nextset) | 1345 | (org-defkey org-agenda-mode-map [(control shift right)] 'org-agenda-todo-nextset) |
| 1309 | (org-defkey org-agenda-mode-map [(control shift left)] 'org-agenda-todo-previousset) | 1346 | (org-defkey org-agenda-mode-map [(control shift left)] 'org-agenda-todo-previousset) |
| 1310 | (org-defkey org-agenda-mode-map "\C-c\C-xb" 'org-agenda-tree-to-indirect-buffer) | 1347 | (org-defkey org-agenda-mode-map "\C-c\C-xb" 'org-agenda-tree-to-indirect-buffer) |
| 1311 | (org-defkey org-agenda-mode-map "b" 'org-agenda-tree-to-indirect-buffer) | ||
| 1312 | (org-defkey org-agenda-mode-map "o" 'delete-other-windows) | 1348 | (org-defkey org-agenda-mode-map "o" 'delete-other-windows) |
| 1313 | (org-defkey org-agenda-mode-map "L" 'org-agenda-recenter) | 1349 | (org-defkey org-agenda-mode-map "L" 'org-agenda-recenter) |
| 1350 | (org-defkey org-agenda-mode-map "\C-c\C-t" 'org-agenda-todo) | ||
| 1314 | (org-defkey org-agenda-mode-map "t" 'org-agenda-todo) | 1351 | (org-defkey org-agenda-mode-map "t" 'org-agenda-todo) |
| 1315 | (org-defkey org-agenda-mode-map "a" 'org-agenda-toggle-archive-tag) | 1352 | (org-defkey org-agenda-mode-map "a" 'org-agenda-toggle-archive-tag) |
| 1316 | (org-defkey org-agenda-mode-map ":" 'org-agenda-set-tags) | 1353 | (org-defkey org-agenda-mode-map ":" 'org-agenda-set-tags) |
| @@ -1336,15 +1373,20 @@ The following commands are available: | |||
| 1336 | (while l (org-defkey org-agenda-mode-map | 1373 | (while l (org-defkey org-agenda-mode-map |
| 1337 | (int-to-string (pop l)) 'digit-argument))) | 1374 | (int-to-string (pop l)) 'digit-argument))) |
| 1338 | 1375 | ||
| 1339 | (org-defkey org-agenda-mode-map "f" 'org-agenda-follow-mode) | 1376 | (org-defkey org-agenda-mode-map "F" 'org-agenda-follow-mode) |
| 1340 | (org-defkey org-agenda-mode-map "R" 'org-agenda-clockreport-mode) | 1377 | (org-defkey org-agenda-mode-map "R" 'org-agenda-clockreport-mode) |
| 1378 | (org-defkey org-agenda-mode-map "E" 'org-agenda-entry-text-mode) | ||
| 1341 | (org-defkey org-agenda-mode-map "l" 'org-agenda-log-mode) | 1379 | (org-defkey org-agenda-mode-map "l" 'org-agenda-log-mode) |
| 1342 | (org-defkey org-agenda-mode-map "v" 'org-agenda-view-mode-dispatch) | 1380 | (org-defkey org-agenda-mode-map "v" 'org-agenda-view-mode-dispatch) |
| 1343 | (org-defkey org-agenda-mode-map "D" 'org-agenda-toggle-diary) | 1381 | (org-defkey org-agenda-mode-map "D" 'org-agenda-toggle-diary) |
| 1344 | (org-defkey org-agenda-mode-map "G" 'org-agenda-toggle-time-grid) | 1382 | (org-defkey org-agenda-mode-map "G" 'org-agenda-toggle-time-grid) |
| 1345 | (org-defkey org-agenda-mode-map "r" 'org-agenda-redo) | 1383 | (org-defkey org-agenda-mode-map "r" 'org-agenda-redo) |
| 1346 | (org-defkey org-agenda-mode-map "g" 'org-agenda-redo) | 1384 | (org-defkey org-agenda-mode-map "g" 'org-agenda-redo) |
| 1347 | (org-defkey org-agenda-mode-map "e" 'org-agenda-execute) | 1385 | (org-defkey org-agenda-mode-map "e" 'org-agenda-set-effort) |
| 1386 | (org-defkey org-agenda-mode-map "\C-c\C-xe" 'org-agenda-set-effort) | ||
| 1387 | (org-defkey org-agenda-mode-map "\C-c\C-x\C-e" | ||
| 1388 | 'org-clock-modify-effort-estimate) | ||
| 1389 | (org-defkey org-agenda-mode-map "\C-c\C-xp" 'org-agenda-set-property) | ||
| 1348 | (org-defkey org-agenda-mode-map "q" 'org-agenda-quit) | 1390 | (org-defkey org-agenda-mode-map "q" 'org-agenda-quit) |
| 1349 | (org-defkey org-agenda-mode-map "x" 'org-agenda-exit) | 1391 | (org-defkey org-agenda-mode-map "x" 'org-agenda-exit) |
| 1350 | (org-defkey org-agenda-mode-map "\C-x\C-w" 'org-write-agenda) | 1392 | (org-defkey org-agenda-mode-map "\C-x\C-w" 'org-write-agenda) |
| @@ -1380,8 +1422,8 @@ The following commands are available: | |||
| 1380 | (org-defkey org-agenda-mode-map [(shift down)] 'org-agenda-priority-down) | 1422 | (org-defkey org-agenda-mode-map [(shift down)] 'org-agenda-priority-down) |
| 1381 | (org-defkey org-agenda-mode-map [?\C-c ?\C-x (up)] 'org-agenda-priority-up) | 1423 | (org-defkey org-agenda-mode-map [?\C-c ?\C-x (up)] 'org-agenda-priority-up) |
| 1382 | (org-defkey org-agenda-mode-map [?\C-c ?\C-x (down)] 'org-agenda-priority-down) | 1424 | (org-defkey org-agenda-mode-map [?\C-c ?\C-x (down)] 'org-agenda-priority-down) |
| 1383 | (org-defkey org-agenda-mode-map [(right)] 'org-agenda-later) | 1425 | (org-defkey org-agenda-mode-map "f" 'org-agenda-later) |
| 1384 | (org-defkey org-agenda-mode-map [(left)] 'org-agenda-earlier) | 1426 | (org-defkey org-agenda-mode-map "b" 'org-agenda-earlier) |
| 1385 | (org-defkey org-agenda-mode-map "\C-c\C-x\C-c" 'org-agenda-columns) | 1427 | (org-defkey org-agenda-mode-map "\C-c\C-x\C-c" 'org-agenda-columns) |
| 1386 | (org-defkey org-agenda-mode-map "\C-c\C-x>" 'org-agenda-remove-restriction-lock) | 1428 | (org-defkey org-agenda-mode-map "\C-c\C-x>" 'org-agenda-remove-restriction-lock) |
| 1387 | 1429 | ||
| @@ -1454,11 +1496,15 @@ The following commands are available: | |||
| 1454 | ["Change Time + min" org-agenda-date-later :active (org-agenda-check-type nil 'agenda 'timeline) :keys "C-u C-u S-right"] | 1496 | ["Change Time + min" org-agenda-date-later :active (org-agenda-check-type nil 'agenda 'timeline) :keys "C-u C-u S-right"] |
| 1455 | ["Change Time - min" org-agenda-date-earlier :active (org-agenda-check-type nil 'agenda 'timeline) :keys "C-u C-u S-left"] | 1497 | ["Change Time - min" org-agenda-date-earlier :active (org-agenda-check-type nil 'agenda 'timeline) :keys "C-u C-u S-left"] |
| 1456 | ["Change Date to ..." org-agenda-date-prompt (org-agenda-check-type nil 'agenda 'timeline)]) | 1498 | ["Change Date to ..." org-agenda-date-prompt (org-agenda-check-type nil 'agenda 'timeline)]) |
| 1457 | ("Clock" | 1499 | ("Clock and Effort" |
| 1458 | ["Clock in" org-agenda-clock-in t] | 1500 | ["Clock in" org-agenda-clock-in t] |
| 1459 | ["Clock out" org-agenda-clock-out t] | 1501 | ["Clock out" org-agenda-clock-out t] |
| 1460 | ["Clock cancel" org-agenda-clock-cancel t] | 1502 | ["Clock cancel" org-agenda-clock-cancel t] |
| 1461 | ["Goto running clock" org-clock-goto t]) | 1503 | ["Goto running clock" org-clock-goto t] |
| 1504 | "--" | ||
| 1505 | ["Set Effort" org-agenda-set-effort t] | ||
| 1506 | ["Change clocked effort" org-clock-modify-effort-estimate | ||
| 1507 | (org-clock-is-active)]) | ||
| 1462 | ("Priority" | 1508 | ("Priority" |
| 1463 | ["Set Priority" org-agenda-priority t] | 1509 | ["Set Priority" org-agenda-priority t] |
| 1464 | ["Increase Priority" org-agenda-priority-up t] | 1510 | ["Increase Priority" org-agenda-priority-up t] |
| @@ -1502,6 +1548,9 @@ The following commands are available: | |||
| 1502 | ["Show clock report" org-agenda-clockreport-mode | 1548 | ["Show clock report" org-agenda-clockreport-mode |
| 1503 | :style toggle :selected org-agenda-clockreport-mode | 1549 | :style toggle :selected org-agenda-clockreport-mode |
| 1504 | :active (org-agenda-check-type nil 'agenda)] | 1550 | :active (org-agenda-check-type nil 'agenda)] |
| 1551 | ["Show some entry text" org-agenda-entry-text-mode | ||
| 1552 | :style toggle :selected org-agenda-entry-text-mode | ||
| 1553 | :active t] | ||
| 1505 | "--" | 1554 | "--" |
| 1506 | ["Show Logbook entries" org-agenda-log-mode | 1555 | ["Show Logbook entries" org-agenda-log-mode |
| 1507 | :style toggle :selected org-agenda-show-log | 1556 | :style toggle :selected org-agenda-show-log |
| @@ -1568,7 +1617,7 @@ that have been changed along." | |||
| 1568 | (not (car pending-undo-list))) | 1617 | (not (car pending-undo-list))) |
| 1569 | (pop pending-undo-list)) | 1618 | (pop pending-undo-list)) |
| 1570 | (undo-more 1)))))) | 1619 | (undo-more 1)))))) |
| 1571 | (goto-line line) | 1620 | (org-goto-line line) |
| 1572 | (message "`%s' undone (buffer %s)" cmd (buffer-name rembuf)))) | 1621 | (message "`%s' undone (buffer %s)" cmd (buffer-name rembuf)))) |
| 1573 | 1622 | ||
| 1574 | (defun org-verify-change-for-undo (l1 l2) | 1623 | (defun org-verify-change-for-undo (l1 l2) |
| @@ -1622,6 +1671,10 @@ Pressing `<' twice means to restrict to the current subtree or region | |||
| 1622 | (interactive "P") | 1671 | (interactive "P") |
| 1623 | (catch 'exit | 1672 | (catch 'exit |
| 1624 | (let* ((prefix-descriptions nil) | 1673 | (let* ((prefix-descriptions nil) |
| 1674 | (org-agenda-window-setup (if (equal (buffer-name) | ||
| 1675 | org-agenda-buffer-name) | ||
| 1676 | 'current-window | ||
| 1677 | org-agenda-window-setup)) | ||
| 1625 | (org-agenda-custom-commands-orig org-agenda-custom-commands) | 1678 | (org-agenda-custom-commands-orig org-agenda-custom-commands) |
| 1626 | (org-agenda-custom-commands | 1679 | (org-agenda-custom-commands |
| 1627 | ;; normalize different versions | 1680 | ;; normalize different versions |
| @@ -1778,7 +1831,7 @@ s Search for keywords C Configure custom agenda commands | |||
| 1778 | (while t | 1831 | (while t |
| 1779 | (setq custom1 custom) | 1832 | (setq custom1 custom) |
| 1780 | (when (eq rmheader t) | 1833 | (when (eq rmheader t) |
| 1781 | (goto-line 1) | 1834 | (org-goto-line 1) |
| 1782 | (re-search-forward ":" nil t) | 1835 | (re-search-forward ":" nil t) |
| 1783 | (delete-region (match-end 0) (point-at-eol)) | 1836 | (delete-region (match-end 0) (point-at-eol)) |
| 1784 | (forward-char 1) | 1837 | (forward-char 1) |
| @@ -1789,7 +1842,8 @@ s Search for keywords C Configure custom agenda commands | |||
| 1789 | (delete-region (point) (point-max)) | 1842 | (delete-region (point) (point-max)) |
| 1790 | (while (setq entry (pop custom1)) | 1843 | (while (setq entry (pop custom1)) |
| 1791 | (setq key (car entry) desc (nth 1 entry) | 1844 | (setq key (car entry) desc (nth 1 entry) |
| 1792 | type (nth 2 entry) match (nth 3 entry)) | 1845 | type (nth 2 entry) |
| 1846 | match (nth 3 entry)) | ||
| 1793 | (if (> (length key) 1) | 1847 | (if (> (length key) 1) |
| 1794 | (add-to-list 'prefixes (string-to-char key)) | 1848 | (add-to-list 'prefixes (string-to-char key)) |
| 1795 | (insert | 1849 | (insert |
| @@ -1815,6 +1869,7 @@ s Search for keywords C Configure custom agenda commands | |||
| 1815 | (t "???")) | 1869 | (t "???")) |
| 1816 | (cond | 1870 | (cond |
| 1817 | ((stringp match) | 1871 | ((stringp match) |
| 1872 | (setq match (copy-sequence match)) | ||
| 1818 | (org-add-props match nil 'face 'org-warning)) | 1873 | (org-add-props match nil 'face 'org-warning)) |
| 1819 | (match | 1874 | (match |
| 1820 | (format "set of %d commands" (length match))) | 1875 | (format "set of %d commands" (length match))) |
| @@ -2212,78 +2267,86 @@ This will add a maximum of `org-agenda-add-entry-text-maxlines' lines of the | |||
| 2212 | entry text following headings shown in the agenda. | 2267 | entry text following headings shown in the agenda. |
| 2213 | Drawers will be excluded, also the line with scheduling/deadline info." | 2268 | Drawers will be excluded, also the line with scheduling/deadline info." |
| 2214 | (when (> org-agenda-add-entry-text-maxlines 0) | 2269 | (when (> org-agenda-add-entry-text-maxlines 0) |
| 2215 | (let (m txt drawer-re kwd-time-re ind) | 2270 | (let (m txt) |
| 2216 | (goto-char (point-min)) | 2271 | (goto-char (point-min)) |
| 2217 | (while (not (eobp)) | 2272 | (while (not (eobp)) |
| 2218 | (if (not (setq m (get-text-property (point) 'org-hd-marker))) | 2273 | (if (not (setq m (get-text-property (point) 'org-hd-marker))) |
| 2219 | (beginning-of-line 2) | 2274 | (beginning-of-line 2) |
| 2220 | (save-excursion | 2275 | (setq txt (org-agenda-get-some-entry-text |
| 2221 | (with-current-buffer (marker-buffer m) | 2276 | m org-agenda-add-entry-text-maxlines)) |
| 2222 | (if (not (org-mode-p)) | ||
| 2223 | (setq txt "") | ||
| 2224 | (save-excursion | ||
| 2225 | (save-restriction | ||
| 2226 | (widen) | ||
| 2227 | (goto-char m) | ||
| 2228 | (beginning-of-line 2) | ||
| 2229 | (setq txt (buffer-substring | ||
| 2230 | (point) | ||
| 2231 | (progn (outline-next-heading) (point))) | ||
| 2232 | drawer-re org-drawer-regexp | ||
| 2233 | kwd-time-re (concat "^[ \t]*" org-keyword-time-regexp | ||
| 2234 | ".*\n?")) | ||
| 2235 | (with-temp-buffer | ||
| 2236 | (insert txt) | ||
| 2237 | (when org-agenda-add-entry-text-descriptive-links | ||
| 2238 | (goto-char (point-min)) | ||
| 2239 | (while (org-activate-bracket-links (point-max)) | ||
| 2240 | (add-text-properties (match-beginning 0) (match-end 0) | ||
| 2241 | '(face org-link)))) | ||
| 2242 | (goto-char (point-min)) | ||
| 2243 | (while (re-search-forward org-bracket-link-regexp (point-max) t) | ||
| 2244 | (set-text-properties (match-beginning 0) (match-end 0) | ||
| 2245 | nil)) | ||
| 2246 | (goto-char (point-min)) | ||
| 2247 | (while (re-search-forward drawer-re nil t) | ||
| 2248 | (delete-region | ||
| 2249 | (match-beginning 0) | ||
| 2250 | (progn (re-search-forward | ||
| 2251 | "^[ \t]*:END:.*\n?" nil 'move) | ||
| 2252 | (point)))) | ||
| 2253 | (goto-char (point-min)) | ||
| 2254 | (while (re-search-forward kwd-time-re nil t) | ||
| 2255 | (replace-match "")) | ||
| 2256 | (if (re-search-forward "[ \t\n]+\\'" nil t) | ||
| 2257 | (replace-match "")) | ||
| 2258 | (goto-char (point-min)) | ||
| 2259 | ;; find min indentation | ||
| 2260 | (goto-char (point-min)) | ||
| 2261 | (untabify (point-min) (point-max)) | ||
| 2262 | (setq ind (org-get-indentation)) | ||
| 2263 | (while (not (eobp)) | ||
| 2264 | (unless (looking-at "[ \t]*$") | ||
| 2265 | (setq ind (min ind (org-get-indentation)))) | ||
| 2266 | (beginning-of-line 2)) | ||
| 2267 | (goto-char (point-min)) | ||
| 2268 | (while (not (eobp)) | ||
| 2269 | (unless (looking-at "[ \t]*$") | ||
| 2270 | (move-to-column ind) | ||
| 2271 | (delete-region (point-at-bol) (point))) | ||
| 2272 | (beginning-of-line 2)) | ||
| 2273 | (goto-char (point-min)) | ||
| 2274 | (while (and (not (eobp)) (re-search-forward "^" nil t)) | ||
| 2275 | (replace-match " > ")) | ||
| 2276 | (goto-char (point-min)) | ||
| 2277 | (while (looking-at "[ \t]*\n") (replace-match "")) | ||
| 2278 | (goto-char (point-max)) | ||
| 2279 | (when (> (org-current-line) | ||
| 2280 | (1+ org-agenda-add-entry-text-maxlines)) | ||
| 2281 | (goto-line (1+ org-agenda-add-entry-text-maxlines)) | ||
| 2282 | (backward-char 1)) | ||
| 2283 | (setq txt (buffer-substring (point-min) (point))))))))) | ||
| 2284 | (end-of-line 1) | 2277 | (end-of-line 1) |
| 2285 | (if (string-match "\\S-" txt) (insert "\n" txt))))))) | 2278 | (if (string-match "\\S-" txt) (insert "\n" txt))))))) |
| 2286 | 2279 | ||
| 2280 | (defun org-agenda-get-some-entry-text (marker n-lines) | ||
| 2281 | "Extract entry text from MARKER, at most N-LINES lines. | ||
| 2282 | This will ignore drawers etc, just get the text." | ||
| 2283 | (let (txt drawer-re kwd-time-re ind) | ||
| 2284 | (save-excursion | ||
| 2285 | (with-current-buffer (marker-buffer marker) | ||
| 2286 | (if (not (org-mode-p)) | ||
| 2287 | (setq txt "") | ||
| 2288 | (save-excursion | ||
| 2289 | (save-restriction | ||
| 2290 | (widen) | ||
| 2291 | (goto-char marker) | ||
| 2292 | (beginning-of-line 2) | ||
| 2293 | (setq txt (buffer-substring | ||
| 2294 | (point) | ||
| 2295 | (progn (outline-next-heading) (point))) | ||
| 2296 | drawer-re org-drawer-regexp | ||
| 2297 | kwd-time-re (concat "^[ \t]*" org-keyword-time-regexp | ||
| 2298 | ".*\n?")) | ||
| 2299 | (with-temp-buffer | ||
| 2300 | (insert txt) | ||
| 2301 | (when org-agenda-add-entry-text-descriptive-links | ||
| 2302 | (goto-char (point-min)) | ||
| 2303 | (while (org-activate-bracket-links (point-max)) | ||
| 2304 | (add-text-properties (match-beginning 0) (match-end 0) | ||
| 2305 | '(face org-link)))) | ||
| 2306 | (goto-char (point-min)) | ||
| 2307 | (while (re-search-forward org-bracket-link-regexp (point-max) t) | ||
| 2308 | (set-text-properties (match-beginning 0) (match-end 0) | ||
| 2309 | nil)) | ||
| 2310 | (goto-char (point-min)) | ||
| 2311 | (while (re-search-forward drawer-re nil t) | ||
| 2312 | (delete-region | ||
| 2313 | (match-beginning 0) | ||
| 2314 | (progn (re-search-forward | ||
| 2315 | "^[ \t]*:END:.*\n?" nil 'move) | ||
| 2316 | (point)))) | ||
| 2317 | (goto-char (point-min)) | ||
| 2318 | (while (re-search-forward kwd-time-re nil t) | ||
| 2319 | (replace-match "")) | ||
| 2320 | (if (re-search-forward "[ \t\n]+\\'" nil t) | ||
| 2321 | (replace-match "")) | ||
| 2322 | (goto-char (point-min)) | ||
| 2323 | ;; find min indentation | ||
| 2324 | (goto-char (point-min)) | ||
| 2325 | (untabify (point-min) (point-max)) | ||
| 2326 | (setq ind (org-get-indentation)) | ||
| 2327 | (while (not (eobp)) | ||
| 2328 | (unless (looking-at "[ \t]*$") | ||
| 2329 | (setq ind (min ind (org-get-indentation)))) | ||
| 2330 | (beginning-of-line 2)) | ||
| 2331 | (goto-char (point-min)) | ||
| 2332 | (while (not (eobp)) | ||
| 2333 | (unless (looking-at "[ \t]*$") | ||
| 2334 | (move-to-column ind) | ||
| 2335 | (delete-region (point-at-bol) (point))) | ||
| 2336 | (beginning-of-line 2)) | ||
| 2337 | (goto-char (point-min)) | ||
| 2338 | (while (and (not (eobp)) (re-search-forward "^" nil t)) | ||
| 2339 | (replace-match " > ")) | ||
| 2340 | (goto-char (point-min)) | ||
| 2341 | (while (looking-at "[ \t]*\n") (replace-match "")) | ||
| 2342 | (goto-char (point-max)) | ||
| 2343 | (when (> (org-current-line) | ||
| 2344 | n-lines) | ||
| 2345 | (org-goto-line (1+ n-lines)) | ||
| 2346 | (backward-char 1)) | ||
| 2347 | (setq txt (buffer-substring (point-min) (point))))))))) | ||
| 2348 | txt)) | ||
| 2349 | |||
| 2287 | (defun org-agenda-collect-markers () | 2350 | (defun org-agenda-collect-markers () |
| 2288 | "Collect the markers pointing to entries in the agenda buffer." | 2351 | "Collect the markers pointing to entries in the agenda buffer." |
| 2289 | (let (m markers) | 2352 | (let (m markers) |
| @@ -2386,7 +2449,8 @@ bind it in the options section.") | |||
| 2386 | ((equal org-agenda-window-setup 'other-window) | 2449 | ((equal org-agenda-window-setup 'other-window) |
| 2387 | (org-switch-to-buffer-other-window abuf)) | 2450 | (org-switch-to-buffer-other-window abuf)) |
| 2388 | ((equal org-agenda-window-setup 'other-frame) | 2451 | ((equal org-agenda-window-setup 'other-frame) |
| 2389 | (switch-to-buffer-other-frame abuf)) | 2452 | (switch-to-buffer-other-frame abuf) |
| 2453 | (set-window-dedicated-p (selected-window) t)) | ||
| 2390 | ((equal org-agenda-window-setup 'reorganize-frame) | 2454 | ((equal org-agenda-window-setup 'reorganize-frame) |
| 2391 | (delete-other-windows) | 2455 | (delete-other-windows) |
| 2392 | (org-switch-to-buffer-other-window abuf)))) | 2456 | (org-switch-to-buffer-other-window abuf)))) |
| @@ -2420,12 +2484,36 @@ bind it in the options section.") | |||
| 2420 | (org-agenda-fontify-priorities)) | 2484 | (org-agenda-fontify-priorities)) |
| 2421 | (when (and org-agenda-dim-blocked-tasks org-blocker-hook) | 2485 | (when (and org-agenda-dim-blocked-tasks org-blocker-hook) |
| 2422 | (org-agenda-dim-blocked-tasks)) | 2486 | (org-agenda-dim-blocked-tasks)) |
| 2487 | (org-agenda-mark-clocking-task) | ||
| 2488 | (when org-agenda-entry-text-mode | ||
| 2489 | (org-agenda-entry-text-hide) | ||
| 2490 | (org-agenda-entry-text-show)) | ||
| 2423 | (run-hooks 'org-finalize-agenda-hook) | 2491 | (run-hooks 'org-finalize-agenda-hook) |
| 2424 | (setq org-agenda-type (get-text-property (point) 'org-agenda-type)) | 2492 | (setq org-agenda-type (get-text-property (point) 'org-agenda-type)) |
| 2425 | (when (get 'org-agenda-filter :preset-filter) | 2493 | (when (get 'org-agenda-filter :preset-filter) |
| 2426 | (org-agenda-filter-apply org-agenda-filter)) | 2494 | (org-agenda-filter-apply org-agenda-filter)) |
| 2427 | ))) | 2495 | ))) |
| 2428 | 2496 | ||
| 2497 | (defun org-agenda-mark-clocking-task () | ||
| 2498 | "Mark the current clock entry in the agenda if it is present." | ||
| 2499 | (mapc (lambda (o) | ||
| 2500 | (if (eq (org-overlay-get o 'type) 'org-agenda-clocking) | ||
| 2501 | (org-delete-overlay o))) | ||
| 2502 | (org-overlays-in (point-min) (point-max))) | ||
| 2503 | (when (marker-buffer org-clock-hd-marker) | ||
| 2504 | (save-excursion | ||
| 2505 | (goto-char (point-min)) | ||
| 2506 | (let (s ov) | ||
| 2507 | (while (setq s (next-single-property-change (point) 'org-hd-marker)) | ||
| 2508 | (goto-char s) | ||
| 2509 | (when (equal (get-text-property (point) 'org-hd-marker) | ||
| 2510 | org-clock-hd-marker) | ||
| 2511 | (setq ov (org-make-overlay (point-at-bol) (1+ (point-at-eol)))) | ||
| 2512 | (org-overlay-put ov 'type 'org-agenda-clocking) | ||
| 2513 | (org-overlay-put ov 'face 'org-agenda-clocking) | ||
| 2514 | (org-overlay-put ov 'help-echo | ||
| 2515 | "The clock is running in this item"))))))) | ||
| 2516 | |||
| 2429 | (defun org-agenda-fontify-priorities () | 2517 | (defun org-agenda-fontify-priorities () |
| 2430 | "Make highest priority lines bold, and lowest italic." | 2518 | "Make highest priority lines bold, and lowest italic." |
| 2431 | (interactive) | 2519 | (interactive) |
| @@ -2530,7 +2618,7 @@ continue from there." | |||
| 2530 | 2618 | ||
| 2531 | (defvar org-agenda-markers nil | 2619 | (defvar org-agenda-markers nil |
| 2532 | "List of all currently active markers created by `org-agenda'.") | 2620 | "List of all currently active markers created by `org-agenda'.") |
| 2533 | (defvar org-agenda-last-marker-time (time-to-seconds (current-time)) | 2621 | (defvar org-agenda-last-marker-time (org-float-time) |
| 2534 | "Creation time of the last agenda marker.") | 2622 | "Creation time of the last agenda marker.") |
| 2535 | 2623 | ||
| 2536 | (defun org-agenda-new-marker (&optional pos) | 2624 | (defun org-agenda-new-marker (&optional pos) |
| @@ -2538,7 +2626,7 @@ continue from there." | |||
| 2538 | Org-mode keeps a list of these markers and resets them when they are | 2626 | Org-mode keeps a list of these markers and resets them when they are |
| 2539 | no longer in use." | 2627 | no longer in use." |
| 2540 | (let ((m (copy-marker (or pos (point))))) | 2628 | (let ((m (copy-marker (or pos (point))))) |
| 2541 | (setq org-agenda-last-marker-time (time-to-seconds (current-time))) | 2629 | (setq org-agenda-last-marker-time (org-float-time)) |
| 2542 | (push m org-agenda-markers) | 2630 | (push m org-agenda-markers) |
| 2543 | m)) | 2631 | m)) |
| 2544 | 2632 | ||
| @@ -2552,6 +2640,43 @@ no longer in use." | |||
| 2552 | (mapc (lambda (m) (org-check-and-save-marker m beg end)) | 2640 | (mapc (lambda (m) (org-check-and-save-marker m beg end)) |
| 2553 | org-agenda-markers)) | 2641 | org-agenda-markers)) |
| 2554 | 2642 | ||
| 2643 | ;;; Entry text mode | ||
| 2644 | |||
| 2645 | (defun org-agenda-entry-text-show-here () | ||
| 2646 | "Add some text from te entry as context to the current line." | ||
| 2647 | (let (m txt o) | ||
| 2648 | (setq m (get-text-property (point) 'org-hd-marker)) | ||
| 2649 | (unless (marker-buffer m) | ||
| 2650 | (error "No marker points to an entry here")) | ||
| 2651 | (setq txt (concat "\n" (org-no-properties | ||
| 2652 | (org-agenda-get-some-entry-text | ||
| 2653 | m org-agenda-entry-text-maxlines)))) | ||
| 2654 | (when (string-match "\\S-" txt) | ||
| 2655 | (setq o (org-make-overlay (point-at-bol) (point-at-eol))) | ||
| 2656 | (org-overlay-put o 'evaporate t) | ||
| 2657 | (org-overlay-put o 'org-overlay-type 'agenda-entry-content) | ||
| 2658 | (org-overlay-put o 'after-string txt)))) | ||
| 2659 | |||
| 2660 | (defun org-agenda-entry-text-show () | ||
| 2661 | "Add entry context for all agenda lines." | ||
| 2662 | (interactive) | ||
| 2663 | (save-excursion | ||
| 2664 | (goto-char (point-max)) | ||
| 2665 | (beginning-of-line 1) | ||
| 2666 | (while (not (bobp)) | ||
| 2667 | (when (get-text-property (point) 'org-hd-marker) | ||
| 2668 | (org-agenda-entry-text-show-here)) | ||
| 2669 | (beginning-of-line 0)))) | ||
| 2670 | |||
| 2671 | (defun org-agenda-entry-text-hide () | ||
| 2672 | "Remove any shown entry context." | ||
| 2673 | (delq nil | ||
| 2674 | (mapcar (lambda (o) | ||
| 2675 | (if (eq (org-overlay-get o 'org-overlay-type) | ||
| 2676 | 'agenda-entry-content) | ||
| 2677 | (progn (org-delete-overlay o) t))) | ||
| 2678 | (org-overlays-in (point-min) (point-max))))) | ||
| 2679 | |||
| 2555 | ;;; Agenda timeline | 2680 | ;;; Agenda timeline |
| 2556 | 2681 | ||
| 2557 | (defvar org-agenda-only-exact-dates nil) ; dynamically scoped | 2682 | (defvar org-agenda-only-exact-dates nil) ; dynamically scoped |
| @@ -3115,7 +3240,7 @@ for a keyword. A numeric prefix directly selects the Nth keyword in | |||
| 3115 | rtn rtnall files file pos) | 3240 | rtn rtnall files file pos) |
| 3116 | (when (equal arg '(4)) | 3241 | (when (equal arg '(4)) |
| 3117 | (setq org-select-this-todo-keyword | 3242 | (setq org-select-this-todo-keyword |
| 3118 | (org-ido-completing-read "Keyword (or KWD1|K2D2|...): " | 3243 | (org-icompleting-read "Keyword (or KWD1|K2D2|...): " |
| 3119 | (mapcar 'list kwds) nil nil))) | 3244 | (mapcar 'list kwds) nil nil))) |
| 3120 | (and (equal 0 arg) (setq org-select-this-todo-keyword nil)) | 3245 | (and (equal 0 arg) (setq org-select-this-todo-keyword nil)) |
| 3121 | (org-set-local 'org-last-arg arg) | 3246 | (org-set-local 'org-last-arg arg) |
| @@ -3547,7 +3672,7 @@ So the example above may also be written as | |||
| 3547 | The function expects the lisp variables `entry' and `date' to be provided | 3672 | The function expects the lisp variables `entry' and `date' to be provided |
| 3548 | by the caller, because this is how the calendar works. Don't use this | 3673 | by the caller, because this is how the calendar works. Don't use this |
| 3549 | function from a program - use `org-agenda-get-day-entries' instead." | 3674 | function from a program - use `org-agenda-get-day-entries' instead." |
| 3550 | (when (> (- (time-to-seconds (current-time)) | 3675 | (when (> (- (org-float-time) |
| 3551 | org-agenda-last-marker-time) | 3676 | org-agenda-last-marker-time) |
| 3552 | 5) | 3677 | 5) |
| 3553 | (org-agenda-reset-markers)) | 3678 | (org-agenda-reset-markers)) |
| @@ -3582,7 +3707,7 @@ the documentation of `org-diary'." | |||
| 3582 | (buffer (if (file-exists-p file) | 3707 | (buffer (if (file-exists-p file) |
| 3583 | (org-get-agenda-file-buffer file) | 3708 | (org-get-agenda-file-buffer file) |
| 3584 | (error "No such file %s" file))) | 3709 | (error "No such file %s" file))) |
| 3585 | arg results rtn) | 3710 | arg results rtn deadline-results) |
| 3586 | (if (not buffer) | 3711 | (if (not buffer) |
| 3587 | ;; If file does not exist, make sure an error message ends up in diary | 3712 | ;; If file does not exist, make sure an error message ends up in diary |
| 3588 | (list (format "ORG-AGENDA-ERROR: No such org-file %s" file)) | 3713 | (list (format "ORG-AGENDA-ERROR: No such org-file %s" file)) |
| @@ -3612,13 +3737,14 @@ the documentation of `org-diary'." | |||
| 3612 | (setq rtn (org-agenda-get-sexps)) | 3737 | (setq rtn (org-agenda-get-sexps)) |
| 3613 | (setq results (append results rtn))) | 3738 | (setq results (append results rtn))) |
| 3614 | ((eq arg :scheduled) | 3739 | ((eq arg :scheduled) |
| 3615 | (setq rtn (org-agenda-get-scheduled)) | 3740 | (setq rtn (org-agenda-get-scheduled deadline-results)) |
| 3616 | (setq results (append results rtn))) | 3741 | (setq results (append results rtn))) |
| 3617 | ((eq arg :closed) | 3742 | ((eq arg :closed) |
| 3618 | (setq rtn (org-agenda-get-progress)) | 3743 | (setq rtn (org-agenda-get-progress)) |
| 3619 | (setq results (append results rtn))) | 3744 | (setq results (append results rtn))) |
| 3620 | ((eq arg :deadline) | 3745 | ((eq arg :deadline) |
| 3621 | (setq rtn (org-agenda-get-deadlines)) | 3746 | (setq rtn (org-agenda-get-deadlines)) |
| 3747 | (setq deadline-results (copy-sequence rtn)) | ||
| 3622 | (setq results (append results rtn)))))))) | 3748 | (setq results (append results rtn)))))))) |
| 3623 | results)))) | 3749 | results)))) |
| 3624 | 3750 | ||
| @@ -4021,7 +4147,7 @@ FRACTION is what fraction of the head-warning time has passed." | |||
| 4021 | (while (setq f (pop faces)) | 4147 | (while (setq f (pop faces)) |
| 4022 | (if (>= fraction (car f)) (throw 'exit (cdr f))))))) | 4148 | (if (>= fraction (car f)) (throw 'exit (cdr f))))))) |
| 4023 | 4149 | ||
| 4024 | (defun org-agenda-get-scheduled () | 4150 | (defun org-agenda-get-scheduled (&optional deadline-results) |
| 4025 | "Return the scheduled information for agenda display." | 4151 | "Return the scheduled information for agenda display." |
| 4026 | (let* ((props (list 'org-not-done-regexp org-not-done-regexp | 4152 | (let* ((props (list 'org-not-done-regexp org-not-done-regexp |
| 4027 | 'org-todo-regexp org-todo-regexp | 4153 | 'org-todo-regexp org-todo-regexp |
| @@ -4035,6 +4161,12 @@ FRACTION is what fraction of the head-warning time has passed." | |||
| 4035 | (regexp org-scheduled-time-regexp) | 4161 | (regexp org-scheduled-time-regexp) |
| 4036 | (todayp (org-agenda-todayp date)) ; DATE bound by calendar | 4162 | (todayp (org-agenda-todayp date)) ; DATE bound by calendar |
| 4037 | (d1 (calendar-absolute-from-gregorian date)) ; DATE bound by calendar | 4163 | (d1 (calendar-absolute-from-gregorian date)) ; DATE bound by calendar |
| 4164 | mm | ||
| 4165 | (deadline-position-alist | ||
| 4166 | (mapcar (lambda (a) (and (setq mm (get-text-property | ||
| 4167 | 0 'org-hd-marker a)) | ||
| 4168 | (cons (marker-position mm) a))) | ||
| 4169 | deadline-results)) | ||
| 4038 | d2 diff pos pos1 category tags donep | 4170 | d2 diff pos pos1 category tags donep |
| 4039 | ee txt head pastschedp todo-state face timestr s) | 4171 | ee txt head pastschedp todo-state face timestr s) |
| 4040 | (goto-char (point-min)) | 4172 | (goto-char (point-min)) |
| @@ -4067,6 +4199,12 @@ FRACTION is what fraction of the head-warning time has passed." | |||
| 4067 | (setq txt org-agenda-no-heading-message) | 4199 | (setq txt org-agenda-no-heading-message) |
| 4068 | (goto-char (match-end 0)) | 4200 | (goto-char (match-end 0)) |
| 4069 | (setq pos1 (match-beginning 0)) | 4201 | (setq pos1 (match-beginning 0)) |
| 4202 | (if (and | ||
| 4203 | (or (eq t org-agenda-skip-scheduled-if-deadline-is-shown) | ||
| 4204 | (and org-agenda-skip-scheduled-if-deadline-is-shown | ||
| 4205 | pastschedp)) | ||
| 4206 | (setq mm (assoc pos1 deadline-position-alist))) | ||
| 4207 | (throw :skip nil)) | ||
| 4070 | (setq tags (org-get-tags-at)) | 4208 | (setq tags (org-get-tags-at)) |
| 4071 | (setq head (buffer-substring-no-properties | 4209 | (setq head (buffer-substring-no-properties |
| 4072 | (point) | 4210 | (point) |
| @@ -4273,7 +4411,7 @@ Any match of REMOVE-RE will be removed from TXT." | |||
| 4273 | (error nil))) | 4411 | (error nil))) |
| 4274 | (when effort | 4412 | (when effort |
| 4275 | (setq neffort (org-hh:mm-string-to-minutes effort) | 4413 | (setq neffort (org-hh:mm-string-to-minutes effort) |
| 4276 | effort (setq effort (concat "[" effort"]" ))))) | 4414 | effort (setq effort (concat "[" effort "]" ))))) |
| 4277 | 4415 | ||
| 4278 | (when remove-re | 4416 | (when remove-re |
| 4279 | (while (string-match remove-re txt) | 4417 | (while (string-match remove-re txt) |
| @@ -4662,6 +4800,7 @@ If ERROR is non-nil, throw an error, otherwise just return nil." | |||
| 4662 | (interactive) | 4800 | (interactive) |
| 4663 | (if org-agenda-columns-active | 4801 | (if org-agenda-columns-active |
| 4664 | (org-columns-quit) | 4802 | (org-columns-quit) |
| 4803 | (if (window-dedicated-p) (delete-other-windows)) | ||
| 4665 | (let ((buf (current-buffer))) | 4804 | (let ((buf (current-buffer))) |
| 4666 | (and (not (eq org-agenda-window-setup 'current-window)) | 4805 | (and (not (eq org-agenda-window-setup 'current-window)) |
| 4667 | (not (one-window-p)) | 4806 | (not (one-window-p)) |
| @@ -4713,7 +4852,7 @@ When this is the global TODO list, a prefix argument will be interpreted." | |||
| 4713 | (put 'org-agenda-filter :preset-filter preset) | 4852 | (put 'org-agenda-filter :preset-filter preset) |
| 4714 | (and (or filter preset) (org-agenda-filter-apply filter)) | 4853 | (and (or filter preset) (org-agenda-filter-apply filter)) |
| 4715 | (and cols (interactive-p) (org-agenda-columns)) | 4854 | (and cols (interactive-p) (org-agenda-columns)) |
| 4716 | (goto-line line) | 4855 | (org-goto-line line) |
| 4717 | (recenter window-line))) | 4856 | (recenter window-line))) |
| 4718 | 4857 | ||
| 4719 | 4858 | ||
| @@ -4772,7 +4911,7 @@ to switch to narrowing." | |||
| 4772 | (org-set-local 'org-global-tags-completion-table | 4911 | (org-set-local 'org-global-tags-completion-table |
| 4773 | (org-global-tags-completion-table))) | 4912 | (org-global-tags-completion-table))) |
| 4774 | (let ((completion-ignore-case t)) | 4913 | (let ((completion-ignore-case t)) |
| 4775 | (setq tag (org-ido-completing-read | 4914 | (setq tag (org-icompleting-read |
| 4776 | "Tag: " org-global-tags-completion-table)))) | 4915 | "Tag: " org-global-tags-completion-table)))) |
| 4777 | (cond | 4916 | (cond |
| 4778 | ((equal char ?/) | 4917 | ((equal char ?/) |
| @@ -4905,10 +5044,9 @@ Negative selection means, regexp must not match for selection of an entry." | |||
| 4905 | (defun org-agenda-manipulate-query (char) | 5044 | (defun org-agenda-manipulate-query (char) |
| 4906 | (cond | 5045 | (cond |
| 4907 | ((memq org-agenda-type '(timeline agenda)) | 5046 | ((memq org-agenda-type '(timeline agenda)) |
| 4908 | (if (y-or-n-p "Re-display with inactive time stamps included? ") | 5047 | (let ((org-agenda-include-inactive-timestamps t)) |
| 4909 | (let ((org-agenda-include-inactive-timestamps t)) | 5048 | (org-agenda-redo)) |
| 4910 | (org-agenda-redo)) | 5049 | (message "Display now includes inactive timestamps as well")) |
| 4911 | (error "Abort"))) | ||
| 4912 | ((eq org-agenda-type 'search) | 5050 | ((eq org-agenda-type 'search) |
| 4913 | (org-add-to-string | 5051 | (org-add-to-string |
| 4914 | 'org-agenda-query-string | 5052 | 'org-agenda-query-string |
| @@ -4999,7 +5137,7 @@ With prefix ARG, go backward that many times the current span." | |||
| 4999 | "Call one of the view mode commands." | 5137 | "Call one of the view mode commands." |
| 5000 | (interactive) | 5138 | (interactive) |
| 5001 | (message "View: [d]ay [w]eek [m]onth [y]ear [l]og [L]og-all [a]rch-trees [A]rch-files | 5139 | (message "View: [d]ay [w]eek [m]onth [y]ear [l]og [L]og-all [a]rch-trees [A]rch-files |
| 5002 | clock[R]eport time[G]rid include[D]iary") | 5140 | clock[R]eport time[G]rid [[]inactive [E]ntryText include[D]iary") |
| 5003 | (let ((a (read-char-exclusive))) | 5141 | (let ((a (read-char-exclusive))) |
| 5004 | (case a | 5142 | (case a |
| 5005 | (?d (call-interactively 'org-agenda-day-view)) | 5143 | (?d (call-interactively 'org-agenda-day-view)) |
| @@ -5007,11 +5145,17 @@ With prefix ARG, go backward that many times the current span." | |||
| 5007 | (?m (call-interactively 'org-agenda-month-view)) | 5145 | (?m (call-interactively 'org-agenda-month-view)) |
| 5008 | (?y (call-interactively 'org-agenda-year-view)) | 5146 | (?y (call-interactively 'org-agenda-year-view)) |
| 5009 | (?l (call-interactively 'org-agenda-log-mode)) | 5147 | (?l (call-interactively 'org-agenda-log-mode)) |
| 5148 | ((?F ?f) (call-interactively 'org-agenda-follow-mode)) | ||
| 5010 | (?a (call-interactively 'org-agenda-archives-mode)) | 5149 | (?a (call-interactively 'org-agenda-archives-mode)) |
| 5011 | (?A (org-agenda-archives-mode 'files)) | 5150 | (?A (org-agenda-archives-mode 'files)) |
| 5012 | (?R (call-interactively 'org-agenda-clockreport-mode)) | 5151 | ((?R ?r) (call-interactively 'org-agenda-clockreport-mode)) |
| 5152 | ((?E ?e) (call-interactively 'org-agenda-entry-text-mode)) | ||
| 5013 | (?G (call-interactively 'org-agenda-toggle-time-grid)) | 5153 | (?G (call-interactively 'org-agenda-toggle-time-grid)) |
| 5014 | (?D (call-interactively 'org-agenda-toggle-diary)) | 5154 | (?D (call-interactively 'org-agenda-toggle-diary)) |
| 5155 | (?\[ (let ((org-agenda-include-inactive-timestamps t)) | ||
| 5156 | (org-agenda-check-type t 'timeline 'agenda) | ||
| 5157 | (org-agenda-redo)) | ||
| 5158 | (message "Display now includes inactive timestamps as well")) | ||
| 5015 | (?q (message "Abort")) | 5159 | (?q (message "Abort")) |
| 5016 | (otherwise (error "Invalid key" ))))) | 5160 | (otherwise (error "Invalid key" ))))) |
| 5017 | 5161 | ||
| @@ -5171,6 +5315,22 @@ so that the date SD will be in that range." | |||
| 5171 | (message "Follow mode is %s" | 5315 | (message "Follow mode is %s" |
| 5172 | (if org-agenda-follow-mode "on" "off"))) | 5316 | (if org-agenda-follow-mode "on" "off"))) |
| 5173 | 5317 | ||
| 5318 | (defun org-agenda-entry-text-mode (&optional arg) | ||
| 5319 | "Toggle entry text mode in an agenda buffer." | ||
| 5320 | (interactive "P") | ||
| 5321 | (if (integerp arg) | ||
| 5322 | (setq org-agenda-entry-text-mode t) | ||
| 5323 | (setq org-agenda-entry-text-mode (not org-agenda-entry-text-mode))) | ||
| 5324 | (org-agenda-entry-text-hide) | ||
| 5325 | (and org-agenda-entry-text-mode | ||
| 5326 | (let ((org-agenda-entry-text-maxlines | ||
| 5327 | (if (integerp arg) arg org-agenda-entry-text-maxlines))) | ||
| 5328 | (org-agenda-entry-text-show))) | ||
| 5329 | (org-agenda-set-mode-name) | ||
| 5330 | (message "Entry text mode is %s. Maximum number of lines is %d" | ||
| 5331 | (if org-agenda-entry-text-mode "on" "off") | ||
| 5332 | (if (integerp arg) arg org-agenda-entry-text-maxlines))) | ||
| 5333 | |||
| 5174 | (defun org-agenda-clockreport-mode () | 5334 | (defun org-agenda-clockreport-mode () |
| 5175 | "Toggle clocktable mode in an agenda buffer." | 5335 | "Toggle clocktable mode in an agenda buffer." |
| 5176 | (interactive) | 5336 | (interactive) |
| @@ -5244,6 +5404,7 @@ When called with a prefix argument, include all archive files as well." | |||
| 5244 | (if (equal org-agenda-ndays 1) " Day" "") | 5404 | (if (equal org-agenda-ndays 1) " Day" "") |
| 5245 | (if (equal org-agenda-ndays 7) " Week" "") | 5405 | (if (equal org-agenda-ndays 7) " Week" "") |
| 5246 | (if org-agenda-follow-mode " Follow" "") | 5406 | (if org-agenda-follow-mode " Follow" "") |
| 5407 | (if org-agenda-entry-text-mode " ETxt" "") | ||
| 5247 | (if org-agenda-include-diary " Diary" "") | 5408 | (if org-agenda-include-diary " Diary" "") |
| 5248 | (if org-agenda-use-time-grid " Grid" "") | 5409 | (if org-agenda-use-time-grid " Grid" "") |
| 5249 | (if (consp org-agenda-show-log) " LogAll" | 5410 | (if (consp org-agenda-show-log) " LogAll" |
| @@ -5411,33 +5572,39 @@ If this information is not given, the function uses the tree at point." | |||
| 5411 | (defun org-agenda-refile (&optional goto rfloc) | 5572 | (defun org-agenda-refile (&optional goto rfloc) |
| 5412 | "Refile the item at point." | 5573 | "Refile the item at point." |
| 5413 | (interactive "P") | 5574 | (interactive "P") |
| 5575 | (if (equal goto '(16)) | ||
| 5576 | (org-refile-goto-last-stored) | ||
| 5577 | (let* ((marker (or (get-text-property (point) 'org-hd-marker) | ||
| 5578 | (org-agenda-error))) | ||
| 5579 | (buffer (marker-buffer marker)) | ||
| 5580 | (pos (marker-position marker)) | ||
| 5581 | (rfloc (or rfloc | ||
| 5582 | (org-refile-get-location | ||
| 5583 | (if goto "Goto: " "Refile to: ") buffer | ||
| 5584 | org-refile-allow-creating-parent-nodes)))) | ||
| 5585 | (with-current-buffer buffer | ||
| 5586 | (save-excursion | ||
| 5587 | (save-restriction | ||
| 5588 | (widen) | ||
| 5589 | (goto-char marker) | ||
| 5590 | (org-remove-subtree-entries-from-agenda) | ||
| 5591 | (org-refile goto buffer rfloc))))))) | ||
| 5592 | |||
| 5593 | (defun org-agenda-open-link (&optional arg) | ||
| 5594 | "Follow the link in the current line, if any. | ||
| 5595 | This looks for a link in the displayed lin in the agenda. It also looks | ||
| 5596 | at the text of the entry itself." | ||
| 5597 | (interactive "P") | ||
| 5414 | (let* ((marker (or (get-text-property (point) 'org-hd-marker) | 5598 | (let* ((marker (or (get-text-property (point) 'org-hd-marker) |
| 5415 | (org-agenda-error))) | 5599 | (get-text-property (point) 'org-marker))) |
| 5416 | (buffer (marker-buffer marker)) | 5600 | (buffer (and marker (marker-buffer marker)))) |
| 5417 | (pos (marker-position marker)) | 5601 | (unless buffer (error "Don't know where to look for links")) |
| 5418 | (rfloc (or rfloc | ||
| 5419 | (org-refile-get-location | ||
| 5420 | (if goto "Goto: " "Refile to: ") buffer | ||
| 5421 | org-refile-allow-creating-parent-nodes)))) | ||
| 5422 | (with-current-buffer buffer | 5602 | (with-current-buffer buffer |
| 5423 | (save-excursion | 5603 | (save-excursion |
| 5424 | (save-restriction | 5604 | (save-restriction |
| 5425 | (widen) | 5605 | (widen) |
| 5426 | (goto-char marker) | 5606 | (goto-char marker) |
| 5427 | (org-remove-subtree-entries-from-agenda) | 5607 | (org-offer-links-in-entry arg)))))) |
| 5428 | (org-refile goto buffer rfloc)))))) | ||
| 5429 | |||
| 5430 | |||
| 5431 | |||
| 5432 | |||
| 5433 | (defun org-agenda-open-link () | ||
| 5434 | "Follow the link in the current line, if any." | ||
| 5435 | (interactive) | ||
| 5436 | (org-agenda-copy-local-variable 'org-link-abbrev-alist-local) | ||
| 5437 | (save-excursion | ||
| 5438 | (save-restriction | ||
| 5439 | (narrow-to-region (point-at-bol) (point-at-eol)) | ||
| 5440 | (org-open-at-point)))) | ||
| 5441 | 5608 | ||
| 5442 | (defun org-agenda-copy-local-variable (var) | 5609 | (defun org-agenda-copy-local-variable (var) |
| 5443 | "Get a variable from a referenced buffer and install it here." | 5610 | "Get a variable from a referenced buffer and install it here." |
| @@ -5487,8 +5654,8 @@ The prefix arg causes further revieling: | |||
| 5487 | 5654 | ||
| 5488 | 0 hide the subtree | 5655 | 0 hide the subtree |
| 5489 | 1 just show the entry according to defaults. | 5656 | 1 just show the entry according to defaults. |
| 5490 | 2 show the text below the heading | 5657 | 2 show the children view |
| 5491 | 3 show the entire subtree | 5658 | 3 show the subtree view |
| 5492 | 4 show the entire subtree and any LOGBOOK drawers | 5659 | 4 show the entire subtree and any LOGBOOK drawers |
| 5493 | 5 show the entire subtree and any drawers | 5660 | 5 show the entire subtree and any drawers |
| 5494 | With prefix argument FULL-ENTRY, make the entire entry visible | 5661 | With prefix argument FULL-ENTRY, make the entire entry visible |
| @@ -5500,21 +5667,25 @@ if it was hidden in the outline." | |||
| 5500 | (cond | 5667 | (cond |
| 5501 | ((= more 0) | 5668 | ((= more 0) |
| 5502 | (hide-subtree) | 5669 | (hide-subtree) |
| 5503 | (message "Remote: hide subtree")) | 5670 | (save-excursion |
| 5671 | (org-back-to-heading) | ||
| 5672 | (run-hook-with-args 'org-cycle-hook 'folded)) | ||
| 5673 | (message "Remote: FOLDED")) | ||
| 5504 | ((and (interactive-p) (= more 1)) | 5674 | ((and (interactive-p) (= more 1)) |
| 5505 | (message "Remote: show with default settings")) | 5675 | (message "Remote: show with default settings")) |
| 5506 | ((= more 2) | 5676 | ((= more 2) |
| 5507 | (show-entry) | 5677 | (show-entry) |
| 5678 | (show-children) | ||
| 5508 | (save-excursion | 5679 | (save-excursion |
| 5509 | (org-back-to-heading) | 5680 | (org-back-to-heading) |
| 5510 | (org-cycle-hide-drawers 'children)) | 5681 | (run-hook-with-args 'org-cycle-hook 'children)) |
| 5511 | (message "Remote: show entry")) | 5682 | (message "Remote: CHILDREN")) |
| 5512 | ((= more 3) | 5683 | ((= more 3) |
| 5513 | (show-subtree) | 5684 | (show-subtree) |
| 5514 | (save-excursion | 5685 | (save-excursion |
| 5515 | (org-back-to-heading) | 5686 | (org-back-to-heading) |
| 5516 | (org-cycle-hide-drawers 'subtree)) | 5687 | (run-hook-with-args 'org-cycle-hook 'subtree)) |
| 5517 | (message "Remote: show subtree")) | 5688 | (message "Remote: SUBTREE")) |
| 5518 | ((= more 4) | 5689 | ((= more 4) |
| 5519 | (let* ((org-drawers (delete "LOGBOOK" (copy-sequence org-drawers))) | 5690 | (let* ((org-drawers (delete "LOGBOOK" (copy-sequence org-drawers))) |
| 5520 | (org-drawer-regexp | 5691 | (org-drawer-regexp |
| @@ -5525,10 +5696,10 @@ if it was hidden in the outline." | |||
| 5525 | (save-excursion | 5696 | (save-excursion |
| 5526 | (org-back-to-heading) | 5697 | (org-back-to-heading) |
| 5527 | (org-cycle-hide-drawers 'subtree))) | 5698 | (org-cycle-hide-drawers 'subtree))) |
| 5528 | (message "Remote: show subtree and LOGBOOK")) | 5699 | (message "Remote: SUBTREE AND LOGBOOK")) |
| 5529 | ((> more 4) | 5700 | ((> more 4) |
| 5530 | (show-subtree) | 5701 | (show-subtree) |
| 5531 | (message "Remote: show subtree and LOGBOOK"))) | 5702 | (message "Remote: SUBTREE AND ALL DRAWERS"))) |
| 5532 | (select-window win))) | 5703 | (select-window win))) |
| 5533 | 5704 | ||
| 5534 | (defun org-recenter-heading (n) | 5705 | (defun org-recenter-heading (n) |
| @@ -5537,20 +5708,27 @@ if it was hidden in the outline." | |||
| 5537 | (recenter n))) | 5708 | (recenter n))) |
| 5538 | 5709 | ||
| 5539 | (defvar org-agenda-cycle-counter nil) | 5710 | (defvar org-agenda-cycle-counter nil) |
| 5540 | (defun org-agenda-cycle-show (n) | 5711 | (defun org-agenda-cycle-show (&optional n) |
| 5541 | "Show the current entry in another window, with default settings. | 5712 | "Show the current entry in another window, with default settings. |
| 5542 | Default settings are taken from `org-show-hierarchy-above' and siblings. | 5713 | Default settings are taken from `org-show-hierarchy-above' and siblings. |
| 5543 | When use repeadedly in immediate succession, the remote entry will cycle | 5714 | When use repeatedly in immediate succession, the remote entry will cycle |
| 5544 | through visibility | 5715 | through visibility |
| 5545 | 5716 | ||
| 5546 | entry -> subtree -> subtree with logbook" | 5717 | children -> subtree -> folded |
| 5547 | (interactive "p") | 5718 | |
| 5548 | (when (and (= n 1) | 5719 | When called with a numeric prefix arg, that arg will be passed through to |
| 5549 | (not (eq last-command this-command))) | 5720 | `org-agenda-show-1'. For the interpretation of that argument, see the |
| 5550 | (setq org-agenda-cycle-counter 0)) | 5721 | docstring of `org-agenda-show-1'." |
| 5551 | (setq org-agenda-cycle-counter (1+ org-agenda-cycle-counter)) | 5722 | (interactive "P") |
| 5552 | (if (> org-agenda-cycle-counter 4) | 5723 | (if (integerp n) |
| 5553 | (setq org-agenda-cycle-counter 0)) | 5724 | (setq org-agenda-cycle-counter n) |
| 5725 | (if (not (eq last-command this-command)) | ||
| 5726 | (setq org-agenda-cycle-counter 1) | ||
| 5727 | (if (equal org-agenda-cycle-counter 0) | ||
| 5728 | (setq org-agenda-cycle-counter 2) | ||
| 5729 | (setq org-agenda-cycle-counter (1+ org-agenda-cycle-counter)) | ||
| 5730 | (if (> org-agenda-cycle-counter 3) | ||
| 5731 | (setq org-agenda-cycle-counter 0))))) | ||
| 5554 | (org-agenda-show-1 org-agenda-cycle-counter)) | 5732 | (org-agenda-show-1 org-agenda-cycle-counter)) |
| 5555 | 5733 | ||
| 5556 | (defun org-agenda-recenter (arg) | 5734 | (defun org-agenda-recenter (arg) |
| @@ -5821,6 +5999,53 @@ the same tree node, and the headline of the tree node in the Org-mode file." | |||
| 5821 | (org-agenda-change-all-lines newhead hdmarker) | 5999 | (org-agenda-change-all-lines newhead hdmarker) |
| 5822 | (beginning-of-line 1))))) | 6000 | (beginning-of-line 1))))) |
| 5823 | 6001 | ||
| 6002 | (defun org-agenda-set-property () | ||
| 6003 | "Set a property for the current headline." | ||
| 6004 | (interactive) | ||
| 6005 | (org-agenda-check-no-diary) | ||
| 6006 | (org-agenda-show) ;;; FIXME This is a stupid hack and should not be needed | ||
| 6007 | (let* ((hdmarker (or (get-text-property (point) 'org-hd-marker) | ||
| 6008 | (org-agenda-error))) | ||
| 6009 | (buffer (marker-buffer hdmarker)) | ||
| 6010 | (pos (marker-position hdmarker)) | ||
| 6011 | (inhibit-read-only t) | ||
| 6012 | newhead) | ||
| 6013 | (org-with-remote-undo buffer | ||
| 6014 | (with-current-buffer buffer | ||
| 6015 | (widen) | ||
| 6016 | (goto-char pos) | ||
| 6017 | (save-excursion | ||
| 6018 | (org-show-context 'agenda)) | ||
| 6019 | (save-excursion | ||
| 6020 | (and (outline-next-heading) | ||
| 6021 | (org-flag-heading nil))) ; show the next heading | ||
| 6022 | (goto-char pos) | ||
| 6023 | (call-interactively 'org-set-property))))) | ||
| 6024 | |||
| 6025 | (defun org-agenda-set-effort () | ||
| 6026 | "Set the effort property for the current headline." | ||
| 6027 | (interactive) | ||
| 6028 | (org-agenda-check-no-diary) | ||
| 6029 | (org-agenda-show) ;;; FIXME This is a stupid hack and should not be needed | ||
| 6030 | (let* ((hdmarker (or (get-text-property (point) 'org-hd-marker) | ||
| 6031 | (org-agenda-error))) | ||
| 6032 | (buffer (marker-buffer hdmarker)) | ||
| 6033 | (pos (marker-position hdmarker)) | ||
| 6034 | (inhibit-read-only t) | ||
| 6035 | newhead) | ||
| 6036 | (org-with-remote-undo buffer | ||
| 6037 | (with-current-buffer buffer | ||
| 6038 | (widen) | ||
| 6039 | (goto-char pos) | ||
| 6040 | (save-excursion | ||
| 6041 | (org-show-context 'agenda)) | ||
| 6042 | (save-excursion | ||
| 6043 | (and (outline-next-heading) | ||
| 6044 | (org-flag-heading nil))) ; show the next heading | ||
| 6045 | (goto-char pos) | ||
| 6046 | (call-interactively 'org-set-effort) | ||
| 6047 | (end-of-line 1))))) | ||
| 6048 | |||
| 5824 | (defun org-agenda-toggle-archive-tag () | 6049 | (defun org-agenda-toggle-archive-tag () |
| 5825 | "Toggle the archive tag for the current entry." | 6050 | "Toggle the archive tag for the current entry." |
| 5826 | (interactive) | 6051 | (interactive) |
| @@ -6273,14 +6498,17 @@ This is a command that has to be installed in `calendar-mode-map'." | |||
| 6273 | (defvar org-agenda-bulk-marked-entries nil | 6498 | (defvar org-agenda-bulk-marked-entries nil |
| 6274 | "List of markers that refer to marked entries in the agenda.") | 6499 | "List of markers that refer to marked entries in the agenda.") |
| 6275 | 6500 | ||
| 6501 | (defun org-agenda-bulk-marked-p () | ||
| 6502 | (eq (get-char-property (point-at-bol) 'type) | ||
| 6503 | 'org-marked-entry-overlay)) | ||
| 6504 | |||
| 6276 | (defun org-agenda-bulk-mark () | 6505 | (defun org-agenda-bulk-mark () |
| 6277 | "Mark the entry at point for future bulk action." | 6506 | "Mark the entry at point for future bulk action." |
| 6278 | (interactive) | 6507 | (interactive) |
| 6279 | (org-agenda-check-no-diary) | 6508 | (org-agenda-check-no-diary) |
| 6280 | (let* ((m (get-text-property (point) 'org-hd-marker)) | 6509 | (let* ((m (get-text-property (point) 'org-hd-marker)) |
| 6281 | ov) | 6510 | ov) |
| 6282 | (unless (eq (get-char-property (point-at-bol) 'type) | 6511 | (unless (org-agenda-bulk-marked-p) |
| 6283 | 'org-marked-entry-overlay) | ||
| 6284 | (unless m (error "Nothing to mark at point")) | 6512 | (unless m (error "Nothing to mark at point")) |
| 6285 | (push m org-agenda-bulk-marked-entries) | 6513 | (push m org-agenda-bulk-marked-entries) |
| 6286 | (setq ov (org-make-overlay (point-at-bol) (+ 2 (point-at-bol)))) | 6514 | (setq ov (org-make-overlay (point-at-bol) (+ 2 (point-at-bol)))) |
| @@ -6295,8 +6523,7 @@ This is a command that has to be installed in `calendar-mode-map'." | |||
| 6295 | (defun org-agenda-bulk-unmark () | 6523 | (defun org-agenda-bulk-unmark () |
| 6296 | "Unmark the entry at point for future bulk action." | 6524 | "Unmark the entry at point for future bulk action." |
| 6297 | (interactive) | 6525 | (interactive) |
| 6298 | (when (eq (get-char-property (point-at-bol) 'type) | 6526 | (when (org-agenda-bulk-marked-p) |
| 6299 | 'org-marked-entry-overlay) | ||
| 6300 | (org-agenda-bulk-remove-overlays | 6527 | (org-agenda-bulk-remove-overlays |
| 6301 | (point-at-bol) (+ 2 (point-at-bol))) | 6528 | (point-at-bol) (+ 2 (point-at-bol))) |
| 6302 | (setq org-agenda-bulk-marked-entries | 6529 | (setq org-agenda-bulk-marked-entries |
| @@ -6306,6 +6533,12 @@ This is a command that has to be installed in `calendar-mode-map'." | |||
| 6306 | (message "%d entries marked for bulk action" | 6533 | (message "%d entries marked for bulk action" |
| 6307 | (length org-agenda-bulk-marked-entries))) | 6534 | (length org-agenda-bulk-marked-entries))) |
| 6308 | 6535 | ||
| 6536 | (defun org-agenda-bulk-toggle () | ||
| 6537 | "Toggle marking the entry at point for bulk action." | ||
| 6538 | (interactive) | ||
| 6539 | (if (org-agenda-bulk-marked-p) | ||
| 6540 | (org-agenda-bulk-unmark) | ||
| 6541 | (org-agenda-bulk-mark))) | ||
| 6309 | 6542 | ||
| 6310 | (defun org-agenda-bulk-remove-overlays (&optional beg end) | 6543 | (defun org-agenda-bulk-remove-overlays (&optional beg end) |
| 6311 | "Remove the mark overlays between BEG and END in the agenda buffer. | 6544 | "Remove the mark overlays between BEG and END in the agenda buffer. |
| @@ -6357,7 +6590,7 @@ This will remove the markers, and the overlays." | |||
| 6357 | (setq cmd (list 'org-agenda-refile nil (list 'quote rfloc)))) | 6590 | (setq cmd (list 'org-agenda-refile nil (list 'quote rfloc)))) |
| 6358 | 6591 | ||
| 6359 | ((equal action ?t) | 6592 | ((equal action ?t) |
| 6360 | (setq state (org-ido-completing-read | 6593 | (setq state (org-icompleting-read |
| 6361 | "Todo state: " | 6594 | "Todo state: " |
| 6362 | (with-current-buffer (marker-buffer (car entries)) | 6595 | (with-current-buffer (marker-buffer (car entries)) |
| 6363 | (mapcar 'list org-todo-keywords-1)))) | 6596 | (mapcar 'list org-todo-keywords-1)))) |
| @@ -6366,7 +6599,7 @@ This will remove the markers, and the overlays." | |||
| 6366 | (org-agenda-todo ,state)))) | 6599 | (org-agenda-todo ,state)))) |
| 6367 | 6600 | ||
| 6368 | ((memq action '(?- ?+)) | 6601 | ((memq action '(?- ?+)) |
| 6369 | (setq tag (org-ido-completing-read | 6602 | (setq tag (org-icompleting-read |
| 6370 | (format "Tag to %s: " (if (eq action ?+) "add" "remove")) | 6603 | (format "Tag to %s: " (if (eq action ?+) "add" "remove")) |
| 6371 | (with-current-buffer (marker-buffer (car entries)) | 6604 | (with-current-buffer (marker-buffer (car entries)) |
| 6372 | (delq nil | 6605 | (delq nil |
diff --git a/lisp/org/org-archive.el b/lisp/org/org-archive.el index 26d3278183c..7a5692480ef 100644 --- a/lisp/org/org-archive.el +++ b/lisp/org/org-archive.el | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | ;; Author: Carsten Dominik <carsten at orgmode dot org> | 6 | ;; Author: Carsten Dominik <carsten at orgmode dot org> |
| 7 | ;; Keywords: outlines, hypermedia, calendar, wp | 7 | ;; Keywords: outlines, hypermedia, calendar, wp |
| 8 | ;; Homepage: http://orgmode.org | 8 | ;; Homepage: http://orgmode.org |
| 9 | ;; Version: 6.29c | 9 | ;; Version: 6.30c |
| 10 | ;; | 10 | ;; |
| 11 | ;; This file is part of GNU Emacs. | 11 | ;; This file is part of GNU Emacs. |
| 12 | ;; | 12 | ;; |
diff --git a/lisp/org/org-ascii.el b/lisp/org/org-ascii.el index 4ace1db5c7c..a055b838794 100644 --- a/lisp/org/org-ascii.el +++ b/lisp/org/org-ascii.el | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | ;; Author: Carsten Dominik <carsten at orgmode dot org> | 6 | ;; Author: Carsten Dominik <carsten at orgmode dot org> |
| 7 | ;; Keywords: outlines, hypermedia, calendar, wp | 7 | ;; Keywords: outlines, hypermedia, calendar, wp |
| 8 | ;; Homepage: http://orgmode.org | 8 | ;; Homepage: http://orgmode.org |
| 9 | ;; Version: 6.29c | 9 | ;; Version: 6.30c |
| 10 | ;; | 10 | ;; |
| 11 | ;; This file is part of GNU Emacs. | 11 | ;; This file is part of GNU Emacs. |
| 12 | ;; | 12 | ;; |
| @@ -266,11 +266,13 @@ publishing directory." | |||
| 266 | 266 | ||
| 267 | ;; File header | 267 | ;; File header |
| 268 | (unless body-only | 268 | (unless body-only |
| 269 | (if title (org-insert-centered title ?=)) | 269 | (when (and title (not (string= "" title))) |
| 270 | (insert "\n") | 270 | (org-insert-centered title ?=) |
| 271 | (insert "\n")) | ||
| 272 | |||
| 271 | (if (and (or author email) | 273 | (if (and (or author email) |
| 272 | org-export-author-info) | 274 | org-export-author-info) |
| 273 | (insert (concat (nth 1 lang-words) ": " (or author "") | 275 | (insert(concat (nth 1 lang-words) ": " (or author "") |
| 274 | (if email (concat " <" email ">") "") | 276 | (if email (concat " <" email ">") "") |
| 275 | "\n"))) | 277 | "\n"))) |
| 276 | 278 | ||
| @@ -283,7 +285,8 @@ publishing directory." | |||
| 283 | (if (and date org-export-time-stamp-file) | 285 | (if (and date org-export-time-stamp-file) |
| 284 | (insert (concat (nth 2 lang-words) ": " date"\n"))) | 286 | (insert (concat (nth 2 lang-words) ": " date"\n"))) |
| 285 | 287 | ||
| 286 | (insert "\n\n")) | 288 | (unless (= (point) (point-min)) |
| 289 | (insert "\n\n"))) | ||
| 287 | 290 | ||
| 288 | (if (and org-export-with-toc (not body-only)) | 291 | (if (and org-export-with-toc (not body-only)) |
| 289 | (progn | 292 | (progn |
diff --git a/lisp/org/org-attach.el b/lisp/org/org-attach.el index 05228c22c0f..a9c80cfe4d8 100644 --- a/lisp/org/org-attach.el +++ b/lisp/org/org-attach.el | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | 4 | ||
| 5 | ;; Author: John Wiegley <johnw@newartisans.com> | 5 | ;; Author: John Wiegley <johnw@newartisans.com> |
| 6 | ;; Keywords: org data task | 6 | ;; Keywords: org data task |
| 7 | ;; Version: 6.29c | 7 | ;; Version: 6.30c |
| 8 | 8 | ||
| 9 | ;; This file is part of GNU Emacs. | 9 | ;; This file is part of GNU Emacs. |
| 10 | ;; | 10 | ;; |
| @@ -314,7 +314,7 @@ The attachment is created as an Emacs buffer." | |||
| 314 | (let* ((attach-dir (org-attach-dir t)) | 314 | (let* ((attach-dir (org-attach-dir t)) |
| 315 | (files (org-attach-file-list attach-dir)) | 315 | (files (org-attach-file-list attach-dir)) |
| 316 | (file (or file | 316 | (file (or file |
| 317 | (org-ido-completing-read | 317 | (org-icompleting-read |
| 318 | "Delete attachment: " | 318 | "Delete attachment: " |
| 319 | (mapcar (lambda (f) | 319 | (mapcar (lambda (f) |
| 320 | (list (file-name-nondirectory f))) | 320 | (list (file-name-nondirectory f))) |
| @@ -389,7 +389,7 @@ If IN-EMACS is non-nil, force opening in Emacs." | |||
| 389 | (files (org-attach-file-list attach-dir)) | 389 | (files (org-attach-file-list attach-dir)) |
| 390 | (file (if (= (length files) 1) | 390 | (file (if (= (length files) 1) |
| 391 | (car files) | 391 | (car files) |
| 392 | (org-ido-completing-read "Open attachment: " | 392 | (org-icompleting-read "Open attachment: " |
| 393 | (mapcar 'list files) nil t)))) | 393 | (mapcar 'list files) nil t)))) |
| 394 | (org-open-file (expand-file-name file attach-dir) in-emacs))) | 394 | (org-open-file (expand-file-name file attach-dir) in-emacs))) |
| 395 | 395 | ||
diff --git a/lisp/org/org-bbdb.el b/lisp/org/org-bbdb.el index 8b2470d82bf..2c2e9ce81a9 100644 --- a/lisp/org/org-bbdb.el +++ b/lisp/org/org-bbdb.el | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | ;; Thomas Baumann <thomas dot baumann at ch dot tum dot de> | 7 | ;; Thomas Baumann <thomas dot baumann at ch dot tum dot de> |
| 8 | ;; Keywords: outlines, hypermedia, calendar, wp | 8 | ;; Keywords: outlines, hypermedia, calendar, wp |
| 9 | ;; Homepage: http://orgmode.org | 9 | ;; Homepage: http://orgmode.org |
| 10 | ;; Version: 6.29c | 10 | ;; Version: 6.30c |
| 11 | ;; | 11 | ;; |
| 12 | ;; This file is part of GNU Emacs. | 12 | ;; This file is part of GNU Emacs. |
| 13 | ;; | 13 | ;; |
diff --git a/lisp/org/org-bibtex.el b/lisp/org/org-bibtex.el index 6bdc1ce1236..5e9fbe3cf76 100644 --- a/lisp/org/org-bibtex.el +++ b/lisp/org/org-bibtex.el | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | ;; Author: Bastien Guerry <bzg at altern dot org> | 5 | ;; Author: Bastien Guerry <bzg at altern dot org> |
| 6 | ;; Carsten Dominik <carsten dot dominik at gmail dot com> | 6 | ;; Carsten Dominik <carsten dot dominik at gmail dot com> |
| 7 | ;; Keywords: org, wp, remember | 7 | ;; Keywords: org, wp, remember |
| 8 | ;; Version: 6.29c | 8 | ;; Version: 6.30c |
| 9 | ;; | 9 | ;; |
| 10 | ;; This file is part of GNU Emacs. | 10 | ;; This file is part of GNU Emacs. |
| 11 | ;; | 11 | ;; |
diff --git a/lisp/org/org-clock.el b/lisp/org/org-clock.el index 4b96dae101b..064d5269523 100644 --- a/lisp/org/org-clock.el +++ b/lisp/org/org-clock.el | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | ;; Author: Carsten Dominik <carsten at orgmode dot org> | 6 | ;; Author: Carsten Dominik <carsten at orgmode dot org> |
| 7 | ;; Keywords: outlines, hypermedia, calendar, wp | 7 | ;; Keywords: outlines, hypermedia, calendar, wp |
| 8 | ;; Homepage: http://orgmode.org | 8 | ;; Homepage: http://orgmode.org |
| 9 | ;; Version: 6.29c | 9 | ;; Version: 6.30c |
| 10 | ;; | 10 | ;; |
| 11 | ;; This file is part of GNU Emacs. | 11 | ;; This file is part of GNU Emacs. |
| 12 | ;; | 12 | ;; |
| @@ -277,6 +277,7 @@ of a different task.") | |||
| 277 | (defun org-clock-save-markers-for-cut-and-paste (beg end) | 277 | (defun org-clock-save-markers-for-cut-and-paste (beg end) |
| 278 | "Save relative positions of markers in region." | 278 | "Save relative positions of markers in region." |
| 279 | (org-check-and-save-marker org-clock-marker beg end) | 279 | (org-check-and-save-marker org-clock-marker beg end) |
| 280 | (org-check-and-save-marker org-clock-hd-marker beg end) | ||
| 280 | (org-check-and-save-marker org-clock-default-task beg end) | 281 | (org-check-and-save-marker org-clock-default-task beg end) |
| 281 | (org-check-and-save-marker org-clock-interrupted-task beg end) | 282 | (org-check-and-save-marker org-clock-interrupted-task beg end) |
| 282 | (mapc (lambda (m) (org-check-and-save-marker m beg end)) | 283 | (mapc (lambda (m) (org-check-and-save-marker m beg end)) |
| @@ -389,8 +390,8 @@ If not, show simply the clocked time like 01:50." | |||
| 389 | The time returned includes the the time spent on this task in | 390 | The time returned includes the the time spent on this task in |
| 390 | previous clocking intervals." | 391 | previous clocking intervals." |
| 391 | (let ((currently-clocked-time | 392 | (let ((currently-clocked-time |
| 392 | (floor (- (time-to-seconds (current-time)) | 393 | (floor (- (org-float-time) |
| 393 | (time-to-seconds org-clock-start-time)) 60))) | 394 | (org-float-time org-clock-start-time)) 60))) |
| 394 | (+ currently-clocked-time (or org-clock-total-time 0)))) | 395 | (+ currently-clocked-time (or org-clock-total-time 0)))) |
| 395 | 396 | ||
| 396 | (defun org-clock-modify-effort-estimate (&optional value) | 397 | (defun org-clock-modify-effort-estimate (&optional value) |
| @@ -424,7 +425,8 @@ the mode line." | |||
| 424 | (setq value (max 0 value) | 425 | (setq value (max 0 value) |
| 425 | org-clock-effort (org-minutes-to-hh:mm-string value)) | 426 | org-clock-effort (org-minutes-to-hh:mm-string value)) |
| 426 | (org-entry-put org-clock-marker "Effort" org-clock-effort) | 427 | (org-entry-put org-clock-marker "Effort" org-clock-effort) |
| 427 | (org-clock-update-mode-line)))) | 428 | (org-clock-update-mode-line) |
| 429 | (message "Effort is now %s" org-clock-effort)))) | ||
| 428 | 430 | ||
| 429 | (defvar org-clock-notification-was-shown nil | 431 | (defvar org-clock-notification-was-shown nil |
| 430 | "Shows if we have shown notification already.") | 432 | "Shows if we have shown notification already.") |
| @@ -438,12 +440,16 @@ Notification is shown only once." | |||
| 438 | (if (>= clocked-time effort-in-minutes) | 440 | (if (>= clocked-time effort-in-minutes) |
| 439 | (unless org-clock-notification-was-shown | 441 | (unless org-clock-notification-was-shown |
| 440 | (setq org-clock-notification-was-shown t) | 442 | (setq org-clock-notification-was-shown t) |
| 441 | (org-clock-play-sound) | 443 | (org-notify |
| 442 | (org-show-notification | ||
| 443 | (format "Task '%s' should be finished by now. (%s)" | 444 | (format "Task '%s' should be finished by now. (%s)" |
| 444 | org-clock-heading org-clock-effort))) | 445 | org-clock-heading org-clock-effort) t)) |
| 445 | (setq org-clock-notification-was-shown nil))))) | 446 | (setq org-clock-notification-was-shown nil))))) |
| 446 | 447 | ||
| 448 | (defun org-notify (notification &optional play-sound) | ||
| 449 | "Send a NOTIFICATION and maybe PLAY-SOUND." | ||
| 450 | (org-show-notification notification) | ||
| 451 | (if play-sound (org-clock-play-sound))) | ||
| 452 | |||
| 447 | (defun org-show-notification (notification) | 453 | (defun org-show-notification (notification) |
| 448 | "Show notification. | 454 | "Show notification. |
| 449 | Use `org-show-notification-handler' if defined, | 455 | Use `org-show-notification-handler' if defined, |
| @@ -592,6 +598,9 @@ the clocking selection, associated with the letter `d'." | |||
| 592 | (setq ts (org-insert-time-stamp org-clock-start-time | 598 | (setq ts (org-insert-time-stamp org-clock-start-time |
| 593 | 'with-hm 'inactive)))) | 599 | 'with-hm 'inactive)))) |
| 594 | (move-marker org-clock-marker (point) (buffer-base-buffer)) | 600 | (move-marker org-clock-marker (point) (buffer-base-buffer)) |
| 601 | (move-marker org-clock-hd-marker | ||
| 602 | (save-excursion (org-back-to-heading t) (point)) | ||
| 603 | (buffer-base-buffer)) | ||
| 595 | (or global-mode-string (setq global-mode-string '(""))) | 604 | (or global-mode-string (setq global-mode-string '(""))) |
| 596 | (or (memq 'org-mode-line-string global-mode-string) | 605 | (or (memq 'org-mode-line-string global-mode-string) |
| 597 | (setq global-mode-string | 606 | (setq global-mode-string |
| @@ -751,8 +760,8 @@ If there is no running clock, throw an error, unless FAIL-QUIETLY is set." | |||
| 751 | (delete-region (point) (point-at-eol)) | 760 | (delete-region (point) (point-at-eol)) |
| 752 | (insert "--") | 761 | (insert "--") |
| 753 | (setq te (org-insert-time-stamp (current-time) 'with-hm 'inactive)) | 762 | (setq te (org-insert-time-stamp (current-time) 'with-hm 'inactive)) |
| 754 | (setq s (- (time-to-seconds (apply 'encode-time (org-parse-time-string te))) | 763 | (setq s (- (org-float-time (apply 'encode-time (org-parse-time-string te))) |
| 755 | (time-to-seconds (apply 'encode-time (org-parse-time-string ts)))) | 764 | (org-float-time (apply 'encode-time (org-parse-time-string ts)))) |
| 756 | h (floor (/ s 3600)) | 765 | h (floor (/ s 3600)) |
| 757 | s (- s (* 3600 h)) | 766 | s (- s (* 3600 h)) |
| 758 | m (floor (/ s 60)) | 767 | m (floor (/ s 60)) |
| @@ -765,6 +774,7 @@ If there is no running clock, throw an error, unless FAIL-QUIETLY is set." | |||
| 765 | (and (looking-at "\n") (> (point-max) (1+ (point))) | 774 | (and (looking-at "\n") (> (point-max) (1+ (point))) |
| 766 | (delete-char 1))) | 775 | (delete-char 1))) |
| 767 | (move-marker org-clock-marker nil) | 776 | (move-marker org-clock-marker nil) |
| 777 | (move-marker org-clock-hd-marker nil) | ||
| 768 | (when org-log-note-clock-out | 778 | (when org-log-note-clock-out |
| 769 | (org-add-log-setup 'clock-out nil nil nil nil | 779 | (org-add-log-setup 'clock-out nil nil nil nil |
| 770 | (concat "# Task: " (org-get-heading t) "\n\n"))) | 780 | (concat "# Task: " (org-get-heading t) "\n\n"))) |
| @@ -802,6 +812,8 @@ If there is no running clock, throw an error, unless FAIL-QUIETLY is set." | |||
| 802 | (set-buffer (marker-buffer org-clock-marker)) | 812 | (set-buffer (marker-buffer org-clock-marker)) |
| 803 | (goto-char org-clock-marker) | 813 | (goto-char org-clock-marker) |
| 804 | (delete-region (1- (point-at-bol)) (point-at-eol))) | 814 | (delete-region (1- (point-at-bol)) (point-at-eol))) |
| 815 | (move-marker 'org-clock-marker nil) | ||
| 816 | (move-marker 'org-clock-hd-marker nil) | ||
| 805 | (setq global-mode-string | 817 | (setq global-mode-string |
| 806 | (delq 'org-mode-line-string global-mode-string)) | 818 | (delq 'org-mode-line-string global-mode-string)) |
| 807 | (force-mode-line-update) | 819 | (force-mode-line-update) |
| @@ -856,8 +868,8 @@ TSTART and TEND can mark a time range to be considered." | |||
| 856 | time) | 868 | time) |
| 857 | (if (stringp tstart) (setq tstart (org-time-string-to-seconds tstart))) | 869 | (if (stringp tstart) (setq tstart (org-time-string-to-seconds tstart))) |
| 858 | (if (stringp tend) (setq tend (org-time-string-to-seconds tend))) | 870 | (if (stringp tend) (setq tend (org-time-string-to-seconds tend))) |
| 859 | (if (consp tstart) (setq tstart (time-to-seconds tstart))) | 871 | (if (consp tstart) (setq tstart (org-float-time tstart))) |
| 860 | (if (consp tend) (setq tend (time-to-seconds tend))) | 872 | (if (consp tend) (setq tend (org-float-time tend))) |
| 861 | (remove-text-properties (point-min) (point-max) '(:org-clock-minutes t)) | 873 | (remove-text-properties (point-min) (point-max) '(:org-clock-minutes t)) |
| 862 | (save-excursion | 874 | (save-excursion |
| 863 | (goto-char (point-max)) | 875 | (goto-char (point-max)) |
| @@ -867,9 +879,9 @@ TSTART and TEND can mark a time range to be considered." | |||
| 867 | ;; Two time stamps | 879 | ;; Two time stamps |
| 868 | (setq ts (match-string 2) | 880 | (setq ts (match-string 2) |
| 869 | te (match-string 3) | 881 | te (match-string 3) |
| 870 | ts (time-to-seconds | 882 | ts (org-float-time |
| 871 | (apply 'encode-time (org-parse-time-string ts))) | 883 | (apply 'encode-time (org-parse-time-string ts))) |
| 872 | te (time-to-seconds | 884 | te (org-float-time |
| 873 | (apply 'encode-time (org-parse-time-string te))) | 885 | (apply 'encode-time (org-parse-time-string te))) |
| 874 | ts (if tstart (max ts tstart) ts) | 886 | ts (if tstart (max ts tstart) ts) |
| 875 | te (if tend (min te tend) te) | 887 | te (if tend (min te tend) te) |
| @@ -1210,9 +1222,9 @@ the currently selected interval size." | |||
| 1210 | (when (and te (listp te)) | 1222 | (when (and te (listp te)) |
| 1211 | (setq te (format "%4d-%02d-%02d" (nth 2 te) (car te) (nth 1 te)))) | 1223 | (setq te (format "%4d-%02d-%02d" (nth 2 te) (car te) (nth 1 te)))) |
| 1212 | ;; Now the times are strings we can parse. | 1224 | ;; Now the times are strings we can parse. |
| 1213 | (if ts (setq ts (time-to-seconds | 1225 | (if ts (setq ts (org-float-time |
| 1214 | (apply 'encode-time (org-parse-time-string ts))))) | 1226 | (apply 'encode-time (org-parse-time-string ts))))) |
| 1215 | (if te (setq te (time-to-seconds | 1227 | (if te (setq te (org-float-time |
| 1216 | (apply 'encode-time (org-parse-time-string te))))) | 1228 | (apply 'encode-time (org-parse-time-string te))))) |
| 1217 | (move-marker ins (point)) | 1229 | (move-marker ins (point)) |
| 1218 | (setq ipos (point)) | 1230 | (setq ipos (point)) |
| @@ -1390,9 +1402,9 @@ the currently selected interval size." | |||
| 1390 | (when block | 1402 | (when block |
| 1391 | (setq cc (org-clock-special-range block nil t) | 1403 | (setq cc (org-clock-special-range block nil t) |
| 1392 | ts (car cc) te (nth 1 cc) range-text (nth 2 cc))) | 1404 | ts (car cc) te (nth 1 cc) range-text (nth 2 cc))) |
| 1393 | (if ts (setq ts (time-to-seconds | 1405 | (if ts (setq ts (org-float-time |
| 1394 | (apply 'encode-time (org-parse-time-string ts))))) | 1406 | (apply 'encode-time (org-parse-time-string ts))))) |
| 1395 | (if te (setq te (time-to-seconds | 1407 | (if te (setq te (org-float-time |
| 1396 | (apply 'encode-time (org-parse-time-string te))))) | 1408 | (apply 'encode-time (org-parse-time-string te))))) |
| 1397 | (setq p1 (plist-put p1 :header "")) | 1409 | (setq p1 (plist-put p1 :header "")) |
| 1398 | (setq p1 (plist-put p1 :step nil)) | 1410 | (setq p1 (plist-put p1 :step nil)) |
diff --git a/lisp/org/org-colview.el b/lisp/org/org-colview.el index c89de339fab..73e6bed121a 100644 --- a/lisp/org/org-colview.el +++ b/lisp/org/org-colview.el | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | ;; Author: Carsten Dominik <carsten at orgmode dot org> | 6 | ;; Author: Carsten Dominik <carsten at orgmode dot org> |
| 7 | ;; Keywords: outlines, hypermedia, calendar, wp | 7 | ;; Keywords: outlines, hypermedia, calendar, wp |
| 8 | ;; Homepage: http://orgmode.org | 8 | ;; Homepage: http://orgmode.org |
| 9 | ;; Version: 6.29c | 9 | ;; Version: 6.30c |
| 10 | ;; | 10 | ;; |
| 11 | ;; This file is part of GNU Emacs. | 11 | ;; This file is part of GNU Emacs. |
| 12 | ;; | 12 | ;; |
| @@ -446,7 +446,7 @@ Where possible, use the standard interface for changing this line." | |||
| 446 | (t | 446 | (t |
| 447 | (setq allowed (org-property-get-allowed-values pom key 'table)) | 447 | (setq allowed (org-property-get-allowed-values pom key 'table)) |
| 448 | (if allowed | 448 | (if allowed |
| 449 | (setq nval (org-ido-completing-read "Value: " allowed nil t)) | 449 | (setq nval (org-icompleting-read "Value: " allowed nil t)) |
| 450 | (setq nval (read-string "Edit: " value))) | 450 | (setq nval (read-string "Edit: " value))) |
| 451 | (setq nval (org-trim nval)) | 451 | (setq nval (org-trim nval)) |
| 452 | (when (not (equal nval value)) | 452 | (when (not (equal nval value)) |
| @@ -694,7 +694,7 @@ around it." | |||
| 694 | truncate-lines)) | 694 | truncate-lines)) |
| 695 | (setq truncate-lines t) | 695 | (setq truncate-lines t) |
| 696 | (mapc (lambda (x) | 696 | (mapc (lambda (x) |
| 697 | (goto-line (car x)) | 697 | (org-goto-line (car x)) |
| 698 | (org-columns-display-here (cdr x))) | 698 | (org-columns-display-here (cdr x))) |
| 699 | cache))))) | 699 | cache))))) |
| 700 | 700 | ||
| @@ -721,7 +721,7 @@ interactive function org-columns-new.") | |||
| 721 | (interactive) | 721 | (interactive) |
| 722 | (let ((editp (and prop (assoc prop org-columns-current-fmt-compiled))) | 722 | (let ((editp (and prop (assoc prop org-columns-current-fmt-compiled))) |
| 723 | cell) | 723 | cell) |
| 724 | (setq prop (org-ido-completing-read | 724 | (setq prop (org-icompleting-read |
| 725 | "Property: " (mapcar 'list (org-buffer-property-keys t nil t)) | 725 | "Property: " (mapcar 'list (org-buffer-property-keys t nil t)) |
| 726 | nil nil prop)) | 726 | nil nil prop)) |
| 727 | (setq title (read-string (concat "Column title [" prop "]: ") (or title prop))) | 727 | (setq title (read-string (concat "Column title [" prop "]: ") (or title prop))) |
| @@ -729,7 +729,7 @@ interactive function org-columns-new.") | |||
| 729 | (if (string-match "\\S-" width) | 729 | (if (string-match "\\S-" width) |
| 730 | (setq width (string-to-number width)) | 730 | (setq width (string-to-number width)) |
| 731 | (setq width nil)) | 731 | (setq width nil)) |
| 732 | (setq fmt (org-ido-completing-read | 732 | (setq fmt (org-icompleting-read |
| 733 | "Summary [none]: " | 733 | "Summary [none]: " |
| 734 | (mapcar (lambda (x) (list (symbol-name (cadr x)))) | 734 | (mapcar (lambda (x) (list (symbol-name (cadr x)))) |
| 735 | org-columns-compile-map) | 735 | org-columns-compile-map) |
| @@ -959,7 +959,7 @@ Don't set this, this is meant for dynamic scoping.") | |||
| 959 | (call-interactively 'org-columns) | 959 | (call-interactively 'org-columns) |
| 960 | (org-agenda-redo) | 960 | (org-agenda-redo) |
| 961 | (call-interactively 'org-agenda-columns))) | 961 | (call-interactively 'org-agenda-columns))) |
| 962 | (goto-line line) | 962 | (org-goto-line line) |
| 963 | (move-to-column col)) | 963 | (move-to-column col)) |
| 964 | (message "Recomputing columns...done")) | 964 | (message "Recomputing columns...done")) |
| 965 | 965 | ||
| @@ -1228,7 +1228,7 @@ and tailing newline characters." | |||
| 1228 | "Create a dynamic block capturing a column view table." | 1228 | "Create a dynamic block capturing a column view table." |
| 1229 | (interactive) | 1229 | (interactive) |
| 1230 | (let ((defaults '(:name "columnview" :hlines 1)) | 1230 | (let ((defaults '(:name "columnview" :hlines 1)) |
| 1231 | (id (org-ido-completing-read | 1231 | (id (org-icompleting-read |
| 1232 | "Capture columns (local, global, entry with :ID: property) [local]: " | 1232 | "Capture columns (local, global, entry with :ID: property) [local]: " |
| 1233 | (append '(("global") ("local")) | 1233 | (append '(("global") ("local")) |
| 1234 | (mapcar 'list (org-property-values "ID")))))) | 1234 | (mapcar 'list (org-property-values "ID")))))) |
| @@ -1303,7 +1303,7 @@ and tailing newline characters." | |||
| 1303 | (org-bound-and-true-p flyspell-mode)) | 1303 | (org-bound-and-true-p flyspell-mode)) |
| 1304 | (flyspell-mode 0)) | 1304 | (flyspell-mode 0)) |
| 1305 | (mapc (lambda (x) | 1305 | (mapc (lambda (x) |
| 1306 | (goto-line (car x)) | 1306 | (org-goto-line (car x)) |
| 1307 | (org-columns-display-here (cdr x))) | 1307 | (org-columns-display-here (cdr x))) |
| 1308 | cache) | 1308 | cache) |
| 1309 | (when org-agenda-columns-show-summaries | 1309 | (when org-agenda-columns-show-summaries |
diff --git a/lisp/org/org-compat.el b/lisp/org/org-compat.el index c52c5af9b6e..2f4112ce354 100644 --- a/lisp/org/org-compat.el +++ b/lisp/org/org-compat.el | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | ;; Author: Carsten Dominik <carsten at orgmode dot org> | 6 | ;; Author: Carsten Dominik <carsten at orgmode dot org> |
| 7 | ;; Keywords: outlines, hypermedia, calendar, wp | 7 | ;; Keywords: outlines, hypermedia, calendar, wp |
| 8 | ;; Homepage: http://orgmode.org | 8 | ;; Homepage: http://orgmode.org |
| 9 | ;; Version: 6.29c | 9 | ;; Version: 6.30c |
| 10 | ;; | 10 | ;; |
| 11 | ;; This file is part of GNU Emacs. | 11 | ;; This file is part of GNU Emacs. |
| 12 | ;; | 12 | ;; |
| @@ -36,7 +36,8 @@ | |||
| 36 | 36 | ||
| 37 | (require 'org-macs) | 37 | (require 'org-macs) |
| 38 | 38 | ||
| 39 | (declare-function find-library-name "find-func" (library)) | 39 | (declare-function find-library-name "find-func" (library)) |
| 40 | (declare-function w32-focus-frame "w32-win" (frame)) | ||
| 40 | 41 | ||
| 41 | (defconst org-xemacs-p (featurep 'xemacs)) ; not used by org.el itself | 42 | (defconst org-xemacs-p (featurep 'xemacs)) ; not used by org.el itself |
| 42 | (defconst org-format-transports-properties-p | 43 | (defconst org-format-transports-properties-p |
| @@ -332,6 +333,35 @@ that can be added." | |||
| 332 | string) | 333 | string) |
| 333 | (apply 'kill-new string args)) | 334 | (apply 'kill-new string args)) |
| 334 | 335 | ||
| 336 | (defun org-select-frame-set-input-focus (frame) | ||
| 337 | "Select FRAME, raise it, and set input focus, if possible." | ||
| 338 | (cond ((featurep 'xemacs) | ||
| 339 | (if (fboundp 'select-frame-set-input-focus) | ||
| 340 | (select-frame-set-input-focus frame) | ||
| 341 | (raise-frame frame) | ||
| 342 | (select-frame frame) | ||
| 343 | (focus-frame frame))) | ||
| 344 | ;; `select-frame-set-input-focus' defined in Emacs 21 will not | ||
| 345 | ;; set the input focus. | ||
| 346 | ((>= emacs-major-version 22) | ||
| 347 | (select-frame-set-input-focus frame)) | ||
| 348 | (t | ||
| 349 | (raise-frame frame) | ||
| 350 | (select-frame frame) | ||
| 351 | (cond ((memq window-system '(x ns mac)) | ||
| 352 | (x-focus-frame frame)) | ||
| 353 | ((eq window-system 'w32) | ||
| 354 | (w32-focus-frame frame))) | ||
| 355 | (when focus-follows-mouse | ||
| 356 | (set-mouse-position frame (1- (frame-width frame)) 0))))) | ||
| 357 | |||
| 358 | (defun org-float-time (&optional time) | ||
| 359 | "Convert time value TIME to a floating point number. | ||
| 360 | TIME defaults to the current time." | ||
| 361 | (if (featurep 'xemacs) | ||
| 362 | (time-to-seconds (or time (current-time))) | ||
| 363 | (float-time time))) | ||
| 364 | |||
| 335 | (provide 'org-compat) | 365 | (provide 'org-compat) |
| 336 | 366 | ||
| 337 | ;; arch-tag: a0a0579f-e68c-4bdf-9e55-93768b846bbe | 367 | ;; arch-tag: a0a0579f-e68c-4bdf-9e55-93768b846bbe |
diff --git a/lisp/org/org-docbook.el b/lisp/org/org-docbook.el index 38af0803434..172319e5b06 100644 --- a/lisp/org/org-docbook.el +++ b/lisp/org/org-docbook.el | |||
| @@ -4,12 +4,11 @@ | |||
| 4 | ;; | 4 | ;; |
| 5 | ;; Emacs Lisp Archive Entry | 5 | ;; Emacs Lisp Archive Entry |
| 6 | ;; Filename: org-docbook.el | 6 | ;; Filename: org-docbook.el |
| 7 | ;; Version: 6.29c | 7 | ;; Version: 6.30c |
| 8 | ;; Author: Baoqiu Cui <cbaoqiu AT yahoo DOT com> | 8 | ;; Author: Baoqiu Cui <cbaoqiu AT yahoo DOT com> |
| 9 | ;; Maintainer: Baoqiu Cui <cbaoqiu AT yahoo DOT com> | 9 | ;; Maintainer: Baoqiu Cui <cbaoqiu AT yahoo DOT com> |
| 10 | ;; Keywords: org, wp, docbook | 10 | ;; Keywords: org, wp, docbook |
| 11 | ;; Description: Converts an org-mode buffer into DocBook | 11 | ;; Description: Converts an org-mode buffer into DocBook |
| 12 | ;; $Id: org-docbook.el,v 1.3 2009/08/08 12:18:56 cdominik Exp $ | ||
| 13 | ;; URL: | 12 | ;; URL: |
| 14 | 13 | ||
| 15 | ;; This file is part of GNU Emacs. | 14 | ;; This file is part of GNU Emacs. |
| @@ -1402,5 +1401,4 @@ that need to be preserved in later phase of DocBook exporting." | |||
| 1402 | 1401 | ||
| 1403 | (provide 'org-docbook) | 1402 | (provide 'org-docbook) |
| 1404 | 1403 | ||
| 1405 | ;; arch-tag: a24a127c-d365-4c2a-9e9b-f7dcb0ebfdc3 | ||
| 1406 | ;;; org-docbook.el ends here | 1404 | ;;; org-docbook.el ends here |
diff --git a/lisp/org/org-exp-blocks.el b/lisp/org/org-exp-blocks.el index e8cf4392de4..8df0ac1476f 100644 --- a/lisp/org/org-exp-blocks.el +++ b/lisp/org/org-exp-blocks.el | |||
| @@ -203,9 +203,8 @@ specified in BLOCKS which default to the value of | |||
| 203 | "" | 203 | "" |
| 204 | (apply func (save-match-data (org-remove-indentation (match-string 4))) | 204 | (apply func (save-match-data (org-remove-indentation (match-string 4))) |
| 205 | (split-string (match-string 3) " ")))) t t) | 205 | (split-string (match-string 3) " ")))) t t) |
| 206 | ;; indent the replaced match | 206 | ;; indent block |
| 207 | (indent-region (match-beginning 0) (match-end 0) indentation) | 207 | (indent-code-rigidly (match-beginning 0) (match-end 0) indentation))) |
| 208 | )) | ||
| 209 | (setf start (save-match-data (match-end 0)))) | 208 | (setf start (save-match-data (match-end 0)))) |
| 210 | (mapcar (lambda (type) | 209 | (mapcar (lambda (type) |
| 211 | (interblock start (point-max) type)) | 210 | (interblock start (point-max) type)) |
| @@ -370,7 +369,7 @@ with their values as determined by R." | |||
| 370 | 369 | ||
| 371 | (defun org-export-interblocks-format-R (start end) | 370 | (defun org-export-interblocks-format-R (start end) |
| 372 | "This is run over parts of the org-file which are between R | 371 | "This is run over parts of the org-file which are between R |
| 373 | blocks. It's main use is to expand the \R{stuff} chunks for | 372 | blocks. Its main use is to expand the \R{stuff} chunks for |
| 374 | export." | 373 | export." |
| 375 | (save-excursion | 374 | (save-excursion |
| 376 | (goto-char start) | 375 | (goto-char start) |
| @@ -437,5 +436,4 @@ export." | |||
| 437 | 436 | ||
| 438 | (provide 'org-exp-blocks) | 437 | (provide 'org-exp-blocks) |
| 439 | 438 | ||
| 440 | ;; arch-tag: 1c365fe9-8808-4f72-bb15-0b00f36d8024 | ||
| 441 | ;;; org-exp-blocks.el ends here | 439 | ;;; org-exp-blocks.el ends here |
diff --git a/lisp/org/org-exp.el b/lisp/org/org-exp.el index 53264d30d47..3e12e6af10e 100644 --- a/lisp/org/org-exp.el +++ b/lisp/org/org-exp.el | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | ;; Author: Carsten Dominik <carsten at orgmode dot org> | 6 | ;; Author: Carsten Dominik <carsten at orgmode dot org> |
| 7 | ;; Keywords: outlines, hypermedia, calendar, wp | 7 | ;; Keywords: outlines, hypermedia, calendar, wp |
| 8 | ;; Homepage: http://orgmode.org | 8 | ;; Homepage: http://orgmode.org |
| 9 | ;; Version: 6.29c | 9 | ;; Version: 6.30c |
| 10 | ;; | 10 | ;; |
| 11 | ;; This file is part of GNU Emacs. | 11 | ;; This file is part of GNU Emacs. |
| 12 | ;; | 12 | ;; |
| @@ -29,7 +29,7 @@ | |||
| 29 | (require 'org) | 29 | (require 'org) |
| 30 | (require 'org-agenda) | 30 | (require 'org-agenda) |
| 31 | (require 'org-exp-blocks) | 31 | (require 'org-exp-blocks) |
| 32 | (eval-and-compile | 32 | (eval-when-compile |
| 33 | (require 'cl)) | 33 | (require 'cl)) |
| 34 | 34 | ||
| 35 | (declare-function org-export-latex-preprocess "org-latex" (parameters)) | 35 | (declare-function org-export-latex-preprocess "org-latex" (parameters)) |
| @@ -574,6 +574,7 @@ much faster." | |||
| 574 | (:priority "pri" org-export-with-priority) | 574 | (:priority "pri" org-export-with-priority) |
| 575 | (:TeX-macros "TeX" org-export-with-TeX-macros) | 575 | (:TeX-macros "TeX" org-export-with-TeX-macros) |
| 576 | (:LaTeX-fragments "LaTeX" org-export-with-LaTeX-fragments) | 576 | (:LaTeX-fragments "LaTeX" org-export-with-LaTeX-fragments) |
| 577 | (:latex-listings nil org-export-latex-listings) | ||
| 577 | (:skip-before-1st-heading "skip" org-export-skip-text-before-1st-heading) | 578 | (:skip-before-1st-heading "skip" org-export-skip-text-before-1st-heading) |
| 578 | (:fixed-width ":" org-export-with-fixed-width) | 579 | (:fixed-width ":" org-export-with-fixed-width) |
| 579 | (:timestamps "<" org-export-with-timestamps) | 580 | (:timestamps "<" org-export-with-timestamps) |
| @@ -741,9 +742,14 @@ modified) list.") | |||
| 741 | (setq p (plist-put | 742 | (setq p (plist-put |
| 742 | p (intern | 743 | p (intern |
| 743 | (concat ":macro-" (downcase (match-string 1 val)))) | 744 | (concat ":macro-" (downcase (match-string 1 val)))) |
| 744 | (match-string 2 val))))) | 745 | (org-export-interpolate-newlines (match-string 2 val)))))) |
| 745 | p)))) | 746 | p)))) |
| 746 | 747 | ||
| 748 | (defun org-export-interpolate-newlines (s) | ||
| 749 | (while (string-match "\\\\n" s) | ||
| 750 | (setq s (replace-match "\n" t t s))) | ||
| 751 | s) | ||
| 752 | |||
| 747 | (defvar org-export-allow-BIND-local nil) | 753 | (defvar org-export-allow-BIND-local nil) |
| 748 | (defun org-export-confirm-letbind () | 754 | (defun org-export-confirm-letbind () |
| 749 | "Can we use #+BIND values during export? | 755 | "Can we use #+BIND values during export? |
| @@ -1695,7 +1701,7 @@ from the buffer." | |||
| 1695 | (ascii "ASCII" "BEGIN_ASCII" "END_ASCII") | 1701 | (ascii "ASCII" "BEGIN_ASCII" "END_ASCII") |
| 1696 | (latex "LaTeX" "BEGIN_LaTeX" "END_LaTeX"))) | 1702 | (latex "LaTeX" "BEGIN_LaTeX" "END_LaTeX"))) |
| 1697 | (case-fold-search t) | 1703 | (case-fold-search t) |
| 1698 | fmt) | 1704 | fmt beg beg-content end end-content) |
| 1699 | 1705 | ||
| 1700 | (while formatters | 1706 | (while formatters |
| 1701 | (setq fmt (pop formatters)) | 1707 | (setq fmt (pop formatters)) |
| @@ -1709,16 +1715,17 @@ from the buffer." | |||
| 1709 | (point-at-bol) (min (1+ (point-at-eol)) (point-max)) | 1715 | (point-at-bol) (min (1+ (point-at-eol)) (point-max)) |
| 1710 | '(org-protected t)))) | 1716 | '(org-protected t)))) |
| 1711 | (goto-char (point-min)) | 1717 | (goto-char (point-min)) |
| 1712 | (while (re-search-forward | 1718 | (while (re-search-forward (concat "^[ \t]*#\\+" (caddr fmt) "\\>.*\n?") |
| 1713 | (concat "^[ \t]*#\\+" (caddr fmt) | 1719 | nil t) |
| 1714 | "\\>.*\\(\\(\n.*\\)*?\n\\)[ \t]*#\\+" (cadddr fmt) | 1720 | (setq beg (match-beginning 0) beg-content (match-end 0)) |
| 1715 | "\\>.*\n?") nil t) | 1721 | (when (re-search-forward (concat "^[ \t]*#\\+" (cadddr fmt) "\\>.*\n?") |
| 1716 | (if (eq (car fmt) backend) | 1722 | nil t) |
| 1717 | ;; yes, keep this | 1723 | (setq end (match-end 0) end-content (match-beginning 0)) |
| 1718 | (add-text-properties (match-beginning 1) (1+ (match-end 1)) | 1724 | (if (eq (car fmt) backend) |
| 1719 | '(org-protected t)) | 1725 | ;; yes, keep this |
| 1720 | ;; No, this is for a different backend, kill it | 1726 | (add-text-properties beg-content end-content '(org-protected t)) |
| 1721 | (delete-region (match-beginning 0) (match-end 0))))))) | 1727 | ;; No, this is for a different backend, kill it |
| 1728 | (delete-region beg end))))))) | ||
| 1722 | 1729 | ||
| 1723 | (defun org-export-mark-blockquote-verse-center () | 1730 | (defun org-export-mark-blockquote-verse-center () |
| 1724 | "Mark block quote and verse environments with special cookies. | 1731 | "Mark block quote and verse environments with special cookies. |
| @@ -1834,12 +1841,18 @@ When it is nil, all comments will be removed." | |||
| 1834 | (while (re-search-forward "^[ \t]*|" nil t) | 1841 | (while (re-search-forward "^[ \t]*|" nil t) |
| 1835 | (beginning-of-line 1) | 1842 | (beginning-of-line 1) |
| 1836 | (if (or (looking-at "[ \t]*| *[!_^] *|") | 1843 | (if (or (looking-at "[ \t]*| *[!_^] *|") |
| 1837 | (and (looking-at ".*?| *<[0-9]+> *|") | 1844 | (and (looking-at "[ \t]*|\\( *\\(<[0-9]+>\\|<[rl]>\\|<[rl][0-9]+>\\)? *|\\)+[ \t]*$") |
| 1838 | (not (looking-at ".*?| *[^ <|]")))) | 1845 | (not (looking-at ".*?| *[^ <|\n]")))) |
| 1839 | (delete-region (max (point-min) (1- (point-at-bol))) | 1846 | (delete-region (max (point-min) (1- (point-at-bol))) |
| 1840 | (point-at-eol)) | 1847 | (point-at-eol)) |
| 1841 | (end-of-line 1)))) | 1848 | (end-of-line 1)))) |
| 1842 | 1849 | ||
| 1850 | (defun org-export-protect-sub-super (s) | ||
| 1851 | (save-match-data | ||
| 1852 | (while (string-match "\\([^\\\\]\\)\\([_^]\\)" s) | ||
| 1853 | (setq s (replace-match "\\1\\\\\\2" nil nil s))) | ||
| 1854 | s)) | ||
| 1855 | |||
| 1843 | (defun org-export-normalize-links () | 1856 | (defun org-export-normalize-links () |
| 1844 | "Convert all links to bracket links, and expand link abbreviations." | 1857 | "Convert all links to bracket links, and expand link abbreviations." |
| 1845 | (let ((re-plain-link (concat "\\([^[<]\\)" org-plain-link-re)) | 1858 | (let ((re-plain-link (concat "\\([^[<]\\)" org-plain-link-re)) |
| @@ -1849,8 +1862,11 @@ When it is nil, all comments will be removed." | |||
| 1849 | (while (re-search-forward re-plain-link nil t) | 1862 | (while (re-search-forward re-plain-link nil t) |
| 1850 | (goto-char (1- (match-end 0))) | 1863 | (goto-char (1- (match-end 0))) |
| 1851 | (org-if-unprotected-at (1+ (match-beginning 0)) | 1864 | (org-if-unprotected-at (1+ (match-beginning 0)) |
| 1852 | (let* ((s (concat (match-string 1) "[[" (match-string 2) | 1865 | (let* ((s (concat (match-string 1) |
| 1853 | ":" (match-string 3) "]]"))) | 1866 | "[[" (match-string 2) ":" (match-string 3) |
| 1867 | "][" (match-string 2) ":" (org-export-protect-sub-super | ||
| 1868 | (match-string 3)) | ||
| 1869 | "]]"))) | ||
| 1854 | ;; added 'org-link face to links | 1870 | ;; added 'org-link face to links |
| 1855 | (put-text-property 0 (length s) 'face 'org-link s) | 1871 | (put-text-property 0 (length s) 'face 'org-link s) |
| 1856 | (replace-match s t t)))) | 1872 | (replace-match s t t)))) |
| @@ -1858,8 +1874,11 @@ When it is nil, all comments will be removed." | |||
| 1858 | (while (re-search-forward re-angle-link nil t) | 1874 | (while (re-search-forward re-angle-link nil t) |
| 1859 | (goto-char (1- (match-end 0))) | 1875 | (goto-char (1- (match-end 0))) |
| 1860 | (org-if-unprotected | 1876 | (org-if-unprotected |
| 1861 | (let* ((s (concat (match-string 1) "[[" (match-string 2) | 1877 | (let* ((s (concat (match-string 1) |
| 1862 | ":" (match-string 3) "]]"))) | 1878 | "[[" (match-string 2) ":" (match-string 3) |
| 1879 | "][" (match-string 2) ":" (org-export-protect-sub-super | ||
| 1880 | (match-string 3)) | ||
| 1881 | "]]"))) | ||
| 1863 | (put-text-property 0 (length s) 'face 'org-link s) | 1882 | (put-text-property 0 (length s) 'face 'org-link s) |
| 1864 | (replace-match s t t)))) | 1883 | (replace-match s t t)))) |
| 1865 | (goto-char (point-min)) | 1884 | (goto-char (point-min)) |
| @@ -2056,7 +2075,7 @@ TYPE must be a string, any of: | |||
| 2056 | (goto-char (point-min)) | 2075 | (goto-char (point-min)) |
| 2057 | (let (sy val key args args2 s n) | 2076 | (let (sy val key args args2 s n) |
| 2058 | (while (re-search-forward | 2077 | (while (re-search-forward |
| 2059 | "{{{\\([a-zA-Z][-a-zA-Z0-9_]*\\)\\((\\(.*?\\))\\)?}}}" | 2078 | "{{{\\([a-zA-Z][-a-zA-Z0-9_]*\\)\\(([ \t\n]*\\([^\000]*?\\))\\)?}}}" |
| 2060 | nil t) | 2079 | nil t) |
| 2061 | (setq key (downcase (match-string 1)) | 2080 | (setq key (downcase (match-string 1)) |
| 2062 | args (match-string 3)) | 2081 | args (match-string 3)) |
| @@ -2066,7 +2085,8 @@ TYPE must be a string, any of: | |||
| 2066 | (intern (concat ":" key))))) | 2085 | (intern (concat ":" key))))) |
| 2067 | (save-match-data | 2086 | (save-match-data |
| 2068 | (when args | 2087 | (when args |
| 2069 | (setq args (org-split-string args ",[ \t]*") args2 nil) | 2088 | (setq args (org-split-string args ",[ \t\n]*") args2 nil) |
| 2089 | (setq args (mapcar 'org-trim args)) | ||
| 2070 | (while args | 2090 | (while args |
| 2071 | (while (string-match "\\\\\\'" (car args)) | 2091 | (while (string-match "\\\\\\'" (car args)) |
| 2072 | ;; repair bad splits | 2092 | ;; repair bad splits |
| @@ -2111,7 +2131,8 @@ TYPE must be a string, any of: | |||
| 2111 | markup (org-symname-or-string (pop params)) | 2131 | markup (org-symname-or-string (pop params)) |
| 2112 | lang (and (member markup '("src" "SRC")) | 2132 | lang (and (member markup '("src" "SRC")) |
| 2113 | (org-symname-or-string (pop params))) | 2133 | (org-symname-or-string (pop params))) |
| 2114 | switches (mapconcat '(lambda (x) (format "%s" x)) params " ")) | 2134 | switches (mapconcat '(lambda (x) (format "%s" x)) params " ") |
| 2135 | start nil end nil) | ||
| 2115 | (delete-region (match-beginning 0) (match-end 0)) | 2136 | (delete-region (match-beginning 0) (match-end 0)) |
| 2116 | (if (or (not file) | 2137 | (if (or (not file) |
| 2117 | (not (file-exists-p file)) | 2138 | (not (file-exists-p file)) |
| @@ -2126,7 +2147,8 @@ TYPE must be a string, any of: | |||
| 2126 | (setq start (format "#+begin_%s %s\n" markup switches) | 2147 | (setq start (format "#+begin_%s %s\n" markup switches) |
| 2127 | end (format "#+end_%s" markup)))) | 2148 | end (format "#+end_%s" markup)))) |
| 2128 | (insert (or start "")) | 2149 | (insert (or start "")) |
| 2129 | (insert (org-get-file-contents (expand-file-name file) prefix prefix1 markup)) | 2150 | (insert (org-get-file-contents (expand-file-name file) |
| 2151 | prefix prefix1 markup)) | ||
| 2130 | (or (bolp) (newline)) | 2152 | (or (bolp) (newline)) |
| 2131 | (insert (or end "")))))) | 2153 | (insert (or end "")))))) |
| 2132 | 2154 | ||
| @@ -2136,6 +2158,7 @@ If PREFIX is a string, prepend it to each line. If PREFIX1 | |||
| 2136 | is a string, prepend it to the first line instead of PREFIX. | 2158 | is a string, prepend it to the first line instead of PREFIX. |
| 2137 | If MARKUP, don't protect org-like lines, the exporter will | 2159 | If MARKUP, don't protect org-like lines, the exporter will |
| 2138 | take care of the block they are in." | 2160 | take care of the block they are in." |
| 2161 | (if (stringp markup) (setq markup (downcase markup))) | ||
| 2139 | (with-temp-buffer | 2162 | (with-temp-buffer |
| 2140 | (insert-file-contents file) | 2163 | (insert-file-contents file) |
| 2141 | (when (or prefix prefix1) | 2164 | (when (or prefix prefix1) |
| @@ -2145,9 +2168,9 @@ take care of the block they are in." | |||
| 2145 | (setq prefix1 nil) | 2168 | (setq prefix1 nil) |
| 2146 | (beginning-of-line 2))) | 2169 | (beginning-of-line 2))) |
| 2147 | (buffer-string) | 2170 | (buffer-string) |
| 2148 | (unless markup | 2171 | (when (member markup '("src" "example")) |
| 2149 | (goto-char (point-min)) | 2172 | (goto-char (point-min)) |
| 2150 | (while (re-search-forward "^\\(\\*\\|[ \t]*#\\)" nil t) | 2173 | (while (re-search-forward "^\\([*#]\\|[ \t]*#\\+\\)" nil t) |
| 2151 | (goto-char (match-beginning 0)) | 2174 | (goto-char (match-beginning 0)) |
| 2152 | (insert ",") | 2175 | (insert ",") |
| 2153 | (end-of-line 1))) | 2176 | (end-of-line 1))) |
| @@ -2203,6 +2226,8 @@ in the list) and remove property and value from the list in LISTVAR." | |||
| 2203 | (defvar htmlp) ;; dynamically scoped | 2226 | (defvar htmlp) ;; dynamically scoped |
| 2204 | (defvar latexp) ;; dynamically scoped | 2227 | (defvar latexp) ;; dynamically scoped |
| 2205 | (defvar org-export-latex-verbatim-wrap) ;; defined in org-latex.el | 2228 | (defvar org-export-latex-verbatim-wrap) ;; defined in org-latex.el |
| 2229 | (defvar org-export-latex-listings) ;; defined in org-latex.el | ||
| 2230 | (defvar org-export-latex-listings-langs) ;; defined in org-latex.el | ||
| 2206 | 2231 | ||
| 2207 | (defun org-export-format-source-code-or-example | 2232 | (defun org-export-format-source-code-or-example |
| 2208 | (backend lang code &optional opts indent) | 2233 | (backend lang code &optional opts indent) |
| @@ -2268,7 +2293,15 @@ INDENT was the original indentation of the block." | |||
| 2268 | "htmlize.el 1.34 or later is needed for source code formatting"))) | 2293 | "htmlize.el 1.34 or later is needed for source code formatting"))) |
| 2269 | 2294 | ||
| 2270 | (if lang | 2295 | (if lang |
| 2271 | (let* ((mode (and lang (intern (concat lang "-mode")))) | 2296 | (let* ((lang-m (when lang |
| 2297 | (or (cdr (assoc lang org-src-lang-modes)) | ||
| 2298 | lang))) | ||
| 2299 | (mode (and lang-m (intern | ||
| 2300 | (concat | ||
| 2301 | (if (symbolp lang-m) | ||
| 2302 | (symbol-name lang-m) | ||
| 2303 | lang-m) | ||
| 2304 | "-mode")))) | ||
| 2272 | (org-inhibit-startup t) | 2305 | (org-inhibit-startup t) |
| 2273 | (org-startup-folded nil)) | 2306 | (org-startup-folded nil)) |
| 2274 | (setq rtn | 2307 | (setq rtn |
| @@ -2309,8 +2342,24 @@ INDENT was the original indentation of the block." | |||
| 2309 | ((eq backend 'latex) | 2342 | ((eq backend 'latex) |
| 2310 | (setq rtn (org-export-number-lines rtn 'latex 0 0 num cont rpllbl fmt)) | 2343 | (setq rtn (org-export-number-lines rtn 'latex 0 0 num cont rpllbl fmt)) |
| 2311 | (concat "\n#+BEGIN_LaTeX\n" | 2344 | (concat "\n#+BEGIN_LaTeX\n" |
| 2312 | (org-add-props (concat (car org-export-latex-verbatim-wrap) | 2345 | (org-add-props |
| 2313 | rtn (cdr org-export-latex-verbatim-wrap)) | 2346 | (if org-export-latex-listings |
| 2347 | (concat | ||
| 2348 | (if lang | ||
| 2349 | (let* | ||
| 2350 | ((lang-sym (intern lang)) | ||
| 2351 | (lstlang | ||
| 2352 | (or (cadr | ||
| 2353 | (assq | ||
| 2354 | lang-sym | ||
| 2355 | org-export-latex-listings-langs)) | ||
| 2356 | lang))) | ||
| 2357 | (format "\\lstset{language=%s}\n" lstlang)) | ||
| 2358 | "") | ||
| 2359 | "\\begin{lstlisting}\n" | ||
| 2360 | rtn "\\end{lstlisting}\n") | ||
| 2361 | (concat (car org-export-latex-verbatim-wrap) | ||
| 2362 | rtn (cdr org-export-latex-verbatim-wrap))) | ||
| 2314 | '(org-protected t)) | 2363 | '(org-protected t)) |
| 2315 | "#+END_LaTeX\n\n")) | 2364 | "#+END_LaTeX\n\n")) |
| 2316 | ((eq backend 'ascii) | 2365 | ((eq backend 'ascii) |
| @@ -2367,7 +2416,7 @@ INDENT was the original indentation of the block." | |||
| 2367 | "\\)\\)")) | 2416 | "\\)\\)")) |
| 2368 | ref) | 2417 | ref) |
| 2369 | 2418 | ||
| 2370 | (goto-line (1+ skip1)) | 2419 | (org-goto-line (1+ skip1)) |
| 2371 | (while (and (re-search-forward "^" nil t) (not (eobp)) (< n nmax)) | 2420 | (while (and (re-search-forward "^" nil t) (not (eobp)) (< n nmax)) |
| 2372 | (if number | 2421 | (if number |
| 2373 | (insert (format fm (incf n))) | 2422 | (insert (format fm (incf n))) |
diff --git a/lisp/org/org-faces.el b/lisp/org/org-faces.el index 3674f0a4e74..d529348d4d4 100644 --- a/lisp/org/org-faces.el +++ b/lisp/org/org-faces.el | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | ;; Author: Carsten Dominik <carsten at orgmode dot org> | 6 | ;; Author: Carsten Dominik <carsten at orgmode dot org> |
| 7 | ;; Keywords: outlines, hypermedia, calendar, wp | 7 | ;; Keywords: outlines, hypermedia, calendar, wp |
| 8 | ;; Homepage: http://orgmode.org | 8 | ;; Homepage: http://orgmode.org |
| 9 | ;; Version: 6.29c | 9 | ;; Version: 6.30c |
| 10 | ;; | 10 | ;; |
| 11 | ;; This file is part of GNU Emacs. | 11 | ;; This file is part of GNU Emacs. |
| 12 | ;; | 12 | ;; |
| @@ -498,6 +498,11 @@ changes." | |||
| 498 | (when (fboundp 'set-face-attribute) | 498 | (when (fboundp 'set-face-attribute) |
| 499 | (set-face-attribute 'org-agenda-date-today nil :weight 'bold :italic 't))) | 499 | (set-face-attribute 'org-agenda-date-today nil :weight 'bold :italic 't))) |
| 500 | 500 | ||
| 501 | (unless (facep 'org-agenda-clocking) | ||
| 502 | (copy-face 'secondary-selection 'org-agenda-clocking) | ||
| 503 | (set-face-doc-string 'org-agenda-clocking | ||
| 504 | "Face marking the current clock item in the agenda.")) | ||
| 505 | |||
| 501 | (unless (facep 'org-agenda-date-weekend) | 506 | (unless (facep 'org-agenda-date-weekend) |
| 502 | (copy-face 'org-agenda-date 'org-agenda-date-weekend) | 507 | (copy-face 'org-agenda-date 'org-agenda-date-weekend) |
| 503 | (set-face-doc-string 'org-agenda-date-weekend | 508 | (set-face-doc-string 'org-agenda-date-weekend |
diff --git a/lisp/org/org-feed.el b/lisp/org/org-feed.el index 4562d252faf..bef0a533358 100644 --- a/lisp/org/org-feed.el +++ b/lisp/org/org-feed.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: 6.29c | 8 | ;; Version: 6.30c |
| 9 | ;; | 9 | ;; |
| 10 | ;; This file is part of GNU Emacs. | 10 | ;; This file is part of GNU Emacs. |
| 11 | ;; | 11 | ;; |
diff --git a/lisp/org/org-footnote.el b/lisp/org/org-footnote.el index 7da75b1989b..416eaaf45ec 100644 --- a/lisp/org/org-footnote.el +++ b/lisp/org/org-footnote.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: 6.29c | 8 | ;; Version: 6.30c |
| 9 | ;; | 9 | ;; |
| 10 | ;; This file is part of GNU Emacs. | 10 | ;; This file is part of GNU Emacs. |
| 11 | ;; | 11 | ;; |
| @@ -38,6 +38,7 @@ | |||
| 38 | (require 'org-macs) | 38 | (require 'org-macs) |
| 39 | (require 'org-compat) | 39 | (require 'org-compat) |
| 40 | 40 | ||
| 41 | (declare-function org-in-commented-line "org" ()) | ||
| 41 | (declare-function org-in-regexp "org" (re &optional nlines visually)) | 42 | (declare-function org-in-regexp "org" (re &optional nlines visually)) |
| 42 | (declare-function org-mark-ring-push "org" (&optional pos buffer)) | 43 | (declare-function org-mark-ring-push "org" (&optional pos buffer)) |
| 43 | (declare-function outline-next-heading "outline") | 44 | (declare-function outline-next-heading "outline") |
| @@ -363,42 +364,44 @@ referenced sequence." | |||
| 363 | ;; Now find footnote references, and extract the definitions | 364 | ;; Now find footnote references, and extract the definitions |
| 364 | (goto-char (point-min)) | 365 | (goto-char (point-min)) |
| 365 | (while (re-search-forward org-footnote-re nil t) | 366 | (while (re-search-forward org-footnote-re nil t) |
| 366 | (org-if-unprotected | 367 | (unless (org-in-commented-line) |
| 367 | (setq def (match-string 4) | 368 | (org-if-unprotected |
| 368 | idef def | 369 | (setq def (match-string 4) |
| 369 | ref (or (match-string 1) (match-string 2)) | 370 | idef def |
| 370 | before (char-to-string (char-after (match-beginning 0)))) | 371 | ref (or (match-string 1) (match-string 2)) |
| 371 | (if (equal ref "fn:") (setq ref nil)) | 372 | before (char-to-string (char-after (match-beginning 0)))) |
| 372 | (if (and ref (setq a (assoc ref ref-table))) | 373 | (if (equal ref "fn:") (setq ref nil)) |
| 373 | (progn | 374 | (if (and ref (setq a (assoc ref ref-table))) |
| 374 | (setq marker (nth 1 a)) | 375 | (progn |
| 375 | (unless (nth 2 a) (setf (caddr a) def))) | 376 | (setq marker (nth 1 a)) |
| 376 | (setq marker (number-to-string (incf count)))) | 377 | (unless (nth 2 a) (setf (caddr a) def))) |
| 377 | (save-match-data | 378 | (setq marker (number-to-string (incf count)))) |
| 378 | (if def | 379 | (save-match-data |
| 379 | (setq def (org-trim def)) | 380 | (if def |
| 380 | (save-excursion | 381 | (setq def (org-trim def)) |
| 381 | (goto-char (point-min)) | 382 | (save-excursion |
| 382 | (if (not (re-search-forward (concat "^\\[" (regexp-quote ref) | 383 | (goto-char (point-min)) |
| 383 | "\\]") nil t)) | 384 | (if (not (re-search-forward (concat "^\\[" (regexp-quote ref) |
| 384 | (setq def nil) | 385 | "\\]") nil t)) |
| 385 | (setq beg (match-beginning 0)) | 386 | (setq def nil) |
| 386 | (setq beg1 (match-end 0)) | 387 | (setq beg (match-beginning 0)) |
| 387 | (re-search-forward | 388 | (setq beg1 (match-end 0)) |
| 388 | (org-re "^[ \t]*$\\|^\\*+ \\|^\\[\\([0-9]+\\|fn:[-_[:word:]]+\\)\\]") | 389 | (re-search-forward |
| 389 | nil 'move) | 390 | (org-re "^[ \t]*$\\|^\\*+ \\|^\\[\\([0-9]+\\|fn:[-_[:word:]]+\\)\\]") |
| 390 | (setq def (buffer-substring beg1 (or (match-beginning 0) | 391 | nil 'move) |
| 391 | (point-max)))) | 392 | (setq def (buffer-substring beg1 (or (match-beginning 0) |
| 392 | (goto-char beg) | 393 | (point-max)))) |
| 393 | (skip-chars-backward " \t\n\t") | 394 | (goto-char beg) |
| 394 | (delete-region (1+ (point)) (match-beginning 0)))))) | 395 | (skip-chars-backward " \t\n\t") |
| 395 | (unless sort-only | 396 | (delete-region (1+ (point)) (match-beginning 0)))))) |
| 396 | (replace-match (concat before "[" marker "]")) | 397 | (unless sort-only |
| 397 | (and idef | 398 | (replace-match (concat before "[" marker "]")) |
| 398 | org-footnote-fill-after-inline-note-extraction | 399 | (and idef |
| 399 | (fill-paragraph))) | 400 | org-footnote-fill-after-inline-note-extraction |
| 400 | (if (not a) (push (list ref marker def (if idef t nil)) ref-table)))) | 401 | (fill-paragraph))) |
| 401 | 402 | (if (not a) (push (list ref marker def (if idef t nil)) | |
| 403 | ref-table))))) | ||
| 404 | |||
| 402 | ;; First find and remove the footnote section | 405 | ;; First find and remove the footnote section |
| 403 | (goto-char (point-min)) | 406 | (goto-char (point-min)) |
| 404 | (cond | 407 | (cond |
diff --git a/lisp/org/org-gnus.el b/lisp/org/org-gnus.el index dbc4ee7db4c..5c5bc6c07d4 100644 --- a/lisp/org/org-gnus.el +++ b/lisp/org/org-gnus.el | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | ;; Tassilo Horn <tassilo at member dot fsf dot org> | 7 | ;; Tassilo Horn <tassilo at member dot fsf dot org> |
| 8 | ;; Keywords: outlines, hypermedia, calendar, wp | 8 | ;; Keywords: outlines, hypermedia, calendar, wp |
| 9 | ;; Homepage: http://orgmode.org | 9 | ;; Homepage: http://orgmode.org |
| 10 | ;; Version: 6.29c | 10 | ;; Version: 6.30c |
| 11 | ;; | 11 | ;; |
| 12 | ;; This file is part of GNU Emacs. | 12 | ;; This file is part of GNU Emacs. |
| 13 | ;; | 13 | ;; |
| @@ -51,8 +51,7 @@ negates this setting for the duration of the command." | |||
| 51 | :type 'boolean) | 51 | :type 'boolean) |
| 52 | 52 | ||
| 53 | ;; Declare external functions and variables | 53 | ;; Declare external functions and variables |
| 54 | (declare-function gnus-article-show-summary "gnus-art" ()) | 54 | (declare-function gnus-summary-article-header "gnus-sum" (&optional number)) |
| 55 | (declare-function gnus-summary-last-subject "gnus-sum" ()) | ||
| 56 | (declare-function message-fetch-field "message" (header &optional not-all)) | 55 | (declare-function message-fetch-field "message" (header &optional not-all)) |
| 57 | (declare-function message-narrow-to-head-1 "message" nil) | 56 | (declare-function message-narrow-to-head-1 "message" nil) |
| 58 | 57 | ||
| @@ -123,37 +122,29 @@ If `org-store-link' was called with a prefix arg the meaning of | |||
| 123 | link))) | 122 | link))) |
| 124 | 123 | ||
| 125 | ((memq major-mode '(gnus-summary-mode gnus-article-mode)) | 124 | ((memq major-mode '(gnus-summary-mode gnus-article-mode)) |
| 126 | (and (eq major-mode 'gnus-summary-mode) (gnus-summary-show-article)) | ||
| 127 | (let* ((group gnus-newsgroup-name) | 125 | (let* ((group gnus-newsgroup-name) |
| 128 | (header (with-current-buffer gnus-article-buffer | 126 | (header (with-current-buffer gnus-summary-buffer |
| 129 | (gnus-summary-toggle-header 1) | 127 | (gnus-summary-article-header))) |
| 130 | (goto-char (point-min)) | 128 | (from (mail-header-from header)) |
| 131 | ;; mbox files may contain a first line starting with | 129 | (message-id (org-remove-angle-brackets (mail-header-id header))) |
| 132 | ;; "From" followed by a space, which cannot be parsed as | 130 | (date (mail-header-date header)) |
| 133 | ;; header line, so we skip it. | 131 | (subject (mail-header-subject header)) |
| 134 | (when (looking-at "From ") | 132 | (to (cdr (assq 'To (mail-header-extra header)))) |
| 135 | (beginning-of-line 2)) | 133 | newsgroups x-no-archive desc link) |
| 136 | (mail-header-extract-no-properties))) | 134 | ;; Fetching an article is an expensive operation; newsgroup and |
| 137 | (from (mail-header 'from header)) | 135 | ;; x-no-archive are only needed for web links. |
| 138 | (message-id (org-remove-angle-brackets | 136 | (when (org-xor current-prefix-arg org-gnus-prefer-web-links) |
| 139 | (mail-header 'message-id header))) | 137 | ;; Make sure the original article buffer is up-to-date |
| 140 | (date (mail-header 'date header)) | 138 | (save-window-excursion (gnus-summary-select-article)) |
| 141 | (to (mail-header 'to header)) | 139 | (setq to (or to (gnus-fetch-original-field "To")) |
| 142 | (newsgroups (mail-header 'newsgroups header)) | 140 | newsgroups (gnus-fetch-original-field "Newsgroups") |
| 143 | (x-no-archive (mail-header 'x-no-archive header)) | 141 | x-no-archive (gnus-fetch-original-field "x-no-archive"))) |
| 144 | (subject (if (eq major-mode 'gnus-article-mode) | ||
| 145 | (save-restriction | ||
| 146 | (require 'message) | ||
| 147 | (message-narrow-to-head-1) | ||
| 148 | (message-fetch-field "subject")) | ||
| 149 | (gnus-summary-subject-string))) | ||
| 150 | desc link) | ||
| 151 | (org-store-link-props :type "gnus" :from from :subject subject | 142 | (org-store-link-props :type "gnus" :from from :subject subject |
| 152 | :message-id message-id :group group :to to) | 143 | :message-id message-id :group group :to to) |
| 153 | (setq desc (org-email-link-description) | 144 | (setq desc (org-email-link-description) |
| 154 | link (org-gnus-article-link group newsgroups message-id x-no-archive)) | 145 | link (org-gnus-article-link |
| 146 | group newsgroups message-id x-no-archive)) | ||
| 155 | (org-add-link-props :link link :description desc) | 147 | (org-add-link-props :link link :description desc) |
| 156 | (gnus-summary-toggle-header -1) | ||
| 157 | link)))) | 148 | link)))) |
| 158 | 149 | ||
| 159 | (defun org-gnus-open (path) | 150 | (defun org-gnus-open (path) |
diff --git a/lisp/org/org-html.el b/lisp/org/org-html.el index 3170f3ae07c..a92fa998adb 100644 --- a/lisp/org/org-html.el +++ b/lisp/org/org-html.el | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | ;; Author: Carsten Dominik <carsten at orgmode dot org> | 6 | ;; Author: Carsten Dominik <carsten at orgmode dot org> |
| 7 | ;; Keywords: outlines, hypermedia, calendar, wp | 7 | ;; Keywords: outlines, hypermedia, calendar, wp |
| 8 | ;; Homepage: http://orgmode.org | 8 | ;; Homepage: http://orgmode.org |
| 9 | ;; Version: 6.29c | 9 | ;; Version: 6.30c |
| 10 | ;; | 10 | ;; |
| 11 | ;; This file is part of GNU Emacs. | 11 | ;; This file is part of GNU Emacs. |
| 12 | ;; | 12 | ;; |
| @@ -27,6 +27,7 @@ | |||
| 27 | ;;; Commentary: | 27 | ;;; Commentary: |
| 28 | 28 | ||
| 29 | (require 'org-exp) | 29 | (require 'org-exp) |
| 30 | (eval-when-compile (require 'cl)) | ||
| 30 | 31 | ||
| 31 | (declare-function org-id-find-id-file "org-id" (id)) | 32 | (declare-function org-id-find-id-file "org-id" (id)) |
| 32 | (declare-function htmlize-region "ext:htmlize" (beg end)) | 33 | (declare-function htmlize-region "ext:htmlize" (beg end)) |
| @@ -1161,7 +1162,7 @@ lang=\"%s\" xml:lang=\"%s\"> | |||
| 1161 | ;; Does this contain a reference to a footnote? | 1162 | ;; Does this contain a reference to a footnote? |
| 1162 | (when org-export-with-footnotes | 1163 | (when org-export-with-footnotes |
| 1163 | (setq start 0) | 1164 | (setq start 0) |
| 1164 | (while (string-match "\\([^* \t].*\\)?\\[\\([0-9]+\\)\\]" line start) | 1165 | (while (string-match "\\([^* \t].*?\\)\\[\\([0-9]+\\)\\]" line start) |
| 1165 | (if (get-text-property (match-beginning 2) 'org-protected line) | 1166 | (if (get-text-property (match-beginning 2) 'org-protected line) |
| 1166 | (setq start (match-end 2)) | 1167 | (setq start (match-end 2)) |
| 1167 | (let ((n (match-string 2 line)) extra a) | 1168 | (let ((n (match-string 2 line)) extra a) |
| @@ -1174,10 +1175,10 @@ lang=\"%s\" xml:lang=\"%s\"> | |||
| 1174 | (setq line | 1175 | (setq line |
| 1175 | (replace-match | 1176 | (replace-match |
| 1176 | (format | 1177 | (format |
| 1177 | (concat (if (match-string 1 line) "%s" "") | 1178 | (concat "%s" |
| 1178 | (format org-export-html-footnote-format | 1179 | (format org-export-html-footnote-format |
| 1179 | "<a class=\"footref\" name=\"fnr.%s%s\" href=\"#fn.%s\">%s</a>")) | 1180 | "<a class=\"footref\" name=\"fnr.%s%s\" href=\"#fn.%s\">%s</a>")) |
| 1180 | (match-string 1 line) n extra n n) | 1181 | (or (match-string 1 line) "") n extra n n) |
| 1181 | t t line)))))) | 1182 | t t line)))))) |
| 1182 | 1183 | ||
| 1183 | (cond | 1184 | (cond |
| @@ -1331,10 +1332,11 @@ lang=\"%s\" xml:lang=\"%s\"> | |||
| 1331 | (let ((n (match-string 1 line))) | 1332 | (let ((n (match-string 1 line))) |
| 1332 | (setq org-par-open t | 1333 | (setq org-par-open t |
| 1333 | line (replace-match | 1334 | line (replace-match |
| 1334 | (concat "<p class=\"footnote\">" | 1335 | (format |
| 1335 | (format org-export-html-footnote-format | 1336 | (concat "<p class=\"footnote\">" |
| 1336 | "<a class=\"footnum\" name=\"fn.%s\" href=\"#fnr.%s\">%s</a>" | 1337 | (format org-export-html-footnote-format |
| 1337 | n n n) t t line)))))) | 1338 | "<a class=\"footnum\" name=\"fn.%s\" href=\"#fnr.%s\">%s</a>")) |
| 1339 | n n n) t t line))))) | ||
| 1338 | ;; Check if the line break needs to be conserved | 1340 | ;; Check if the line break needs to be conserved |
| 1339 | (cond | 1341 | (cond |
| 1340 | ((string-match "\\\\\\\\[ \t]*$" line) | 1342 | ((string-match "\\\\\\\\[ \t]*$" line) |
| @@ -1419,7 +1421,8 @@ lang=\"%s\" xml:lang=\"%s\"> | |||
| 1419 | 1421 | ||
| 1420 | (unless (plist-get opt-plist :buffer-will-be-killed) | 1422 | (unless (plist-get opt-plist :buffer-will-be-killed) |
| 1421 | (normal-mode) | 1423 | (normal-mode) |
| 1422 | (if (eq major-mode (default-value 'major-mode)) (html-mode))) | 1424 | (if (eq major-mode (default-value 'major-mode)) |
| 1425 | (html-mode))) | ||
| 1423 | 1426 | ||
| 1424 | ;; insert the table of contents | 1427 | ;; insert the table of contents |
| 1425 | (goto-char (point-min)) | 1428 | (goto-char (point-min)) |
| @@ -1641,7 +1644,7 @@ lang=\"%s\" xml:lang=\"%s\"> | |||
| 1641 | (push (mapconcat | 1644 | (push (mapconcat |
| 1642 | (lambda (x) | 1645 | (lambda (x) |
| 1643 | (setq gr (pop org-table-colgroup-info)) | 1646 | (setq gr (pop org-table-colgroup-info)) |
| 1644 | (format "%s<col align=\"%s\"></col>%s" | 1647 | (format "%s<col align=\"%s\" />%s" |
| 1645 | (if (memq gr '(:start :startend)) | 1648 | (if (memq gr '(:start :startend)) |
| 1646 | (prog1 | 1649 | (prog1 |
| 1647 | (if colgropen "</colgroup>\n<colgroup>" "<colgroup>") | 1650 | (if colgropen "</colgroup>\n<colgroup>" "<colgroup>") |
| @@ -1883,13 +1886,6 @@ If there are links in the string, don't modify these." | |||
| 1883 | (setq start (+ start (length wd)))))))) | 1886 | (setq start (+ start (length wd)))))))) |
| 1884 | s) | 1887 | s) |
| 1885 | 1888 | ||
| 1886 | (defconst org-export-html-special-string-regexps | ||
| 1887 | '(("\\\\-" . "­") | ||
| 1888 | ("---\\([^-]\\)" . "—\\1") | ||
| 1889 | ("--\\([^-]\\)" . "–\\1") | ||
| 1890 | ("\\.\\.\\." . "…")) | ||
| 1891 | "Regular expressions for special string conversion.") | ||
| 1892 | |||
| 1893 | (defun org-export-html-convert-special-strings (string) | 1889 | (defun org-export-html-convert-special-strings (string) |
| 1894 | "Convert special characters in STRING to HTML." | 1890 | "Convert special characters in STRING to HTML." |
| 1895 | (let ((all org-export-html-special-string-regexps) | 1891 | (let ((all org-export-html-special-string-regexps) |
diff --git a/lisp/org/org-icalendar.el b/lisp/org/org-icalendar.el index 2ea7483078f..d3804e6cfb6 100644 --- a/lisp/org/org-icalendar.el +++ b/lisp/org/org-icalendar.el | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | ;; Author: Carsten Dominik <carsten at orgmode dot org> | 6 | ;; Author: Carsten Dominik <carsten at orgmode dot org> |
| 7 | ;; Keywords: outlines, hypermedia, calendar, wp | 7 | ;; Keywords: outlines, hypermedia, calendar, wp |
| 8 | ;; Homepage: http://orgmode.org | 8 | ;; Homepage: http://orgmode.org |
| 9 | ;; Version: 6.29c | 9 | ;; Version: 6.30c |
| 10 | ;; | 10 | ;; |
| 11 | ;; This file is part of GNU Emacs. | 11 | ;; This file is part of GNU Emacs. |
| 12 | ;; | 12 | ;; |
diff --git a/lisp/org/org-id.el b/lisp/org/org-id.el index 70f2243ce16..41da48f2272 100644 --- a/lisp/org/org-id.el +++ b/lisp/org/org-id.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: 6.29c | 8 | ;; Version: 6.30c |
| 9 | ;; | 9 | ;; |
| 10 | ;; This file is part of GNU Emacs. | 10 | ;; This file is part of GNU Emacs. |
| 11 | ;; | 11 | ;; |
| @@ -563,7 +563,7 @@ optional argument MARKERP, return the position as a new marker." | |||
| 563 | ;; so we do have to add it to `org-store-link-functions'. | 563 | ;; so we do have to add it to `org-store-link-functions'. |
| 564 | 564 | ||
| 565 | (defun org-id-store-link () | 565 | (defun org-id-store-link () |
| 566 | "Store a link to the current entry, using it's ID." | 566 | "Store a link to the current entry, using its ID." |
| 567 | (interactive) | 567 | (interactive) |
| 568 | (let* ((link (org-make-link "id:" (org-id-get-create))) | 568 | (let* ((link (org-make-link "id:" (org-id-get-create))) |
| 569 | (desc (save-excursion | 569 | (desc (save-excursion |
| @@ -601,9 +601,8 @@ optional argument MARKERP, return the position as a new marker." | |||
| 601 | 601 | ||
| 602 | (provide 'org-id) | 602 | (provide 'org-id) |
| 603 | 603 | ||
| 604 | ;; arch-tag: e5abaca4-e16f-4b25-832a-540cfb63a712 | ||
| 605 | ;;; org-id.el ends here | 604 | ;;; org-id.el ends here |
| 606 | 605 | ||
| 607 | 606 | ;; arch-tag: e5abaca4-e16f-4b25-832a-540cfb63a712 | |
| 608 | 607 | ||
| 609 | 608 | ||
diff --git a/lisp/org/org-indent.el b/lisp/org/org-indent.el index 50b6f4856e6..ec6d2ff73f2 100644 --- a/lisp/org/org-indent.el +++ b/lisp/org/org-indent.el | |||
| @@ -1,11 +1,10 @@ | |||
| 1 | ;;; org-indent.el --- Dynamic indentation for Org-mode | 1 | ;;; org-indent.el --- Dynamic indentation for Org-mode |
| 2 | 2 | ;; Copyright (C) 2009 Free Software Foundation, Inc. | |
| 3 | ;; Copyright (C) 2008, 2009 Free Software Foundation, Inc. | ||
| 4 | ;; | 3 | ;; |
| 5 | ;; Author: Carsten Dominik <carsten at orgmode dot org> | 4 | ;; Author: Carsten Dominik <carsten at orgmode dot org> |
| 6 | ;; Keywords: outlines, hypermedia, calendar, wp | 5 | ;; Keywords: outlines, hypermedia, calendar, wp |
| 7 | ;; Homepage: http://orgmode.org | 6 | ;; Homepage: http://orgmode.org |
| 8 | ;; Version: 6.29c | 7 | ;; Version: 6.30c |
| 9 | ;; | 8 | ;; |
| 10 | ;; This file is part of GNU Emacs. | 9 | ;; This file is part of GNU Emacs. |
| 11 | ;; | 10 | ;; |
| @@ -278,5 +277,4 @@ Point is assumed to be at the beginning of a headline." | |||
| 278 | 277 | ||
| 279 | (provide 'org-indent) | 278 | (provide 'org-indent) |
| 280 | 279 | ||
| 281 | ;; arch-tag: 981f57e3-d747-49d1-8e63-ed460682cee6 | ||
| 282 | ;;; org-indent.el ends here | 280 | ;;; org-indent.el ends here |
diff --git a/lisp/org/org-info.el b/lisp/org/org-info.el index 8599404020a..3b5cfb148ea 100644 --- a/lisp/org/org-info.el +++ b/lisp/org/org-info.el | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | ;; Author: Carsten Dominik <carsten at orgmode dot org> | 6 | ;; Author: Carsten Dominik <carsten at orgmode dot org> |
| 7 | ;; Keywords: outlines, hypermedia, calendar, wp | 7 | ;; Keywords: outlines, hypermedia, calendar, wp |
| 8 | ;; Homepage: http://orgmode.org | 8 | ;; Homepage: http://orgmode.org |
| 9 | ;; Version: 6.29c | 9 | ;; Version: 6.30c |
| 10 | ;; | 10 | ;; |
| 11 | ;; This file is part of GNU Emacs. | 11 | ;; This file is part of GNU Emacs. |
| 12 | ;; | 12 | ;; |
diff --git a/lisp/org/org-inlinetask.el b/lisp/org/org-inlinetask.el index ebee4268c92..e01e20c802d 100644 --- a/lisp/org/org-inlinetask.el +++ b/lisp/org/org-inlinetask.el | |||
| @@ -5,11 +5,12 @@ | |||
| 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: 6.29c | 8 | ;; Version: 6.30c |
| 9 | 9 | ||
| 10 | ;; This file is part of GNU Emacs. | 10 | ;; This file is part of GNU Emacs. |
| 11 | 11 | ||
| 12 | ;; GNU Emacs is free software: you can redistribute it and/or modify | 12 | ;; GNU Emacs is free software: you can redistribute it and/or modify |
| 13 | |||
| 13 | ;; it under the terms of the GNU General Public License as published by | 14 | ;; it under the terms of the GNU General Public License as published by |
| 14 | ;; the Free Software Foundation, either version 3 of the License, or | 15 | ;; the Free Software Foundation, either version 3 of the License, or |
| 15 | ;; (at your option) any later version. | 16 | ;; (at your option) any later version. |
| @@ -195,5 +196,4 @@ Either remove headline and meta data, or do special formatting." | |||
| 195 | 196 | ||
| 196 | (provide 'org-inlinetask) | 197 | (provide 'org-inlinetask) |
| 197 | 198 | ||
| 198 | ;; arch-tag: b76736bc-9f4a-43cd-977c-ecfd6689846a | ||
| 199 | ;;; org-inlinetask.el ends here | 199 | ;;; org-inlinetask.el ends here |
diff --git a/lisp/org/org-irc.el b/lisp/org/org-irc.el index ac40ec606bd..f415bd1cc0f 100644 --- a/lisp/org/org-irc.el +++ b/lisp/org/org-irc.el | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | ;; | 4 | ;; |
| 5 | ;; Author: Philip Jackson <emacs@shellarchive.co.uk> | 5 | ;; Author: Philip Jackson <emacs@shellarchive.co.uk> |
| 6 | ;; Keywords: erc, irc, link, org | 6 | ;; Keywords: erc, irc, link, org |
| 7 | ;; Version: 6.29c | 7 | ;; Version: 6.30c |
| 8 | ;; | 8 | ;; |
| 9 | ;; This file is part of GNU Emacs. | 9 | ;; This file is part of GNU Emacs. |
| 10 | ;; | 10 | ;; |
diff --git a/lisp/org/org-jsinfo.el b/lisp/org/org-jsinfo.el index b5632fc85d0..55f2251f560 100644 --- a/lisp/org/org-jsinfo.el +++ b/lisp/org/org-jsinfo.el | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | ;; Author: Carsten Dominik <carsten at orgmode dot org> | 6 | ;; Author: Carsten Dominik <carsten at orgmode dot org> |
| 7 | ;; Keywords: outlines, hypermedia, calendar, wp | 7 | ;; Keywords: outlines, hypermedia, calendar, wp |
| 8 | ;; Homepage: http://orgmode.org | 8 | ;; Homepage: http://orgmode.org |
| 9 | ;; Version: 6.29c | 9 | ;; Version: 6.30c |
| 10 | ;; | 10 | ;; |
| 11 | ;; This file is part of GNU Emacs. | 11 | ;; This file is part of GNU Emacs. |
| 12 | ;; | 12 | ;; |
diff --git a/lisp/org/org-latex.el b/lisp/org/org-latex.el index 896a0073190..48a7ac2878b 100644 --- a/lisp/org/org-latex.el +++ b/lisp/org/org-latex.el | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | ;; | 4 | ;; |
| 5 | ;; Emacs Lisp Archive Entry | 5 | ;; Emacs Lisp Archive Entry |
| 6 | ;; Filename: org-latex.el | 6 | ;; Filename: org-latex.el |
| 7 | ;; Version: 6.29c | 7 | ;; Version: 6.30c |
| 8 | ;; Author: Bastien Guerry <bzg AT altern DOT org> | 8 | ;; Author: Bastien Guerry <bzg AT altern DOT org> |
| 9 | ;; Maintainer: Carsten Dominik <carsten.dominik AT gmail DOT com> | 9 | ;; Maintainer: Carsten Dominik <carsten.dominik AT gmail DOT com> |
| 10 | ;; Keywords: org, wp, tex | 10 | ;; Keywords: org, wp, tex |
| @@ -93,6 +93,7 @@ | |||
| 93 | \\usepackage[T1]{fontenc} | 93 | \\usepackage[T1]{fontenc} |
| 94 | \\usepackage{graphicx} | 94 | \\usepackage{graphicx} |
| 95 | \\usepackage{longtable} | 95 | \\usepackage{longtable} |
| 96 | \\usepackage{soul} | ||
| 96 | \\usepackage{hyperref}" | 97 | \\usepackage{hyperref}" |
| 97 | ("\\section{%s}" . "\\section*{%s}") | 98 | ("\\section{%s}" . "\\section*{%s}") |
| 98 | ("\\subsection{%s}" . "\\subsection*{%s}") | 99 | ("\\subsection{%s}" . "\\subsection*{%s}") |
| @@ -105,6 +106,7 @@ | |||
| 105 | \\usepackage[T1]{fontenc} | 106 | \\usepackage[T1]{fontenc} |
| 106 | \\usepackage{graphicx} | 107 | \\usepackage{graphicx} |
| 107 | \\usepackage{longtable} | 108 | \\usepackage{longtable} |
| 109 | \\usepackage{soul} | ||
| 108 | \\usepackage{hyperref}" | 110 | \\usepackage{hyperref}" |
| 109 | ("\\part{%s}" . "\\part*{%s}") | 111 | ("\\part{%s}" . "\\part*{%s}") |
| 110 | ("\\chapter{%s}" . "\\chapter*{%s}") | 112 | ("\\chapter{%s}" . "\\chapter*{%s}") |
| @@ -117,6 +119,7 @@ | |||
| 117 | \\usepackage[T1]{fontenc} | 119 | \\usepackage[T1]{fontenc} |
| 118 | \\usepackage{graphicx} | 120 | \\usepackage{graphicx} |
| 119 | \\usepackage{longtable} | 121 | \\usepackage{longtable} |
| 122 | \\usepackage{soul} | ||
| 120 | \\usepackage{hyperref}" | 123 | \\usepackage{hyperref}" |
| 121 | ("\\part{%s}" . "\\part*{%s}") | 124 | ("\\part{%s}" . "\\part*{%s}") |
| 122 | ("\\chapter{%s}" . "\\chapter*{%s}") | 125 | ("\\chapter{%s}" . "\\chapter*{%s}") |
| @@ -166,7 +169,7 @@ to represent the section title." | |||
| 166 | '(("*" "\\textbf{%s}" nil) | 169 | '(("*" "\\textbf{%s}" nil) |
| 167 | ("/" "\\emph{%s}" nil) | 170 | ("/" "\\emph{%s}" nil) |
| 168 | ("_" "\\underline{%s}" nil) | 171 | ("_" "\\underline{%s}" nil) |
| 169 | ("+" "\\texttt{%s}" nil) | 172 | ("+" "\\st{%s}" nil) |
| 170 | ("=" "\\verb" t) | 173 | ("=" "\\verb" t) |
| 171 | ("~" "\\verb" t)) | 174 | ("~" "\\verb" t)) |
| 172 | "Alist of LaTeX expressions to convert emphasis fontifiers. | 175 | "Alist of LaTeX expressions to convert emphasis fontifiers. |
| @@ -245,9 +248,12 @@ When nil, grouping causes only separation lines between groups." | |||
| 245 | 248 | ||
| 246 | (defcustom org-export-latex-packages-alist nil | 249 | (defcustom org-export-latex-packages-alist nil |
| 247 | "Alist of packages to be inserted in the header. | 250 | "Alist of packages to be inserted in the header. |
| 248 | Each cell is of the forma \( \"option\" . \"package\" \)." | 251 | Each cell is of the format \( \"option\" . \"package\" \)." |
| 249 | :group 'org-export-latex | 252 | :group 'org-export-latex |
| 250 | :type 'alist) | 253 | :type '(repeat |
| 254 | (list | ||
| 255 | (string :tag "option") | ||
| 256 | (string :tag "package")))) | ||
| 251 | 257 | ||
| 252 | (defcustom org-export-latex-low-levels 'itemize | 258 | (defcustom org-export-latex-low-levels 'itemize |
| 253 | "How to convert sections below the current level of sectioning. | 259 | "How to convert sections below the current level of sectioning. |
| @@ -297,6 +303,43 @@ Defaults to \\begin{verbatim} and \\end{verbatim}." | |||
| 297 | :type '(cons (string :tag "Open") | 303 | :type '(cons (string :tag "Open") |
| 298 | (string :tag "Close"))) | 304 | (string :tag "Close"))) |
| 299 | 305 | ||
| 306 | (defcustom org-export-latex-listings nil | ||
| 307 | "Non-nil means, export source code using the listings package. | ||
| 308 | This package will fontify source code, possibly even with color. | ||
| 309 | If you want to use this, you also need to make LaTeX use the | ||
| 310 | listings package, and if you want to have color, the color | ||
| 311 | package. Just add these to `org-export-latex-packages-alist', | ||
| 312 | for example using customize, or with something like | ||
| 313 | |||
| 314 | (require 'org-latex) | ||
| 315 | (add-to-list 'org-export-latex-packages-alist '(\"\" \"listings\")) | ||
| 316 | (add-to-list 'org-export-latex-packages-alist '(\"\" \"color\"))" | ||
| 317 | :group 'org-export-latex | ||
| 318 | :type 'boolean) | ||
| 319 | |||
| 320 | (defcustom org-export-latex-listings-langs | ||
| 321 | '((emacs-lisp "Lisp") (lisp "Lisp") | ||
| 322 | (c "C") (cc "C++") | ||
| 323 | (fortran "fortran") | ||
| 324 | (perl "Perl") (cperl "Perl") (python "Python") (ruby "Ruby") | ||
| 325 | (html "HTML") (xml "XML") | ||
| 326 | (tex "TeX") (latex "TeX") | ||
| 327 | (shell-script "bash") | ||
| 328 | (gnuplot "Gnuplot") | ||
| 329 | (ocaml "Caml") (caml "Caml") | ||
| 330 | (sql "SQL")) | ||
| 331 | "Alist mapping languages to their listing language counterpart. | ||
| 332 | The key is a symbol, the major mode symbol without the \"-mode\". | ||
| 333 | The value is the string that should be inserted as the language parameter | ||
| 334 | for the listings package. If the mode name and the listings name are | ||
| 335 | the same, the language does not need an entry in this list - but it does not | ||
| 336 | hurt if it is present." | ||
| 337 | :group 'org-export-latex | ||
| 338 | :type '(repeat | ||
| 339 | (list | ||
| 340 | (symbol :tag "Major mode ") | ||
| 341 | (string :tag "Listings language")))) | ||
| 342 | |||
| 300 | (defcustom org-export-latex-remove-from-headlines | 343 | (defcustom org-export-latex-remove-from-headlines |
| 301 | '(:todo nil :priority nil :tags nil) | 344 | '(:todo nil :priority nil :tags nil) |
| 302 | "A plist of keywords to remove from headlines. OBSOLETE. | 345 | "A plist of keywords to remove from headlines. OBSOLETE. |
| @@ -960,10 +1003,11 @@ If BEG is non-nil, it is the beginning of the region. | |||
| 960 | If END is non-nil, it is the end of the region." | 1003 | If END is non-nil, it is the end of the region." |
| 961 | (save-excursion | 1004 | (save-excursion |
| 962 | (goto-char (or beg (point-min))) | 1005 | (goto-char (or beg (point-min))) |
| 963 | (let* ((pt (point)) | 1006 | (let* ((pt (point))) |
| 964 | (end (if (re-search-forward "^\\*+ " end t) | 1007 | (or end |
| 965 | (goto-char (match-beginning 0)) | 1008 | (and (re-search-forward "^\\*+ " end t) |
| 966 | (goto-char end)))) | 1009 | (setq end (match-beginning 0))) |
| 1010 | (setq end (point-max))) | ||
| 967 | (prog1 | 1011 | (prog1 |
| 968 | (org-export-latex-content | 1012 | (org-export-latex-content |
| 969 | (org-export-preprocess-string | 1013 | (org-export-preprocess-string |
| @@ -1276,16 +1320,19 @@ The conversion is made depending of STRING-BEFORE and STRING-AFTER." | |||
| 1276 | 1320 | ||
| 1277 | 1321 | ||
| 1278 | (defvar org-table-last-alignment) ; defined in org-table.el | 1322 | (defvar org-table-last-alignment) ; defined in org-table.el |
| 1323 | (defvar org-table-last-column-widths) ; defined in org-table.el | ||
| 1279 | (declare-function orgtbl-to-latex "org-table" (table params) t) | 1324 | (declare-function orgtbl-to-latex "org-table" (table params) t) |
| 1280 | (defun org-export-latex-tables (insert) | 1325 | (defun org-export-latex-tables (insert) |
| 1281 | "Convert tables to LaTeX and INSERT it." | 1326 | "Convert tables to LaTeX and INSERT it." |
| 1282 | (goto-char (point-min)) | 1327 | (goto-char (point-min)) |
| 1283 | (while (re-search-forward "^\\([ \t]*\\)|" nil t) | 1328 | (while (re-search-forward "^\\([ \t]*\\)|" nil t) |
| 1284 | ;; FIXME really need to save-excursion? | 1329 | (org-table-align) |
| 1285 | (save-excursion (org-table-align)) | ||
| 1286 | (let* ((beg (org-table-begin)) | 1330 | (let* ((beg (org-table-begin)) |
| 1287 | (end (org-table-end)) | 1331 | (end (org-table-end)) |
| 1288 | (raw-table (buffer-substring beg end)) | 1332 | (raw-table (buffer-substring beg end)) |
| 1333 | (org-table-last-alignment (copy-sequence org-table-last-alignment)) | ||
| 1334 | (org-table-last-column-widths (copy-sequence | ||
| 1335 | org-table-last-column-widths)) | ||
| 1289 | fnum fields line lines olines gr colgropen line-fmt align | 1336 | fnum fields line lines olines gr colgropen line-fmt align |
| 1290 | caption label attr floatp longtblp) | 1337 | caption label attr floatp longtblp) |
| 1291 | (if org-export-latex-tables-verbatim | 1338 | (if org-export-latex-tables-verbatim |
| @@ -1310,6 +1357,9 @@ The conversion is made depending of STRING-BEFORE and STRING-AFTER." | |||
| 1310 | (apply 'delete-region (list beg end)) | 1357 | (apply 'delete-region (list beg end)) |
| 1311 | (when org-export-table-remove-special-lines | 1358 | (when org-export-table-remove-special-lines |
| 1312 | (setq lines (org-table-clean-before-export lines 'maybe-quoted))) | 1359 | (setq lines (org-table-clean-before-export lines 'maybe-quoted))) |
| 1360 | (when org-table-clean-did-remove-column | ||
| 1361 | (pop org-table-last-alignment) | ||
| 1362 | (pop org-table-last-column-widths)) | ||
| 1313 | ;; make a formatting string to reflect aligment | 1363 | ;; make a formatting string to reflect aligment |
| 1314 | (setq olines lines) | 1364 | (setq olines lines) |
| 1315 | (while (and (not line-fmt) (setq line (pop olines))) | 1365 | (while (and (not line-fmt) (setq line (pop olines))) |
| @@ -1521,10 +1571,24 @@ The conversion is made depending of STRING-BEFORE and STRING-AFTER." | |||
| 1521 | ((not type) | 1571 | ((not type) |
| 1522 | (insert (format "\\hyperref[%s]{%s}" | 1572 | (insert (format "\\hyperref[%s]{%s}" |
| 1523 | (org-remove-initial-hash | 1573 | (org-remove-initial-hash |
| 1524 | (org-solidify-link-text raw-path)) desc))) | 1574 | (org-solidify-link-text raw-path)) |
| 1525 | (path (insert (format "\\href{%s}{%s}" path desc))) | 1575 | desc))) |
| 1576 | (path | ||
| 1577 | (when (org-at-table-p) | ||
| 1578 | ;; There is a strange problem when we have a link in a table, | ||
| 1579 | ;; ampersands then cause a problem. I think this must be | ||
| 1580 | ;; a LaTeX issue, but we here implement a work-around anyway. | ||
| 1581 | (setq path (org-export-latex-protect-amp path) | ||
| 1582 | desc (org-export-latex-protect-amp desc))) | ||
| 1583 | (insert (format "\\href{%s}{%s}" path desc))) | ||
| 1526 | (t (insert "\\texttt{" desc "}"))))))) | 1584 | (t (insert "\\texttt{" desc "}"))))))) |
| 1527 | 1585 | ||
| 1586 | (defun org-export-latex-protect-amp (s) | ||
| 1587 | (while (string-match "\\([^\\\\]\\)\\(&\\)" s) | ||
| 1588 | (setq s (replace-match (concat (match-string 1 s) "\\" (match-string 2 s)) | ||
| 1589 | t t s))) | ||
| 1590 | s) | ||
| 1591 | |||
| 1528 | (defun org-remove-initial-hash (s) | 1592 | (defun org-remove-initial-hash (s) |
| 1529 | (if (string-match "\\`#" s) | 1593 | (if (string-match "\\`#" s) |
| 1530 | (substring s 1) | 1594 | (substring s 1) |
diff --git a/lisp/org/org-list.el b/lisp/org/org-list.el index 6c775f7d5d0..cef5fe458a4 100644 --- a/lisp/org/org-list.el +++ b/lisp/org/org-list.el | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | ;; Bastien Guerry <bzg AT altern DOT org> | 7 | ;; Bastien Guerry <bzg AT altern DOT org> |
| 8 | ;; Keywords: outlines, hypermedia, calendar, wp | 8 | ;; Keywords: outlines, hypermedia, calendar, wp |
| 9 | ;; Homepage: http://orgmode.org | 9 | ;; Homepage: http://orgmode.org |
| 10 | ;; Version: 6.29c | 10 | ;; Version: 6.30c |
| 11 | ;; | 11 | ;; |
| 12 | ;; This file is part of GNU Emacs. | 12 | ;; This file is part of GNU Emacs. |
| 13 | ;; | 13 | ;; |
| @@ -149,7 +149,9 @@ toggle a checkbox with \\[org-ctrl-c-ctrl-c]." | |||
| 149 | 149 | ||
| 150 | (defcustom org-hierarchical-checkbox-statistics t | 150 | (defcustom org-hierarchical-checkbox-statistics t |
| 151 | "Non-nil means, checkbox statistics counts only the state of direct children. | 151 | "Non-nil means, checkbox statistics counts only the state of direct children. |
| 152 | When nil, all boxes below the cookie are counted." | 152 | When nil, all boxes below the cookie are counted. |
| 153 | This can be set to nil on a per-node basis using a COCKIE_DATA property | ||
| 154 | with the word \"recursive\" in the value." | ||
| 153 | :group 'org-plain-lists | 155 | :group 'org-plain-lists |
| 154 | :type 'boolean) | 156 | :type 'boolean) |
| 155 | 157 | ||
| @@ -834,7 +836,7 @@ with something like \"1.\" or \"2)\"." | |||
| 834 | (goto-char (match-beginning 2)) | 836 | (goto-char (match-beginning 2)) |
| 835 | (insert (setq new (format fmt (setq n (1+ n))))) | 837 | (insert (setq new (format fmt (setq n (1+ n))))) |
| 836 | (org-shift-item-indentation (- (length new) (length old)))))) | 838 | (org-shift-item-indentation (- (length new) (length old)))))) |
| 837 | (goto-line line) | 839 | (org-goto-line line) |
| 838 | (org-move-to-column col))) | 840 | (org-move-to-column col))) |
| 839 | 841 | ||
| 840 | (defun org-fix-bullet-type (&optional force-bullet) | 842 | (defun org-fix-bullet-type (&optional force-bullet) |
| @@ -872,7 +874,7 @@ Also, fix the indentation." | |||
| 872 | (setq oldbullet (match-string 0)) | 874 | (setq oldbullet (match-string 0)) |
| 873 | (unless (equal bullet oldbullet) (replace-match bullet)) | 875 | (unless (equal bullet oldbullet) (replace-match bullet)) |
| 874 | (org-shift-item-indentation (- (length bullet) (length oldbullet)))))) | 876 | (org-shift-item-indentation (- (length bullet) (length oldbullet)))))) |
| 875 | (goto-line line) | 877 | (org-goto-line line) |
| 876 | (org-move-to-column col) | 878 | (org-move-to-column col) |
| 877 | (if (string-match "[0-9]" bullet) | 879 | (if (string-match "[0-9]" bullet) |
| 878 | (org-renumber-ordered-list 1)))) | 880 | (org-renumber-ordered-list 1)))) |
diff --git a/lisp/org/org-mac-message.el b/lisp/org/org-mac-message.el index ff33dc7de14..87fe77a7b70 100644 --- a/lisp/org/org-mac-message.el +++ b/lisp/org/org-mac-message.el | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | ;; Author: John Wiegley <johnw@gnu.org> | 5 | ;; Author: John Wiegley <johnw@gnu.org> |
| 6 | ;; Christopher Suckling <suckling at gmail dot com> | 6 | ;; Christopher Suckling <suckling at gmail dot com> |
| 7 | 7 | ||
| 8 | ;; Version: 6.29c | 8 | ;; Version: 6.30c |
| 9 | ;; Keywords: outlines, hypermedia, calendar, wp | 9 | ;; Keywords: outlines, hypermedia, calendar, wp |
| 10 | 10 | ||
| 11 | ;; This file is part of GNU Emacs. | 11 | ;; This file is part of GNU Emacs. |
diff --git a/lisp/org/org-macs.el b/lisp/org/org-macs.el index 4e15566f4f6..0bc3d059eb4 100644 --- a/lisp/org/org-macs.el +++ b/lisp/org/org-macs.el | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | ;; Author: Carsten Dominik <carsten at orgmode dot org> | 6 | ;; Author: Carsten Dominik <carsten at orgmode dot org> |
| 7 | ;; Keywords: outlines, hypermedia, calendar, wp | 7 | ;; Keywords: outlines, hypermedia, calendar, wp |
| 8 | ;; Homepage: http://orgmode.org | 8 | ;; Homepage: http://orgmode.org |
| 9 | ;; Version: 6.29c | 9 | ;; Version: 6.30c |
| 10 | ;; | 10 | ;; |
| 11 | ;; This file is part of GNU Emacs. | 11 | ;; This file is part of GNU Emacs. |
| 12 | ;; | 12 | ;; |
| @@ -71,7 +71,7 @@ Also, do not record undo information." | |||
| 71 | (_col (current-column))) | 71 | (_col (current-column))) |
| 72 | (unwind-protect | 72 | (unwind-protect |
| 73 | (progn ,@body) | 73 | (progn ,@body) |
| 74 | (goto-line _line) | 74 | (org-goto-line _line) |
| 75 | (org-move-to-column _col)))) | 75 | (org-move-to-column _col)))) |
| 76 | 76 | ||
| 77 | (defmacro org-without-partial-completion (&rest body) | 77 | (defmacro org-without-partial-completion (&rest body) |
| @@ -173,7 +173,7 @@ We use a macro so that the test can happen at compilation time." | |||
| 173 | 173 | ||
| 174 | (defsubst org-check-external-command (cmd &optional use no-error) | 174 | (defsubst org-check-external-command (cmd &optional use no-error) |
| 175 | "Check if external progam CMD for USE exists, error if not. | 175 | "Check if external progam CMD for USE exists, error if not. |
| 176 | When the program does exist, return it's path. | 176 | When the program does exist, return its path. |
| 177 | When it does not exist and NO-ERROR is set, return nil. | 177 | When it does not exist and NO-ERROR is set, return nil. |
| 178 | Otherwise, throw an error. The optional argument USE can describe what this | 178 | Otherwise, throw an error. The optional argument USE can describe what this |
| 179 | program is needed for, so that the error message can be more informative." | 179 | program is needed for, so that the error message can be more informative." |
| @@ -219,6 +219,12 @@ we turn off invisibility temporarily. Use this in a `let' form." | |||
| 219 | ;; works also in narrowed buffer, because we start at 1, not point-min | 219 | ;; works also in narrowed buffer, because we start at 1, not point-min |
| 220 | (+ (if (bolp) 1 0) (count-lines 1 (point))))) | 220 | (+ (if (bolp) 1 0) (count-lines 1 (point))))) |
| 221 | 221 | ||
| 222 | (defsubst org-goto-line (N) | ||
| 223 | (save-restriction | ||
| 224 | (widen) | ||
| 225 | (goto-char (point-min)) | ||
| 226 | (forward-line (1- N)))) | ||
| 227 | |||
| 222 | (defsubst org-current-line-string (&optional to-here) | 228 | (defsubst org-current-line-string (&optional to-here) |
| 223 | (buffer-substring (point-at-bol) (if to-here (point) (point-at-eol)))) | 229 | (buffer-substring (point-at-bol) (if to-here (point) (point-at-eol)))) |
| 224 | 230 | ||
diff --git a/lisp/org/org-mew.el b/lisp/org/org-mew.el index 9fe84fece87..6840703fcde 100644 --- a/lisp/org/org-mew.el +++ b/lisp/org/org-mew.el | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | ;; Author: Tokuya Kameshima <kames at fa2 dot so-net dot ne dot jp> | 5 | ;; Author: Tokuya Kameshima <kames at fa2 dot so-net dot ne dot jp> |
| 6 | ;; Keywords: outlines, hypermedia, calendar, wp | 6 | ;; Keywords: outlines, hypermedia, calendar, wp |
| 7 | ;; Homepage: http://orgmode.org | 7 | ;; Homepage: http://orgmode.org |
| 8 | ;; Version: 6.29c | 8 | ;; Version: 6.30c |
| 9 | 9 | ||
| 10 | ;; This file is part of GNU Emacs. | 10 | ;; This file is part of GNU Emacs. |
| 11 | 11 | ||
diff --git a/lisp/org/org-mhe.el b/lisp/org/org-mhe.el index ba408ef7c4f..8b90f3f93e8 100644 --- a/lisp/org/org-mhe.el +++ b/lisp/org/org-mhe.el | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | ;; Author: Thomas Baumann <thomas dot baumann at ch dot tum dot de> | 6 | ;; Author: Thomas Baumann <thomas dot baumann at ch dot tum dot de> |
| 7 | ;; Keywords: outlines, hypermedia, calendar, wp | 7 | ;; Keywords: outlines, hypermedia, calendar, wp |
| 8 | ;; Homepage: http://orgmode.org | 8 | ;; Homepage: http://orgmode.org |
| 9 | ;; Version: 6.29c | 9 | ;; Version: 6.30c |
| 10 | ;; | 10 | ;; |
| 11 | ;; This file is part of GNU Emacs. | 11 | ;; This file is part of GNU Emacs. |
| 12 | ;; | 12 | ;; |
diff --git a/lisp/org/org-mouse.el b/lisp/org/org-mouse.el index c911db9ad61..fd69589395d 100644 --- a/lisp/org/org-mouse.el +++ b/lisp/org/org-mouse.el | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | ;; | 4 | ;; |
| 5 | ;; Author: Piotr Zielinski <piotr dot zielinski at gmail dot com> | 5 | ;; Author: Piotr Zielinski <piotr dot zielinski at gmail dot com> |
| 6 | ;; Maintainer: Carsten Dominik <carsten at orgmode dot org> | 6 | ;; Maintainer: Carsten Dominik <carsten at orgmode dot org> |
| 7 | ;; Version: 6.29c | 7 | ;; Version: 6.30c |
| 8 | ;; | 8 | ;; |
| 9 | ;; This file is part of GNU Emacs. | 9 | ;; This file is part of GNU Emacs. |
| 10 | ;; | 10 | ;; |
diff --git a/lisp/org/org-plot.el b/lisp/org/org-plot.el index 3f40eafb8cd..684a515e96d 100644 --- a/lisp/org/org-plot.el +++ b/lisp/org/org-plot.el | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | ;; Author: Eric Schulte <schulte dot eric at gmail dot com> | 5 | ;; Author: Eric Schulte <schulte dot eric at gmail dot com> |
| 6 | ;; Keywords: tables, plotting | 6 | ;; Keywords: tables, plotting |
| 7 | ;; Homepage: http://orgmode.org | 7 | ;; Homepage: http://orgmode.org |
| 8 | ;; Version: 6.29c | 8 | ;; Version: 6.30c |
| 9 | ;; | 9 | ;; |
| 10 | ;; This file is part of GNU Emacs. | 10 | ;; This file is part of GNU Emacs. |
| 11 | ;; | 11 | ;; |
| @@ -33,7 +33,7 @@ | |||
| 33 | (require 'org) | 33 | (require 'org) |
| 34 | (require 'org-exp) | 34 | (require 'org-exp) |
| 35 | (require 'org-table) | 35 | (require 'org-table) |
| 36 | (eval-and-compile | 36 | (eval-when-compile |
| 37 | (require 'cl)) | 37 | (require 'cl)) |
| 38 | 38 | ||
| 39 | (declare-function gnuplot-delchar-or-maybe-eof "ext:gnuplot" (arg)) | 39 | (declare-function gnuplot-delchar-or-maybe-eof "ext:gnuplot" (arg)) |
diff --git a/lisp/org/org-protocol.el b/lisp/org/org-protocol.el index 4de3ab89a44..61e29882b4f 100644 --- a/lisp/org/org-protocol.el +++ b/lisp/org/org-protocol.el | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | ;;; org-protocol.el --- Intercept calls from emacsclient to trigger custom actions. | 1 | ;;; org-protocol.el --- Intercept calls from emacsclient to trigger custom actions. |
| 2 | ;; | 2 | ;; |
| 3 | ;; Copyright (C) 2008, 2009 | 3 | ;; Copyright (C) 2008, 2009 |
| 4 | ;; Free Software Foundation, Inc. | 4 | ;; Free Software Foundation, Inc. |
| 5 | ;; | 5 | ;; |
| 6 | ;; Author: Bastien Guerry <bzg AT altern DOT org> | 6 | ;; Author: Bastien Guerry <bzg AT altern DOT org> |
| 7 | ;; Author: Daniel M German <dmg AT uvic DOT org> | 7 | ;; Author: Daniel M German <dmg AT uvic DOT org> |
| @@ -9,7 +9,7 @@ | |||
| 9 | ;; Author: Ross Patterson <me AT rpatterson DOT net> | 9 | ;; Author: Ross Patterson <me AT rpatterson DOT net> |
| 10 | ;; Maintainer: Sebastian Rose <sebastian_rose AT gmx DOT de> | 10 | ;; Maintainer: Sebastian Rose <sebastian_rose AT gmx DOT de> |
| 11 | ;; Keywords: org, emacsclient, wp | 11 | ;; Keywords: org, emacsclient, wp |
| 12 | ;; Version: 6.29c | 12 | ;; Version: 6.30c |
| 13 | 13 | ||
| 14 | ;; This file is part of GNU Emacs. | 14 | ;; This file is part of GNU Emacs. |
| 15 | ;; | 15 | ;; |
| @@ -393,6 +393,7 @@ function transforms it into a flat list." | |||
| 393 | 393 | ||
| 394 | ;;; Standard protocol handlers: | 394 | ;;; Standard protocol handlers: |
| 395 | 395 | ||
| 396 | ;;;###autoload | ||
| 396 | (defun org-protocol-store-link (fname) | 397 | (defun org-protocol-store-link (fname) |
| 397 | "Process an org-protocol://store-link:// style url | 398 | "Process an org-protocol://store-link:// style url |
| 398 | and store a browser URL as an org link. Also pushes the links URL to the | 399 | and store a browser URL as an org link. Also pushes the links URL to the |
| @@ -422,7 +423,7 @@ The sub-protocol used to reach this function is set in | |||
| 422 | uri)) | 423 | uri)) |
| 423 | nil) | 424 | nil) |
| 424 | 425 | ||
| 425 | 426 | ;;;###autoload | |
| 426 | (defun org-protocol-remember (info) | 427 | (defun org-protocol-remember (info) |
| 427 | "Process an org-protocol://remember:// style url. | 428 | "Process an org-protocol://remember:// style url. |
| 428 | 429 | ||
| @@ -470,7 +471,7 @@ Now template ?b will be used." | |||
| 470 | (message "Org-mode not loaded.")) | 471 | (message "Org-mode not loaded.")) |
| 471 | nil) | 472 | nil) |
| 472 | 473 | ||
| 473 | 474 | ;;;###autoload | |
| 474 | (defun org-protocol-open-source (fname) | 475 | (defun org-protocol-open-source (fname) |
| 475 | "Process an org-protocol://open-source:// style url. | 476 | "Process an org-protocol://open-source:// style url. |
| 476 | 477 | ||
| @@ -634,6 +635,4 @@ project-plist is the CDR of an element in `org-publish-project-alist', reuse | |||
| 634 | 635 | ||
| 635 | (provide 'org-protocol) | 636 | (provide 'org-protocol) |
| 636 | 637 | ||
| 637 | ;; arch-tag: b5c5c2ac-77cf-4a94-a649-2163dff95846 | ||
| 638 | |||
| 639 | ;;; org-protocol.el ends here | 638 | ;;; org-protocol.el ends here |
diff --git a/lisp/org/org-publish.el b/lisp/org/org-publish.el index e6b0218b178..bac86366916 100644 --- a/lisp/org/org-publish.el +++ b/lisp/org/org-publish.el | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | ;; Author: David O'Toole <dto@gnu.org> | 4 | ;; Author: David O'Toole <dto@gnu.org> |
| 5 | ;; Maintainer: Carsten Dominik <carsten DOT dominik AT gmail DOT com> | 5 | ;; Maintainer: Carsten Dominik <carsten DOT dominik AT gmail DOT com> |
| 6 | ;; Keywords: hypermedia, outlines, wp | 6 | ;; Keywords: hypermedia, outlines, wp |
| 7 | ;; Version: 6.29c | 7 | ;; Version: 6.30c |
| 8 | 8 | ||
| 9 | ;; This file is part of GNU Emacs. | 9 | ;; This file is part of GNU Emacs. |
| 10 | ;; | 10 | ;; |
| @@ -632,7 +632,7 @@ Default for INDEX-FILENAME is 'sitemap.org'." | |||
| 632 | "Publish PROJECT." | 632 | "Publish PROJECT." |
| 633 | (interactive | 633 | (interactive |
| 634 | (list | 634 | (list |
| 635 | (assoc (org-ido-completing-read | 635 | (assoc (org-icompleting-read |
| 636 | "Publish project: " | 636 | "Publish project: " |
| 637 | org-publish-project-alist nil t) | 637 | org-publish-project-alist nil t) |
| 638 | org-publish-project-alist) | 638 | org-publish-project-alist) |
diff --git a/lisp/org/org-remember.el b/lisp/org/org-remember.el index 4bc1bf67d84..d3f83993daa 100644 --- a/lisp/org/org-remember.el +++ b/lisp/org/org-remember.el | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | ;; Author: Carsten Dominik <carsten at orgmode dot org> | 6 | ;; Author: Carsten Dominik <carsten at orgmode dot org> |
| 7 | ;; Keywords: outlines, hypermedia, calendar, wp | 7 | ;; Keywords: outlines, hypermedia, calendar, wp |
| 8 | ;; Homepage: http://orgmode.org | 8 | ;; Homepage: http://orgmode.org |
| 9 | ;; Version: 6.29c | 9 | ;; Version: 6.30c |
| 10 | ;; | 10 | ;; |
| 11 | ;; This file is part of GNU Emacs. | 11 | ;; This file is part of GNU Emacs. |
| 12 | ;; | 12 | ;; |
| @@ -130,8 +130,8 @@ Furthermore, the following %-escapes will be replaced with content: | |||
| 130 | You may define a prompt like %^{Please specify birthday | 130 | You may define a prompt like %^{Please specify birthday |
| 131 | %n user name (taken from `user-full-name') | 131 | %n user name (taken from `user-full-name') |
| 132 | %a annotation, normally the link created with org-store-link | 132 | %a annotation, normally the link created with org-store-link |
| 133 | %i initial content, the region active. If %i is indented, | 133 | %i initial content, copied from the active region. If %i is |
| 134 | the entire inserted text will be indented as well. | 134 | indented, the entire inserted text will be indented as well. |
| 135 | %c current kill ring head | 135 | %c current kill ring head |
| 136 | %x content of the X clipboard | 136 | %x content of the X clipboard |
| 137 | %^C Interactive selection of which kill or clip to use | 137 | %^C Interactive selection of which kill or clip to use |
| @@ -256,6 +256,18 @@ is set." | |||
| 256 | :group 'org-remember | 256 | :group 'org-remember |
| 257 | :type 'boolean) | 257 | :type 'boolean) |
| 258 | 258 | ||
| 259 | (defcustom org-remember-warn-about-backups t | ||
| 260 | "Non-nil means warn about backup files in `org-remember-backup-directory'. | ||
| 261 | |||
| 262 | Set this to nil if you find that you don't need the warning. | ||
| 263 | |||
| 264 | If you cancel remember calls frequently and know when they | ||
| 265 | contain useful information (because you know that you made an | ||
| 266 | error or emacs crashed, for example) nil is more useful. In the | ||
| 267 | opposite case, the default, t, is more useful." | ||
| 268 | :group 'org-remember | ||
| 269 | :type 'boolean) | ||
| 270 | |||
| 259 | (defvar annotation) ; from remember.el, dynamically scoped in `remember-mode' | 271 | (defvar annotation) ; from remember.el, dynamically scoped in `remember-mode' |
| 260 | (defvar initial) ; from remember.el, dynamically scoped in `remember-mode' | 272 | (defvar initial) ; from remember.el, dynamically scoped in `remember-mode' |
| 261 | 273 | ||
| @@ -468,49 +480,53 @@ to be run from that hook to function properly." | |||
| 468 | 480 | ||
| 469 | ;; Simple %-escapes | 481 | ;; Simple %-escapes |
| 470 | (while (re-search-forward "%\\([tTuUaiAcxkKI]\\)" nil t) | 482 | (while (re-search-forward "%\\([tTuUaiAcxkKI]\\)" nil t) |
| 471 | (when (and initial (equal (match-string 0) "%i")) | 483 | (unless (org-remember-escaped-%) |
| 472 | (save-match-data | 484 | (when (and initial (equal (match-string 0) "%i")) |
| 473 | (let* ((lead (buffer-substring | 485 | (save-match-data |
| 474 | (point-at-bol) (match-beginning 0)))) | 486 | (let* ((lead (buffer-substring |
| 475 | (setq v-i (mapconcat 'identity | 487 | (point-at-bol) (match-beginning 0)))) |
| 476 | (org-split-string initial "\n") | 488 | (setq v-i (mapconcat 'identity |
| 477 | (concat "\n" lead)))))) | 489 | (org-split-string initial "\n") |
| 478 | (replace-match | 490 | (concat "\n" lead)))))) |
| 479 | (or (eval (intern (concat "v-" (match-string 1)))) "") | 491 | (replace-match |
| 480 | t t)) | 492 | (or (eval (intern (concat "v-" (match-string 1)))) "") |
| 493 | t t))) | ||
| 481 | 494 | ||
| 482 | ;; %[] Insert contents of a file. | 495 | ;; %[] Insert contents of a file. |
| 483 | (goto-char (point-min)) | 496 | (goto-char (point-min)) |
| 484 | (while (re-search-forward "%\\[\\(.+\\)\\]" nil t) | 497 | (while (re-search-forward "%\\[\\(.+\\)\\]" nil t) |
| 485 | (let ((start (match-beginning 0)) | 498 | (unless (org-remember-escaped-%) |
| 486 | (end (match-end 0)) | 499 | (let ((start (match-beginning 0)) |
| 487 | (filename (expand-file-name (match-string 1)))) | 500 | (end (match-end 0)) |
| 488 | (goto-char start) | 501 | (filename (expand-file-name (match-string 1)))) |
| 489 | (delete-region start end) | 502 | (goto-char start) |
| 490 | (condition-case error | 503 | (delete-region start end) |
| 491 | (insert-file-contents filename) | 504 | (condition-case error |
| 492 | (error (insert (format "%%![Couldn't insert %s: %s]" | 505 | (insert-file-contents filename) |
| 493 | filename error)))))) | 506 | (error (insert (format "%%![Couldn't insert %s: %s]" |
| 507 | filename error))))))) | ||
| 494 | ;; %() embedded elisp | 508 | ;; %() embedded elisp |
| 495 | (goto-char (point-min)) | 509 | (goto-char (point-min)) |
| 496 | (while (re-search-forward "%\\((.+)\\)" nil t) | 510 | (while (re-search-forward "%\\((.+)\\)" nil t) |
| 497 | (goto-char (match-beginning 0)) | 511 | (unless (org-remember-escaped-%) |
| 498 | (let ((template-start (point))) | 512 | (goto-char (match-beginning 0)) |
| 499 | (forward-char 1) | 513 | (let ((template-start (point))) |
| 500 | (let ((result | 514 | (forward-char 1) |
| 501 | (condition-case error | 515 | (let ((result |
| 502 | (eval (read (current-buffer))) | 516 | (condition-case error |
| 503 | (error (format "%%![Error: %s]" error))))) | 517 | (eval (read (current-buffer))) |
| 504 | (delete-region template-start (point)) | 518 | (error (format "%%![Error: %s]" error))))) |
| 505 | (insert result)))) | 519 | (delete-region template-start (point)) |
| 520 | (insert result))))) | ||
| 506 | 521 | ||
| 507 | ;; From the property list | 522 | ;; From the property list |
| 508 | (when plist-p | 523 | (when plist-p |
| 509 | (goto-char (point-min)) | 524 | (goto-char (point-min)) |
| 510 | (while (re-search-forward "%\\(:[-a-zA-Z]+\\)" nil t) | 525 | (while (re-search-forward "%\\(:[-a-zA-Z]+\\)" nil t) |
| 526 | (unless (org-remember-escaped-%) | ||
| 511 | (and (setq x (or (plist-get org-store-link-plist | 527 | (and (setq x (or (plist-get org-store-link-plist |
| 512 | (intern (match-string 1))) "")) | 528 | (intern (match-string 1))) "")) |
| 513 | (replace-match x t t)))) | 529 | (replace-match x t t))))) |
| 514 | 530 | ||
| 515 | ;; Turn on org-mode in the remember buffer, set local variables | 531 | ;; Turn on org-mode in the remember buffer, set local variables |
| 516 | (let ((org-inhibit-startup t)) (org-mode) (org-remember-mode 1)) | 532 | (let ((org-inhibit-startup t)) (org-mode) (org-remember-mode 1)) |
| @@ -521,87 +537,89 @@ to be run from that hook to function properly." | |||
| 521 | ;; Interactive template entries | 537 | ;; Interactive template entries |
| 522 | (goto-char (point-min)) | 538 | (goto-char (point-min)) |
| 523 | (while (re-search-forward "%^\\({\\([^}]*\\)}\\)?\\([gGtTuUCLp]\\)?" nil t) | 539 | (while (re-search-forward "%^\\({\\([^}]*\\)}\\)?\\([gGtTuUCLp]\\)?" nil t) |
| 524 | (setq char (if (match-end 3) (match-string 3)) | 540 | (unless (org-remember-escaped-%) |
| 525 | prompt (if (match-end 2) (match-string 2))) | 541 | (setq char (if (match-end 3) (match-string 3)) |
| 526 | (goto-char (match-beginning 0)) | 542 | prompt (if (match-end 2) (match-string 2))) |
| 527 | (replace-match "") | 543 | (goto-char (match-beginning 0)) |
| 528 | (setq completions nil default nil) | 544 | (replace-match "") |
| 529 | (when prompt | 545 | (setq completions nil default nil) |
| 530 | (setq completions (org-split-string prompt "|") | 546 | (when prompt |
| 531 | prompt (pop completions) | 547 | (setq completions (org-split-string prompt "|") |
| 532 | default (car completions) | 548 | prompt (pop completions) |
| 533 | histvar (intern (concat | 549 | default (car completions) |
| 534 | "org-remember-template-prompt-history::" | 550 | histvar (intern (concat |
| 535 | (or prompt ""))) | 551 | "org-remember-template-prompt-history::" |
| 536 | completions (mapcar 'list completions))) | 552 | (or prompt ""))) |
| 537 | (cond | 553 | completions (mapcar 'list completions))) |
| 538 | ((member char '("G" "g")) | 554 | (cond |
| 539 | (let* ((org-last-tags-completion-table | 555 | ((member char '("G" "g")) |
| 540 | (org-global-tags-completion-table | 556 | (let* ((org-last-tags-completion-table |
| 541 | (if (equal char "G") (org-agenda-files) (and file (list file))))) | 557 | (org-global-tags-completion-table |
| 542 | (org-add-colon-after-tag-completion t) | 558 | (if (equal char "G") (org-agenda-files) (and file (list file))))) |
| 543 | (ins (org-ido-completing-read | 559 | (org-add-colon-after-tag-completion t) |
| 544 | (if prompt (concat prompt ": ") "Tags: ") | 560 | (ins (org-icompleting-read |
| 545 | 'org-tags-completion-function nil nil nil | 561 | (if prompt (concat prompt ": ") "Tags: ") |
| 546 | 'org-tags-history))) | 562 | 'org-tags-completion-function nil nil nil |
| 547 | (setq ins (mapconcat 'identity | 563 | 'org-tags-history))) |
| 548 | (org-split-string ins (org-re "[^[:alnum:]_@]+")) | 564 | (setq ins (mapconcat 'identity |
| 549 | ":")) | 565 | (org-split-string ins (org-re "[^[:alnum:]_@]+")) |
| 550 | (when (string-match "\\S-" ins) | 566 | ":")) |
| 551 | (or (equal (char-before) ?:) (insert ":")) | 567 | (when (string-match "\\S-" ins) |
| 552 | (insert ins) | 568 | (or (equal (char-before) ?:) (insert ":")) |
| 553 | (or (equal (char-after) ?:) (insert ":"))))) | 569 | (insert ins) |
| 554 | ((equal char "C") | 570 | (or (equal (char-after) ?:) (insert ":"))))) |
| 555 | (cond ((= (length clipboards) 1) (insert (car clipboards))) | 571 | ((equal char "C") |
| 556 | ((> (length clipboards) 1) | 572 | (cond ((= (length clipboards) 1) (insert (car clipboards))) |
| 557 | (insert (read-string "Clipboard/kill value: " | 573 | ((> (length clipboards) 1) |
| 558 | (car clipboards) '(clipboards . 1) | 574 | (insert (read-string "Clipboard/kill value: " |
| 559 | (car clipboards)))))) | 575 | (car clipboards) '(clipboards . 1) |
| 560 | ((equal char "L") | 576 | (car clipboards)))))) |
| 561 | (cond ((= (length clipboards) 1) | 577 | ((equal char "L") |
| 562 | (org-insert-link 0 (car clipboards))) | 578 | (cond ((= (length clipboards) 1) |
| 563 | ((> (length clipboards) 1) | 579 | (org-insert-link 0 (car clipboards))) |
| 564 | (org-insert-link 0 (read-string "Clipboard/kill value: " | 580 | ((> (length clipboards) 1) |
| 565 | (car clipboards) | 581 | (org-insert-link 0 (read-string "Clipboard/kill value: " |
| 566 | '(clipboards . 1) | 582 | (car clipboards) |
| 567 | (car clipboards)))))) | 583 | '(clipboards . 1) |
| 568 | ((equal char "p") | 584 | (car clipboards)))))) |
| 569 | (let* | 585 | ((equal char "p") |
| 570 | ((prop (org-substring-no-properties prompt)) | 586 | (let* |
| 571 | (pall (concat prop "_ALL")) | 587 | ((prop (org-substring-no-properties prompt)) |
| 572 | (allowed | 588 | (pall (concat prop "_ALL")) |
| 573 | (with-current-buffer | 589 | (allowed |
| 574 | (get-buffer (file-name-nondirectory file)) | 590 | (with-current-buffer |
| 575 | (or (cdr (assoc pall org-file-properties)) | 591 | (get-buffer (file-name-nondirectory file)) |
| 576 | (cdr (assoc pall org-global-properties)) | 592 | (or (cdr (assoc pall org-file-properties)) |
| 577 | (cdr (assoc pall org-global-properties-fixed))))) | 593 | (cdr (assoc pall org-global-properties)) |
| 578 | (existing (with-current-buffer | 594 | (cdr (assoc pall org-global-properties-fixed))))) |
| 579 | (get-buffer (file-name-nondirectory file)) | 595 | (existing (with-current-buffer |
| 580 | (mapcar 'list (org-property-values prop)))) | 596 | (get-buffer (file-name-nondirectory file)) |
| 581 | (propprompt (concat "Value for " prop ": ")) | 597 | (mapcar 'list (org-property-values prop)))) |
| 582 | (val (if allowed | 598 | (propprompt (concat "Value for " prop ": ")) |
| 583 | (org-completing-read | 599 | (val (if allowed |
| 584 | propprompt | 600 | (org-completing-read |
| 585 | (mapcar 'list (org-split-string allowed "[ \t]+")) | 601 | propprompt |
| 586 | nil 'req-match) | 602 | (mapcar 'list (org-split-string allowed "[ \t]+")) |
| 587 | (org-completing-read-no-ido propprompt existing nil nil | 603 | nil 'req-match) |
| 588 | "" nil "")))) | 604 | (org-completing-read-no-i propprompt existing nil nil |
| 589 | (org-set-property prop val))) | 605 | "" nil "")))) |
| 590 | (char | 606 | (org-set-property prop val))) |
| 591 | ;; These are the date/time related ones | 607 | (char |
| 592 | (setq org-time-was-given (equal (upcase char) char)) | 608 | ;; These are the date/time related ones |
| 593 | (setq time (org-read-date (equal (upcase char) "U") t nil | 609 | (setq org-time-was-given (equal (upcase char) char)) |
| 594 | prompt)) | 610 | (setq time (org-read-date (equal (upcase char) "U") t nil |
| 595 | (org-insert-time-stamp time org-time-was-given | 611 | prompt)) |
| 596 | (member char '("u" "U")) | 612 | (org-insert-time-stamp time org-time-was-given |
| 597 | nil nil (list org-end-time-was-given))) | 613 | (member char '("u" "U")) |
| 598 | (t | 614 | nil nil (list org-end-time-was-given))) |
| 599 | (let (org-completion-use-ido) | 615 | (t |
| 600 | (insert (org-completing-read-no-ido | 616 | (let (org-completion-use-ido) |
| 601 | (concat (if prompt prompt "Enter string") | 617 | (insert (org-completing-read-no-i |
| 602 | (if default (concat " [" default "]")) | 618 | (concat (if prompt prompt "Enter string") |
| 603 | ": ") | 619 | (if default (concat " [" default "]")) |
| 604 | completions nil nil nil histvar default)))))) | 620 | ": ") |
| 621 | completions nil nil nil histvar default))))))) | ||
| 622 | |||
| 605 | (goto-char (point-min)) | 623 | (goto-char (point-min)) |
| 606 | (if (re-search-forward "%\\?" nil t) | 624 | (if (re-search-forward "%\\?" nil t) |
| 607 | (replace-match "") | 625 | (replace-match "") |
| @@ -629,6 +647,14 @@ to be run from that hook to function properly." | |||
| 629 | (replace-match "") | 647 | (replace-match "") |
| 630 | (add-hook 'post-command-hook 'org-remember-finish-immediately 'append))) | 648 | (add-hook 'post-command-hook 'org-remember-finish-immediately 'append))) |
| 631 | 649 | ||
| 650 | (defun org-remember-escaped-% () | ||
| 651 | (if (equal (char-before (match-beginning 0)) ?\\) | ||
| 652 | (progn | ||
| 653 | (delete-region (1- (match-beginning 0)) (match-beginning 0)) | ||
| 654 | t) | ||
| 655 | nil)) | ||
| 656 | |||
| 657 | |||
| 632 | (defun org-remember-finish-immediately () | 658 | (defun org-remember-finish-immediately () |
| 633 | "File remember note immediately. | 659 | "File remember note immediately. |
| 634 | This should be run in `post-command-hook' and will remove itself | 660 | This should be run in `post-command-hook' and will remove itself |
| @@ -1050,7 +1076,8 @@ See also the variable `org-reverse-note-order'." | |||
| 1050 | (directory-files | 1076 | (directory-files |
| 1051 | org-remember-backup-directory nil | 1077 | org-remember-backup-directory nil |
| 1052 | "^remember-.*[0-9]$")))) | 1078 | "^remember-.*[0-9]$")))) |
| 1053 | (when (> n 0) | 1079 | (when (and org-remember-warn-about-backups |
| 1080 | (> n 0)) | ||
| 1054 | (message | 1081 | (message |
| 1055 | "%d backup files (unfinished remember calls) in %s" | 1082 | "%d backup files (unfinished remember calls) in %s" |
| 1056 | n org-remember-backup-directory)))))))))) | 1083 | n org-remember-backup-directory)))))))))) |
diff --git a/lisp/org/org-src.el b/lisp/org/org-src.el index 4be14e859d0..b7536b21152 100644 --- a/lisp/org/org-src.el +++ b/lisp/org/org-src.el | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | ;; Bastien Guerry <bzg AT altern DOT org> | 7 | ;; Bastien Guerry <bzg AT altern DOT org> |
| 8 | ;; Keywords: outlines, hypermedia, calendar, wp | 8 | ;; Keywords: outlines, hypermedia, calendar, wp |
| 9 | ;; Homepage: http://orgmode.org | 9 | ;; Homepage: http://orgmode.org |
| 10 | ;; Version: 6.29c | 10 | ;; Version: 6.30c |
| 11 | ;; | 11 | ;; |
| 12 | ;; This file is part of GNU Emacs. | 12 | ;; This file is part of GNU Emacs. |
| 13 | ;; | 13 | ;; |
| @@ -109,11 +109,25 @@ You may want to use this hook for example to turn off `outline-minor-mode' | |||
| 109 | or similar things which you want to have when editing a source code file, | 109 | or similar things which you want to have when editing a source code file, |
| 110 | but which mess up the display of a snippet in Org exported files.") | 110 | but which mess up the display of a snippet in Org exported files.") |
| 111 | 111 | ||
| 112 | (defcustom org-src-lang-modes | ||
| 113 | '(("ocaml" . tuareg) ("elisp" . emacs-lisp) ("ditaa" . artist)) | ||
| 114 | "Alist mapping languages to their major mode. | ||
| 115 | The key is the language name, the value is the string that should | ||
| 116 | be inserted as the name of the major mode. For many languages this is | ||
| 117 | simple, but for language where this is not the case, this variable | ||
| 118 | provides a way to simplify things on the user side. | ||
| 119 | For example, there is no ocaml-mode in Emacs, but the mode to use is | ||
| 120 | `tuareg-mode'." | ||
| 121 | :group 'org-edit-structure | ||
| 122 | :type '(repeat | ||
| 123 | (cons | ||
| 124 | (string "Language name") | ||
| 125 | (symbol "Major mode")))) | ||
| 126 | |||
| 112 | ;;; Editing source examples | 127 | ;;; Editing source examples |
| 113 | 128 | ||
| 114 | (defvar org-src-mode-map (make-sparse-keymap)) | 129 | (defvar org-src-mode-map (make-sparse-keymap)) |
| 115 | (define-key org-src-mode-map "\C-c'" 'org-edit-src-exit) | 130 | (define-key org-src-mode-map "\C-c'" 'org-edit-src-exit) |
| 116 | (define-key org-src-mode-map "\C-x\C-s" 'org-edit-src-save) | ||
| 117 | (defvar org-edit-src-force-single-line nil) | 131 | (defvar org-edit-src-force-single-line nil) |
| 118 | (defvar org-edit-src-from-org-mode nil) | 132 | (defvar org-edit-src-from-org-mode nil) |
| 119 | (defvar org-edit-src-picture nil) | 133 | (defvar org-edit-src-picture nil) |
| @@ -151,7 +165,9 @@ the edited version." | |||
| 151 | (setq beg (move-marker beg (nth 0 info)) | 165 | (setq beg (move-marker beg (nth 0 info)) |
| 152 | end (move-marker end (nth 1 info)) | 166 | end (move-marker end (nth 1 info)) |
| 153 | code (buffer-substring-no-properties beg end) | 167 | code (buffer-substring-no-properties beg end) |
| 154 | lang (nth 2 info) | 168 | lang (or (cdr (assoc (nth 2 info) org-src-lang-modes)) |
| 169 | (nth 2 info)) | ||
| 170 | lang (if (symbolp lang) (symbol-name lang) lang) | ||
| 155 | single (nth 3 info) | 171 | single (nth 3 info) |
| 156 | lfmt (nth 4 info) | 172 | lfmt (nth 4 info) |
| 157 | nindent (nth 5 info) | 173 | nindent (nth 5 info) |
| @@ -159,7 +175,7 @@ the edited version." | |||
| 159 | begline (save-excursion (goto-char beg) (org-current-line))) | 175 | begline (save-excursion (goto-char beg) (org-current-line))) |
| 160 | (unless (functionp lang-f) | 176 | (unless (functionp lang-f) |
| 161 | (error "No such language mode: %s" lang-f)) | 177 | (error "No such language mode: %s" lang-f)) |
| 162 | (goto-line line) | 178 | (org-goto-line line) |
| 163 | (if (and (setq buffer (org-edit-src-find-buffer beg end)) | 179 | (if (and (setq buffer (org-edit-src-find-buffer beg end)) |
| 164 | (y-or-n-p "Return to existing edit buffer? [n] will revert changes: ")) | 180 | (y-or-n-p "Return to existing edit buffer? [n] will revert changes: ")) |
| 165 | (switch-to-buffer buffer) | 181 | (switch-to-buffer buffer) |
| @@ -168,7 +184,8 @@ the edited version." | |||
| 168 | (if (boundp 'org-edit-src-overlay) | 184 | (if (boundp 'org-edit-src-overlay) |
| 169 | (org-delete-overlay org-edit-src-overlay))) | 185 | (org-delete-overlay org-edit-src-overlay))) |
| 170 | (kill-buffer buffer)) | 186 | (kill-buffer buffer)) |
| 171 | (setq buffer (generate-new-buffer "*Org Edit Src Example*")) | 187 | (setq buffer (generate-new-buffer |
| 188 | (concat "*Org Src " (file-name-nondirectory buffer-file-name) "[" lang "]*"))) | ||
| 172 | (setq ovl (org-make-overlay beg end)) | 189 | (setq ovl (org-make-overlay beg end)) |
| 173 | (org-overlay-put ovl 'face 'secondary-selection) | 190 | (org-overlay-put ovl 'face 'secondary-selection) |
| 174 | (org-overlay-put ovl 'edit-buffer buffer) | 191 | (org-overlay-put ovl 'edit-buffer buffer) |
| @@ -186,8 +203,7 @@ the edited version." | |||
| 186 | '(display nil invisible nil intangible nil)) | 203 | '(display nil invisible nil intangible nil)) |
| 187 | (org-do-remove-indentation) | 204 | (org-do-remove-indentation) |
| 188 | (let ((org-inhibit-startup t)) | 205 | (let ((org-inhibit-startup t)) |
| 189 | (funcall lang-f) | 206 | (funcall lang-f)) |
| 190 | (org-src-mode)) | ||
| 191 | (set (make-local-variable 'org-edit-src-force-single-line) single) | 207 | (set (make-local-variable 'org-edit-src-force-single-line) single) |
| 192 | (set (make-local-variable 'org-edit-src-from-org-mode) org-mode-p) | 208 | (set (make-local-variable 'org-edit-src-from-org-mode) org-mode-p) |
| 193 | (when lfmt | 209 | (when lfmt |
| @@ -196,11 +212,13 @@ the edited version." | |||
| 196 | (goto-char (point-min)) | 212 | (goto-char (point-min)) |
| 197 | (while (re-search-forward "^," nil t) | 213 | (while (re-search-forward "^," nil t) |
| 198 | (replace-match ""))) | 214 | (replace-match ""))) |
| 199 | (goto-line (1+ (- line begline))) | 215 | (org-goto-line (1+ (- line begline))) |
| 200 | (org-set-local 'org-edit-src-beg-marker beg) | 216 | (org-set-local 'org-edit-src-beg-marker beg) |
| 201 | (org-set-local 'org-edit-src-end-marker end) | 217 | (org-set-local 'org-edit-src-end-marker end) |
| 202 | (org-set-local 'org-edit-src-overlay ovl) | 218 | (org-set-local 'org-edit-src-overlay ovl) |
| 203 | (org-set-local 'org-edit-src-nindent nindent) | 219 | (org-set-local 'org-edit-src-nindent nindent) |
| 220 | (org-src-mode) | ||
| 221 | (set-buffer-modified-p nil) | ||
| 204 | (and org-edit-src-persistent-message | 222 | (and org-edit-src-persistent-message |
| 205 | (org-set-local 'header-line-format msg))) | 223 | (org-set-local 'header-line-format msg))) |
| 206 | (message "%s" msg) | 224 | (message "%s" msg) |
| @@ -258,7 +276,7 @@ the fragment in the Org-mode buffer." | |||
| 258 | (if (re-search-forward "^[ \t]*[^: \t]" nil 'move) | 276 | (if (re-search-forward "^[ \t]*[^: \t]" nil 'move) |
| 259 | (setq end1 (1- (match-beginning 0))) | 277 | (setq end1 (1- (match-beginning 0))) |
| 260 | (setq end1 (point)))) | 278 | (setq end1 (point)))) |
| 261 | (goto-line line)) | 279 | (org-goto-line line)) |
| 262 | (setq beg (move-marker beg beg1) | 280 | (setq beg (move-marker beg beg1) |
| 263 | end (move-marker end end1) | 281 | end (move-marker end end1) |
| 264 | code (buffer-substring-no-properties beg end) | 282 | code (buffer-substring-no-properties beg end) |
| @@ -299,12 +317,13 @@ the fragment in the Org-mode buffer." | |||
| 299 | (goto-char (point-min)) | 317 | (goto-char (point-min)) |
| 300 | (while (re-search-forward "^[ \t]*: ?" nil t) | 318 | (while (re-search-forward "^[ \t]*: ?" nil t) |
| 301 | (replace-match "")) | 319 | (replace-match "")) |
| 302 | (goto-line (1+ (- line begline))) | 320 | (org-goto-line (1+ (- line begline))) |
| 303 | (org-src-mode) | ||
| 304 | (org-set-local 'org-edit-src-beg-marker beg) | 321 | (org-set-local 'org-edit-src-beg-marker beg) |
| 305 | (org-set-local 'org-edit-src-end-marker end) | 322 | (org-set-local 'org-edit-src-end-marker end) |
| 306 | (org-set-local 'org-edit-src-overlay ovl) | 323 | (org-set-local 'org-edit-src-overlay ovl) |
| 307 | (org-set-local 'org-edit-src-nindent nindent) | 324 | (org-set-local 'org-edit-src-nindent nindent) |
| 325 | (org-src-mode) | ||
| 326 | (set-buffer-modified-p nil) | ||
| 308 | (and org-edit-src-persistent-message | 327 | (and org-edit-src-persistent-message |
| 309 | (org-set-local 'header-line-format msg))) | 328 | (org-set-local 'header-line-format msg))) |
| 310 | (message "%s" msg) | 329 | (message "%s" msg) |
| @@ -400,8 +419,8 @@ the language, a switch telling of the content should be in a single line." | |||
| 400 | (defun org-edit-src-exit () | 419 | (defun org-edit-src-exit () |
| 401 | "Exit special edit and protect problematic lines." | 420 | "Exit special edit and protect problematic lines." |
| 402 | (interactive) | 421 | (interactive) |
| 403 | (unless (string-match "\\`*Org Edit " (buffer-name (current-buffer))) | 422 | (unless org-edit-src-from-org-mode |
| 404 | (error "This is not an sub-editing buffer, something is wrong...")) | 423 | (error "This is not a sub-editing buffer, something is wrong...")) |
| 405 | (let ((beg org-edit-src-beg-marker) | 424 | (let ((beg org-edit-src-beg-marker) |
| 406 | (end org-edit-src-end-marker) | 425 | (end org-edit-src-end-marker) |
| 407 | (ovl org-edit-src-overlay) | 426 | (ovl org-edit-src-overlay) |
| @@ -441,14 +460,14 @@ the language, a switch telling of the content should be in a single line." | |||
| 441 | (while (re-search-forward "^" nil t) | 460 | (while (re-search-forward "^" nil t) |
| 442 | (replace-match nindent))) | 461 | (replace-match nindent))) |
| 443 | (setq code (buffer-string)) | 462 | (setq code (buffer-string)) |
| 463 | (set-buffer-modified-p nil) | ||
| 444 | (switch-to-buffer (marker-buffer beg)) | 464 | (switch-to-buffer (marker-buffer beg)) |
| 445 | (kill-buffer buffer) | 465 | (kill-buffer buffer) |
| 446 | (goto-char beg) | 466 | (goto-char beg) |
| 447 | (org-delete-overlay ovl) | ||
| 448 | (delete-region beg end) | 467 | (delete-region beg end) |
| 449 | (insert code) | 468 | (insert code) |
| 450 | (goto-char beg) | 469 | (goto-char beg) |
| 451 | (goto-line (1- (+ (org-current-line) line))) | 470 | (org-goto-line (1- (+ (org-current-line) line))) |
| 452 | (move-marker beg nil) | 471 | (move-marker beg nil) |
| 453 | (move-marker end nil))) | 472 | (move-marker end nil))) |
| 454 | 473 | ||
| @@ -464,6 +483,19 @@ the language, a switch telling of the content should be in a single line." | |||
| 464 | (goto-char (min p (point-max))) | 483 | (goto-char (min p (point-max))) |
| 465 | (message (or msg "")))) | 484 | (message (or msg "")))) |
| 466 | 485 | ||
| 486 | (defun org-src-mode-configure-edit-buffer () | ||
| 487 | (when org-edit-src-from-org-mode | ||
| 488 | (setq buffer-offer-save t) | ||
| 489 | (setq buffer-file-name | ||
| 490 | (concat (buffer-file-name (marker-buffer org-edit-src-beg-marker)) | ||
| 491 | "[" (buffer-name) "]")) | ||
| 492 | (set (if (featurep 'xemacs) 'write-contents-hooks 'write-contents-functions) | ||
| 493 | '(org-edit-src-save)) | ||
| 494 | (org-add-hook 'kill-buffer-hook | ||
| 495 | '(lambda () (org-delete-overlay org-edit-src-overlay)) nil 'local))) | ||
| 496 | |||
| 497 | (org-add-hook 'org-src-mode-hook 'org-src-mode-configure-edit-buffer) | ||
| 498 | |||
| 467 | (provide 'org-src) | 499 | (provide 'org-src) |
| 468 | 500 | ||
| 469 | ;; arch-tag: 6a1fc84f-dec7-47be-a416-64be56bea5d8 | 501 | ;; arch-tag: 6a1fc84f-dec7-47be-a416-64be56bea5d8 |
diff --git a/lisp/org/org-table.el b/lisp/org/org-table.el index f09d51917c0..cbee75c1f1e 100644 --- a/lisp/org/org-table.el +++ b/lisp/org/org-table.el | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | ;; Author: Carsten Dominik <carsten at orgmode dot org> | 6 | ;; Author: Carsten Dominik <carsten at orgmode dot org> |
| 7 | ;; Keywords: outlines, hypermedia, calendar, wp | 7 | ;; Keywords: outlines, hypermedia, calendar, wp |
| 8 | ;; Homepage: http://orgmode.org | 8 | ;; Homepage: http://orgmode.org |
| 9 | ;; Version: 6.29c | 9 | ;; Version: 6.30c |
| 10 | ;; | 10 | ;; |
| 11 | ;; This file is part of GNU Emacs. | 11 | ;; This file is part of GNU Emacs. |
| 12 | ;; | 12 | ;; |
| @@ -719,9 +719,6 @@ When nil, simply write \"#ERROR\" in corrupted fields.") | |||
| 719 | (append (pop fields) emptystrings)) | 719 | (append (pop fields) emptystrings)) |
| 720 | hfmt)) | 720 | hfmt)) |
| 721 | lines "")) | 721 | lines "")) |
| 722 | ;; Replace the old one | ||
| 723 | (delete-region beg end) | ||
| 724 | (move-marker end nil) | ||
| 725 | (if (equal (char-before) ?\n) | 722 | (if (equal (char-before) ?\n) |
| 726 | ;; This hack is for org-indent, to force redisplay of the | 723 | ;; This hack is for org-indent, to force redisplay of the |
| 727 | ;; line prefix of the first line. Apparently the redisplay | 724 | ;; line prefix of the first line. Apparently the redisplay |
| @@ -734,14 +731,17 @@ When nil, simply write \"#ERROR\" in corrupted fields.") | |||
| 734 | (insert "\n"))) | 731 | (insert "\n"))) |
| 735 | (move-marker org-table-aligned-begin-marker (point)) | 732 | (move-marker org-table-aligned-begin-marker (point)) |
| 736 | (insert new) | 733 | (insert new) |
| 734 | ;; Replace the old one | ||
| 735 | (delete-region (point) end) | ||
| 736 | (move-marker end nil) | ||
| 737 | (move-marker org-table-aligned-end-marker (point)) | 737 | (move-marker org-table-aligned-end-marker (point)) |
| 738 | (when (and orgtbl-mode (not (org-mode-p))) | 738 | (when (and orgtbl-mode (not (org-mode-p))) |
| 739 | (goto-char org-table-aligned-begin-marker) | 739 | (goto-char org-table-aligned-begin-marker) |
| 740 | (while (org-hide-wide-columns org-table-aligned-end-marker))) | 740 | (while (org-hide-wide-columns org-table-aligned-end-marker))) |
| 741 | ;; Try to move to the old location | 741 | ;; Try to move to the old location |
| 742 | (goto-line winstartline) | 742 | (org-goto-line winstartline) |
| 743 | (setq winstart (point-at-bol)) | 743 | (setq winstart (point-at-bol)) |
| 744 | (goto-line linepos) | 744 | (org-goto-line linepos) |
| 745 | (set-window-start (selected-window) winstart 'noforce) | 745 | (set-window-start (selected-window) winstart 'noforce) |
| 746 | (org-table-goto-column colpos) | 746 | (org-table-goto-column colpos) |
| 747 | (and org-table-overlay-coordinates (org-table-overlay-coordinates)) | 747 | (and org-table-overlay-coordinates (org-table-overlay-coordinates)) |
| @@ -1127,7 +1127,7 @@ However, when FORCE is non-nil, create new columns if necessary." | |||
| 1127 | (insert "| ")) | 1127 | (insert "| ")) |
| 1128 | (beginning-of-line 2)) | 1128 | (beginning-of-line 2)) |
| 1129 | (move-marker end nil) | 1129 | (move-marker end nil) |
| 1130 | (goto-line linepos) | 1130 | (org-goto-line linepos) |
| 1131 | (org-table-goto-column colpos) | 1131 | (org-table-goto-column colpos) |
| 1132 | (org-table-align) | 1132 | (org-table-align) |
| 1133 | (org-table-fix-formulas "$" nil (1- col) 1) | 1133 | (org-table-fix-formulas "$" nil (1- col) 1) |
| @@ -1174,7 +1174,7 @@ However, when FORCE is non-nil, create new columns if necessary." | |||
| 1174 | (replace-match "|"))) | 1174 | (replace-match "|"))) |
| 1175 | (beginning-of-line 2)) | 1175 | (beginning-of-line 2)) |
| 1176 | (move-marker end nil) | 1176 | (move-marker end nil) |
| 1177 | (goto-line linepos) | 1177 | (org-goto-line linepos) |
| 1178 | (org-table-goto-column colpos) | 1178 | (org-table-goto-column colpos) |
| 1179 | (org-table-align) | 1179 | (org-table-align) |
| 1180 | (org-table-fix-formulas "$" (list (cons (number-to-string col) "INVALID")) | 1180 | (org-table-fix-formulas "$" (list (cons (number-to-string col) "INVALID")) |
| @@ -1218,7 +1218,7 @@ However, when FORCE is non-nil, create new columns if necessary." | |||
| 1218 | (replace-match "|\\2|\\1|"))) | 1218 | (replace-match "|\\2|\\1|"))) |
| 1219 | (beginning-of-line 2)) | 1219 | (beginning-of-line 2)) |
| 1220 | (move-marker end nil) | 1220 | (move-marker end nil) |
| 1221 | (goto-line linepos) | 1221 | (org-goto-line linepos) |
| 1222 | (org-table-goto-column colpos) | 1222 | (org-table-goto-column colpos) |
| 1223 | (org-table-align) | 1223 | (org-table-align) |
| 1224 | (org-table-fix-formulas | 1224 | (org-table-fix-formulas |
| @@ -1424,7 +1424,7 @@ should be done in reverse order." | |||
| 1424 | (move-marker beg nil) | 1424 | (move-marker beg nil) |
| 1425 | (move-marker end nil) | 1425 | (move-marker end nil) |
| 1426 | (insert (mapconcat 'cdr lns "\n") "\n") | 1426 | (insert (mapconcat 'cdr lns "\n") "\n") |
| 1427 | (goto-line thisline) | 1427 | (org-goto-line thisline) |
| 1428 | (org-table-goto-column thiscol) | 1428 | (org-table-goto-column thiscol) |
| 1429 | (message "%d lines sorted, based on column %d" (length lns) column))) | 1429 | (message "%d lines sorted, based on column %d" (length lns) column))) |
| 1430 | 1430 | ||
| @@ -1462,7 +1462,7 @@ with `org-table-paste-rectangle'." | |||
| 1462 | (while t | 1462 | (while t |
| 1463 | (catch 'nextline | 1463 | (catch 'nextline |
| 1464 | (if (> l1 l2) (throw 'exit t)) | 1464 | (if (> l1 l2) (throw 'exit t)) |
| 1465 | (goto-line l1) | 1465 | (org-goto-line l1) |
| 1466 | (if (org-at-table-hline-p) (throw 'nextline (setq l1 (1+ l1)))) | 1466 | (if (org-at-table-hline-p) (throw 'nextline (setq l1 (1+ l1)))) |
| 1467 | (setq cols nil ic1 c1 ic2 c2) | 1467 | (setq cols nil ic1 c1 ic2 c2) |
| 1468 | (while (< ic1 (1+ ic2)) | 1468 | (while (< ic1 (1+ ic2)) |
| @@ -1500,7 +1500,7 @@ lines." | |||
| 1500 | (org-table-get-field nil field) | 1500 | (org-table-get-field nil field) |
| 1501 | (setq c (1+ c))) | 1501 | (setq c (1+ c))) |
| 1502 | (beginning-of-line 2)) | 1502 | (beginning-of-line 2)) |
| 1503 | (goto-line line) | 1503 | (org-goto-line line) |
| 1504 | (org-table-goto-column col) | 1504 | (org-table-goto-column col) |
| 1505 | (org-table-align))) | 1505 | (org-table-align))) |
| 1506 | 1506 | ||
| @@ -1590,7 +1590,7 @@ blank, and the content is appended to the field above." | |||
| 1590 | (setq org-table-clip | 1590 | (setq org-table-clip |
| 1591 | (mapcar 'list (org-wrap (mapconcat 'car org-table-clip " ") | 1591 | (mapcar 'list (org-wrap (mapconcat 'car org-table-clip " ") |
| 1592 | nil nlines))) | 1592 | nil nlines))) |
| 1593 | (goto-line cline) | 1593 | (org-goto-line cline) |
| 1594 | (org-table-goto-column ccol) | 1594 | (org-table-goto-column ccol) |
| 1595 | (org-table-paste-rectangle)) | 1595 | (org-table-paste-rectangle)) |
| 1596 | ;; No region, split the current field at point | 1596 | ;; No region, split the current field at point |
| @@ -1994,7 +1994,7 @@ For all numbers larger than LIMIT, shift them by DELTA." | |||
| 1994 | last-dline (car dlines) | 1994 | last-dline (car dlines) |
| 1995 | org-table-dlines (apply 'vector (cons nil (nreverse dlines))) | 1995 | org-table-dlines (apply 'vector (cons nil (nreverse dlines))) |
| 1996 | org-table-hlines (apply 'vector (cons nil (nreverse hlines)))) | 1996 | org-table-hlines (apply 'vector (cons nil (nreverse hlines)))) |
| 1997 | (goto-line last-dline) | 1997 | (org-goto-line last-dline) |
| 1998 | (let* ((l last-dline) | 1998 | (let* ((l last-dline) |
| 1999 | (fields (org-split-string | 1999 | (fields (org-split-string |
| 2000 | (buffer-substring (point-at-bol) (point-at-eol)) | 2000 | (buffer-substring (point-at-bol) (point-at-eol)) |
| @@ -2070,7 +2070,7 @@ of the new mark." | |||
| 2070 | (if (and newchar (not forcenew)) | 2070 | (if (and newchar (not forcenew)) |
| 2071 | (error "Invalid NEWCHAR `%s' in `org-table-rotate-recalc-marks'" | 2071 | (error "Invalid NEWCHAR `%s' in `org-table-rotate-recalc-marks'" |
| 2072 | newchar)) | 2072 | newchar)) |
| 2073 | (if l1 (goto-line l1)) | 2073 | (if l1 (org-goto-line l1)) |
| 2074 | (save-excursion | 2074 | (save-excursion |
| 2075 | (beginning-of-line 1) | 2075 | (beginning-of-line 1) |
| 2076 | (unless (looking-at org-table-dataline-regexp) | 2076 | (unless (looking-at org-table-dataline-regexp) |
| @@ -2091,13 +2091,13 @@ of the new mark." | |||
| 2091 | " # "))) | 2091 | " # "))) |
| 2092 | (if (and l1 l2) | 2092 | (if (and l1 l2) |
| 2093 | (progn | 2093 | (progn |
| 2094 | (goto-line l1) | 2094 | (org-goto-line l1) |
| 2095 | (while (progn (beginning-of-line 2) (not (= (org-current-line) l2))) | 2095 | (while (progn (beginning-of-line 2) (not (= (org-current-line) l2))) |
| 2096 | (and (looking-at org-table-dataline-regexp) | 2096 | (and (looking-at org-table-dataline-regexp) |
| 2097 | (org-table-get-field 1 (concat " " new " ")))) | 2097 | (org-table-get-field 1 (concat " " new " ")))) |
| 2098 | (goto-line l1))) | 2098 | (org-goto-line l1))) |
| 2099 | (if (not (= epos (point-at-eol))) (org-table-align)) | 2099 | (if (not (= epos (point-at-eol))) (org-table-align)) |
| 2100 | (goto-line l) | 2100 | (org-goto-line l) |
| 2101 | (and (interactive-p) (message "%s" (cdr (assoc new org-recalc-marks)))))) | 2101 | (and (interactive-p) (message "%s" (cdr (assoc new org-recalc-marks)))))) |
| 2102 | 2102 | ||
| 2103 | (defun org-table-maybe-recalculate-line () | 2103 | (defun org-table-maybe-recalculate-line () |
| @@ -2360,7 +2360,7 @@ HIGHLIGHT means, just highlight the range." | |||
| 2360 | (if (or (not rangep) (and (= r1 r2) (= c1 c2))) | 2360 | (if (or (not rangep) (and (= r1 r2) (= c1 c2))) |
| 2361 | ;; just one field | 2361 | ;; just one field |
| 2362 | (progn | 2362 | (progn |
| 2363 | (goto-line r1) | 2363 | (org-goto-line r1) |
| 2364 | (while (not (looking-at org-table-dataline-regexp)) | 2364 | (while (not (looking-at org-table-dataline-regexp)) |
| 2365 | (beginning-of-line 2)) | 2365 | (beginning-of-line 2)) |
| 2366 | (prog1 (org-trim (org-table-get-field c1)) | 2366 | (prog1 (org-trim (org-table-get-field c1)) |
| @@ -2369,12 +2369,12 @@ HIGHLIGHT means, just highlight the range." | |||
| 2369 | ;; First sort the numbers to get a regular ractangle | 2369 | ;; First sort the numbers to get a regular ractangle |
| 2370 | (if (< r2 r1) (setq tmp r1 r1 r2 r2 tmp)) | 2370 | (if (< r2 r1) (setq tmp r1 r1 r2 r2 tmp)) |
| 2371 | (if (< c2 c1) (setq tmp c1 c1 c2 c2 tmp)) | 2371 | (if (< c2 c1) (setq tmp c1 c1 c2 c2 tmp)) |
| 2372 | (goto-line r1) | 2372 | (org-goto-line r1) |
| 2373 | (while (not (looking-at org-table-dataline-regexp)) | 2373 | (while (not (looking-at org-table-dataline-regexp)) |
| 2374 | (beginning-of-line 2)) | 2374 | (beginning-of-line 2)) |
| 2375 | (org-table-goto-column c1) | 2375 | (org-table-goto-column c1) |
| 2376 | (setq beg (point)) | 2376 | (setq beg (point)) |
| 2377 | (goto-line r2) | 2377 | (org-goto-line r2) |
| 2378 | (while (not (looking-at org-table-dataline-regexp)) | 2378 | (while (not (looking-at org-table-dataline-regexp)) |
| 2379 | (beginning-of-line 0)) | 2379 | (beginning-of-line 0)) |
| 2380 | (org-table-goto-column c2) | 2380 | (org-table-goto-column c2) |
| @@ -2550,7 +2550,7 @@ known that the table will be realigned a little later anyway." | |||
| 2550 | (string-to-number (match-string 2 name))))) | 2550 | (string-to-number (match-string 2 name))))) |
| 2551 | (when (and a (or all (equal (nth 1 a) thisline))) | 2551 | (when (and a (or all (equal (nth 1 a) thisline))) |
| 2552 | (message "Re-applying formula to field: %s" name) | 2552 | (message "Re-applying formula to field: %s" name) |
| 2553 | (goto-line (nth 1 a)) | 2553 | (org-goto-line (nth 1 a)) |
| 2554 | (org-table-goto-column (nth 2 a)) | 2554 | (org-table-goto-column (nth 2 a)) |
| 2555 | (push (append a (list (cdr eq))) eqlname1) | 2555 | (push (append a (list (cdr eq))) eqlname1) |
| 2556 | (org-table-put-field-property :org-untouchable t))) | 2556 | (org-table-put-field-property :org-untouchable t))) |
| @@ -2566,7 +2566,7 @@ known that the table will be realigned a little later anyway." | |||
| 2566 | (setq org-last-recalc-line (org-current-line)) | 2566 | (setq org-last-recalc-line (org-current-line)) |
| 2567 | (setq eql eqlnum) | 2567 | (setq eql eqlnum) |
| 2568 | (while (setq entry (pop eql)) | 2568 | (while (setq entry (pop eql)) |
| 2569 | (goto-line org-last-recalc-line) | 2569 | (org-goto-line org-last-recalc-line) |
| 2570 | (org-table-goto-column (string-to-number (car entry)) nil 'force) | 2570 | (org-table-goto-column (string-to-number (car entry)) nil 'force) |
| 2571 | (unless (get-text-property (point) :org-untouchable) | 2571 | (unless (get-text-property (point) :org-untouchable) |
| 2572 | (org-table-eval-formula nil (cdr entry) | 2572 | (org-table-eval-formula nil (cdr entry) |
| @@ -2575,12 +2575,12 @@ known that the table will be realigned a little later anyway." | |||
| 2575 | ;; Now evaluate the field formulas | 2575 | ;; Now evaluate the field formulas |
| 2576 | (while (setq eq (pop eqlname1)) | 2576 | (while (setq eq (pop eqlname1)) |
| 2577 | (message "Re-applying formula to field: %s" (car eq)) | 2577 | (message "Re-applying formula to field: %s" (car eq)) |
| 2578 | (goto-line (nth 1 eq)) | 2578 | (org-goto-line (nth 1 eq)) |
| 2579 | (org-table-goto-column (nth 2 eq)) | 2579 | (org-table-goto-column (nth 2 eq)) |
| 2580 | (org-table-eval-formula nil (nth 3 eq) 'noalign 'nocst | 2580 | (org-table-eval-formula nil (nth 3 eq) 'noalign 'nocst |
| 2581 | 'nostore 'noanalysis)) | 2581 | 'nostore 'noanalysis)) |
| 2582 | 2582 | ||
| 2583 | (goto-line thisline) | 2583 | (org-goto-line thisline) |
| 2584 | (org-table-goto-column thiscol) | 2584 | (org-table-goto-column thiscol) |
| 2585 | (remove-text-properties (point-min) (point-max) '(org-untouchable t)) | 2585 | (remove-text-properties (point-min) (point-max) '(org-untouchable t)) |
| 2586 | (or noalign (and org-table-may-need-update (org-table-align)) | 2586 | (or noalign (and org-table-may-need-update (org-table-align)) |
| @@ -2588,7 +2588,7 @@ known that the table will be realigned a little later anyway." | |||
| 2588 | 2588 | ||
| 2589 | ;; back to initial position | 2589 | ;; back to initial position |
| 2590 | (message "Re-applying formulas...done") | 2590 | (message "Re-applying formulas...done") |
| 2591 | (goto-line thisline) | 2591 | (org-goto-line thisline) |
| 2592 | (org-table-goto-column thiscol) | 2592 | (org-table-goto-column thiscol) |
| 2593 | (or noalign (and org-table-may-need-update (org-table-align)) | 2593 | (or noalign (and org-table-may-need-update (org-table-align)) |
| 2594 | (and all (message "Re-applying formulas...done")))))) | 2594 | (and all (message "Re-applying formulas...done")))))) |
| @@ -2744,7 +2744,7 @@ Parameters get priority." | |||
| 2744 | (insert s)) | 2744 | (insert s)) |
| 2745 | (if (eq org-table-use-standard-references t) | 2745 | (if (eq org-table-use-standard-references t) |
| 2746 | (org-table-fedit-toggle-ref-type)) | 2746 | (org-table-fedit-toggle-ref-type)) |
| 2747 | (goto-line startline) | 2747 | (org-goto-line startline) |
| 2748 | (message "Edit formulas and finish with `C-c C-c'. See menu for more commands."))) | 2748 | (message "Edit formulas and finish with `C-c C-c'. See menu for more commands."))) |
| 2749 | 2749 | ||
| 2750 | (defun org-table-fedit-post-command () | 2750 | (defun org-table-fedit-post-command () |
| @@ -2839,7 +2839,7 @@ For example: 28 -> AB." | |||
| 2839 | (insert (funcall function (buffer-substring (point) (point-at-eol)))) | 2839 | (insert (funcall function (buffer-substring (point) (point-at-eol)))) |
| 2840 | (delete-region (point) (point-at-eol)) | 2840 | (delete-region (point) (point-at-eol)) |
| 2841 | (or (eobp) (forward-char 1))) | 2841 | (or (eobp) (forward-char 1))) |
| 2842 | (goto-line line))) | 2842 | (org-goto-line line))) |
| 2843 | 2843 | ||
| 2844 | (defun org-table-fedit-toggle-ref-type () | 2844 | (defun org-table-fedit-toggle-ref-type () |
| 2845 | "Convert all references in the buffer from B3 to @3$2 and back." | 2845 | "Convert all references in the buffer from B3 to @3$2 and back." |
| @@ -3080,12 +3080,12 @@ With prefix ARG, apply the new formulas to the table." | |||
| 3080 | (cond | 3080 | (cond |
| 3081 | ((string-match "^\\$[a-zA-Z][a-zA-Z0-9]*" dest) | 3081 | ((string-match "^\\$[a-zA-Z][a-zA-Z0-9]*" dest) |
| 3082 | (setq e (assoc name org-table-named-field-locations)) | 3082 | (setq e (assoc name org-table-named-field-locations)) |
| 3083 | (goto-line (nth 1 e)) | 3083 | (org-goto-line (nth 1 e)) |
| 3084 | (org-table-goto-column (nth 2 e))) | 3084 | (org-table-goto-column (nth 2 e))) |
| 3085 | ((string-match "^@\\([0-9]+\\)\\$\\([0-9]+\\)" dest) | 3085 | ((string-match "^@\\([0-9]+\\)\\$\\([0-9]+\\)" dest) |
| 3086 | (let ((l (string-to-number (match-string 1 dest))) | 3086 | (let ((l (string-to-number (match-string 1 dest))) |
| 3087 | (c (string-to-number (match-string 2 dest)))) | 3087 | (c (string-to-number (match-string 2 dest)))) |
| 3088 | (goto-line (aref org-table-dlines l)) | 3088 | (org-goto-line (aref org-table-dlines l)) |
| 3089 | (org-table-goto-column c))) | 3089 | (org-table-goto-column c))) |
| 3090 | (t (org-table-goto-column (string-to-number name)))) | 3090 | (t (org-table-goto-column (string-to-number name)))) |
| 3091 | (move-marker pos (point)) | 3091 | (move-marker pos (point)) |
| @@ -3099,7 +3099,7 @@ With prefix ARG, apply the new formulas to the table." | |||
| 3099 | (org-table-get-range match nil nil 'highlight)) | 3099 | (org-table-get-range match nil nil 'highlight)) |
| 3100 | (error nil))) | 3100 | (error nil))) |
| 3101 | ((setq e (assoc var org-table-named-field-locations)) | 3101 | ((setq e (assoc var org-table-named-field-locations)) |
| 3102 | (goto-line (nth 1 e)) | 3102 | (org-goto-line (nth 1 e)) |
| 3103 | (org-table-goto-column (nth 2 e)) | 3103 | (org-table-goto-column (nth 2 e)) |
| 3104 | (org-table-highlight-rectangle (point) (point)) | 3104 | (org-table-highlight-rectangle (point) (point)) |
| 3105 | (message "Named field, column %d of line %d" (nth 2 e) (nth 1 e))) | 3105 | (message "Named field, column %d of line %d" (nth 2 e) (nth 1 e))) |
| @@ -3224,7 +3224,7 @@ Use COMMAND to do the motion, repeat if necessary to end up in a data line." | |||
| 3224 | (setq l2 (org-current-line) | 3224 | (setq l2 (org-current-line) |
| 3225 | c2 (org-table-current-column)) | 3225 | c2 (org-table-current-column)) |
| 3226 | (if (> c1 c2) (setq tmp c1 c1 c2 c2 tmp)) | 3226 | (if (> c1 c2) (setq tmp c1 c1 c2 c2 tmp)) |
| 3227 | (goto-line l1) | 3227 | (org-goto-line l1) |
| 3228 | (beginning-of-line 1) | 3228 | (beginning-of-line 1) |
| 3229 | (loop for line from l1 to l2 do | 3229 | (loop for line from l1 to l2 do |
| 3230 | (when (looking-at org-table-dataline-regexp) | 3230 | (when (looking-at org-table-dataline-regexp) |
diff --git a/lisp/org/org-timer.el b/lisp/org/org-timer.el index 385f09b8954..847d5140973 100644 --- a/lisp/org/org-timer.el +++ b/lisp/org/org-timer.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: 6.29c | 8 | ;; Version: 6.30c |
| 9 | ;; | 9 | ;; |
| 10 | ;; This file is part of GNU Emacs. | 10 | ;; This file is part of GNU Emacs. |
| 11 | ;; | 11 | ;; |
| @@ -78,9 +78,7 @@ the region 0:00:00." | |||
| 78 | (setq delta (org-timer-hms-to-secs (org-timer-fix-incomplete s))))) | 78 | (setq delta (org-timer-hms-to-secs (org-timer-fix-incomplete s))))) |
| 79 | (setq org-timer-start-time | 79 | (setq org-timer-start-time |
| 80 | (seconds-to-time | 80 | (seconds-to-time |
| 81 | (- | 81 | (- (org-float-time) (org-timer-hms-to-secs s))))) |
| 82 | (time-to-seconds (current-time)) | ||
| 83 | (org-timer-hms-to-secs s))))) | ||
| 84 | (org-timer-set-mode-line 'on) | 82 | (org-timer-set-mode-line 'on) |
| 85 | (message "Timer start time set to %s, current value is %s" | 83 | (message "Timer start time set to %s, current value is %s" |
| 86 | (format-time-string "%T" org-timer-start-time) | 84 | (format-time-string "%T" org-timer-start-time) |
| @@ -97,9 +95,9 @@ the region 0:00:00." | |||
| 97 | (setq org-timer-start-time | 95 | (setq org-timer-start-time |
| 98 | (seconds-to-time | 96 | (seconds-to-time |
| 99 | (- | 97 | (- |
| 100 | (time-to-seconds (current-time)) | 98 | (org-float-time) |
| 101 | (- (time-to-seconds org-timer-pause-time) | 99 | (- (org-float-time org-timer-pause-time) |
| 102 | (time-to-seconds org-timer-start-time)))) | 100 | (org-float-time org-timer-start-time)))) |
| 103 | org-timer-pause-time nil) | 101 | org-timer-pause-time nil) |
| 104 | (org-timer-set-mode-line 'on) | 102 | (org-timer-set-mode-line 'on) |
| 105 | (message "Timer continues at %s" (org-timer-value-string))) | 103 | (message "Timer continues at %s" (org-timer-value-string))) |
| @@ -133,8 +131,8 @@ that was not started at the correct moment." | |||
| 133 | (format org-timer-format (org-timer-secs-to-hms (floor (org-timer-seconds))))) | 131 | (format org-timer-format (org-timer-secs-to-hms (floor (org-timer-seconds))))) |
| 134 | 132 | ||
| 135 | (defun org-timer-seconds () | 133 | (defun org-timer-seconds () |
| 136 | (- (time-to-seconds (or org-timer-pause-time (current-time))) | 134 | (- (org-float-time (or org-timer-pause-time (current-time))) |
| 137 | (time-to-seconds org-timer-start-time))) | 135 | (org-float-time org-timer-start-time))) |
| 138 | 136 | ||
| 139 | ;;;###autoload | 137 | ;;;###autoload |
| 140 | (defun org-timer-change-times-in-region (beg end delta) | 138 | (defun org-timer-change-times-in-region (beg end delta) |
| @@ -317,8 +315,8 @@ VALUE can be `on', `off', or `pause'." | |||
| 317 | (if (not (or (eval timer) timer-set)) | 315 | (if (not (or (eval timer) timer-set)) |
| 318 | (setq timer-set t | 316 | (setq timer-set t |
| 319 | timer | 317 | timer |
| 320 | (run-with-timer secs nil 'org-show-notification | 318 | (run-with-timer |
| 321 | (format "%s: time out" hl)) | 319 | secs nil 'org-notify (format "%s: time out" hl) t) |
| 322 | org-timer-last-timer timer))) | 320 | org-timer-last-timer timer))) |
| 323 | '(org-timer-timer1 | 321 | '(org-timer-timer1 |
| 324 | org-timer-timer2 | 322 | org-timer-timer2 |
diff --git a/lisp/org/org-vm.el b/lisp/org/org-vm.el index 283ac74639b..6feb64732a4 100644 --- a/lisp/org/org-vm.el +++ b/lisp/org/org-vm.el | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | ;; Author: Carsten Dominik <carsten at orgmode dot org> | 6 | ;; Author: Carsten Dominik <carsten at orgmode dot org> |
| 7 | ;; Keywords: outlines, hypermedia, calendar, wp | 7 | ;; Keywords: outlines, hypermedia, calendar, wp |
| 8 | ;; Homepage: http://orgmode.org | 8 | ;; Homepage: http://orgmode.org |
| 9 | ;; Version: 6.29c | 9 | ;; Version: 6.30c |
| 10 | ;; | 10 | ;; |
| 11 | ;; This file is part of GNU Emacs. | 11 | ;; This file is part of GNU Emacs. |
| 12 | ;; | 12 | ;; |
diff --git a/lisp/org/org-w3m.el b/lisp/org/org-w3m.el index 773e8bc9630..5f0bf265849 100644 --- a/lisp/org/org-w3m.el +++ b/lisp/org/org-w3m.el | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | ;; Author: Andy Stewart <lazycat dot manatee at gmail dot com> | 5 | ;; Author: Andy Stewart <lazycat dot manatee at gmail dot com> |
| 6 | ;; Keywords: outlines, hypermedia, calendar, wp | 6 | ;; Keywords: outlines, hypermedia, calendar, wp |
| 7 | ;; Homepage: http://orgmode.org | 7 | ;; Homepage: http://orgmode.org |
| 8 | ;; Version: 6.29c | 8 | ;; Version: 6.30c |
| 9 | ;; | 9 | ;; |
| 10 | ;; This file is part of GNU Emacs. | 10 | ;; This file is part of GNU Emacs. |
| 11 | ;; | 11 | ;; |
diff --git a/lisp/org/org-wl.el b/lisp/org/org-wl.el index 60be81e75c3..24a772a7aa2 100644 --- a/lisp/org/org-wl.el +++ b/lisp/org/org-wl.el | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | ;; Author: Tokuya Kameshima <kames at fa2 dot so-net dot ne dot jp> | 6 | ;; Author: Tokuya Kameshima <kames at fa2 dot so-net dot ne dot jp> |
| 7 | ;; Keywords: outlines, hypermedia, calendar, wp | 7 | ;; Keywords: outlines, hypermedia, calendar, wp |
| 8 | ;; Homepage: http://orgmode.org | 8 | ;; Homepage: http://orgmode.org |
| 9 | ;; Version: 6.29c | 9 | ;; Version: 6.30c |
| 10 | ;; | 10 | ;; |
| 11 | ;; This file is part of GNU Emacs. | 11 | ;; This file is part of GNU Emacs. |
| 12 | ;; | 12 | ;; |
diff --git a/lisp/org/org-xoxo.el b/lisp/org/org-xoxo.el index d55993f8065..61904c26542 100644 --- a/lisp/org/org-xoxo.el +++ b/lisp/org/org-xoxo.el | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | ;; Author: Carsten Dominik <carsten at orgmode dot org> | 6 | ;; Author: Carsten Dominik <carsten at orgmode dot org> |
| 7 | ;; Keywords: outlines, hypermedia, calendar, wp | 7 | ;; Keywords: outlines, hypermedia, calendar, wp |
| 8 | ;; Homepage: http://orgmode.org | 8 | ;; Homepage: http://orgmode.org |
| 9 | ;; Version: 6.29c | 9 | ;; Version: 6.30c |
| 10 | ;; | 10 | ;; |
| 11 | ;; This file is part of GNU Emacs. | 11 | ;; This file is part of GNU Emacs. |
| 12 | ;; | 12 | ;; |
diff --git a/lisp/org/org.el b/lisp/org/org.el index 16f72b94534..82838bbb570 100644 --- a/lisp/org/org.el +++ b/lisp/org/org.el | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | ;; Author: Carsten Dominik <carsten at orgmode dot org> | 6 | ;; Author: Carsten Dominik <carsten at orgmode dot org> |
| 7 | ;; Keywords: outlines, hypermedia, calendar, wp | 7 | ;; Keywords: outlines, hypermedia, calendar, wp |
| 8 | ;; Homepage: http://orgmode.org | 8 | ;; Homepage: http://orgmode.org |
| 9 | ;; Version: 6.29c | 9 | ;; Version: 6.30c |
| 10 | ;; | 10 | ;; |
| 11 | ;; This file is part of GNU Emacs. | 11 | ;; This file is part of GNU Emacs. |
| 12 | ;; | 12 | ;; |
| @@ -95,17 +95,36 @@ | |||
| 95 | 95 | ||
| 96 | ;;; Version | 96 | ;;; Version |
| 97 | 97 | ||
| 98 | (defconst org-version "6.29c" | 98 | (defconst org-version "6.30c" |
| 99 | "The version number of the file org.el.") | 99 | "The version number of the file org.el.") |
| 100 | 100 | ||
| 101 | (defun org-version (&optional here) | 101 | (defun org-version (&optional here) |
| 102 | "Show the org-mode version in the echo area. | 102 | "Show the org-mode version in the echo area. |
| 103 | With prefix arg HERE, insert it at point." | 103 | With prefix arg HERE, insert it at point." |
| 104 | (interactive "P") | 104 | (interactive "P") |
| 105 | (let ((version (format "Org-mode version %s" org-version))) | 105 | (let* ((version org-version) |
| 106 | (git-version) | ||
| 107 | (dir (concat (file-name-directory (locate-library "org")) "../" ))) | ||
| 108 | (if (and (file-exists-p (expand-file-name ".git" dir)) | ||
| 109 | (executable-find "git")) | ||
| 110 | (let ((pwd (substring (pwd) 10))) | ||
| 111 | (cd dir) | ||
| 112 | (if (eql 0 (shell-command "git describe --abbrev=4 HEAD")) | ||
| 113 | (save-excursion | ||
| 114 | (set-buffer "*Shell Command Output*") | ||
| 115 | (goto-char (point-min)) | ||
| 116 | (re-search-forward "[^\n]+") | ||
| 117 | (setq git-version (match-string 0)) | ||
| 118 | (subst-char-in-string ?- ?. git-version t) | ||
| 119 | (shell-command "git diff-index --name-only HEAD --") | ||
| 120 | (unless (eql 1 (point-max)) | ||
| 121 | (setq git-version (concat git-version ".dirty"))) | ||
| 122 | (setq version (concat version " (" git-version ")"))) | ||
| 123 | (cd pwd)))) | ||
| 124 | (setq version (format "Org-mode version %s" version)) | ||
| 125 | (if here (insert version)) | ||
| 106 | (message version) | 126 | (message version) |
| 107 | (if here | 127 | version)) |
| 108 | (insert version)))) | ||
| 109 | 128 | ||
| 110 | ;;; Compatibility constants | 129 | ;;; Compatibility constants |
| 111 | 130 | ||
| @@ -207,6 +226,7 @@ to add the symbol `xyz', and the package must have a call to | |||
| 207 | (const :tag "C special-blocks: Turn blocks into LaTeX envs and HTML divs" org-special-blocks) | 226 | (const :tag "C special-blocks: Turn blocks into LaTeX envs and HTML divs" org-special-blocks) |
| 208 | (const :tag "C sqlinsert: Convert Org-mode tables to SQL insertions" orgtbl-sqlinsert) | 227 | (const :tag "C sqlinsert: Convert Org-mode tables to SQL insertions" orgtbl-sqlinsert) |
| 209 | (const :tag "C toc: Table of contents for Org-mode buffer" org-toc) | 228 | (const :tag "C toc: Table of contents for Org-mode buffer" org-toc) |
| 229 | (const :tag "C track: Keep up with Org development" org-track) | ||
| 210 | (repeat :tag "External packages" :inline t (symbol :tag "Package")))) | 230 | (repeat :tag "External packages" :inline t (symbol :tag "Package")))) |
| 211 | 231 | ||
| 212 | (defcustom org-support-shift-select nil | 232 | (defcustom org-support-shift-select nil |
| @@ -652,6 +672,9 @@ So the default 2 means, at least 2 empty lines after the end of a subtree | |||
| 652 | are needed to produce free space between a collapsed subtree and the | 672 | are needed to produce free space between a collapsed subtree and the |
| 653 | following headline. | 673 | following headline. |
| 654 | 674 | ||
| 675 | If the number is negative, and the number of empty lines is at least -N, | ||
| 676 | all empty lines are shown. | ||
| 677 | |||
| 655 | Special case: when 0, never leave empty lines in collapsed view." | 678 | Special case: when 0, never leave empty lines in collapsed view." |
| 656 | :group 'org-cycle | 679 | :group 'org-cycle |
| 657 | :type 'integer) | 680 | :type 'integer) |
| @@ -1751,7 +1774,9 @@ current entry each time a todo state is changed." | |||
| 1751 | (defcustom org-hierarchical-todo-statistics t | 1774 | (defcustom org-hierarchical-todo-statistics t |
| 1752 | "Non-nil means, TODO statistics covers just direct children. | 1775 | "Non-nil means, TODO statistics covers just direct children. |
| 1753 | When nil, all entries in the subtree are considered. | 1776 | When nil, all entries in the subtree are considered. |
| 1754 | This has only an effect if `org-provide-todo-statistics' is set." | 1777 | This has only an effect if `org-provide-todo-statistics' is set. |
| 1778 | To set this to nil for only a single subtree, use a COOKIE_DATA | ||
| 1779 | property and include the word \"recursive\" into the value." | ||
| 1755 | :group 'org-todo | 1780 | :group 'org-todo |
| 1756 | :type 'boolean) | 1781 | :type 'boolean) |
| 1757 | 1782 | ||
| @@ -2848,7 +2873,17 @@ This is needed for font-lock setup.") | |||
| 2848 | "Non-nil means, use ido completion wherever possible. | 2873 | "Non-nil means, use ido completion wherever possible. |
| 2849 | Note that `ido-mode' must be active for this variable to be relevant. | 2874 | Note that `ido-mode' must be active for this variable to be relevant. |
| 2850 | If you decide to turn this variable on, you might well want to turn off | 2875 | If you decide to turn this variable on, you might well want to turn off |
| 2851 | `org-outline-path-complete-in-steps'." | 2876 | `org-outline-path-complete-in-steps'. |
| 2877 | See also `org-completion-use-iswitchb'." | ||
| 2878 | :group 'org-completion | ||
| 2879 | :type 'boolean) | ||
| 2880 | |||
| 2881 | (defcustom org-completion-use-iswitchb nil | ||
| 2882 | "Non-nil means, use iswitchb completion wherever possible. | ||
| 2883 | Note that `iswitchb-mode' must be active for this variable to be relevant. | ||
| 2884 | If you decide to turn this variable on, you might well want to turn off | ||
| 2885 | `org-outline-path-complete-in-steps'. | ||
| 2886 | Note that thi variable has only an effect if `org-completion-use-ido' is nil." | ||
| 2852 | :group 'org-completion | 2887 | :group 'org-completion |
| 2853 | :type 'boolean) | 2888 | :type 'boolean) |
| 2854 | 2889 | ||
| @@ -3085,6 +3120,8 @@ If TABLE-TYPE is non-nil, also check for table.el-type tables." | |||
| 3085 | (defvar org-clock-start-time) | 3120 | (defvar org-clock-start-time) |
| 3086 | (defvar org-clock-marker (make-marker) | 3121 | (defvar org-clock-marker (make-marker) |
| 3087 | "Marker recording the last clock-in.") | 3122 | "Marker recording the last clock-in.") |
| 3123 | (defvar org-clock-hd-marker (make-marker) | ||
| 3124 | "Marker recording the last clock-in, but the headline position.") | ||
| 3088 | (defun org-clock-is-active () | 3125 | (defun org-clock-is-active () |
| 3089 | "Return non-nil if clock is currently running. | 3126 | "Return non-nil if clock is currently running. |
| 3090 | The return value is actually the clock marker." | 3127 | The return value is actually the clock marker." |
| @@ -3128,9 +3165,9 @@ Otherwise, return nil." | |||
| 3128 | (end-of-line 1) | 3165 | (end-of-line 1) |
| 3129 | (setq ts (match-string 1) | 3166 | (setq ts (match-string 1) |
| 3130 | te (match-string 3)) | 3167 | te (match-string 3)) |
| 3131 | (setq s (- (time-to-seconds | 3168 | (setq s (- (org-float-time |
| 3132 | (apply 'encode-time (org-parse-time-string te))) | 3169 | (apply 'encode-time (org-parse-time-string te))) |
| 3133 | (time-to-seconds | 3170 | (org-float-time |
| 3134 | (apply 'encode-time (org-parse-time-string ts)))) | 3171 | (apply 'encode-time (org-parse-time-string ts)))) |
| 3135 | neg (< s 0) | 3172 | neg (< s 0) |
| 3136 | s (abs s) | 3173 | s (abs s) |
| @@ -3694,7 +3731,8 @@ means to push this value onto the list in the variable.") | |||
| 3694 | 3731 | ||
| 3695 | ;; Compute the regular expressions and other local variables | 3732 | ;; Compute the regular expressions and other local variables |
| 3696 | (if (not org-done-keywords) | 3733 | (if (not org-done-keywords) |
| 3697 | (setq org-done-keywords (list (org-last org-todo-keywords-1)))) | 3734 | (setq org-done-keywords (and org-todo-keywords-1 |
| 3735 | (list (org-last org-todo-keywords-1))))) | ||
| 3698 | (setq org-ds-keyword-length (+ 2 (max (length org-deadline-string) | 3736 | (setq org-ds-keyword-length (+ 2 (max (length org-deadline-string) |
| 3699 | (length org-scheduled-string) | 3737 | (length org-scheduled-string) |
| 3700 | (length org-clock-string) | 3738 | (length org-clock-string) |
| @@ -4448,7 +4486,15 @@ will be prompted for." | |||
| 4448 | "Regular expression for highlighting export special stuff.") | 4486 | "Regular expression for highlighting export special stuff.") |
| 4449 | (defvar org-match-substring-regexp) | 4487 | (defvar org-match-substring-regexp) |
| 4450 | (defvar org-match-substring-with-braces-regexp) | 4488 | (defvar org-match-substring-with-braces-regexp) |
| 4451 | (defvar org-export-html-special-string-regexps) | 4489 | |
| 4490 | ;; This should be with the exporter code, but we also use if for font-locking | ||
| 4491 | (defconst org-export-html-special-string-regexps | ||
| 4492 | '(("\\\\-" . "­") | ||
| 4493 | ("---\\([^-]\\)" . "—\\1") | ||
| 4494 | ("--\\([^-]\\)" . "–\\1") | ||
| 4495 | ("\\.\\.\\." . "…")) | ||
| 4496 | "Regular expressions for special string conversion.") | ||
| 4497 | |||
| 4452 | 4498 | ||
| 4453 | (defun org-compute-latex-and-specials-regexp () | 4499 | (defun org-compute-latex-and-specials-regexp () |
| 4454 | "Compute regular expression for stuff treated specially by exporters." | 4500 | "Compute regular expression for stuff treated specially by exporters." |
| @@ -4764,7 +4810,7 @@ If KWD is a number, get the corresponding match group." | |||
| 4764 | (defun org-cycle (&optional arg) | 4810 | (defun org-cycle (&optional arg) |
| 4765 | "TAB-action and visibility cycling for Org-mode. | 4811 | "TAB-action and visibility cycling for Org-mode. |
| 4766 | 4812 | ||
| 4767 | This is the command invoked in Org-moe by the TAB key. It's main purpose | 4813 | This is the command invoked in Org-mode by the TAB key. Its main purpose |
| 4768 | is outine visibility cycling, but it also invokes other actions | 4814 | is outine visibility cycling, but it also invokes other actions |
| 4769 | in special contexts. | 4815 | in special contexts. |
| 4770 | 4816 | ||
| @@ -4972,7 +5018,7 @@ in special contexts. | |||
| 4972 | (skip-chars-forward " \t\n") | 5018 | (skip-chars-forward " \t\n") |
| 4973 | (beginning-of-line 1) ; in case this is an item | 5019 | (beginning-of-line 1) ; in case this is an item |
| 4974 | ) | 5020 | ) |
| 4975 | (setq eos (1- (point)))) | 5021 | (setq eos (if (eobp) (point) (1- (point))))) |
| 4976 | ;; Find out what to do next and set `this-command' | 5022 | ;; Find out what to do next and set `this-command' |
| 4977 | (cond | 5023 | (cond |
| 4978 | ((= eos eoh) | 5024 | ((= eos eoh) |
| @@ -5157,13 +5203,13 @@ This function is the default value of the hook `org-cycle-hook'." | |||
| 5157 | ;; First, find a reasonable region to look at: | 5203 | ;; First, find a reasonable region to look at: |
| 5158 | ;; Start two siblings above, end three below | 5204 | ;; Start two siblings above, end three below |
| 5159 | (let* ((beg (save-excursion | 5205 | (let* ((beg (save-excursion |
| 5160 | (and (outline-get-last-sibling) | 5206 | (and (org-get-last-sibling) |
| 5161 | (outline-get-last-sibling)) | 5207 | (org-get-last-sibling)) |
| 5162 | (point))) | 5208 | (point))) |
| 5163 | (end (save-excursion | 5209 | (end (save-excursion |
| 5164 | (and (outline-get-next-sibling) | 5210 | (and (org-get-next-sibling) |
| 5165 | (outline-get-next-sibling) | 5211 | (org-get-next-sibling) |
| 5166 | (outline-get-next-sibling)) | 5212 | (org-get-next-sibling)) |
| 5167 | (if (org-at-heading-p) | 5213 | (if (org-at-heading-p) |
| 5168 | (point-at-eol) | 5214 | (point-at-eol) |
| 5169 | (point)))) | 5215 | (point)))) |
| @@ -5187,16 +5233,16 @@ The region to be covered depends on STATE when called through | |||
| 5187 | `org-cycle-hook'. Lisp program can use t for STATE to get the | 5233 | `org-cycle-hook'. Lisp program can use t for STATE to get the |
| 5188 | entire buffer covered. Note that an empty line is only shown if there | 5234 | entire buffer covered. Note that an empty line is only shown if there |
| 5189 | are at least `org-cycle-separator-lines' empty lines before the headline." | 5235 | are at least `org-cycle-separator-lines' empty lines before the headline." |
| 5190 | (when (> org-cycle-separator-lines 0) | 5236 | (when (not (= org-cycle-separator-lines 0)) |
| 5191 | (save-excursion | 5237 | (save-excursion |
| 5192 | (let* ((n org-cycle-separator-lines) | 5238 | (let* ((n (abs org-cycle-separator-lines)) |
| 5193 | (re (cond | 5239 | (re (cond |
| 5194 | ((= n 1) "\\(\n[ \t]*\n\\*+\\) ") | 5240 | ((= n 1) "\\(\n[ \t]*\n\\*+\\) ") |
| 5195 | ((= n 2) "^[ \t]*\\(\n[ \t]*\n\\*+\\) ") | 5241 | ((= n 2) "^[ \t]*\\(\n[ \t]*\n\\*+\\) ") |
| 5196 | (t (let ((ns (number-to-string (- n 2)))) | 5242 | (t (let ((ns (number-to-string (- n 2)))) |
| 5197 | (concat "^\\(?:[ \t]*\n\\)\\{" ns "," ns "\\}" | 5243 | (concat "^\\(?:[ \t]*\n\\)\\{" ns "," ns "\\}" |
| 5198 | "[ \t]*\\(\n[ \t]*\n\\*+\\) "))))) | 5244 | "[ \t]*\\(\n[ \t]*\n\\*+\\) "))))) |
| 5199 | beg end) | 5245 | beg end b e) |
| 5200 | (cond | 5246 | (cond |
| 5201 | ((memq state '(overview contents t)) | 5247 | ((memq state '(overview contents t)) |
| 5202 | (setq beg (point-min) end (point-max))) | 5248 | (setq beg (point-min) end (point-max))) |
| @@ -5207,9 +5253,15 @@ are at least `org-cycle-separator-lines' empty lines before the headline." | |||
| 5207 | (when beg | 5253 | (when beg |
| 5208 | (goto-char beg) | 5254 | (goto-char beg) |
| 5209 | (while (re-search-forward re end t) | 5255 | (while (re-search-forward re end t) |
| 5210 | (if (not (get-char-property (match-end 1) 'invisible)) | 5256 | (unless (get-char-property (match-end 1) 'invisible) |
| 5211 | (outline-flag-region | 5257 | (setq e (match-end 1)) |
| 5212 | (match-beginning 1) (match-end 1) nil))))))) | 5258 | (if (< org-cycle-separator-lines 0) |
| 5259 | (setq b (save-excursion | ||
| 5260 | (goto-char (match-beginning 0)) | ||
| 5261 | (org-back-over-empty-lines) | ||
| 5262 | (point))) | ||
| 5263 | (setq b (match-beginning 1))) | ||
| 5264 | (outline-flag-region b e nil))))))) | ||
| 5213 | ;; Never hide empty lines at the end of the file. | 5265 | ;; Never hide empty lines at the end of the file. |
| 5214 | (save-excursion | 5266 | (save-excursion |
| 5215 | (goto-char (point-max)) | 5267 | (goto-char (point-max)) |
| @@ -5250,7 +5302,7 @@ are at least `org-cycle-separator-lines' empty lines before the headline." | |||
| 5250 | "^[ \t]*:END:" | 5302 | "^[ \t]*:END:" |
| 5251 | (save-excursion (outline-next-heading) (point)) t) | 5303 | (save-excursion (outline-next-heading) (point)) t) |
| 5252 | (outline-flag-region b (point-at-eol) flag) | 5304 | (outline-flag-region b (point-at-eol) flag) |
| 5253 | (error ":END: line missing")))))) | 5305 | (error ":END: line missing at position %s" b)))))) |
| 5254 | 5306 | ||
| 5255 | (defun org-subtree-end-visible-p () | 5307 | (defun org-subtree-end-visible-p () |
| 5256 | "Is the end of the current subtree visible?" | 5308 | "Is the end of the current subtree visible?" |
| @@ -5323,24 +5375,34 @@ the range." | |||
| 5323 | (beginning-of-line) | 5375 | (beginning-of-line) |
| 5324 | (if (re-search-forward org-block-regexp nil t) | 5376 | (if (re-search-forward org-block-regexp nil t) |
| 5325 | (let ((start (- (match-beginning 4) 1)) ;; beginning of body | 5377 | (let ((start (- (match-beginning 4) 1)) ;; beginning of body |
| 5326 | (end (match-end 0)) | 5378 | (end (match-end 0)) ;; end of entire body |
| 5327 | ov) ;; end of entire body | 5379 | ov) |
| 5328 | (if (memq t (mapcar (lambda (overlay) | 5380 | (if (memq t (mapcar (lambda (overlay) |
| 5329 | (eq (org-overlay-get overlay 'invisible) | 5381 | (eq (org-overlay-get overlay 'invisible) |
| 5330 | 'org-hide-block)) | 5382 | 'org-hide-block)) |
| 5331 | (org-overlays-at start))) | 5383 | (org-overlays-at start))) |
| 5332 | (if (or (not force) (eq force 'off)) | 5384 | (if (or (not force) (eq force 'off)) |
| 5333 | (mapc (lambda (ov) | 5385 | (mapc (lambda (ov) |
| 5334 | (when (member ov org-hide-block-overlays) | 5386 | (when (member ov org-hide-block-overlays) |
| 5335 | (setq org-hide-block-overlays | 5387 | (setq org-hide-block-overlays |
| 5336 | (delq ov org-hide-block-overlays))) | 5388 | (delq ov org-hide-block-overlays))) |
| 5337 | (when (eq (org-overlay-get ov 'invisible) | 5389 | (when (eq (org-overlay-get ov 'invisible) |
| 5338 | 'org-hide-block) | 5390 | 'org-hide-block) |
| 5339 | (org-delete-overlay ov))) | 5391 | (org-delete-overlay ov))) |
| 5340 | (org-overlays-at start))) | 5392 | (org-overlays-at start))) |
| 5341 | (setq ov (org-make-overlay start end)) | 5393 | (setq ov (org-make-overlay start end)) |
| 5342 | (org-overlay-put ov 'invisible 'org-hide-block) | 5394 | (org-overlay-put ov 'invisible 'org-hide-block) |
| 5343 | (push ov org-hide-block-overlays))) | 5395 | ;; make the block accessible to isearch |
| 5396 | (org-overlay-put | ||
| 5397 | ov 'isearch-open-invisible | ||
| 5398 | (lambda (ov) | ||
| 5399 | (when (member ov org-hide-block-overlays) | ||
| 5400 | (setq org-hide-block-overlays | ||
| 5401 | (delq ov org-hide-block-overlays))) | ||
| 5402 | (when (eq (org-overlay-get ov 'invisible) | ||
| 5403 | 'org-hide-block) | ||
| 5404 | (org-delete-overlay ov)))) | ||
| 5405 | (push ov org-hide-block-overlays))) | ||
| 5344 | (error "Not looking at a source block")))) | 5406 | (error "Not looking at a source block")))) |
| 5345 | 5407 | ||
| 5346 | ;; org-tab-after-check-for-cycling-hook | 5408 | ;; org-tab-after-check-for-cycling-hook |
| @@ -5662,6 +5724,7 @@ but create the new headline after the current line." | |||
| 5662 | ;; insert before the current line | 5724 | ;; insert before the current line |
| 5663 | (open-line (if blank 2 1))) | 5725 | (open-line (if blank 2 1))) |
| 5664 | ((and (bolp) | 5726 | ((and (bolp) |
| 5727 | (not org-insert-heading-respect-content) | ||
| 5665 | (or (bobp) | 5728 | (or (bobp) |
| 5666 | (save-excursion | 5729 | (save-excursion |
| 5667 | (backward-char 1) (not (org-invisible-p))))) | 5730 | (backward-char 1) (not (org-invisible-p))))) |
| @@ -6036,8 +6099,8 @@ is signaled in this case." | |||
| 6036 | "Move the current subtree down past ARG headlines of the same level." | 6099 | "Move the current subtree down past ARG headlines of the same level." |
| 6037 | (interactive "p") | 6100 | (interactive "p") |
| 6038 | (setq arg (prefix-numeric-value arg)) | 6101 | (setq arg (prefix-numeric-value arg)) |
| 6039 | (let ((movfunc (if (> arg 0) 'outline-get-next-sibling | 6102 | (let ((movfunc (if (> arg 0) 'org-get-next-sibling |
| 6040 | 'outline-get-last-sibling)) | 6103 | 'org-get-last-sibling)) |
| 6041 | (ins-point (make-marker)) | 6104 | (ins-point (make-marker)) |
| 6042 | (cnt (abs arg)) | 6105 | (cnt (abs arg)) |
| 6043 | beg beg0 end txt folded ne-beg ne-end ne-ins ins-end) | 6106 | beg beg0 end txt folded ne-beg ne-end ne-ins ins-end) |
| @@ -6539,13 +6602,13 @@ WITH-CASE, the sorting considers case as well." | |||
| 6539 | 6602 | ||
| 6540 | (and (= (downcase sorting-type) ?f) | 6603 | (and (= (downcase sorting-type) ?f) |
| 6541 | (setq getkey-func | 6604 | (setq getkey-func |
| 6542 | (org-ido-completing-read "Sort using function: " | 6605 | (org-icompleting-read "Sort using function: " |
| 6543 | obarray 'fboundp t nil nil)) | 6606 | obarray 'fboundp t nil nil)) |
| 6544 | (setq getkey-func (intern getkey-func))) | 6607 | (setq getkey-func (intern getkey-func))) |
| 6545 | 6608 | ||
| 6546 | (and (= (downcase sorting-type) ?r) | 6609 | (and (= (downcase sorting-type) ?r) |
| 6547 | (setq property | 6610 | (setq property |
| 6548 | (org-ido-completing-read "Property: " | 6611 | (org-icompleting-read "Property: " |
| 6549 | (mapcar 'list (org-buffer-property-keys t)) | 6612 | (mapcar 'list (org-buffer-property-keys t)) |
| 6550 | nil t)))) | 6613 | nil t)))) |
| 6551 | 6614 | ||
| @@ -6594,7 +6657,7 @@ WITH-CASE, the sorting considers case as well." | |||
| 6594 | (re-search-forward org-ts-regexp-both | 6657 | (re-search-forward org-ts-regexp-both |
| 6595 | (point-at-eol) t)) | 6658 | (point-at-eol) t)) |
| 6596 | (org-time-string-to-seconds (match-string 0)) | 6659 | (org-time-string-to-seconds (match-string 0)) |
| 6597 | (time-to-seconds now))) | 6660 | (org-float-time now))) |
| 6598 | ((= dcst ?f) | 6661 | ((= dcst ?f) |
| 6599 | (if getkey-func | 6662 | (if getkey-func |
| 6600 | (progn | 6663 | (progn |
| @@ -6618,24 +6681,24 @@ WITH-CASE, the sorting considers case as well." | |||
| 6618 | (if (or (re-search-forward org-ts-regexp end t) | 6681 | (if (or (re-search-forward org-ts-regexp end t) |
| 6619 | (re-search-forward org-ts-regexp-both end t)) | 6682 | (re-search-forward org-ts-regexp-both end t)) |
| 6620 | (org-time-string-to-seconds (match-string 0)) | 6683 | (org-time-string-to-seconds (match-string 0)) |
| 6621 | (time-to-seconds now)))) | 6684 | (org-float-time now)))) |
| 6622 | ((= dcst ?c) | 6685 | ((= dcst ?c) |
| 6623 | (let ((end (save-excursion (outline-next-heading) (point)))) | 6686 | (let ((end (save-excursion (outline-next-heading) (point)))) |
| 6624 | (if (re-search-forward | 6687 | (if (re-search-forward |
| 6625 | (concat "^[ \t]*\\[" org-ts-regexp1 "\\]") | 6688 | (concat "^[ \t]*\\[" org-ts-regexp1 "\\]") |
| 6626 | end t) | 6689 | end t) |
| 6627 | (org-time-string-to-seconds (match-string 0)) | 6690 | (org-time-string-to-seconds (match-string 0)) |
| 6628 | (time-to-seconds now)))) | 6691 | (org-float-time now)))) |
| 6629 | ((= dcst ?s) | 6692 | ((= dcst ?s) |
| 6630 | (let ((end (save-excursion (outline-next-heading) (point)))) | 6693 | (let ((end (save-excursion (outline-next-heading) (point)))) |
| 6631 | (if (re-search-forward org-scheduled-time-regexp end t) | 6694 | (if (re-search-forward org-scheduled-time-regexp end t) |
| 6632 | (org-time-string-to-seconds (match-string 1)) | 6695 | (org-time-string-to-seconds (match-string 1)) |
| 6633 | (time-to-seconds now)))) | 6696 | (org-float-time now)))) |
| 6634 | ((= dcst ?d) | 6697 | ((= dcst ?d) |
| 6635 | (let ((end (save-excursion (outline-next-heading) (point)))) | 6698 | (let ((end (save-excursion (outline-next-heading) (point)))) |
| 6636 | (if (re-search-forward org-deadline-time-regexp end t) | 6699 | (if (re-search-forward org-deadline-time-regexp end t) |
| 6637 | (org-time-string-to-seconds (match-string 1)) | 6700 | (org-time-string-to-seconds (match-string 1)) |
| 6638 | (time-to-seconds now)))) | 6701 | (org-float-time now)))) |
| 6639 | ((= dcst ?p) | 6702 | ((= dcst ?p) |
| 6640 | (if (re-search-forward org-priority-regexp (point-at-eol) t) | 6703 | (if (re-search-forward org-priority-regexp (point-at-eol) t) |
| 6641 | (string-to-char (match-string 2)) | 6704 | (string-to-char (match-string 2)) |
| @@ -6694,7 +6757,7 @@ If WITH-CASE is non-nil, the sorting will be case-sensitive." | |||
| 6694 | (lambda (x) | 6757 | (lambda (x) |
| 6695 | (if (or (string-match org-ts-regexp x) | 6758 | (if (or (string-match org-ts-regexp x) |
| 6696 | (string-match org-ts-regexp-both x)) | 6759 | (string-match org-ts-regexp-both x)) |
| 6697 | (time-to-seconds | 6760 | (org-float-time |
| 6698 | (org-time-string-to-time (match-string 0 x))) | 6761 | (org-time-string-to-time (match-string 0 x))) |
| 6699 | 0)) | 6762 | 0)) |
| 6700 | comparefun (if (= dcst sorting-type) '< '>))) | 6763 | comparefun (if (= dcst sorting-type) '< '>))) |
| @@ -7516,7 +7579,8 @@ Use TAB to complete link prefixes, then RET for type-specific completion support | |||
| 7516 | (unwind-protect | 7579 | (unwind-protect |
| 7517 | (progn | 7580 | (progn |
| 7518 | (setq link | 7581 | (setq link |
| 7519 | (let ((org-completion-use-ido nil)) | 7582 | (let ((org-completion-use-ido nil) |
| 7583 | (org-completion-use-iswitchb nil)) | ||
| 7520 | (org-completing-read | 7584 | (org-completing-read |
| 7521 | "Link: " | 7585 | "Link: " |
| 7522 | (append | 7586 | (append |
| @@ -7626,14 +7690,23 @@ Use TAB to complete link prefixes, then RET for type-specific completion support | |||
| 7626 | (copy-keymap minibuffer-local-completion-map))) | 7690 | (copy-keymap minibuffer-local-completion-map))) |
| 7627 | (org-defkey minibuffer-local-completion-map " " 'self-insert-command) | 7691 | (org-defkey minibuffer-local-completion-map " " 'self-insert-command) |
| 7628 | (org-defkey minibuffer-local-completion-map "?" 'self-insert-command) | 7692 | (org-defkey minibuffer-local-completion-map "?" 'self-insert-command) |
| 7629 | (apply 'org-ido-completing-read args))) | 7693 | (apply 'org-icompleting-read args))) |
| 7630 | 7694 | ||
| 7631 | (defun org-completing-read-no-ido (&rest args) | 7695 | (defun org-completing-read-no-i (&rest args) |
| 7632 | (let (org-completion-use-ido) | 7696 | (let (org-completion-use-ido org-completion-use-iswitchb) |
| 7633 | (apply 'org-completing-read args))) | 7697 | (apply 'org-completing-read args))) |
| 7634 | 7698 | ||
| 7635 | (defun org-ido-completing-read (&rest args) | 7699 | (defun org-iswitchb-completing-read (prompt choices &rest args) |
| 7636 | "Completing-read using `ido-mode' speedups if available" | 7700 | "Use iswitch as a completing-read replacement to choose from choices. |
| 7701 | PROMPT is a string to prompt with. CHOICES is a list of strings to choose | ||
| 7702 | from." | ||
| 7703 | (let ((iswitchb-make-buflist-hook | ||
| 7704 | (lambda () | ||
| 7705 | (setq iswitchb-temp-buflist choices)))) | ||
| 7706 | (iswitchb-read-buffer prompt))) | ||
| 7707 | |||
| 7708 | (defun org-icompleting-read (&rest args) | ||
| 7709 | "Completing-read using `ido-mode' or `iswitchb' speedups if available" | ||
| 7637 | (if (and org-completion-use-ido | 7710 | (if (and org-completion-use-ido |
| 7638 | (fboundp 'ido-completing-read) | 7711 | (fboundp 'ido-completing-read) |
| 7639 | (boundp 'ido-mode) ido-mode | 7712 | (boundp 'ido-mode) ido-mode |
| @@ -7644,7 +7717,13 @@ Use TAB to complete link prefixes, then RET for type-specific completion support | |||
| 7644 | (mapcar (lambda (x) (car x)) (nth 1 args)) | 7717 | (mapcar (lambda (x) (car x)) (nth 1 args)) |
| 7645 | (nth 1 args)) | 7718 | (nth 1 args)) |
| 7646 | (cddr args))) | 7719 | (cddr args))) |
| 7647 | (apply 'completing-read args))) | 7720 | (if (and org-completion-use-iswitchb |
| 7721 | (boundp 'iswitchb-mode) iswitchb-mode | ||
| 7722 | (listp (second args))) | ||
| 7723 | (apply 'org-iswitchb-completing-read (concat (car args)) | ||
| 7724 | (mapcar (lambda (x) (car x)) (nth 1 args)) | ||
| 7725 | (cddr args)) | ||
| 7726 | (apply 'completing-read args)))) | ||
| 7648 | 7727 | ||
| 7649 | (defun org-extract-attributes (s) | 7728 | (defun org-extract-attributes (s) |
| 7650 | "Extract the attributes cookie from a string and set as text property." | 7729 | "Extract the attributes cookie from a string and set as text property." |
| @@ -7783,10 +7862,10 @@ Org-mode syntax." | |||
| 7783 | (org-run-like-in-org-mode 'org-open-at-point)) | 7862 | (org-run-like-in-org-mode 'org-open-at-point)) |
| 7784 | 7863 | ||
| 7785 | ;;;###autoload | 7864 | ;;;###autoload |
| 7786 | (defun org-open-link-from-string (s &optional arg) | 7865 | (defun org-open-link-from-string (s &optional arg reference-buffer) |
| 7787 | "Open a link in the string S, as if it was in Org-mode." | 7866 | "Open a link in the string S, as if it was in Org-mode." |
| 7788 | (interactive "sLink: \nP") | 7867 | (interactive "sLink: \nP") |
| 7789 | (let ((reference-buffer (current-buffer))) | 7868 | (let ((reference-buffer (or reference-buffer (current-buffer)))) |
| 7790 | (with-temp-buffer | 7869 | (with-temp-buffer |
| 7791 | (let ((org-inhibit-startup t)) | 7870 | (let ((org-inhibit-startup t)) |
| 7792 | (org-mode) | 7871 | (org-mode) |
| @@ -7808,6 +7887,13 @@ application the system uses for this file type." | |||
| 7808 | (setq org-window-config-before-follow-link (current-window-configuration)) | 7887 | (setq org-window-config-before-follow-link (current-window-configuration)) |
| 7809 | (org-remove-occur-highlights nil nil t) | 7888 | (org-remove-occur-highlights nil nil t) |
| 7810 | (cond | 7889 | (cond |
| 7890 | ((and (org-on-heading-p) | ||
| 7891 | (not (org-in-regexp | ||
| 7892 | (concat org-plain-link-re "\\|" | ||
| 7893 | org-bracket-link-regexp "\\|" | ||
| 7894 | org-angle-link-re "\\|" | ||
| 7895 | "[ \t]:[^ \t\n]+:[ \t]*$")))) | ||
| 7896 | (org-offer-links-in-entry in-emacs)) | ||
| 7811 | ((org-at-timestamp-p t) (org-follow-timestamp-link)) | 7897 | ((org-at-timestamp-p t) (org-follow-timestamp-link)) |
| 7812 | ((or (org-footnote-at-reference-p) (org-footnote-at-definition-p)) | 7898 | ((or (org-footnote-at-reference-p) (org-footnote-at-definition-p)) |
| 7813 | (org-footnote-action)) | 7899 | (org-footnote-action)) |
| @@ -7862,110 +7948,161 @@ application the system uses for this file type." | |||
| 7862 | ;; switch back to reference buffer | 7948 | ;; switch back to reference buffer |
| 7863 | ;; needed when if called in a temporary buffer through | 7949 | ;; needed when if called in a temporary buffer through |
| 7864 | ;; org-open-link-from-string | 7950 | ;; org-open-link-from-string |
| 7865 | (and reference-buffer (switch-to-buffer reference-buffer)) | 7951 | (with-current-buffer (or reference-buffer (current-buffer)) |
| 7866 | 7952 | ||
| 7867 | ;; Remove any trailing spaces in path | 7953 | ;; Remove any trailing spaces in path |
| 7868 | (if (string-match " +\\'" path) | 7954 | (if (string-match " +\\'" path) |
| 7869 | (setq path (replace-match "" t t path))) | 7955 | (setq path (replace-match "" t t path))) |
| 7870 | (if (and org-link-translation-function | 7956 | (if (and org-link-translation-function |
| 7871 | (fboundp org-link-translation-function)) | 7957 | (fboundp org-link-translation-function)) |
| 7872 | ;; Check if we need to translate the link | 7958 | ;; Check if we need to translate the link |
| 7873 | (let ((tmp (funcall org-link-translation-function type path))) | 7959 | (let ((tmp (funcall org-link-translation-function type path))) |
| 7874 | (setq type (car tmp) path (cdr tmp)))) | 7960 | (setq type (car tmp) path (cdr tmp)))) |
| 7875 | 7961 | ||
| 7876 | (cond | 7962 | (cond |
| 7877 | 7963 | ||
| 7878 | ((assoc type org-link-protocols) | 7964 | ((assoc type org-link-protocols) |
| 7879 | (funcall (nth 1 (assoc type org-link-protocols)) path)) | 7965 | (funcall (nth 1 (assoc type org-link-protocols)) path)) |
| 7880 | 7966 | ||
| 7881 | ((equal type "mailto") | 7967 | ((equal type "mailto") |
| 7882 | (let ((cmd (car org-link-mailto-program)) | 7968 | (let ((cmd (car org-link-mailto-program)) |
| 7883 | (args (cdr org-link-mailto-program)) args1 | 7969 | (args (cdr org-link-mailto-program)) args1 |
| 7884 | (address path) (subject "") a) | 7970 | (address path) (subject "") a) |
| 7885 | (if (string-match "\\(.*\\)::\\(.*\\)" path) | 7971 | (if (string-match "\\(.*\\)::\\(.*\\)" path) |
| 7886 | (setq address (match-string 1 path) | 7972 | (setq address (match-string 1 path) |
| 7887 | subject (org-link-escape (match-string 2 path)))) | 7973 | subject (org-link-escape (match-string 2 path)))) |
| 7888 | (while args | 7974 | (while args |
| 7889 | (cond | 7975 | (cond |
| 7890 | ((not (stringp (car args))) (push (pop args) args1)) | 7976 | ((not (stringp (car args))) (push (pop args) args1)) |
| 7891 | (t (setq a (pop args)) | 7977 | (t (setq a (pop args)) |
| 7892 | (if (string-match "%a" a) | 7978 | (if (string-match "%a" a) |
| 7893 | (setq a (replace-match address t t a))) | 7979 | (setq a (replace-match address t t a))) |
| 7894 | (if (string-match "%s" a) | 7980 | (if (string-match "%s" a) |
| 7895 | (setq a (replace-match subject t t a))) | 7981 | (setq a (replace-match subject t t a))) |
| 7896 | (push a args1)))) | 7982 | (push a args1)))) |
| 7897 | (apply cmd (nreverse args1)))) | 7983 | (apply cmd (nreverse args1)))) |
| 7898 | 7984 | ||
| 7899 | ((member type '("http" "https" "ftp" "news")) | 7985 | ((member type '("http" "https" "ftp" "news")) |
| 7900 | (browse-url (concat type ":" (org-link-escape | 7986 | (browse-url (concat type ":" (org-link-escape |
| 7901 | path org-link-escape-chars-browser)))) | 7987 | path org-link-escape-chars-browser)))) |
| 7902 | 7988 | ||
| 7903 | ((member type '("message")) | 7989 | ((member type '("message")) |
| 7904 | (browse-url (concat type ":" path))) | 7990 | (browse-url (concat type ":" path))) |
| 7905 | 7991 | ||
| 7906 | ((string= type "tags") | 7992 | ((string= type "tags") |
| 7907 | (org-tags-view in-emacs path)) | 7993 | (org-tags-view in-emacs path)) |
| 7908 | ((string= type "thisfile") | 7994 | ((string= type "thisfile") |
| 7909 | (if in-emacs | 7995 | (if in-emacs |
| 7910 | (switch-to-buffer-other-window | 7996 | (switch-to-buffer-other-window |
| 7911 | (org-get-buffer-for-internal-link (current-buffer))) | 7997 | (org-get-buffer-for-internal-link (current-buffer))) |
| 7912 | (org-mark-ring-push)) | 7998 | (org-mark-ring-push)) |
| 7913 | (let ((cmd `(org-link-search | 7999 | (let ((cmd `(org-link-search |
| 7914 | ,path | 8000 | ,path |
| 7915 | ,(cond ((equal in-emacs '(4)) 'occur) | 8001 | ,(cond ((equal in-emacs '(4)) 'occur) |
| 7916 | ((equal in-emacs '(16)) 'org-occur) | 8002 | ((equal in-emacs '(16)) 'org-occur) |
| 7917 | (t nil)) | 8003 | (t nil)) |
| 7918 | ,pos))) | 8004 | ,pos))) |
| 7919 | (condition-case nil (eval cmd) | 8005 | (condition-case nil (eval cmd) |
| 7920 | (error (progn (widen) (eval cmd)))))) | 8006 | (error (progn (widen) (eval cmd)))))) |
| 7921 | 8007 | ||
| 7922 | ((string= type "tree-match") | 8008 | ((string= type "tree-match") |
| 7923 | (org-occur (concat "\\[" (regexp-quote path) "\\]"))) | 8009 | (org-occur (concat "\\[" (regexp-quote path) "\\]"))) |
| 7924 | 8010 | ||
| 7925 | ((string= type "file") | 8011 | ((string= type "file") |
| 7926 | (if (string-match "::\\([0-9]+\\)\\'" path) | 8012 | (if (string-match "::\\([0-9]+\\)\\'" path) |
| 7927 | (setq line (string-to-number (match-string 1 path)) | 8013 | (setq line (string-to-number (match-string 1 path)) |
| 7928 | path (substring path 0 (match-beginning 0))) | 8014 | path (substring path 0 (match-beginning 0))) |
| 7929 | (if (string-match "::\\(.+\\)\\'" path) | 8015 | (if (string-match "::\\(.+\\)\\'" path) |
| 7930 | (setq search (match-string 1 path) | 8016 | (setq search (match-string 1 path) |
| 7931 | path (substring path 0 (match-beginning 0))))) | 8017 | path (substring path 0 (match-beginning 0))))) |
| 7932 | (if (string-match "[*?{]" (file-name-nondirectory path)) | 8018 | (if (string-match "[*?{]" (file-name-nondirectory path)) |
| 7933 | (dired path) | 8019 | (dired path) |
| 7934 | (org-open-file path in-emacs line search))) | 8020 | (org-open-file path in-emacs line search))) |
| 7935 | 8021 | ||
| 7936 | ((string= type "news") | 8022 | ((string= type "news") |
| 7937 | (require 'org-gnus) | 8023 | (require 'org-gnus) |
| 7938 | (org-gnus-follow-link path)) | 8024 | (org-gnus-follow-link path)) |
| 7939 | 8025 | ||
| 7940 | ((string= type "shell") | 8026 | ((string= type "shell") |
| 7941 | (let ((cmd path)) | 8027 | (let ((cmd path)) |
| 7942 | (if (or (not org-confirm-shell-link-function) | 8028 | (if (or (not org-confirm-shell-link-function) |
| 7943 | (funcall org-confirm-shell-link-function | 8029 | (funcall org-confirm-shell-link-function |
| 7944 | (format "Execute \"%s\" in shell? " | 8030 | (format "Execute \"%s\" in shell? " |
| 7945 | (org-add-props cmd nil | 8031 | (org-add-props cmd nil |
| 7946 | 'face 'org-warning)))) | 8032 | 'face 'org-warning)))) |
| 7947 | (progn | 8033 | (progn |
| 7948 | (message "Executing %s" cmd) | 8034 | (message "Executing %s" cmd) |
| 7949 | (shell-command cmd)) | 8035 | (shell-command cmd)) |
| 7950 | (error "Abort")))) | 8036 | (error "Abort")))) |
| 7951 | 8037 | ||
| 7952 | ((string= type "elisp") | 8038 | ((string= type "elisp") |
| 7953 | (let ((cmd path)) | 8039 | (let ((cmd path)) |
| 7954 | (if (or (not org-confirm-elisp-link-function) | 8040 | (if (or (not org-confirm-elisp-link-function) |
| 7955 | (funcall org-confirm-elisp-link-function | 8041 | (funcall org-confirm-elisp-link-function |
| 7956 | (format "Execute \"%s\" as elisp? " | 8042 | (format "Execute \"%s\" as elisp? " |
| 7957 | (org-add-props cmd nil | 8043 | (org-add-props cmd nil |
| 7958 | 'face 'org-warning)))) | 8044 | 'face 'org-warning)))) |
| 7959 | (message "%s => %s" cmd | 8045 | (message "%s => %s" cmd |
| 7960 | (if (equal (string-to-char cmd) ?\() | 8046 | (if (equal (string-to-char cmd) ?\() |
| 7961 | (eval (read cmd)) | 8047 | (eval (read cmd)) |
| 7962 | (call-interactively (read cmd)))) | 8048 | (call-interactively (read cmd)))) |
| 7963 | (error "Abort")))) | 8049 | (error "Abort")))) |
| 8050 | |||
| 8051 | (t | ||
| 8052 | (browse-url-at-point)))))) | ||
| 8053 | (move-marker org-open-link-marker nil) | ||
| 8054 | (run-hook-with-args 'org-follow-link-hook))) | ||
| 8055 | |||
| 8056 | (defun org-offer-links-in-entry (&optional nth) | ||
| 8057 | "Offer links in the curren entry and follow the selected link. | ||
| 8058 | If there is only one link, follow it immediately as well. | ||
| 8059 | If NTH is an integer immediately pick the NTH link found." | ||
| 8060 | (let ((re (concat "\\(" org-bracket-link-regexp "\\)\\|" | ||
| 8061 | "\\(" org-angle-link-re "\\)\\|" | ||
| 8062 | "\\(" org-plain-link-re "\\)")) | ||
| 8063 | (cnt ?0) | ||
| 8064 | (in-emacs (if (integerp nth) nil nth)) | ||
| 8065 | end | ||
| 8066 | links link c) | ||
| 8067 | (save-excursion | ||
| 8068 | (org-back-to-heading t) | ||
| 8069 | (setq end (save-excursion (outline-next-heading) (point))) | ||
| 8070 | (while (re-search-forward re end t) | ||
| 8071 | (push (match-string 0) links)) | ||
| 8072 | (setq links (org-uniquify (reverse links)))) | ||
| 7964 | 8073 | ||
| 7965 | (t | 8074 | (cond |
| 7966 | (browse-url-at-point)))))) | 8075 | ((null links) (error "No links")) |
| 7967 | (move-marker org-open-link-marker nil) | 8076 | ((equal (length links) 1) |
| 7968 | (run-hook-with-args 'org-follow-link-hook)) | 8077 | (setq link (car links))) |
| 8078 | ((and (integerp nth) (>= (length links) nth)) | ||
| 8079 | (setq link (nth (1- nth) links))) | ||
| 8080 | (t ; we have to select a link | ||
| 8081 | (save-excursion | ||
| 8082 | (save-window-excursion | ||
| 8083 | (delete-other-windows) | ||
| 8084 | (with-output-to-temp-buffer "*Select Link*" | ||
| 8085 | (princ "Select link\n\n") | ||
| 8086 | (mapc (lambda (l) | ||
| 8087 | (if (not (string-match org-bracket-link-regexp l)) | ||
| 8088 | (princ (format "[%c] %s\n" (incf cnt) | ||
| 8089 | (org-remove-angle-brackets l))) | ||
| 8090 | (if (match-end 3) | ||
| 8091 | (princ (format "[%c] %s (%s)\n" (incf cnt) | ||
| 8092 | (match-string 3 l) (match-string 1 l))) | ||
| 8093 | (princ (format "[%c] %s\n" (incf cnt) | ||
| 8094 | (match-string 1 l)))))) | ||
| 8095 | links)) | ||
| 8096 | (org-fit-window-to-buffer (get-buffer-window "*Select Link*")) | ||
| 8097 | (message "Select link to open:") | ||
| 8098 | (setq c (read-char-exclusive)) | ||
| 8099 | (and (get-buffer "*Select Link*") (kill-buffer "*Select Link*")))) | ||
| 8100 | (when (equal c ?q) (error "Abort")) | ||
| 8101 | (setq nth (- c ?0)) | ||
| 8102 | (unless (and (integerp nth) (>= (length links) nth)) | ||
| 8103 | (error "Invalid link selection")) | ||
| 8104 | (setq link (nth (1- nth) links)))) | ||
| 8105 | (org-open-link-from-string link in-emacs (current-buffer)))) | ||
| 7969 | 8106 | ||
| 7970 | ;;;; Time estimates | 8107 | ;;;; Time estimates |
| 7971 | 8108 | ||
| @@ -8349,7 +8486,7 @@ If the file does not exist, an error is thrown." | |||
| 8349 | (eq cmd 'emacs)) | 8486 | (eq cmd 'emacs)) |
| 8350 | (funcall (cdr (assq 'file org-link-frame-setup)) file) | 8487 | (funcall (cdr (assq 'file org-link-frame-setup)) file) |
| 8351 | (widen) | 8488 | (widen) |
| 8352 | (if line (goto-line line) | 8489 | (if line (org-goto-line line) |
| 8353 | (if search (org-link-search search)))) | 8490 | (if search (org-link-search search)))) |
| 8354 | ((consp cmd) | 8491 | ((consp cmd) |
| 8355 | (let ((file (convert-standard-filename file))) | 8492 | (let ((file (convert-standard-filename file))) |
| @@ -8640,7 +8777,7 @@ See also `org-refile-use-outline-path' and `org-completion-use-ido'" | |||
| 8640 | (goto-char | 8777 | (goto-char |
| 8641 | (if reversed | 8778 | (if reversed |
| 8642 | (or (outline-next-heading) (point-max)) | 8779 | (or (outline-next-heading) (point-max)) |
| 8643 | (or (save-excursion (outline-get-next-sibling)) | 8780 | (or (save-excursion (org-get-next-sibling)) |
| 8644 | (org-end-of-subtree t t) | 8781 | (org-end-of-subtree t t) |
| 8645 | (point-max))))) | 8782 | (point-max))))) |
| 8646 | (setq level 1) | 8783 | (setq level 1) |
| @@ -8681,7 +8818,7 @@ See also `org-refile-use-outline-path' and `org-completion-use-ido'" | |||
| 8681 | (cfunc (if (and org-refile-use-outline-path | 8818 | (cfunc (if (and org-refile-use-outline-path |
| 8682 | org-outline-path-complete-in-steps) | 8819 | org-outline-path-complete-in-steps) |
| 8683 | 'org-olpath-completing-read | 8820 | 'org-olpath-completing-read |
| 8684 | 'org-ido-completing-read)) | 8821 | 'org-icompleting-read)) |
| 8685 | (extra (if org-refile-use-outline-path "/" "")) | 8822 | (extra (if org-refile-use-outline-path "/" "")) |
| 8686 | (filename (and cfn (expand-file-name cfn))) | 8823 | (filename (and cfn (expand-file-name cfn))) |
| 8687 | (tbl (mapcar | 8824 | (tbl (mapcar |
| @@ -8751,9 +8888,10 @@ See also `org-refile-use-outline-path' and `org-completion-use-ido'" | |||
| 8751 | (defun org-olpath-completing-read (prompt collection &rest args) | 8888 | (defun org-olpath-completing-read (prompt collection &rest args) |
| 8752 | "Read an outline path like a file name." | 8889 | "Read an outline path like a file name." |
| 8753 | (let ((thetable collection) | 8890 | (let ((thetable collection) |
| 8754 | (org-completion-use-ido nil)) ; does not work with ido. | 8891 | (org-completion-use-ido nil) ; does not work with ido. |
| 8892 | (org-completion-use-iswitchb nil)) ; or iswitchb | ||
| 8755 | (apply | 8893 | (apply |
| 8756 | 'org-ido-completing-read prompt | 8894 | 'org-icompleting-read prompt |
| 8757 | (lambda (string predicate &optional flag) | 8895 | (lambda (string predicate &optional flag) |
| 8758 | (let (rtn r f (l (length string))) | 8896 | (let (rtn r f (l (length string))) |
| 8759 | (cond | 8897 | (cond |
| @@ -8912,7 +9050,8 @@ This function can be used in a hook." | |||
| 8912 | "BEGIN_SRC" "END_SRC" | 9050 | "BEGIN_SRC" "END_SRC" |
| 8913 | "CATEGORY" "COLUMNS" | 9051 | "CATEGORY" "COLUMNS" |
| 8914 | "CAPTION" "LABEL" | 9052 | "CAPTION" "LABEL" |
| 8915 | "BIND")) | 9053 | "BIND" |
| 9054 | "MACRO")) | ||
| 8916 | 9055 | ||
| 8917 | (defcustom org-structure-template-alist | 9056 | (defcustom org-structure-template-alist |
| 8918 | '( | 9057 | '( |
| @@ -9044,11 +9183,14 @@ At all other locations, this simply calls the value of | |||
| 9044 | (setq type :opt) | 9183 | (setq type :opt) |
| 9045 | (require 'org-exp) | 9184 | (require 'org-exp) |
| 9046 | (append | 9185 | (append |
| 9047 | (mapcar | 9186 | (delq nil |
| 9048 | (lambda (x) | 9187 | (mapcar |
| 9049 | (string-match "^#\\+\\(\\([A-Z_]+:?\\).*\\)" x) | 9188 | (lambda (x) |
| 9050 | (cons (match-string 2 x) (match-string 1 x))) | 9189 | (if (string-match |
| 9051 | (org-split-string (org-get-current-options) "\n")) | 9190 | "^#\\+\\(\\([A-Z_]+:?\\).*\\)" x) |
| 9191 | (cons (match-string 2 x) | ||
| 9192 | (match-string 1 x)))) | ||
| 9193 | (org-split-string (org-get-current-options) "\n"))) | ||
| 9052 | (mapcar 'list org-additional-option-like-keywords))) | 9194 | (mapcar 'list org-additional-option-like-keywords))) |
| 9053 | (startup | 9195 | (startup |
| 9054 | (setq type :startup) | 9196 | (setq type :startup) |
| @@ -9247,7 +9389,7 @@ For calling through lisp, arg is also interpreted in the following way: | |||
| 9247 | (or (not org-use-fast-todo-selection) | 9389 | (or (not org-use-fast-todo-selection) |
| 9248 | (not org-todo-key-trigger))) | 9390 | (not org-todo-key-trigger))) |
| 9249 | ;; Read a state with completion | 9391 | ;; Read a state with completion |
| 9250 | (org-ido-completing-read | 9392 | (org-icompleting-read |
| 9251 | "State: " (mapcar (lambda(x) (list x)) | 9393 | "State: " (mapcar (lambda(x) (list x)) |
| 9252 | org-todo-keywords-1) | 9394 | org-todo-keywords-1) |
| 9253 | nil t)) | 9395 | nil t)) |
| @@ -9513,6 +9655,39 @@ changes because there are uncheckd boxes in this entry." | |||
| 9513 | (throw 'dont-block nil))))) | 9655 | (throw 'dont-block nil))))) |
| 9514 | t)) ; do not block | 9656 | t)) ; do not block |
| 9515 | 9657 | ||
| 9658 | (defun org-update-statistics-cookies (all) | ||
| 9659 | "Update the statistics cookie, either from TODO or from checkboxes. | ||
| 9660 | This should be called with the cursor in a line with a statistics cookie." | ||
| 9661 | (interactive "P") | ||
| 9662 | (if all | ||
| 9663 | (progn | ||
| 9664 | (org-update-checkbox-count 'all) | ||
| 9665 | (org-map-entries 'org-update-parent-todo-statistics)) | ||
| 9666 | (if (not (org-on-heading-p)) | ||
| 9667 | (org-update-checkbox-count) | ||
| 9668 | (let ((pos (move-marker (make-marker) (point))) | ||
| 9669 | end l1 l2) | ||
| 9670 | (ignore-errors (org-back-to-heading t)) | ||
| 9671 | (if (not (org-on-heading-p)) | ||
| 9672 | (org-update-checkbox-count) | ||
| 9673 | (setq l1 (org-outline-level)) | ||
| 9674 | (setq end (save-excursion | ||
| 9675 | (outline-next-heading) | ||
| 9676 | (if (org-on-heading-p) (setq l2 (org-outline-level))) | ||
| 9677 | (point))) | ||
| 9678 | (if (and (save-excursion (re-search-forward | ||
| 9679 | "^[ \t]*[-+*] \\[[- X]\\]" end t)) | ||
| 9680 | (not (save-excursion (re-search-forward | ||
| 9681 | ":COOKIE_DATA:.*\\<todo\\>" end t)))) | ||
| 9682 | (org-update-checkbox-count) | ||
| 9683 | (if (and l2 (> l2 l1)) | ||
| 9684 | (progn | ||
| 9685 | (goto-char end) | ||
| 9686 | (org-update-parent-todo-statistics)) | ||
| 9687 | (error "No data for statistics cookie")))) | ||
| 9688 | (goto-char pos) | ||
| 9689 | (move-marker pos nil))))) | ||
| 9690 | |||
| 9516 | (defvar org-entry-property-inherited-from) ;; defined below | 9691 | (defvar org-entry-property-inherited-from) ;; defined below |
| 9517 | (defun org-update-parent-todo-statistics () | 9692 | (defun org-update-parent-todo-statistics () |
| 9518 | "Update any statistics cookie in the parent of the current headline. | 9693 | "Update any statistics cookie in the parent of the current headline. |
| @@ -9848,7 +10023,7 @@ of `org-todo-keywords-1'." | |||
| 9848 | (kwd-re | 10023 | (kwd-re |
| 9849 | (cond ((null arg) org-not-done-regexp) | 10024 | (cond ((null arg) org-not-done-regexp) |
| 9850 | ((equal arg '(4)) | 10025 | ((equal arg '(4)) |
| 9851 | (let ((kwd (org-ido-completing-read "Keyword (or KWD1|KWD2|...): " | 10026 | (let ((kwd (org-icompleting-read "Keyword (or KWD1|KWD2|...): " |
| 9852 | (mapcar 'list org-todo-keywords-1)))) | 10027 | (mapcar 'list org-todo-keywords-1)))) |
| 9853 | (concat "\\(" | 10028 | (concat "\\(" |
| 9854 | (mapconcat 'identity (org-split-string kwd "|") "\\|") | 10029 | (mapconcat 'identity (org-split-string kwd "|") "\\|") |
| @@ -9913,7 +10088,7 @@ nil." | |||
| 9913 | (save-excursion | 10088 | (save-excursion |
| 9914 | (org-back-to-heading t) | 10089 | (org-back-to-heading t) |
| 9915 | (setq beg (point)) | 10090 | (setq beg (point)) |
| 9916 | (org-end-of-subtree t t) | 10091 | (outline-next-heading) |
| 9917 | (while (re-search-backward re beg t) | 10092 | (while (re-search-backward re beg t) |
| 9918 | (replace-match "") | 10093 | (replace-match "") |
| 9919 | (if (and (string-match "\\S-" (buffer-substring (point-at-bol) (point))) | 10094 | (if (and (string-match "\\S-" (buffer-substring (point-at-bol) (point))) |
| @@ -10234,9 +10409,9 @@ a Show deadlines and scheduled items after a date." | |||
| 10234 | ((member ans '(?T ?m)) | 10409 | ((member ans '(?T ?m)) |
| 10235 | (call-interactively 'org-match-sparse-tree)) | 10410 | (call-interactively 'org-match-sparse-tree)) |
| 10236 | ((member ans '(?p ?P)) | 10411 | ((member ans '(?p ?P)) |
| 10237 | (setq kwd (org-ido-completing-read "Property: " | 10412 | (setq kwd (org-icompleting-read "Property: " |
| 10238 | (mapcar 'list (org-buffer-property-keys)))) | 10413 | (mapcar 'list (org-buffer-property-keys)))) |
| 10239 | (setq value (org-ido-completing-read "Value: " | 10414 | (setq value (org-icompleting-read "Value: " |
| 10240 | (mapcar 'list (org-property-values kwd)))) | 10415 | (mapcar 'list (org-property-values kwd)))) |
| 10241 | (unless (string-match "\\`{.*}\\'" value) | 10416 | (unless (string-match "\\`{.*}\\'" value) |
| 10242 | (setq value (concat "\"" value "\""))) | 10417 | (setq value (concat "\"" value "\""))) |
| @@ -10684,7 +10859,7 @@ also TODO lines." | |||
| 10684 | ;; Get a new match request, with completion | 10859 | ;; Get a new match request, with completion |
| 10685 | (let ((org-last-tags-completion-table | 10860 | (let ((org-last-tags-completion-table |
| 10686 | (org-global-tags-completion-table))) | 10861 | (org-global-tags-completion-table))) |
| 10687 | (setq match (org-completing-read-no-ido | 10862 | (setq match (org-completing-read-no-i |
| 10688 | "Match: " 'org-tags-completion-function nil nil nil | 10863 | "Match: " 'org-tags-completion-function nil nil nil |
| 10689 | 'org-tags-history)))) | 10864 | 'org-tags-history)))) |
| 10690 | 10865 | ||
| @@ -11021,7 +11196,7 @@ With prefix ARG, realign all tags in headings in the current buffer." | |||
| 11021 | (let ((org-add-colon-after-tag-completion t)) | 11196 | (let ((org-add-colon-after-tag-completion t)) |
| 11022 | (org-trim | 11197 | (org-trim |
| 11023 | (org-without-partial-completion | 11198 | (org-without-partial-completion |
| 11024 | (org-ido-completing-read "Tags: " 'org-tags-completion-function | 11199 | (org-icompleting-read "Tags: " 'org-tags-completion-function |
| 11025 | nil nil current 'org-tags-history))))))) | 11200 | nil nil current 'org-tags-history))))))) |
| 11026 | (while (string-match "[-+&]+" tags) | 11201 | (while (string-match "[-+&]+" tags) |
| 11027 | ;; No boolean logic, just a list | 11202 | ;; No boolean logic, just a list |
| @@ -11069,7 +11244,7 @@ This works in the agenda, and also in an org-mode buffer." | |||
| 11069 | (if (org-mode-p) | 11244 | (if (org-mode-p) |
| 11070 | (org-get-buffer-tags) | 11245 | (org-get-buffer-tags) |
| 11071 | (org-global-tags-completion-table)))) | 11246 | (org-global-tags-completion-table)))) |
| 11072 | (org-ido-completing-read | 11247 | (org-icompleting-read |
| 11073 | "Tag: " 'org-tags-completion-function nil nil nil | 11248 | "Tag: " 'org-tags-completion-function nil nil nil |
| 11074 | 'org-tags-history)) | 11249 | 'org-tags-history)) |
| 11075 | (progn | 11250 | (progn |
| @@ -11083,7 +11258,7 @@ This works in the agenda, and also in an org-mode buffer." | |||
| 11083 | (goto-char beg) | 11258 | (goto-char beg) |
| 11084 | (setq l1 (org-current-line)) | 11259 | (setq l1 (org-current-line)) |
| 11085 | (loop for l from l1 to l2 do | 11260 | (loop for l from l1 to l2 do |
| 11086 | (goto-line l) | 11261 | (org-goto-line l) |
| 11087 | (setq m (get-text-property (point) 'org-hd-marker)) | 11262 | (setq m (get-text-property (point) 'org-hd-marker)) |
| 11088 | (when (or (and (org-mode-p) (org-on-heading-p)) | 11263 | (when (or (and (org-mode-p) (org-on-heading-p)) |
| 11089 | (and agendap m)) | 11264 | (and agendap m)) |
| @@ -11134,7 +11309,7 @@ This works in the agenda, and also in an org-mode buffer." | |||
| 11134 | 11309 | ||
| 11135 | (defun org-fast-tag-show-exit (flag) | 11310 | (defun org-fast-tag-show-exit (flag) |
| 11136 | (save-excursion | 11311 | (save-excursion |
| 11137 | (goto-line 3) | 11312 | (org-goto-line 3) |
| 11138 | (if (re-search-forward "[ \t]+Next change exits" (point-at-eol) t) | 11313 | (if (re-search-forward "[ \t]+Next change exits" (point-at-eol) t) |
| 11139 | (replace-match "")) | 11314 | (replace-match "")) |
| 11140 | (when flag | 11315 | (when flag |
| @@ -11225,7 +11400,7 @@ Returns the new tags string, or nil to not change the current settings." | |||
| 11225 | (insert "\n") | 11400 | (insert "\n") |
| 11226 | (setq tbl (cdr tbl))))) | 11401 | (setq tbl (cdr tbl))))) |
| 11227 | (t | 11402 | (t |
| 11228 | (setq tg (car e) c2 nil) | 11403 | (setq tg (copy-sequence (car e)) c2 nil) |
| 11229 | (if (cdr e) | 11404 | (if (cdr e) |
| 11230 | (setq c (cdr e)) | 11405 | (setq c (cdr e)) |
| 11231 | ;; automatically assign a character. | 11406 | ;; automatically assign a character. |
| @@ -11288,7 +11463,7 @@ Returns the new tags string, or nil to not change the current settings." | |||
| 11288 | (if exit-after-next (setq exit-after-next 'now))) | 11463 | (if exit-after-next (setq exit-after-next 'now))) |
| 11289 | ((= c ?\t) | 11464 | ((= c ?\t) |
| 11290 | (condition-case nil | 11465 | (condition-case nil |
| 11291 | (setq tg (org-ido-completing-read | 11466 | (setq tg (org-icompleting-read |
| 11292 | "Tag: " | 11467 | "Tag: " |
| 11293 | (or buffer-tags | 11468 | (or buffer-tags |
| 11294 | (with-current-buffer buf | 11469 | (with-current-buffer buf |
| @@ -11541,6 +11716,35 @@ Being in this list makes sure that they are offered for completion.") | |||
| 11541 | (call-interactively 'org-compute-property-at-point)) | 11716 | (call-interactively 'org-compute-property-at-point)) |
| 11542 | (t (error "No such property action %c" c))))) | 11717 | (t (error "No such property action %c" c))))) |
| 11543 | 11718 | ||
| 11719 | (defun org-set-effort (&optional value) | ||
| 11720 | "Set the effort property of the current entry. | ||
| 11721 | With numerical prefix arg, use the nth allowed value, 0 stands for the 10th | ||
| 11722 | allowed value." | ||
| 11723 | (interactive "P") | ||
| 11724 | (if (equal value 0) (setq value 10)) | ||
| 11725 | (let* ((completion-ignore-case t) | ||
| 11726 | (prop org-effort-property) | ||
| 11727 | (cur (org-entry-get nil prop)) | ||
| 11728 | (allowed (org-property-get-allowed-values nil prop 'table)) | ||
| 11729 | (existing (mapcar 'list (org-property-values prop))) | ||
| 11730 | (val (cond | ||
| 11731 | ((stringp value) value) | ||
| 11732 | ((and allowed (integerp value)) | ||
| 11733 | (or (car (nth (1- value) allowed)) | ||
| 11734 | (car (org-last allowed)))) | ||
| 11735 | (allowed | ||
| 11736 | (org-completing-read "Value: " allowed nil 'req-match)) | ||
| 11737 | (t | ||
| 11738 | (let (org-completion-use-ido org-completion-use-iswitchb) | ||
| 11739 | (org-completing-read | ||
| 11740 | (concat "Value " (if (and cur (string-match "\\S-" cur)) | ||
| 11741 | (concat "[" cur "]") "") | ||
| 11742 | ": ") | ||
| 11743 | existing nil nil "" nil cur)))))) | ||
| 11744 | (unless (equal (org-entry-get nil prop) val) | ||
| 11745 | (org-entry-put nil prop val)) | ||
| 11746 | (message "%s is now %s" prop val))) | ||
| 11747 | |||
| 11544 | (defun org-at-property-p () | 11748 | (defun org-at-property-p () |
| 11545 | "Is the cursor in a property line?" | 11749 | "Is the cursor in a property line?" |
| 11546 | ;; FIXME: Does not check if we are actually in the drawer. | 11750 | ;; FIXME: Does not check if we are actually in the drawer. |
| @@ -11958,7 +12162,7 @@ in the current file." | |||
| 11958 | (interactive | 12162 | (interactive |
| 11959 | (let* ((completion-ignore-case t) | 12163 | (let* ((completion-ignore-case t) |
| 11960 | (keys (org-buffer-property-keys nil t t)) | 12164 | (keys (org-buffer-property-keys nil t t)) |
| 11961 | (prop0 (org-ido-completing-read "Property: " (mapcar 'list keys))) | 12165 | (prop0 (org-icompleting-read "Property: " (mapcar 'list keys))) |
| 11962 | (prop (if (member prop0 keys) | 12166 | (prop (if (member prop0 keys) |
| 11963 | prop0 | 12167 | prop0 |
| 11964 | (or (cdr (assoc (downcase prop0) | 12168 | (or (cdr (assoc (downcase prop0) |
| @@ -11970,9 +12174,9 @@ in the current file." | |||
| 11970 | (existing (mapcar 'list (org-property-values prop))) | 12174 | (existing (mapcar 'list (org-property-values prop))) |
| 11971 | (val (if allowed | 12175 | (val (if allowed |
| 11972 | (org-completing-read "Value: " allowed nil 'req-match) | 12176 | (org-completing-read "Value: " allowed nil 'req-match) |
| 11973 | (let (org-completion-use-ido) | 12177 | (let (org-completion-use-ido org-completion-use-iswitchb) |
| 11974 | (org-completing-read | 12178 | (org-completing-read |
| 11975 | (concat "Value" (if (and cur (string-match "\\S-" cur)) | 12179 | (concat "Value " (if (and cur (string-match "\\S-" cur)) |
| 11976 | (concat "[" cur "]") "") | 12180 | (concat "[" cur "]") "") |
| 11977 | ": ") | 12181 | ": ") |
| 11978 | existing nil nil "" nil cur))))) | 12182 | existing nil nil "" nil cur))))) |
| @@ -11984,7 +12188,7 @@ in the current file." | |||
| 11984 | "In the current entry, delete PROPERTY." | 12188 | "In the current entry, delete PROPERTY." |
| 11985 | (interactive | 12189 | (interactive |
| 11986 | (let* ((completion-ignore-case t) | 12190 | (let* ((completion-ignore-case t) |
| 11987 | (prop (org-ido-completing-read | 12191 | (prop (org-icompleting-read |
| 11988 | "Property: " (org-entry-properties nil 'standard)))) | 12192 | "Property: " (org-entry-properties nil 'standard)))) |
| 11989 | (list prop))) | 12193 | (list prop))) |
| 11990 | (message "Property %s %s" property | 12194 | (message "Property %s %s" property |
| @@ -11996,7 +12200,7 @@ in the current file." | |||
| 11996 | "Remove PROPERTY globally, from all entries." | 12200 | "Remove PROPERTY globally, from all entries." |
| 11997 | (interactive | 12201 | (interactive |
| 11998 | (let* ((completion-ignore-case t) | 12202 | (let* ((completion-ignore-case t) |
| 11999 | (prop (org-ido-completing-read | 12203 | (prop (org-icompleting-read |
| 12000 | "Globally remove property: " | 12204 | "Globally remove property: " |
| 12001 | (mapcar 'list (org-buffer-property-keys))))) | 12205 | (mapcar 'list (org-buffer-property-keys))))) |
| 12002 | (list prop))) | 12206 | (list prop))) |
| @@ -12595,7 +12799,7 @@ Also, store the cursor date in variable org-ans2." | |||
| 12595 | (setq org-ans2 (format-time-string "%Y-%m-%d" time)))) | 12799 | (setq org-ans2 (format-time-string "%Y-%m-%d" time)))) |
| 12596 | (org-move-overlay org-date-ovl (1- (point)) (1+ (point)) (current-buffer)) | 12800 | (org-move-overlay org-date-ovl (1- (point)) (1+ (point)) (current-buffer)) |
| 12597 | (select-window sw) | 12801 | (select-window sw) |
| 12598 | (select-frame-set-input-focus sf))) | 12802 | (org-select-frame-set-input-focus sf))) |
| 12599 | 12803 | ||
| 12600 | (defun org-calendar-select () | 12804 | (defun org-calendar-select () |
| 12601 | "Return to `org-read-date' with the date currently selected. | 12805 | "Return to `org-read-date' with the date currently selected. |
| @@ -12826,8 +13030,8 @@ days in order to avoid rounding problems." | |||
| 12826 | (match-end (match-end 0)) | 13030 | (match-end (match-end 0)) |
| 12827 | (time1 (org-time-string-to-time ts1)) | 13031 | (time1 (org-time-string-to-time ts1)) |
| 12828 | (time2 (org-time-string-to-time ts2)) | 13032 | (time2 (org-time-string-to-time ts2)) |
| 12829 | (t1 (time-to-seconds time1)) | 13033 | (t1 (org-float-time time1)) |
| 12830 | (t2 (time-to-seconds time2)) | 13034 | (t2 (org-float-time time2)) |
| 12831 | (diff (abs (- t2 t1))) | 13035 | (diff (abs (- t2 t1))) |
| 12832 | (negative (< (- t2 t1) 0)) | 13036 | (negative (< (- t2 t1) 0)) |
| 12833 | ;; (ys (floor (* 365 24 60 60))) | 13037 | ;; (ys (floor (* 365 24 60 60))) |
| @@ -12883,7 +13087,7 @@ days in order to avoid rounding problems." | |||
| 12883 | (defun org-time-string-to-time (s) | 13087 | (defun org-time-string-to-time (s) |
| 12884 | (apply 'encode-time (org-parse-time-string s))) | 13088 | (apply 'encode-time (org-parse-time-string s))) |
| 12885 | (defun org-time-string-to-seconds (s) | 13089 | (defun org-time-string-to-seconds (s) |
| 12886 | (time-to-seconds (org-time-string-to-time s))) | 13090 | (org-float-time (org-time-string-to-time s))) |
| 12887 | 13091 | ||
| 12888 | (defun org-time-string-to-absolute (s &optional daynr prefer show-all) | 13092 | (defun org-time-string-to-absolute (s &optional daynr prefer show-all) |
| 12889 | "Convert a time stamp to an absolute day number. | 13093 | "Convert a time stamp to an absolute day number. |
| @@ -13071,7 +13275,7 @@ hour and minute fields will be nil if not given." | |||
| 13071 | (string-to-number (match-string 3 s)) | 13275 | (string-to-number (match-string 3 s)) |
| 13072 | (string-to-number (match-string 2 s)) | 13276 | (string-to-number (match-string 2 s)) |
| 13073 | nil nil nil) | 13277 | nil nil nil) |
| 13074 | (make-list 9 0))) | 13278 | (error "Not a standard Org-mode time string: %s" s))) |
| 13075 | 13279 | ||
| 13076 | (defun org-timestamp-up (&optional arg) | 13280 | (defun org-timestamp-up (&optional arg) |
| 13077 | "Increase the date item at the cursor by one. | 13281 | "Increase the date item at the cursor by one. |
| @@ -13372,32 +13576,7 @@ changes from another. I believe the procedure must be like this: | |||
| 13372 | 13576 | ||
| 13373 | ;;;###autoload | 13577 | ;;;###autoload |
| 13374 | (defun org-iswitchb (&optional arg) | 13578 | (defun org-iswitchb (&optional arg) |
| 13375 | "Use `iswitchb-read-buffer' to prompt for an Org buffer to switch to. | 13579 | "Use `org-icompleting-read' to prompt for an Org buffer to switch to. |
| 13376 | With a prefix argument, restrict available to files. | ||
| 13377 | With two prefix arguments, restrict available buffers to agenda files. | ||
| 13378 | |||
| 13379 | Due to some yet unresolved reason, the global function | ||
| 13380 | `iswitchb-mode' needs to be active for this function to work." | ||
| 13381 | (interactive "P") | ||
| 13382 | (require 'iswitchb) | ||
| 13383 | (let ((enabled iswitchb-mode) blist) | ||
| 13384 | (or enabled (iswitchb-mode 1)) | ||
| 13385 | (setq blist (cond ((equal arg '(4)) (org-buffer-list 'files)) | ||
| 13386 | ((equal arg '(16)) (org-buffer-list 'agenda)) | ||
| 13387 | (t (org-buffer-list)))) | ||
| 13388 | (unwind-protect | ||
| 13389 | (let ((iswitchb-make-buflist-hook | ||
| 13390 | (lambda () | ||
| 13391 | (setq iswitchb-temp-buflist | ||
| 13392 | (mapcar 'buffer-name blist))))) | ||
| 13393 | (switch-to-buffer | ||
| 13394 | (iswitchb-read-buffer | ||
| 13395 | "Switch-to: " nil t)) | ||
| 13396 | (or enabled (iswitchb-mode -1)))))) | ||
| 13397 | |||
| 13398 | ;;;###autoload | ||
| 13399 | (defun org-ido-switchb (&optional arg) | ||
| 13400 | "Use `org-ido-completing-read' to prompt for an Org buffer to switch to. | ||
| 13401 | With a prefix argument, restrict available to files. | 13580 | With a prefix argument, restrict available to files. |
| 13402 | With two prefix arguments, restrict available buffers to agenda files." | 13581 | With two prefix arguments, restrict available buffers to agenda files." |
| 13403 | (interactive "P") | 13582 | (interactive "P") |
| @@ -13405,10 +13584,13 @@ With two prefix arguments, restrict available buffers to agenda files." | |||
| 13405 | ((equal arg '(16)) (org-buffer-list 'agenda)) | 13584 | ((equal arg '(16)) (org-buffer-list 'agenda)) |
| 13406 | (t (org-buffer-list))))) | 13585 | (t (org-buffer-list))))) |
| 13407 | (switch-to-buffer | 13586 | (switch-to-buffer |
| 13408 | (org-ido-completing-read "Org buffer: " | 13587 | (org-icompleting-read "Org buffer: " |
| 13409 | (mapcar 'list (mapcar 'buffer-name blist)) | 13588 | (mapcar 'list (mapcar 'buffer-name blist)) |
| 13410 | nil t)))) | 13589 | nil t)))) |
| 13411 | 13590 | ||
| 13591 | ;;;###autoload | ||
| 13592 | (defalias 'org-ido-switchb 'org-iswitchb) | ||
| 13593 | |||
| 13412 | (defun org-buffer-list (&optional predicate exclude-tmp) | 13594 | (defun org-buffer-list (&optional predicate exclude-tmp) |
| 13413 | "Return a list of Org buffers. | 13595 | "Return a list of Org buffers. |
| 13414 | PREDICATE can be `export', `files' or `agenda'. | 13596 | PREDICATE can be `export', `files' or `agenda'. |
| @@ -13508,9 +13690,8 @@ the buffer and restores the previous window configuration." | |||
| 13508 | (while (setq b (find-buffer-visiting f)) (kill-buffer b)) | 13690 | (while (setq b (find-buffer-visiting f)) (kill-buffer b)) |
| 13509 | (with-temp-file f | 13691 | (with-temp-file f |
| 13510 | (insert (mapconcat 'identity list "\n") "\n"))) | 13692 | (insert (mapconcat 'identity list "\n") "\n"))) |
| 13511 | (let ((org-mode-hook nil) | 13693 | (let ((org-mode-hook nil) (org-inhibit-startup t) |
| 13512 | ;; FIXME: What is this for?? --Stef | 13694 | (org-insert-mode-line-in-empty-file nil)) |
| 13513 | (default-major-mode 'fundamental-mode)) | ||
| 13514 | (setq org-agenda-files list) | 13695 | (setq org-agenda-files list) |
| 13515 | (customize-save-variable 'org-agenda-files org-agenda-files)))) | 13696 | (customize-save-variable 'org-agenda-files org-agenda-files)))) |
| 13516 | 13697 | ||
| @@ -13858,8 +14039,8 @@ The images can be removed again with \\[org-ctrl-c-ctrl-c]." | |||
| 13858 | ("$1" "\\([^$]\\)\\(\\$[^ \r\n,;.$]\\$\\)\\([- .,?;:'\")\000]\\|$\\)" 2 nil) | 14039 | ("$1" "\\([^$]\\)\\(\\$[^ \r\n,;.$]\\$\\)\\([- .,?;:'\")\000]\\|$\\)" 2 nil) |
| 13859 | ("$" "\\([^$]\\)\\(\\(\\$\\([^ \r\n,;.$][^$\n\r]*?\\(\n[^$\n\r]*?\\)\\{0,2\\}[^ \r\n,.$]\\)\\$\\)\\)\\([- .,?;:'\")\000]\\|$\\)" 2 nil) | 14040 | ("$" "\\([^$]\\)\\(\\(\\$\\([^ \r\n,;.$][^$\n\r]*?\\(\n[^$\n\r]*?\\)\\{0,2\\}[^ \r\n,.$]\\)\\$\\)\\)\\([- .,?;:'\")\000]\\|$\\)" 2 nil) |
| 13860 | ("\\(" "\\\\([^\000]*?\\\\)" 0 nil) | 14041 | ("\\(" "\\\\([^\000]*?\\\\)" 0 nil) |
| 13861 | ("\\[" "\\\\\\[[^\000]*?\\\\\\]" 0 t) | 14042 | ("\\[" "\\\\\\[[^\000]*?\\\\\\]" 0 nil) |
| 13862 | ("$$" "\\$\\$[^\000]*?\\$\\$" 0 t)) | 14043 | ("$$" "\\$\\$[^\000]*?\\$\\$" 0 nil)) |
| 13863 | "Regular expressions for matching embedded LaTeX.") | 14044 | "Regular expressions for matching embedded LaTeX.") |
| 13864 | 14045 | ||
| 13865 | (defun org-format-latex (prefix &optional dir overlays msg at forbuffer) | 14046 | (defun org-format-latex (prefix &optional dir overlays msg at forbuffer) |
| @@ -13889,7 +14070,11 @@ The images can be removed again with \\[org-ctrl-c-ctrl-c]." | |||
| 13889 | (while (re-search-forward re nil t) | 14070 | (while (re-search-forward re nil t) |
| 13890 | (when (and (or (not at) (equal (cdr at) (match-beginning n))) | 14071 | (when (and (or (not at) (equal (cdr at) (match-beginning n))) |
| 13891 | (not (get-text-property (match-beginning n) | 14072 | (not (get-text-property (match-beginning n) |
| 13892 | 'org-protected))) | 14073 | 'org-protected)) |
| 14074 | (or (not overlays) | ||
| 14075 | (not (eq (get-char-property (match-beginning n) | ||
| 14076 | 'org-overlay-type) | ||
| 14077 | 'org-latex-overlay)))) | ||
| 13893 | (setq txt (match-string n) | 14078 | (setq txt (match-string n) |
| 13894 | beg (match-beginning n) end (match-end n) | 14079 | beg (match-beginning n) end (match-end n) |
| 13895 | cnt (1+ cnt) | 14080 | cnt (1+ cnt) |
| @@ -13913,7 +14098,13 @@ The images can be removed again with \\[org-ctrl-c-ctrl-c]." | |||
| 13913 | txt movefile opt forbuffer) | 14098 | txt movefile opt forbuffer) |
| 13914 | (if overlays | 14099 | (if overlays |
| 13915 | (progn | 14100 | (progn |
| 14101 | (mapc (lambda (o) | ||
| 14102 | (if (eq (org-overlay-get o 'org-overlay-type) | ||
| 14103 | 'org-latex-overlay) | ||
| 14104 | (org-delete-overlay o))) | ||
| 14105 | (org-overlays-in beg end)) | ||
| 13916 | (setq ov (org-make-overlay beg end)) | 14106 | (setq ov (org-make-overlay beg end)) |
| 14107 | (org-overlay-put ov 'org-overlay-type 'org-latex-overlay) | ||
| 13917 | (if (featurep 'xemacs) | 14108 | (if (featurep 'xemacs) |
| 13918 | (progn | 14109 | (progn |
| 13919 | (org-overlay-put ov 'invisible t) | 14110 | (org-overlay-put ov 'invisible t) |
| @@ -13928,8 +14119,10 @@ The images can be removed again with \\[org-ctrl-c-ctrl-c]." | |||
| 13928 | (delete-region beg end) | 14119 | (delete-region beg end) |
| 13929 | (insert link)))))))) | 14120 | (insert link)))))))) |
| 13930 | 14121 | ||
| 14122 | (defvar org-export-latex-packages-alist) ;; defined in org-latex.el | ||
| 13931 | ;; This function borrows from Ganesh Swami's latex2png.el | 14123 | ;; This function borrows from Ganesh Swami's latex2png.el |
| 13932 | (defun org-create-formula-image (string tofile options buffer) | 14124 | (defun org-create-formula-image (string tofile options buffer) |
| 14125 | (require 'org-latex) | ||
| 13933 | (let* ((tmpdir (if (featurep 'xemacs) | 14126 | (let* ((tmpdir (if (featurep 'xemacs) |
| 13934 | (temp-directory) | 14127 | (temp-directory) |
| 13935 | temporary-file-directory)) | 14128 | temporary-file-directory)) |
| @@ -13951,6 +14144,15 @@ The images can be removed again with \\[org-ctrl-c-ctrl-c]." | |||
| 13951 | (if (eq bg 'default) (setq bg (org-dvipng-color :background))) | 14144 | (if (eq bg 'default) (setq bg (org-dvipng-color :background))) |
| 13952 | (with-temp-file texfile | 14145 | (with-temp-file texfile |
| 13953 | (insert org-format-latex-header | 14146 | (insert org-format-latex-header |
| 14147 | (if org-export-latex-packages-alist | ||
| 14148 | (concat "\n" | ||
| 14149 | (mapconcat (lambda(p) | ||
| 14150 | (if (equal "" (car p)) | ||
| 14151 | (format "\\usepackage{%s}" (cadr p)) | ||
| 14152 | (format "\\usepackage[%s]{%s}" | ||
| 14153 | (car p) (cadr p)))) | ||
| 14154 | org-export-latex-packages-alist "\n")) | ||
| 14155 | "") | ||
| 13954 | "\n\\begin{document}\n" string "\n\\end{document}\n")) | 14156 | "\n\\begin{document}\n" string "\n\\end{document}\n")) |
| 13955 | (let ((dir default-directory)) | 14157 | (let ((dir default-directory)) |
| 13956 | (condition-case nil | 14158 | (condition-case nil |
| @@ -14119,7 +14321,7 @@ The images can be removed again with \\[org-ctrl-c-ctrl-c]." | |||
| 14119 | (org-defkey org-mode-map "\C-c^" 'org-sort) | 14321 | (org-defkey org-mode-map "\C-c^" 'org-sort) |
| 14120 | (org-defkey org-mode-map "\C-c\C-c" 'org-ctrl-c-ctrl-c) | 14322 | (org-defkey org-mode-map "\C-c\C-c" 'org-ctrl-c-ctrl-c) |
| 14121 | (org-defkey org-mode-map "\C-c\C-k" 'org-kill-note-or-show-branches) | 14323 | (org-defkey org-mode-map "\C-c\C-k" 'org-kill-note-or-show-branches) |
| 14122 | (org-defkey org-mode-map "\C-c#" 'org-update-checkbox-count) | 14324 | (org-defkey org-mode-map "\C-c#" 'org-update-statistics-cookies) |
| 14123 | (org-defkey org-mode-map "\C-m" 'org-return) | 14325 | (org-defkey org-mode-map "\C-m" 'org-return) |
| 14124 | (org-defkey org-mode-map "\C-j" 'org-return-indent) | 14326 | (org-defkey org-mode-map "\C-j" 'org-return-indent) |
| 14125 | (org-defkey org-mode-map "\C-c?" 'org-table-field-info) | 14327 | (org-defkey org-mode-map "\C-c?" 'org-table-field-info) |
| @@ -14157,6 +14359,7 @@ The images can be removed again with \\[org-ctrl-c-ctrl-c]." | |||
| 14157 | (org-defkey org-mode-map "\C-c\C-x\C-l" 'org-preview-latex-fragment) | 14359 | (org-defkey org-mode-map "\C-c\C-x\C-l" 'org-preview-latex-fragment) |
| 14158 | (org-defkey org-mode-map "\C-c\C-x\C-b" 'org-toggle-checkbox) | 14360 | (org-defkey org-mode-map "\C-c\C-x\C-b" 'org-toggle-checkbox) |
| 14159 | (org-defkey org-mode-map "\C-c\C-xp" 'org-set-property) | 14361 | (org-defkey org-mode-map "\C-c\C-xp" 'org-set-property) |
| 14362 | (org-defkey org-mode-map "\C-c\C-xe" 'org-set-effort) | ||
| 14160 | (org-defkey org-mode-map "\C-c\C-xo" 'org-toggle-ordered-property) | 14363 | (org-defkey org-mode-map "\C-c\C-xo" 'org-toggle-ordered-property) |
| 14161 | (org-defkey org-mode-map "\C-c\C-xi" 'org-insert-columns-dblock) | 14364 | (org-defkey org-mode-map "\C-c\C-xi" 'org-insert-columns-dblock) |
| 14162 | (org-defkey org-mode-map [(control ?c) (control ?x) ?\;] 'org-timer-set-timer) | 14365 | (org-defkey org-mode-map [(control ?c) (control ?x) ?\;] 'org-timer-set-timer) |
| @@ -14728,6 +14931,8 @@ This command does many different things, depending on context: | |||
| 14728 | - If a function in `org-ctrl-c-ctrl-c-hook' recognizes this location, | 14931 | - If a function in `org-ctrl-c-ctrl-c-hook' recognizes this location, |
| 14729 | this is what we do. | 14932 | this is what we do. |
| 14730 | 14933 | ||
| 14934 | - If the cursor is on a statistics cookie, update it. | ||
| 14935 | |||
| 14731 | - If the cursor is in a headline, prompt for tags and insert them | 14936 | - If the cursor is in a headline, prompt for tags and insert them |
| 14732 | into the current line, aligned to `org-tags-column'. When called | 14937 | into the current line, aligned to `org-tags-column'. When called |
| 14733 | with prefix arg, realign all tags in the current buffer. | 14938 | with prefix arg, realign all tags in the current buffer. |
| @@ -14779,6 +14984,9 @@ This command does many different things, depending on context: | |||
| 14779 | ((org-at-property-p) | 14984 | ((org-at-property-p) |
| 14780 | (call-interactively 'org-property-action)) | 14985 | (call-interactively 'org-property-action)) |
| 14781 | ((org-on-target-p) (call-interactively 'org-update-radio-target-regexp)) | 14986 | ((org-on-target-p) (call-interactively 'org-update-radio-target-regexp)) |
| 14987 | ((and (org-in-regexp "\\[\\([0-9]*%\\|[0-9]*/[0-9]*\\)\\]") | ||
| 14988 | (or (org-on-heading-p) (org-at-item-p))) | ||
| 14989 | (call-interactively 'org-update-statistics-cookies)) | ||
| 14782 | ((org-on-heading-p) (call-interactively 'org-set-tags)) | 14990 | ((org-on-heading-p) (call-interactively 'org-set-tags)) |
| 14783 | ((org-at-table.el-p) | 14991 | ((org-at-table.el-p) |
| 14784 | (require 'table) | 14992 | (require 'table) |
| @@ -15261,6 +15469,7 @@ See the individual commands for more information." | |||
| 15261 | "--" | 15469 | "--" |
| 15262 | ["Expand This Menu" org-create-customize-menu | 15470 | ["Expand This Menu" org-create-customize-menu |
| 15263 | (fboundp 'customize-menu-create)]) | 15471 | (fboundp 'customize-menu-create)]) |
| 15472 | ["Send bug report" org-submit-bug-report t] | ||
| 15264 | "--" | 15473 | "--" |
| 15265 | ("Refresh/Reload" | 15474 | ("Refresh/Reload" |
| 15266 | ["Refresh setup current buffer" org-mode-restart t] | 15475 | ["Refresh setup current buffer" org-mode-restart t] |
| @@ -15274,6 +15483,62 @@ With optional NODE, go directly to that node." | |||
| 15274 | (interactive) | 15483 | (interactive) |
| 15275 | (info (format "(org)%s" (or node "")))) | 15484 | (info (format "(org)%s" (or node "")))) |
| 15276 | 15485 | ||
| 15486 | ;;;###autoload | ||
| 15487 | (defun org-submit-bug-report () | ||
| 15488 | "Submit a bug report on Org-mode via mail. | ||
| 15489 | |||
| 15490 | Don't hesitate to report any problems or inaccurate documentation. | ||
| 15491 | |||
| 15492 | If you don't have setup sending mail from (X)Emacs, please copy the | ||
| 15493 | output buffer into your mail program, as it gives us important | ||
| 15494 | information about your Org-mode version and configuration." | ||
| 15495 | (interactive) | ||
| 15496 | (require 'reporter) | ||
| 15497 | (org-load-modules-maybe) | ||
| 15498 | (org-require-autoloaded-modules) | ||
| 15499 | (let ((reporter-prompt-for-summary-p "Bug report subject: ")) | ||
| 15500 | (reporter-submit-bug-report | ||
| 15501 | "emacs-orgmode@gnu.org" | ||
| 15502 | (org-version) | ||
| 15503 | (let (list) | ||
| 15504 | (save-window-excursion | ||
| 15505 | (switch-to-buffer (get-buffer-create "*Warn about privacy*")) | ||
| 15506 | (delete-other-windows) | ||
| 15507 | (erase-buffer) | ||
| 15508 | (insert "You are about to submit a bug report to the Org-mode mailing list. | ||
| 15509 | |||
| 15510 | We would like to add your full Org-mode and Outline configuration to the | ||
| 15511 | bug report. This greatly simplifies the work of the maintainer and | ||
| 15512 | other experts on the mailing list. | ||
| 15513 | |||
| 15514 | HOWEVER, some variables you have customized may contain private | ||
| 15515 | information. The names of customers, colleagues, or friends, might | ||
| 15516 | appear in the form of file names, tags, todo states, or search strings. | ||
| 15517 | If you answer yes to the prompt, you might want to check and remove | ||
| 15518 | such private information before sending the email.") | ||
| 15519 | (add-text-properties (point-min) (point-max) '(face org-warning)) | ||
| 15520 | (when (yes-or-no-p "Include your Org-mode configuration ") | ||
| 15521 | (mapatoms | ||
| 15522 | (lambda (v) | ||
| 15523 | (and (boundp v) | ||
| 15524 | (string-match "\\`\\(org-\\|outline-\\)" (symbol-name v)) | ||
| 15525 | (or (and (symbol-value v) | ||
| 15526 | (string-match "\\(-hook\\|-function\\)\\'" (symbol-name v))) | ||
| 15527 | (and | ||
| 15528 | (get v 'custom-type) (get v 'standard-value) | ||
| 15529 | (not (equal (symbol-value v) (eval (car (get v 'standard-value))))))) | ||
| 15530 | (push v list))))) | ||
| 15531 | (kill-buffer (get-buffer "*Warn about privacy*")) | ||
| 15532 | list)) | ||
| 15533 | nil nil | ||
| 15534 | "Remember to cover the basics, that is, what you expected to happen and | ||
| 15535 | what in fact did happen. You don't know how to make a good report? See | ||
| 15536 | |||
| 15537 | http://orgmode.org/manual/Feedback.html#Feedback | ||
| 15538 | |||
| 15539 | Your bug report will be posted to the Org-mode mailing list. | ||
| 15540 | ------------------------------------------------------------------------"))) | ||
| 15541 | |||
| 15277 | (defun org-install-agenda-files-menu () | 15542 | (defun org-install-agenda-files-menu () |
| 15278 | (let ((bl (buffer-list))) | 15543 | (let ((bl (buffer-list))) |
| 15279 | (save-excursion | 15544 | (save-excursion |
| @@ -15392,6 +15657,10 @@ With prefix arg UNCOMPILED, load the uncompiled versions." | |||
| 15392 | (display-buffer buf) | 15657 | (display-buffer buf) |
| 15393 | (sit-for 0)))) | 15658 | (sit-for 0)))) |
| 15394 | 15659 | ||
| 15660 | (defun org-in-commented-line () | ||
| 15661 | "Is point in a line starting with `#'?" | ||
| 15662 | (equal (char-after (point-at-bol)) ?#)) | ||
| 15663 | |||
| 15395 | (defun org-goto-marker-or-bmk (marker &optional bookmark) | 15664 | (defun org-goto-marker-or-bmk (marker &optional bookmark) |
| 15396 | "Go to MARKER, widen if necessary. When marker is not live, try BOOKMARK." | 15665 | "Go to MARKER, widen if necessary. When marker is not live, try BOOKMARK." |
| 15397 | (if (and marker (marker-buffer marker) | 15666 | (if (and marker (marker-buffer marker) |
| @@ -16544,6 +16813,20 @@ This is like outline-next-sibling, but invisible headings are ok." | |||
| 16544 | nil | 16813 | nil |
| 16545 | (point)))) | 16814 | (point)))) |
| 16546 | 16815 | ||
| 16816 | (defun org-get-last-sibling () | ||
| 16817 | "Move to previous heading of the same level, and return point. | ||
| 16818 | If there is no such heading, return nil." | ||
| 16819 | (let ((opoint (point)) | ||
| 16820 | (level (funcall outline-level))) | ||
| 16821 | (outline-previous-heading) | ||
| 16822 | (when (and (/= (point) opoint) (outline-on-heading-p t)) | ||
| 16823 | (while (and (> (funcall outline-level) level) | ||
| 16824 | (not (bobp))) | ||
| 16825 | (outline-previous-heading)) | ||
| 16826 | (if (< (funcall outline-level) level) | ||
| 16827 | nil | ||
| 16828 | (point))))) | ||
| 16829 | |||
| 16547 | (defun org-end-of-subtree (&optional invisible-OK to-heading) | 16830 | (defun org-end-of-subtree (&optional invisible-OK to-heading) |
| 16548 | ;; This contains an exact copy of the original function, but it uses | 16831 | ;; This contains an exact copy of the original function, but it uses |
| 16549 | ;; `org-back-to-heading', to make it work also in invisible | 16832 | ;; `org-back-to-heading', to make it work also in invisible |
| @@ -16629,7 +16912,7 @@ Stop at the first and last subheadings of a superior heading." | |||
| 16629 | (outline-flag-region | 16912 | (outline-flag-region |
| 16630 | (point) | 16913 | (point) |
| 16631 | (save-excursion | 16914 | (save-excursion |
| 16632 | (outline-end-of-subtree) (outline-next-heading) (point)) | 16915 | (org-end-of-subtree t t)) |
| 16633 | nil)) | 16916 | nil)) |
| 16634 | 16917 | ||
| 16635 | (defun org-show-entry () | 16918 | (defun org-show-entry () |
| @@ -16854,14 +17137,14 @@ To get rid of the restriction, use \\[org-agenda-remove-restriction-lock]." | |||
| 16854 | Still experimental, may disappear in the future." | 17137 | Still experimental, may disappear in the future." |
| 16855 | (interactive) | 17138 | (interactive) |
| 16856 | ;; Get the time interval from the user. | 17139 | ;; Get the time interval from the user. |
| 16857 | (let* ((time1 (time-to-seconds | 17140 | (let* ((time1 (org-float-time |
| 16858 | (org-read-date nil 'to-time nil "Starting date: "))) | 17141 | (org-read-date nil 'to-time nil "Starting date: "))) |
| 16859 | (time2 (time-to-seconds | 17142 | (time2 (org-float-time |
| 16860 | (org-read-date nil 'to-time nil "End date:"))) | 17143 | (org-read-date nil 'to-time nil "End date:"))) |
| 16861 | ;; callback function | 17144 | ;; callback function |
| 16862 | (callback (lambda () | 17145 | (callback (lambda () |
| 16863 | (let ((time | 17146 | (let ((time |
| 16864 | (time-to-seconds | 17147 | (org-float-time |
| 16865 | (apply 'encode-time | 17148 | (apply 'encode-time |
| 16866 | (org-parse-time-string | 17149 | (org-parse-time-string |
| 16867 | (match-string 1)))))) | 17150 | (match-string 1)))))) |