From 0bd48b37bb27e64f7502ad8603f7ace81ca617e6 Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Sun, 25 Jan 2009 15:54:03 +0000 Subject: [PATCH] 2009-01-25 Carsten Dominik * org-exp.el (org-export-as-html): Turn \par into a paragraph. * org.el (org-agenda-tags-todo-honor-ignore-options): Declare variable. * org-table.el (org-table-insert-hline): Fix typo in fuction call to `backward-char'. * org-exp.el (org-export-as-html): Remove the initial space from colon examples. * org.el (org-scan-tags): Call `org-agenda-check-for-timestamp-as-reason-to-ignore-todo-item'. * org-agenda.el (org-agenda-todo-list, org-agenda-match-view): New customization groups. (org-agenda-tags-todo-honor-ignore-options): New option. (org-agenda-check-for-timestamp-as-reason-to-ignore-todo-item): New function. (org-agenda-get-todos): Use `org-agenda-check-for-timestamp-as-reason-to-ignore-todo-item'. 2009-01-25 Carsten Dominik * org-exp.el (org-export-format-source-code-or-example): Escape HTML characters also in examples that anre not treated with htmlize. Also, just switch to EXAMPLE processing if we do not have a good version of htmlize. * org-rmail.el: Fix copyright notice. * org.el (org-activate-footnote-links): Improve footnote link highlighting. * org-footnote.el (org-footnote-normalize): Fix finding the end of a footnote definition at the end of the file. * org-table.el (org-table-get-specials): Add an imagined hline at the end of the table. This can be useful for references that want to go to the end of the table. Also fix bug when computing last row constants, in tables that do not start right at the right margin. (org-table-eval-formula): Match and replace remove references. (org-table-formula-substitute-names): Make sure that names inside a "remote" call are left alone, the will be replaced later when the remote call is handled. (org-table-convert-refs-to-rc): Do not convert things that might look like a reference, but are really part of an ID or namei n a remote reference. (org-table-get-remote-range): New function. 2009-01-25 Carsten Dominik * org-faces.el (org-clock-overlay): Fix bug in face definition. * org-clock.el (org-clock-put-overlay): Use new face instead of `secondary-selection'. * org-faces.el (org-clock-overlay): New face. 2009-01-25 Carsten Dominik * org-exp.el (org-get-current-options): Include the option for publishing time stamps. * org.el (org-toggle-heading): Renamed from `org-toggel-region-headings'. No longer needs a region defined, but will use it if there is one. (org-ctrl-c-star): Simplified, relying more on the internal workings of `org-toggle-heading'. (org-toggle-item): Renamed from `org-toggle-region-items'. No longer needs a region defined, but will use it if there is one. (org-ctrl-c-minus): Simplified, relying more on the inernal workings of `org-toggle-item'. * org-export-latex.el (org-export-latex-preprocess): Fix bug in environment detection. Also, do real changes only in unprotected places. 2009-01-25 Carsten Dominik * org-export-latex.el (org-export-latex-quotation-marks): Use `org-if-unprotected-1'. (org-export-latex-set-initial-vars): Check for class definition in property. * org-macs.el (org-if-unprotected-1): New macro. 2009-01-25 Carsten Dominik * org-compat.el (org-count-lines): New function. * org-exp.el (org-export-format-source-code-or-example): Handle switches related to text areas. * org.el (org-activate-footnote-links): Don't allow match inside a link. * org-footnote.el (org-footnote-re): Don't allow match inside a link. * org-export-latex.el (org-export-latex-links): Keep a relative path relative also after export. * org-exp.el (org-export-html-scripts): Fix HTML snippet. * org.el (org-make-tags-matcher): Never use IDO for completing the tags matcher match string. (org-completing-read): Also remove the special biding for "?". * org-attach.el (org-attach-allow-inheritance): New option. (org-attach-inherited): New variable. (org-attach-dir): Handle properties related to the attachment directory. (org-attach-check-absolute-path): New function. (org-attach-set-directory, org-attach-set-inherit): New commands. (org-attach): Accommodate the new commands in the dispatcher. 2009-01-25 Carsten Dominik * org-compat.el (org-fit-window-to-buffer): Fix bug with using `window-full-width-p'. * org-exp.el (org-export-as-html): Only check for images files that really can be inlined * org.el (org-image-file-name-regexp, org-file-image-p): Allow the list of extensions to be a parameter. * org-exp.el (org-export-html-inline-image-extensions): New variable. * org-agenda.el (org-prepare-agenda): Use `org-agenda-block-separator'. (org-agenda-block-separator): New option. 2009-01-25 Carsten Dominik * org-export-latex.el (org-export-latex-tables): Call `org-table-clean-before-export' with the new optional argument. * org-exp.el (org-table-clean-before-export): New optional parameter MAYBE-QUOTED, allows for quoted characters like \# in first column. 2009-01-25 Carsten Dominik * org-plot.el (org-plot/gnuplot): Fix text-ind parameter for histograms. * org-colview.el (org-colview-construct-allowed-dates): Better error catching when a date/time property does not have allowed values defined. * org-colview-xemacs.el (org-colview-construct-allowed-dates): Better error catching when a date/time property does not have allowed values defined. 2009-01-25 Carsten Dominik * org.el (org-map-entries): Restore point and restriction after `org-map-entries'. 2009-01-25 Carsten Dominik * org.el (org-time=, org-time<, org-time<=, org-time>) (org-time>=, org-time<>): Make sure both values are dates. 2009-01-25 Carsten Dominik * org-archive.el (org-extract-archive-heading): Allow %s for file name also in achive location heading. 2009-01-25 Carsten Dominik * org-archive.el (org-add-archive-files): Uniquify the list before returning it. 2009-01-25 Carsten Dominik * org-compat.el (org-fit-window-to-buffer): Use `window-full-width-p'. * org-export-latex.el (org-export-latex-fixed-width): Enforce the space after the colon in short examples. * org-exp.el (org-export-protect-colon-examples): Rewritten, to enforce a space after the colon. However, we also allow lines that are *only* a colon. (org-export-as-html): Enforce the space after the colon in short examples. (org-export-preprocess-string): Do the colon example protection earlier. (org-export-remove-timestamps): Do not check for protection at the end of the line. 2009-01-25 Carsten Dominik * org.el (org-format-latex-options): Add new matcher for single letters between dollars. (org-get-header): Function removed. (org-heading-components): New function. * org-exp.el (org-export-define-heading-targets): Record ID's also as alternative targets. (org-export-as-html): Interpret "id:" links to other files by preserving the relative path. * org-jsinfo.el (org-infojs-handle-options): Catch the case if v is nil. * org-exp.el (org-export-normalize-links): Protect the main link, to avoid special character processing. * org-export-latex.el (org-export-latex-special-keyword-regexp): New variable. (org-export-latex-special-string-regexps): Variable removed. (org-export-latex-keywords): Use the new regexp. * org-exp.el (org-export-handle-include-files): Fetch switches and put them into the BEGIN statement. * org-timer.el (org-timer-mode-line-string): New variable. * org-clock.el (org-clock-mode-line-map): Renamed from `org-clock-mode-map'. (org-clock-mode-line-timer): Renamed from `org-mode-line-timer'. (org-clock-update-mode-line): Renamed from `org-update-mode-line'. (org-clock-put-overlay): Renamed from `org-put-clock-overlay'. (org-clock-remove-overlays): Renamed from `org-remove-clock-overlays'. * org-timer.el (org-timer-pause-or-continue): Implement stopping and mode line display. (org-timer-stop): New command. (org-timer-seconds): Return correct time when timer is paused. (org-timer-mode-line-timer): New variable. (org-timer-set-mode-line, org-timer-update-mode-line): New functions. * org.el (org-insert-heading): Handle new value `auto' for `org-blank-before-new-entry'. (org-org-menu): Add new items for timer functions. * org-list.el (org-insert-item): Handle new value `auto' for `org-blank-before-new-entry'. * org.el (org-blank-before-new-entry): New value `auto', made default. 2009-01-25 Carsten Dominik * org-exp.el (org-export-normalize-links): If the link is also used as the description, protect the description. 2009-01-25 Carsten Dominik * org.el (org-closest-date): Fix bug with yearly repeats, in combination with preference of the past as it is used for deadline and scheduling search. * org-exp.el (org-html-handle-time-stamps): No longer check for the `org-export-with-timestamps' option, because the preprocesser has taken care of this already. * org.el (org-entry-properties): Catch the case when this is called in a non-org-mode file. * org-export-latex.el (org-export-latex-remove-from-headlines): Variable made obsolete, also LaTeX export now uses the standard variables. (org-export-as-latex): Add the timestamps parameter to the preprocessor parameter list. (org-export-latex-content): Export the remaining keywords without considering to remove them. (org-export-latex-keywords-maybe): Make the REMOVE-LIST optional. Use bold font instead of tt font for the keywords. (org-export-latex-fontify-headline): Format headlines, assuming that all keywords still present should be published. (org-export-latex-keywords): Remove argument TIMESTAMPS and just publish what ever remains of the time stamps. (org-export-latex-list-parameters): New option. (org-export-latex-lists): Pass additional parameters to the list converter. * org-exp.el (org-export-preprocess-string): Remove clock lines and timestamps already in the preprocesor. (org-export-remove-timestamps, org-export-remove-clock-lines): New functions. (org-export-as-ascii, org-export-as-html): Add the timestamps parameter to the preprocessor parameter list. * org-list.el (org-list-parse-list): Parse for checkboxes. (org-list-to-generic): Introduce and handle new parameters :cbon and :cboff. (org-list-to-latex, org-list-to-html, org-list-to-texinfo): Add optional parameter PARAMS. * org-export-latex.el (org-export-latex-special-chars): Fix problems with interpreting dollar signs. (org-inside-latex-math-p): New function. (org-export-latex-preprocess): Protect all the math fragments. * org.el (org-latex-regexps): Allow a dash after a dollar. * org-w3m.el (org-w3m-copy-for-org-mode): Always deactivate the mark after copying. * org-agenda.el (org-run-agenda-series): Have series options set when finalizing the agenda. * org-exp.el (org-export-format-source-code-or-example): Protect the converted examples. * org.el (org-set-regexps-and-options): Fix the regexp `org-complex-heading-regexp'. 2009-01-25 Carsten Dominik * org.el (org-edit-src-get-label-format): New function. (org-coderef-label-format): New option. (org-edit-src-code, org-edit-src-find-region-and-lang): Parse for a label format specification and make sure it is used in the edit buffer. (org-edit-src-get-label-format): New function. (org-store-link): Handle new coderef formats. (org-link-search): Handle new coderef formats. * org-footnote.el (org-footnote-create-definition) (org-footnote-goto-local-insertion-point): Make footnote insertion work correctly when the "Footnotes" headline is the last line in the buffer. * org.el (org-goto-marker-or-bmk): Expose context after jumping to the location. 2009-01-25 Carsten Dominik * org-w3m.el (org-w3m): New customization group. (org-w3m-deactivate-mark): New option. (org-w3m-copy-for-org-mode): Deactivate region, unless the user option say not to. 2009-01-25 Carsten Dominik * org.el (org-set-font-lock-defaults): Trigger footnote fontification. (org-activate-footnote-links): New function. (org-activate-links): New entry `footnote'. * org-faces.el (org-footnote): New face. 2009-01-25 Carsten Dominik * org-macs.el (org-re): Handle the [:word:] class. * org-exp.el (org-export-preprocess-string): Call `org-export-protect-colon-examples'. (org-export-protect-colon-examples): Renamed from `org-export-protect-examples', and scope limited to lines starting with a colon. 2009-01-25 Carsten Dominik * org-exp.el (org-export-preprocess-string): Move the preprocess hook to after turning on Org-mode. (org-export-preprocess-after-include-files-hook) (org-export-preprocess-after-tree-selection-hook) (org-export-preprocess-before-backend-specifics-hook) (org-export-preprocess-final-hook): New hooks. (org-export-preprocess-string): Run the new hooks. * org.el (org-ctrl-c-minus): Fix indentation for new items. * org-footnote.el: New file. * org.el (org-footnote): Require footnote code. (org-startup-options): Add new footnote options. (org-mode-map): New keybindig for footnotes. (org-ctrl-c-ctrl-c): Add function at footnotes. (org-org-menu): New menu entries for footnotes. * org-export-latex.el (org-export-as-latex): Pass footnote variable to preprocessor. (org-export-latex-preprocess): Treat multiple references to a footnote. * org-exp.el (org-export-preprocess-string): Call `org-footnote-normalize'. (org-export-as-ascii, org-export-as-html): Pass footnote variable to preprocessor. (org-export-as-html): Treat multiple references to a footnote. 2009-01-25 Carsten Dominik * org-export-latex.el (org-export-latex-links): Handle coderef links. * org.el (org-bracket-link-analytic-regexp++): New variable. (org-make-link-regexps): Initialize `org-bracket-link-analytic-regexp++'. (org-store-link): Implement special case in edit-src buffer. (org-insert-link): No use of ide to insert stored links. (org-link-search): Implement special case for coderefs. * org-exp.el (org-export-html-scripts): New constant. (org-export-html-style-default): Add a new style for highlighted code. (org-export-code-refs): New variable. (org-export-preprocess-string): Initialize `org-export-code-refs'. Call `org-export-replace-src-segments-and-examples' No longer call `org-export-protect-examples'. (org-export-target-internal-links): Take care of coderef targets. (org-export-last-code-line-counter-value): New variable. (org-export-replace-src-segments-and-examples): Renamed from `org-export-replace-src-segments', and modified. (org-export-format-source-code-or-example): Renamed from `org-export-format-source-code'. (org-export-number-lines): New function. (org-export-as-ascii, org-export-as-html): Handle coderef links. --- doc/misc/ChangeLog | 27 ++ lisp/org/ChangeLog | 422 +++++++++++++++++++++++++ lisp/org/org-agenda.el | 93 ++++-- lisp/org/org-archive.el | 32 +- lisp/org/org-attach.el | 116 +++++-- lisp/org/org-bbdb.el | 2 +- lisp/org/org-bibtex.el | 2 +- lisp/org/org-clock.el | 40 +-- lisp/org/org-colview.el | 60 ++-- lisp/org/org-compat.el | 15 +- lisp/org/org-exp.el | 581 +++++++++++++++++++++++++++-------- lisp/org/org-export-latex.el | 274 +++++++++++------ lisp/org/org-faces.el | 25 +- lisp/org/org-footnote.el | 504 ++++++++++++++++++++++++++++++ lisp/org/org-gnus.el | 14 +- lisp/org/org-id.el | 7 +- lisp/org/org-info.el | 2 +- lisp/org/org-irc.el | 4 +- lisp/org/org-jsinfo.el | 4 +- lisp/org/org-list.el | 110 ++++--- lisp/org/org-mac-message.el | 2 +- lisp/org/org-macs.el | 12 +- lisp/org/org-mew.el | 2 +- lisp/org/org-mhe.el | 2 +- lisp/org/org-mouse.el | 7 +- lisp/org/org-plot.el | 16 +- lisp/org/org-publish.el | 2 +- lisp/org/org-remember.el | 2 +- lisp/org/org-rmail.el | 2 +- lisp/org/org-table.el | 90 +++++- lisp/org/org-timer.el | 93 +++++- lisp/org/org-vm.el | 2 +- lisp/org/org-w3m.el | 106 ++++--- lisp/org/org-wl.el | 2 +- lisp/org/org.el | 547 ++++++++++++++++++++++----------- 35 files changed, 2563 insertions(+), 658 deletions(-) create mode 100644 lisp/org/org-footnote.el diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index 0a9b4d0fd1..5390d3c2a9 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog @@ -1,3 +1,30 @@ +2009-01-25 Carsten Dominik + + * org.texi (References): Add information about remote references. + (Built-in table editor): Document `C-c RET' in tables. + (Math symbols, Quoting LaTeX code): Mention that simple + LaTeX macros survive LaTeX export. + (Images in LaTeX export): Show how to create a reference to a + figure. + (Sectioning structure): Document that the LaTeX class can be + specified in a property. + (Text areas in HTML export): New section. + (External links): Add examples for text search and ID links. + (Built-in table editor): Remove the descriptio of `C-c + C-q', it not longer works. + (Literal examples): Document that a space must follow + the colon in short examples. + (Relative timer): Document `org-timer-stop'. + (Footnotes): New section. + (Footnote markup): Shorten section and refer to new Footnote + section. + (Literal examples): Add documentation for line + numbering in and references to code examples. + (CSS support): Fix the description of default CSS styles. + (Capturing column view): Document + "file:path/to/file.org" as an allowed value for the ID property of + a dynamic block copying column view. + 2009-01-23 Stephen Eglen * mh-e.texi (Getting Started): Describe $MH. diff --git a/lisp/org/ChangeLog b/lisp/org/ChangeLog index 6d714a502c..a569d6a114 100644 --- a/lisp/org/ChangeLog +++ b/lisp/org/ChangeLog @@ -1,3 +1,425 @@ +2009-01-25 Carsten Dominik + + * org-exp.el (org-export-as-html): Turn \par into a paragraph. + + * org.el (org-agenda-tags-todo-honor-ignore-options): Declare + variable. + + * org-table.el (org-table-insert-hline): Fix typo in fuction call + to `backward-char'. + + * org-exp.el (org-export-as-html): Remove the initial space from + colon examples. + + * org.el (org-scan-tags): Call + `org-agenda-check-for-timestamp-as-reason-to-ignore-todo-item'. + + * org-agenda.el (org-agenda-todo-list, org-agenda-match-view): New + customization groups. + (org-agenda-tags-todo-honor-ignore-options): New option. + (org-agenda-check-for-timestamp-as-reason-to-ignore-todo-item): + New function. + (org-agenda-get-todos): Use + `org-agenda-check-for-timestamp-as-reason-to-ignore-todo-item'. + +2009-01-25 Carsten Dominik + + * org-exp.el (org-export-format-source-code-or-example): Escape + HTML characters also in examples that anre not treated with + htmlize. Also, just switch to EXAMPLE processing if we do not + have a good version of htmlize. + + * org-rmail.el: Fix copyright notice. + + * org.el (org-activate-footnote-links): Improve footnote link + highlighting. + + * org-footnote.el (org-footnote-normalize): Fix finding the end of + a footnote definition at the end of the file. + + * org-table.el (org-table-get-specials): Add an imagined hline at + the end of the table. This can be useful for references that want + to go to the end of the table. Also fix bug when computing last + row constants, in tables that do not start right at the right + margin. + (org-table-eval-formula): Match and replace remove references. + (org-table-formula-substitute-names): Make sure that names inside + a "remote" call are left alone, the will be replaced later when + the remote call is handled. + (org-table-convert-refs-to-rc): Do not convert things that might + look like a reference, but are really part of an ID or namei n a + remote reference. + (org-table-get-remote-range): New function. + +2009-01-25 Carsten Dominik + + * org-faces.el (org-clock-overlay): Fix bug in face definition. + + * org-clock.el (org-clock-put-overlay): Use new face instead of + `secondary-selection'. + + * org-faces.el (org-clock-overlay): New face. + +2009-01-25 Carsten Dominik + + * org-exp.el (org-get-current-options): Include the option for + publishing time stamps. + + * org.el (org-toggle-heading): Renamed from + `org-toggel-region-headings'. + No longer needs a region defined, but will use it if there is one. + (org-ctrl-c-star): Simplified, relying more on the internal + workings of `org-toggle-heading'. + (org-toggle-item): Renamed from `org-toggle-region-items'. + No longer needs a region defined, but will use it if there is one. + (org-ctrl-c-minus): Simplified, relying more on the inernal + workings of `org-toggle-item'. + + * org-export-latex.el (org-export-latex-preprocess): Fix bug in + environment detection. Also, do real changes only in unprotected + places. + +2009-01-25 Carsten Dominik + + * org-export-latex.el (org-export-latex-quotation-marks): Use + `org-if-unprotected-1'. + (org-export-latex-set-initial-vars): Check for class definition in + property. + + * org-macs.el (org-if-unprotected-1): New macro. + +2009-01-25 Carsten Dominik + + * org-compat.el (org-count-lines): New function. + + * org-exp.el (org-export-format-source-code-or-example): Handle + switches related to text areas. + + * org.el (org-activate-footnote-links): Don't allow match inside a + link. + + * org-footnote.el (org-footnote-re): Don't allow match inside a link. + + * org-export-latex.el (org-export-latex-links): Keep a relative + path relative also after export. + + * org-exp.el (org-export-html-scripts): Fix HTML snippet. + + * org.el (org-make-tags-matcher): Never use IDO for completing the + tags matcher match string. + (org-completing-read): Also remove the special biding for "?". + + * org-attach.el (org-attach-allow-inheritance): New option. + (org-attach-inherited): New variable. + (org-attach-dir): Handle properties related to the attachment + directory. + (org-attach-check-absolute-path): New function. + (org-attach-set-directory, org-attach-set-inherit): New commands. + (org-attach): Accommodate the new commands in the dispatcher. + +2009-01-25 Carsten Dominik + + * org-compat.el (org-fit-window-to-buffer): Fix bug with using + `window-full-width-p'. + + * org-exp.el (org-export-as-html): Only check for images files + that really can be inlined + + * org.el (org-image-file-name-regexp, org-file-image-p): Allow the + list of extensions to be a parameter. + + * org-exp.el (org-export-html-inline-image-extensions): New + variable. + + * org-agenda.el (org-prepare-agenda): Use + `org-agenda-block-separator'. + (org-agenda-block-separator): New option. + +2009-01-25 Carsten Dominik + + * org-export-latex.el (org-export-latex-tables): Call + `org-table-clean-before-export' with the new optional argument. + + * org-exp.el (org-table-clean-before-export): New optional + parameter MAYBE-QUOTED, allows for quoted characters like \# in + first column. + +2009-01-25 Carsten Dominik + + * org-plot.el (org-plot/gnuplot): Fix text-ind parameter for + histograms. + + * org-colview.el (org-colview-construct-allowed-dates): Better + error catching when a date/time property does not have allowed + values defined. + + * org-colview-xemacs.el (org-colview-construct-allowed-dates): + Better error catching when a date/time property does not have + allowed values defined. + +2009-01-25 Carsten Dominik + + * org.el (org-map-entries): Restore point and restriction after + `org-map-entries'. + +2009-01-25 Carsten Dominik + + * org.el (org-time=, org-time<, org-time<=, org-time>) + (org-time>=, org-time<>): Make sure both values are dates. + +2009-01-25 Carsten Dominik + + * org-archive.el (org-extract-archive-heading): Allow %s for file + name also in achive location heading. + +2009-01-25 Carsten Dominik + + * org-archive.el (org-add-archive-files): Uniquify the list before + returning it. + +2009-01-25 Carsten Dominik + + * org-compat.el (org-fit-window-to-buffer): Use + `window-full-width-p'. + + * org-export-latex.el (org-export-latex-fixed-width): Enforce the + space after the colon in short examples. + + * org-exp.el (org-export-protect-colon-examples): Rewritten, to + enforce a space after the colon. However, we also allow lines + that are *only* a colon. + (org-export-as-html): Enforce the space after the colon in short + examples. + (org-export-preprocess-string): Do the colon example protection + earlier. + (org-export-remove-timestamps): Do not check for protection at the + end of the line. + +2009-01-25 Carsten Dominik + + * org.el (org-format-latex-options): Add new matcher for single + letters between dollars. + (org-get-header): Function removed. + (org-heading-components): New function. + + * org-exp.el (org-export-define-heading-targets): Record ID's also + as alternative targets. + (org-export-as-html): Interpret "id:" links to other files by + preserving the relative path. + + * org-jsinfo.el (org-infojs-handle-options): Catch the case if v + is nil. + + * org-exp.el (org-export-normalize-links): Protect the main link, + to avoid special character processing. + + * org-export-latex.el (org-export-latex-special-keyword-regexp): + New variable. + (org-export-latex-special-string-regexps): Variable removed. + (org-export-latex-keywords): Use the new regexp. + + * org-exp.el (org-export-handle-include-files): Fetch switches and + put them into the BEGIN statement. + + * org-timer.el (org-timer-mode-line-string): New variable. + + * org-clock.el (org-clock-mode-line-map): Renamed from + `org-clock-mode-map'. + (org-clock-mode-line-timer): Renamed from `org-mode-line-timer'. + (org-clock-update-mode-line): Renamed from `org-update-mode-line'. + (org-clock-put-overlay): Renamed from `org-put-clock-overlay'. + (org-clock-remove-overlays): Renamed from + `org-remove-clock-overlays'. + + * org-timer.el (org-timer-pause-or-continue): Implement stopping + and mode line display. + (org-timer-stop): New command. + (org-timer-seconds): Return correct time when timer is paused. + (org-timer-mode-line-timer): New variable. + (org-timer-set-mode-line, org-timer-update-mode-line): New + functions. + + * org.el (org-insert-heading): Handle new value `auto' for + `org-blank-before-new-entry'. + (org-org-menu): Add new items for timer functions. + + * org-list.el (org-insert-item): Handle new value `auto' for + `org-blank-before-new-entry'. + + * org.el (org-blank-before-new-entry): New value `auto', made + default. + +2009-01-25 Carsten Dominik + + * org-exp.el (org-export-normalize-links): If the link is also + used as the description, protect the description. + +2009-01-25 Carsten Dominik + + * org.el (org-closest-date): Fix bug with yearly repeats, in + combination with preference of the past as it is used for deadline + and scheduling search. + + * org-exp.el (org-html-handle-time-stamps): No longer check for + the `org-export-with-timestamps' option, because the preprocesser + has taken care of this already. + + * org.el (org-entry-properties): Catch the case when this is + called in a non-org-mode file. + + * org-export-latex.el (org-export-latex-remove-from-headlines): + Variable made obsolete, also LaTeX export now uses the standard + variables. + (org-export-as-latex): Add the timestamps parameter to the + preprocessor parameter list. + (org-export-latex-content): Export the remaining keywords without + considering to remove them. + (org-export-latex-keywords-maybe): Make the REMOVE-LIST optional. + Use bold font instead of tt font for the keywords. + (org-export-latex-fontify-headline): Format headlines, assuming + that all keywords still present should be published. + (org-export-latex-keywords): Remove argument TIMESTAMPS and just + publish what ever remains of the time stamps. + (org-export-latex-list-parameters): New option. + (org-export-latex-lists): Pass additional parameters to the list + converter. + + * org-exp.el (org-export-preprocess-string): Remove clock lines + and timestamps already in the preprocesor. + (org-export-remove-timestamps, org-export-remove-clock-lines): New + functions. + (org-export-as-ascii, org-export-as-html): Add the timestamps + parameter to the preprocessor parameter list. + + * org-list.el (org-list-parse-list): Parse for checkboxes. + (org-list-to-generic): Introduce and handle new parameters :cbon + and :cboff. + (org-list-to-latex, org-list-to-html, org-list-to-texinfo): Add + optional parameter PARAMS. + + * org-export-latex.el (org-export-latex-special-chars): Fix + problems with interpreting dollar signs. + (org-inside-latex-math-p): New function. + (org-export-latex-preprocess): Protect all the math fragments. + + * org.el (org-latex-regexps): Allow a dash after a dollar. + + * org-w3m.el (org-w3m-copy-for-org-mode): Always deactivate the + mark after copying. + + * org-agenda.el (org-run-agenda-series): Have series options set + when finalizing the agenda. + + * org-exp.el (org-export-format-source-code-or-example): Protect + the converted examples. + + * org.el (org-set-regexps-and-options): Fix the regexp + `org-complex-heading-regexp'. + +2009-01-25 Carsten Dominik + + * org.el (org-edit-src-get-label-format): New function. + (org-coderef-label-format): New option. + (org-edit-src-code, org-edit-src-find-region-and-lang): Parse for + a label format specification and make sure it is used in the edit + buffer. + (org-edit-src-get-label-format): New function. + (org-store-link): Handle new coderef formats. + (org-link-search): Handle new coderef formats. + + * org-footnote.el (org-footnote-create-definition) + (org-footnote-goto-local-insertion-point): Make footnote insertion + work correctly when the "Footnotes" headline is the last line in + the buffer. + + * org.el (org-goto-marker-or-bmk): Expose context after jumping to + the location. + +2009-01-25 Carsten Dominik + + * org-w3m.el (org-w3m): New customization group. + (org-w3m-deactivate-mark): New option. + (org-w3m-copy-for-org-mode): Deactivate region, unless the user + option say not to. + +2009-01-25 Carsten Dominik + + * org.el (org-set-font-lock-defaults): Trigger footnote + fontification. + (org-activate-footnote-links): New function. + (org-activate-links): New entry `footnote'. + + * org-faces.el (org-footnote): New face. + +2009-01-25 Carsten Dominik + + * org-macs.el (org-re): Handle the [:word:] class. + + * org-exp.el (org-export-preprocess-string): Call + `org-export-protect-colon-examples'. + (org-export-protect-colon-examples): Renamed from + `org-export-protect-examples', and scope limited to lines starting + with a colon. + +2009-01-25 Carsten Dominik + + * org-exp.el (org-export-preprocess-string): Move the preprocess + hook to after turning on Org-mode. + (org-export-preprocess-after-include-files-hook) + (org-export-preprocess-after-tree-selection-hook) + (org-export-preprocess-before-backend-specifics-hook) + (org-export-preprocess-final-hook): New hooks. + (org-export-preprocess-string): Run the new hooks. + + * org.el (org-ctrl-c-minus): Fix indentation for new items. + + * org-footnote.el: New file. + + * org.el (org-footnote): Require footnote code. + (org-startup-options): Add new footnote options. + (org-mode-map): New keybindig for footnotes. + (org-ctrl-c-ctrl-c): Add function at footnotes. + (org-org-menu): New menu entries for footnotes. + + * org-export-latex.el (org-export-as-latex): Pass footnote + variable to preprocessor. + (org-export-latex-preprocess): Treat multiple references to a + footnote. + + * org-exp.el (org-export-preprocess-string): Call + `org-footnote-normalize'. + (org-export-as-ascii, org-export-as-html): Pass footnote variable + to preprocessor. + (org-export-as-html): Treat multiple references to a footnote. + +2009-01-25 Carsten Dominik + + * org-export-latex.el (org-export-latex-links): Handle coderef + links. + + * org.el (org-bracket-link-analytic-regexp++): New variable. + (org-make-link-regexps): Initialize + `org-bracket-link-analytic-regexp++'. + (org-store-link): Implement special case in edit-src buffer. + (org-insert-link): No use of ide to insert stored links. + (org-link-search): Implement special case for coderefs. + + * org-exp.el (org-export-html-scripts): New constant. + (org-export-html-style-default): Add a new style for highlighted + code. + (org-export-code-refs): New variable. + (org-export-preprocess-string): Initialize `org-export-code-refs'. + Call `org-export-replace-src-segments-and-examples' + No longer call `org-export-protect-examples'. + (org-export-target-internal-links): Take care of coderef targets. + (org-export-last-code-line-counter-value): New variable. + (org-export-replace-src-segments-and-examples): Renamed from + `org-export-replace-src-segments', and modified. + (org-export-format-source-code-or-example): Renamed from + `org-export-format-source-code'. + (org-export-number-lines): New function. + (org-export-as-ascii, org-export-as-html): Handle coderef links. + 2009-01-23 Glenn Morris * org-rmail.el (rmail-narrow-to-non-pruned-header): diff --git a/lisp/org/org-agenda.el b/lisp/org/org-agenda.el index d7a94d71e2..698c6244ac 100644 --- a/lisp/org/org-agenda.el +++ b/lisp/org/org-agenda.el @@ -6,7 +6,7 @@ ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp ;; Homepage: http://orgmode.org -;; Version: 6.16 +;; Version: 6.19a ;; ;; This file is part of GNU Emacs. ;; @@ -81,6 +81,15 @@ This is done by leaving out unnecessary lines." :group 'org-agenda :type 'boolean) +(defcustom org-agenda-block-separator ?= + "The separator between blocks in the agenda. +If this is a string, it will be used as the separator, with a newline added. +If it is a character, it will be repeated to fill the window width." + :group 'org-agenda + :type '(choice + (character) + (string))) + (defgroup org-agenda-export nil "Options concerning exporting agenda views in Org-mode." :tag "Org Agenda Export" @@ -400,6 +409,18 @@ this one will be used." "Options concerning skipping parts of agenda files." :tag "Org Agenda Skip" :group 'org-agenda) +(defgroup org-agenda-daily/weekly nil + "Options concerning the daily/weekly agenda." + :tag "Org Agenda Daily/Weekly" + :group 'org-agenda) +(defgroup org-agenda-todo-list nil + "Options concerning the global todo list agenda view." + :tag "Org Agenda Todo List" + :group 'org-agenda) +(defgroup org-agenda-match-view nil + "Options concerning the general tags/property/todo match agenda view." + :tag "Org Agenda Match View" + :group 'org-agenda) (defvar org-agenda-archives-mode nil "Non-nil means, the agenda will include archived items. @@ -419,7 +440,7 @@ When nil, these trees are also scanned by agenda commands." When nil, the sublevels of a TODO entry are not checked, resulting in potentially much shorter TODO lists." :group 'org-agenda-skip - :group 'org-todo + :group 'org-agenda-todo-list :type 'boolean) (defcustom org-agenda-todo-ignore-with-date nil @@ -430,7 +451,7 @@ When this is set, it also covers deadlines and scheduled items, the settings of `org-agenda-todo-ignore-scheduled' and `org-agenda-todo-ignore-deadlines' will be ignored." :group 'org-agenda-skip - :group 'org-todo + :group 'org-agenda-todo-list :type 'boolean) (defcustom org-agenda-todo-ignore-scheduled nil @@ -439,7 +460,7 @@ The idea behind this is that by scheduling it, you have already taken care of this item. See also `org-agenda-todo-ignore-with-date'." :group 'org-agenda-skip - :group 'org-todo + :group 'org-agenda-todo-list :type 'boolean) (defcustom org-agenda-todo-ignore-deadlines nil @@ -448,7 +469,22 @@ Near means closer than `org-deadline-warning-days' days. The idea behind this is that such items will appear in the agenda anyway. See also `org-agenda-todo-ignore-with-date'." :group 'org-agenda-skip - :group 'org-todo + :group 'org-agenda-todo-list + :type 'boolean) + +(defcustom org-agenda-tags-todo-honor-ignore-options nil + "Non-nil means, honor todo-list ...ignore options also in tags-todo search. +The variables + `org-agenda-todo-ignore-with-date', + `org-agenda-todo-ignore-scheduled' + `org-agenda-todo-ignore-deadlines' +make the global TODO list skip entries that have time stamps of certain +kinds. If this option is set, the same options will also apply for the +tags-todo search, which is the general tags/property matcher +restricted to unfinished TODO entries only." + :group 'org-agenda-skip + :group 'org-agenda-todo-list + :group 'org-agenda-match-view :type 'boolean) (defcustom org-agenda-skip-scheduled-if-done nil @@ -458,6 +494,7 @@ it applies only to the actual date of the scheduling. Warnings about an item with a past scheduling dates are always turned off when the item is DONE." :group 'org-agenda-skip + :group 'org-agenda-daily/weekly :type 'boolean) (defcustom org-agenda-skip-deadline-if-done nil @@ -467,11 +504,13 @@ This is relevant for the daily/weekly agenda. And it applied only to the actually date of the deadline. Warnings about approaching and past-due deadlines are always turned off when the item is DONE." :group 'org-agenda-skip + :group 'org-agenda-daily/weekly :type 'boolean) (defcustom org-agenda-skip-timestamp-if-done nil "Non-nil means don't select item by timestamp or -range if it is DONE." :group 'org-agenda-skip + :group 'org-agenda-daily/weekly :type 'boolean) (defcustom org-timeline-show-empty-dates 3 @@ -550,11 +589,6 @@ option will be ignored.." :group 'org-agenda-windows :type 'boolean) -(defgroup org-agenda-daily/weekly nil - "Options concerning the daily/weekly agenda." - :tag "Org Agenda Daily/Weekly" - :group 'org-agenda) - (defcustom org-agenda-ndays 7 "Number of days to include in overview display. Should be 1 or 7." @@ -631,7 +665,8 @@ and timeline buffers." (defcustom org-agenda-include-all-todo nil "Set means weekly/daily agenda will always contain all TODO entries. The TODO entries will be listed at the top of the agenda, before -the entries for specific days." +the entries for specific days. +This option is deprecated, it is better to define a block agenda instead." :group 'org-agenda-daily/weekly :type 'boolean) @@ -991,7 +1026,6 @@ or a list like `(:background \"Red\")'." (list (character :tag "Priority" :value ?A) (sexp :tag "face"))))) - (defgroup org-agenda-column-view nil "Options concerning column view in the agenda." :tag "Org Agenda Column View" @@ -1057,7 +1091,8 @@ works you probably want to add it to `org-agenda-custom-commands' for good." (defvar org-agenda-show-log nil) (defvar org-agenda-redo-command nil) (defvar org-agenda-query-string nil) -(defvar org-agenda-mode-hook nil) +(defvar org-agenda-mode-hook nil + "Hook for org-agenda-mode, run after the mode is turned on.") (defvar org-agenda-type nil) (defvar org-agenda-force-single-file nil) @@ -1712,7 +1747,7 @@ s Search for keywords C Configure custom agenda commands (widen) (setq org-agenda-redo-command redo) (goto-char (point-min))) - (org-finalize-agenda)) + (org-let (nth 1 series) '(org-finalize-agenda))) ;;;###autoload (defmacro org-batch-agenda (cmd-key &rest parameters) @@ -2040,7 +2075,11 @@ VALUE defaults to t." (setq buffer-read-only nil) (goto-char (point-max)) (unless (or (bobp) org-agenda-compact-blocks) - (insert "\n" (make-string (window-width) ?=) "\n")) + (insert "\n" + (if (stringp org-agenda-block-separator) + org-agenda-block-separator + (make-string (window-width) org-agenda-block-separator)) + "\n")) (narrow-to-region (point) (point-max))) (org-agenda-reset-markers) (setq org-agenda-contributing-files nil) @@ -3234,13 +3273,7 @@ the documentation of `org-diary'." (save-match-data (beginning-of-line) (setq beg (point) end (progn (outline-next-heading) (point))) - (when (or (and org-agenda-todo-ignore-with-date (goto-char beg) - (re-search-forward org-ts-regexp end t)) - (and org-agenda-todo-ignore-scheduled (goto-char beg) - (re-search-forward org-scheduled-time-regexp end t)) - (and org-agenda-todo-ignore-deadlines (goto-char beg) - (re-search-forward org-deadline-time-regexp end t) - (org-deadline-close (match-string 1)))) + (when (org-agenda-check-for-timestamp-as-reason-to-ignore-todo-item end) (goto-char (1+ beg)) (or org-agenda-todo-list-sublevels (org-end-of-subtree 'invisible)) (throw :skip nil))) @@ -3263,6 +3296,22 @@ the documentation of `org-diary'." (org-end-of-subtree 'invisible)))) (nreverse ee))) +;;;###autoload +(defun org-agenda-check-for-timestamp-as-reason-to-ignore-todo-item (&optional end) + "Do we have a reason to ignore this todo entry because it has a time stamp?" + (when (or org-agenda-todo-ignore-with-date + org-agenda-todo-ignore-scheduled + org-agenda-todo-ignore-deadlines) + (setq end (or end (save-excursion (outline-next-heading) (point)))) + (save-excursion + (or (and org-agenda-todo-ignore-with-date + (re-search-forward org-ts-regexp end t)) + (and org-agenda-todo-ignore-scheduled + (re-search-forward org-scheduled-time-regexp end t)) + (and org-agenda-todo-ignore-deadlines + (re-search-forward org-deadline-time-regexp end t) + (org-deadline-close (match-string 1))))))) + (defconst org-agenda-no-heading-message "No heading for this item in buffer or region.") diff --git a/lisp/org/org-archive.el b/lisp/org/org-archive.el index 530a052e21..baddac4abe 100644 --- a/lisp/org/org-archive.el +++ b/lisp/org/org-archive.el @@ -5,7 +5,7 @@ ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp ;; Homepage: http://orgmode.org -;; Version: 6.16 +;; Version: 6.19a ;; ;; This file is part of GNU Emacs. ;; @@ -102,18 +102,19 @@ information." (t org-archive-location (match-string 1))))))) (defun org-add-archive-files (files) - "Splice the archive files into the list f files. + "Splice the archive files into the list of files. This implies visiting all these files and finding out what the archive file is." - (apply - 'append - (mapcar - (lambda (f) - (if (not (file-exists-p f)) - nil - (with-current-buffer (org-get-agenda-file-buffer f) - (cons f (org-all-archive-files))))) - files))) + (org-uniquify + (apply + 'append + (mapcar + (lambda (f) + (if (not (file-exists-p f)) + nil + (with-current-buffer (org-get-agenda-file-buffer f) + (cons f (org-all-archive-files))))) + files)))) (defun org-all-archive-files () "Get a list of all archive files used in the current buffer." @@ -150,7 +151,8 @@ if LOCATION is not given, the value of `org-archive-location' is used." if LOCATION is not given, the value of `org-archive-location' is used." (setq location (or location org-archive-location)) (if (string-match "\\(.*\\)::\\(.*\\)" location) - (match-string 2 location))) + (format (match-string 2 location) + (file-name-nondirectory buffer-file-name)))) (defun org-archive-subtree (&optional find-done) "Move the current subtree to the archive. @@ -304,7 +306,8 @@ this heading." (message "Subtree archived %s" (if (eq this-buffer buffer) (concat "under heading: " heading) - (concat "in file: " (abbreviate-file-name afile))))))) + (concat "in file: " (abbreviate-file-name afile)))))) + (org-reveal)) (defun org-archive-to-archive-sibling () "Archive the current heading by moving it under the archive sibling. @@ -355,7 +358,8 @@ sibling does not exist, it will be created at the end of the subtree." (outline-up-heading 1 t) (hide-subtree) (org-cycle-show-empty-lines 'folded) - (goto-char pos)))) + (goto-char pos))) + (org-reveal)) (defun org-archive-all-done (&optional tag) "Archive sublevels of the current tree without open TODO items. diff --git a/lisp/org/org-attach.el b/lisp/org/org-attach.el index d2685b5282..9ee6af64ef 100644 --- a/lisp/org/org-attach.el +++ b/lisp/org/org-attach.el @@ -4,7 +4,7 @@ ;; Author: John Wiegley ;; Keywords: org data task -;; Version: 6.16 +;; Version: 6.19a ;; This file is part of GNU Emacs. ;; @@ -64,7 +64,9 @@ where the Org file lives." (defcustom org-attach-file-list-property "Attachments" "The property used to keep a list of attachment belonging to this entry. -This is not really needed, so you may set this to nil if you don't want it." +This is not really needed, so you may set this to nil if you don't want it. +Also, for entries where children inherit the directory, the list of +attachments is not kept in this property." :group 'org-attach :type '(choice (const :tag "None" nil) @@ -89,6 +91,15 @@ ln create a hard link. Note that this is not supported :group 'org-attach :type 'boolean) +(defcustom org-attach-allow-inheritance t + "Non-nil means, allow attachment directories be inherited." + :group 'org-attach + :type 'boolean) + + +(defvar org-attach-inherited nil + "Indicates if the last access to the attachment directory was inherited.") + ;;;###autoload (defun org-attach () "The dispatcher for attachment commands. @@ -124,7 +135,10 @@ F Like \"f\", but force using dired in Emacs. d Delete one attachment, you will be prompted for a file name. D Delete all of a task's attachments. A safer way is - to open the directory in dired and delete from there."))) + to open the directory in dired and delete from there. + +s Set a specific attachment directory for this entry. +i Make children of the current entry inherit its attachment directory."))) (org-fit-window-to-buffer (get-buffer-window "*Org Attach*")) (message "Select command: [acmlzoOfFdD]") (setq c (read-char-exclusive)) @@ -147,29 +161,81 @@ D Delete all of a task's attachments. A safer way is 'org-attach-delete-one)) ((eq c ?D) (call-interactively 'org-attach-delete-all)) ((eq c ?q) (message "Abort")) + ((memq c '(?s ?\C-s)) (call-interactively + 'org-attach-set-directory)) + ((memq c '(?i ?\C-i)) (call-interactively + 'org-attach-set-inherit)) (t (error "No such attachment command %c" c)))))) (defun org-attach-dir (&optional create-if-not-exists-p) "Return the directory associated with the current entry. +This first checks for a local property ATTACH_DIR, and then for an inherited +property ATTACH_DIR_INHERIT. If neither exists, the default mechanism +using the entry ID will be invoked to access the unique directory for the +current entry. If the directory does not exist and CREATE-IF-NOT-EXISTS-P is non-nil, -the directory and the corresponding ID will be created." - (when (and (not (buffer-file-name (buffer-base-buffer))) - (not (file-name-absolute-p org-attach-directory))) - (error "Need absolute `org-attach-directory' to attach in buffers without filename.")) - (let ((uuid (org-id-get (point) create-if-not-exists-p))) - (when (or uuid create-if-not-exists-p) - (unless uuid - (error "ID retrieval/creation failed")) - (let ((attach-dir (expand-file-name - (format "%s/%s" - (substring uuid 0 2) - (substring uuid 2)) - (expand-file-name org-attach-directory)))) - (if (and create-if-not-exists-p - (not (file-directory-p attach-dir))) - (make-directory attach-dir t)) - (and (file-exists-p attach-dir) - attach-dir))))) +the directory and (if necessary) the corresponding ID will be created." + (let (attach-dir uuid inherit) + (setq org-attach-inherited (org-entry-get nil "ATTACH_DIR_INHERIT")) + (cond + ((setq attach-dir (org-entry-get nil "ATTACH_DIR")) + (org-attach-check-absolute-path attach-dir)) + ((and org-attach-allow-inheritance + (setq inherit (org-entry-get nil "ATTACH_DIR_INHERIT" t))) + (setq attach-dir + (save-excursion + (save-restriction + (widen) + (goto-char org-entry-property-inherited-from) + (let (org-attach-allow-inheritance) + (org-attach-dir create-if-not-exists-p))))) + (org-attach-check-absolute-path attach-dir) + (setq org-attach-inherited t)) + (t ; use the ID + (org-attach-check-absolute-path nil) + (setq uuid (org-id-get (point) create-if-not-exists-p)) + (when (or uuid create-if-not-exists-p) + (unless uuid (error "ID retrieval/creation failed")) + (setq attach-dir (expand-file-name + (format "%s/%s" + (substring uuid 0 2) + (substring uuid 2)) + (expand-file-name org-attach-directory)))))) + (when attach-dir + (if (and create-if-not-exists-p + (not (file-directory-p attach-dir))) + (make-directory attach-dir t)) + (and (file-exists-p attach-dir) + attach-dir)))) + +(defun org-attach-check-absolute-path (dir) + "Check if we have enough information to root the atachment directory. +When DIR is given, check also if it is already absolute. Otherwise, +assume that it will be relative, and check if `org-attach-directory' is +absolute, or if at least the current buffer has a file name. +Throw an error if we cannot root the directory." + (or (and dir (file-name-absolute-p dir)) + (file-name-absolute-p org-attach-directory) + (buffer-file-name (buffer-base-buffer)) + (error "Need absolute `org-attach-directory' to attach in buffers without filename."))) + +(defun org-attach-set-directory () + "Set the ATTACH_DIR property of the current entry. +The property defines the directory that is used for attachments +of the entry." + (interactive) + (let ((dir (org-entry-get nil "ATTACH_DIR"))) + (setq dir (read-directory-name "Attachment directory: " dir)) + (org-entry-put nil "ATTACH_DIR" dir))) + +(defun org-attach-set-inherit () + "Set the ATTACH_DIR_INHERIT property of the current entry. +The property defines the directory that is used for attachments +of the entry and any children that do not explicitly define (by setting +the ATTACH_DIR property) their own attachment directory." + (interactive) + (org-entry-put nil "ATTACH_DIR_INHERIT" "t") + (message "Children will inherit attachment directory")) (defun org-attach-commit () "Commit changes to git if `org-attach-directory' is properly initialized. @@ -200,7 +266,7 @@ METHOD may be `cp', `mv', or `ln', default taken from `org-attach-method'." (interactive "fFile to keep as an attachment: \nP") (setq method (or method org-attach-method)) (let ((basename (file-name-nondirectory file))) - (when org-attach-file-list-property + (when (and org-attach-file-list-property (not org-attach-inherited)) (org-entry-add-to-multivalued-property (point) org-attach-file-list-property basename)) (let* ((attach-dir (org-attach-dir t)) @@ -234,7 +300,7 @@ On some systems, this apparently does copy the file instead." "Create a new attachment FILE for the current task. The attachment is created as an Emacs buffer." (interactive "sCreate attachment named: ") - (when org-attach-file-list-property + (when (and org-attach-file-list-property (not org-attach-inherited)) (org-entry-add-to-multivalued-property (point) org-attach-file-list-property file)) (let ((attach-dir (org-attach-dir t))) @@ -263,7 +329,7 @@ The attachment is created as an Emacs buffer." This actually deletes the entire attachment directory. A safer way is to open the directory in dired and delete from there." (interactive "P") - (when org-attach-file-list-property + (when (and org-attach-file-list-property (not org-attach-inherited)) (org-entry-delete (point) org-attach-file-list-property)) (let ((attach-dir (org-attach-dir))) (when @@ -280,7 +346,7 @@ A safer way is to open the directory in dired and delete from there." This can be used after files have been added externally." (interactive) (org-attach-commit) - (when org-attach-file-list-property + (when (and org-attach-file-list-property (not org-attach-inherited)) (org-entry-delete (point) org-attach-file-list-property)) (let ((attach-dir (org-attach-dir))) (when attach-dir diff --git a/lisp/org/org-bbdb.el b/lisp/org/org-bbdb.el index 18ca2b448b..b925151743 100644 --- a/lisp/org/org-bbdb.el +++ b/lisp/org/org-bbdb.el @@ -7,7 +7,7 @@ ;; Thomas Baumann ;; Keywords: outlines, hypermedia, calendar, wp ;; Homepage: http://orgmode.org -;; Version: 6.16 +;; Version: 6.19a ;; ;; This file is part of GNU Emacs. ;; diff --git a/lisp/org/org-bibtex.el b/lisp/org/org-bibtex.el index b95b22918e..0df5d4a05a 100644 --- a/lisp/org/org-bibtex.el +++ b/lisp/org/org-bibtex.el @@ -5,7 +5,7 @@ ;; Author: Bastien Guerry ;; Carsten Dominik ;; Keywords: org, wp, remember -;; Version: 6.16 +;; Version: 6.19a ;; ;; This file is part of GNU Emacs. ;; diff --git a/lisp/org/org-clock.el b/lisp/org/org-clock.el index 575a0ea76d..21f2dab4fe 100644 --- a/lisp/org/org-clock.el +++ b/lisp/org/org-clock.el @@ -5,7 +5,7 @@ ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp ;; Homepage: http://orgmode.org -;; Version: 6.16 +;; Version: 6.19a ;; ;; This file is part of GNU Emacs. ;; @@ -140,7 +140,7 @@ load." (defvar org-mode-line-string "") (put 'org-mode-line-string 'risky-local-variable t) -(defvar org-mode-line-timer nil) +(defvar org-clock-mode-line-timer nil) (defvar org-clock-heading "") (defvar org-clock-heading-for-remember "") (defvar org-clock-start-time "") @@ -156,8 +156,8 @@ of a different task.") (defvar org-clock-interrupted-task (make-marker) "Marker pointing to the task that has been interrupted by the current clock.") -(defvar org-clock-mode-map (make-sparse-keymap)) -(define-key org-clock-mode-map [mode-line mouse-2] 'org-clock-goto) +(defvar org-clock-mode-line-map (make-sparse-keymap)) +(define-key org-clock-mode-line-map [mode-line mouse-2] 'org-clock-goto) (defun org-clock-history-push (&optional pos buffer) "Push a marker to the clock history." @@ -241,7 +241,7 @@ of a different task.") (insert (format "[%c] %-15s %s\n" i cat task)) (cons i marker))))) -(defun org-update-mode-line () +(defun org-clock-update-mode-line () (let* ((delta (- (time-to-seconds (current-time)) (time-to-seconds org-clock-start-time))) (h (floor delta 3600)) @@ -256,7 +256,7 @@ of a different task.") (org-propertize (substring clock-string 0 org-clock-string-limit) 'help-echo (concat help-text ": " org-clock-heading)) (org-propertize clock-string 'help-echo help-text))) - 'local-map org-clock-mode-map + 'local-map org-clock-mode-line-map 'mouse-face (if (featurep 'xemacs) 'highlight 'mode-line-highlight))) (force-mode-line-update))) @@ -363,9 +363,9 @@ the clocking selection, associated with the letter `d'." (or (memq 'org-mode-line-string global-mode-string) (setq global-mode-string (append global-mode-string '(org-mode-line-string)))) - (org-update-mode-line) - (setq org-mode-line-timer - (run-with-timer 60 60 'org-update-mode-line)) + (org-clock-update-mode-line) + (setq org-clock-mode-line-timer + (run-with-timer 60 60 'org-clock-update-mode-line)) (message "Clock started at %s" ts))))))) (defun org-clock-find-position () @@ -463,9 +463,9 @@ If there is no running clock, throw an error, unless FAIL-QUIETLY is set." (when org-log-note-clock-out (org-add-log-setup 'clock-out nil nil nil (concat "# Task: " (org-get-heading t) "\n\n"))) - (when org-mode-line-timer - (cancel-timer org-mode-line-timer) - (setq org-mode-line-timer nil)) + (when org-clock-mode-line-timer + (cancel-timer org-clock-mode-line-timer) + (setq org-clock-mode-line-timer nil)) (setq global-mode-string (delq 'org-mode-line-string global-mode-string)) (force-mode-line-update) @@ -562,7 +562,7 @@ Puts the resulting times in minutes as a text property on each headline." If TOTAL-ONLY is non-nil, only show the total time for the entire file in the echo area." (interactive) - (org-remove-clock-overlays) + (org-clock-remove-overlays) (let (time h m p) (org-clock-sum) (unless total-only @@ -574,19 +574,19 @@ in the echo area." (point) :org-clock-minutes))) (goto-char p) (when (setq time (get-text-property p :org-clock-minutes)) - (org-put-clock-overlay time (funcall outline-level)))) + (org-clock-put-overlay time (funcall outline-level)))) (setq h (/ org-clock-file-total-minutes 60) m (- org-clock-file-total-minutes (* 60 h))) ;; Arrange to remove the overlays upon next change. (when org-remove-highlights-with-change - (org-add-hook 'before-change-functions 'org-remove-clock-overlays + (org-add-hook 'before-change-functions 'org-clock-remove-overlays nil 'local)))) (message (concat "Total file time: " org-time-clocksum-format " (%d hours and %d minutes)") h m h m))) (defvar org-clock-overlays nil) (make-variable-buffer-local 'org-clock-overlays) -(defun org-put-clock-overlay (time &optional level) +(defun org-clock-put-overlay (time &optional level) "Put an overlays on the current line, displaying TIME. If LEVEL is given, prefix time with a corresponding number of stars. This creates a new overlay and stores it in `org-clock-overlays', so that it @@ -605,7 +605,7 @@ will be easy to remove." (org-add-props (format fmt (make-string l ?*) h m (make-string (- 16 l) ?\ )) - '(face secondary-selection)) + (list 'face 'org-clock-overlay)) "")) (if (not (featurep 'xemacs)) (org-overlay-put ov 'display tx) @@ -613,7 +613,7 @@ will be easy to remove." (org-overlay-put ov 'end-glyph (make-glyph tx))) (push ov org-clock-overlays))) -(defun org-remove-clock-overlays (&optional beg end noremove) +(defun org-clock-remove-overlays (&optional beg end noremove) "Remove the occur highlights from the buffer. BEG and END are ignored. If NOREMOVE is nil, remove this function from the `before-change-functions' in the current buffer." @@ -623,7 +623,7 @@ from the `before-change-functions' in the current buffer." (setq org-clock-overlays nil) (unless noremove (remove-hook 'before-change-functions - 'org-remove-clock-overlays 'local)))) + 'org-clock-remove-overlays 'local)))) (defvar state) ;; dynamically scoped into this function (defun org-clock-out-if-current () @@ -671,7 +671,7 @@ will be updated. If not, a new clocktable will be inserted. When called with a prefix argument, move to the first clock table in the buffer and update it." (interactive "P") - (org-remove-clock-overlays) + (org-clock-remove-overlays) (when arg (org-find-dblock "clocktable") (org-show-entry)) diff --git a/lisp/org/org-colview.el b/lisp/org/org-colview.el index 28caefad80..8f7b56b431 100644 --- a/lisp/org/org-colview.el +++ b/lisp/org/org-colview.el @@ -5,7 +5,7 @@ ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp ;; Homepage: http://orgmode.org -;; Version: 6.16 +;; Version: 6.19a ;; ;; This file is part of GNU Emacs. ;; @@ -594,7 +594,7 @@ an integer, select that value." This respects the format of the time stamp in S, active or non-active, and also including time or not. S must be just a time stamp, no text around it." - (when (string-match (concat "^" org-ts-regexp3 "$") s) + (when (and s (string-match (concat "^" org-ts-regexp3 "$") s)) (let* ((time (org-parse-time-string s 'nodefaults)) (active (equal (string-to-char s) ?<)) (fmt (funcall (if (nth 1 time) 'cdr 'car) org-time-stamp-formats)) @@ -1067,10 +1067,12 @@ PARAMS is a property list of parameters: :width enforce same column widths with specifiers. :id the :ID: property of the entry where the columns view - should be built, as a string. When `local', call locally. + should be built. When the symbol `local', call locally. When `global' call column view with the cursor at the beginning of the buffer (usually this means that the whole buffer switches - to column view). + to column view). When \"file:path/to/file.org\", invoke column + view at the start of that file. Otherwise, the ID is located + using `org-id-find'. :hlines When t, insert a hline before each item. When a number, insert a hline before each level <= that number. :vlines When t, make each column a colgroup to enforce vertical lines. @@ -1083,20 +1085,38 @@ PARAMS is a property list of parameters: (maxlevel (plist-get params :maxlevel)) (content-lines (org-split-string (plist-get params :content) "\n")) (skip-empty-rows (plist-get params :skip-empty-rows)) - tbl id idpos nfields tmp recalc line) - (save-excursion - (save-restriction - (when (setq id (plist-get params :id)) - (cond ((not id) nil) - ((eq id 'global) (goto-char (point-min))) - ((eq id 'local) nil) - ((setq idpos (org-find-entry-with-id id)) - (goto-char idpos)) - (t (error "Cannot find entry with :ID: %s" id)))) - (org-columns) - (setq tbl (org-columns-capture-view maxlevel skip-empty-rows)) - (setq nfields (length (car tbl))) - (org-columns-quit))) + tbl id idpos nfields tmp recalc line + id-as-string view-file view-pos) + (when (setq id (plist-get params :id)) + (setq id-as-string (cond ((numberp id) (number-to-string id)) + ((symbolp id) (symbol-name id)) + ((stringp id) id) + (t ""))) + (cond ((not id) nil) + ((eq id 'global) (setq view-pos (point-min))) + ((eq id 'local)) + ((string-match "^file:\\(.*\\)" id-as-string) + (setq view-file (match-string 1 id-as-string) + view-pos 1) + (unless (file-exists-p view-file) + (error "No such file: \"%s\"" id-as-string))) + ((setq idpos (org-find-entry-with-id id)) + (setq view-pos idpos)) + ((setq idpos (org-id-find id)) + (setq view-file (car idpos)) + (setq view-pos (cdr idpos))) + (t (error "Cannot find entry with :ID: %s" id)))) + (with-current-buffer (if view-file + (get-file-buffer view-file) + (current-buffer)) + (save-excursion + (save-restriction + (widen) + (goto-char (or view-pos (point))) + (org-columns) + (setq tbl (org-columns-capture-view maxlevel skip-empty-rows)) + (setq nfields (length (car tbl))) + (org-columns-quit)))) (goto-char pos) (move-marker pos nil) (when tbl @@ -1108,7 +1128,9 @@ PARAMS is a property list of parameters: (if (string-match "\\` *\\(\\*+\\)" (caar tbl)) (if (and (not (eq (car tmp) 'hline)) (or (eq hlines t) - (and (numberp hlines) (<= (- (match-end 1) (match-beginning 1)) hlines)))) + (and (numberp hlines) + (<= (- (match-end 1) (match-beginning 1)) + hlines)))) (push 'hline tmp))) (push (pop tbl) tmp))) (setq tbl (nreverse tmp))) diff --git a/lisp/org/org-compat.el b/lisp/org/org-compat.el index bd9e86bfab..0703d72301 100644 --- a/lisp/org/org-compat.el +++ b/lisp/org/org-compat.el @@ -5,7 +5,7 @@ ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp ;; Homepage: http://orgmode.org -;; Version: 6.16 +;; Version: 6.19a ;; ;; This file is part of GNU Emacs. ;; @@ -157,7 +157,9 @@ WINDOW defaults to the selected window. MAX-HEIGHT and MIN-HEIGHT are passed through to `fit-window-to-buffer'. If SHRINK-ONLY is set, call `shrink-window-if-larger-than-buffer' instead, the hight limit are ignored in this case." - (cond ((> (frame-width) (window-width window)) + (cond ((if (fboundp 'window-full-width-p) + (not (window-full-width-p window)) + (> (frame-width) (window-width window))) ;; do nothing if another window would suffer ) ((and (fboundp 'fit-window-to-buffer) (not shrink-only)) @@ -287,6 +289,15 @@ that can be added." (org-no-properties (substring string (or from 0) to)) (substring-no-properties string from to))) +(defun org-count-lines (s) + "How many lines in string S?" + (let ((start 0) (n 1)) + (while (string-match "\n" s start) + (setq start (match-end 0) n (1+ n))) + (if (and (> (length s) 0) (= (aref s (1- (length s))) ?\n)) + (setq n (1- n))) + n)) + (provide 'org-compat) ;; arch-tag: a0a0579f-e68c-4bdf-9e55-93768b846bbe diff --git a/lisp/org/org-exp.el b/lisp/org/org-exp.el index 8bb77c926c..0a888746c8 100644 --- a/lisp/org/org-exp.el +++ b/lisp/org/org-exp.el @@ -5,7 +5,7 @@ ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp ;; Homepage: http://orgmode.org -;; Version: 6.16 +;; Version: 6.19a ;; ;; This file is part of GNU Emacs. ;; @@ -34,6 +34,7 @@ (declare-function org-agenda-skip "org-agenda" ()) (declare-function org-infojs-options-inbuffer-template "org-jsinfo" ()) (declare-function htmlize-region "ext:htmlize" (beg end)) +(declare-function org-id-find-id-file "org-id" (id)) (defvar htmlize-buffer-places) ; from htmlize.el (defgroup org-export nil @@ -298,6 +299,24 @@ drawer names to export." "Hook for preprocessing an export buffer. Pretty much the first thing when exporting is running this hook.") +(defvar org-export-preprocess-after-include-files-hook nil + "Hook for preprocessing an export buffer. +This is run after the contents of included files have been inserted.") + +(defvar org-export-preprocess-after-tree-selection-hook nil + "Hook for preprocessing an export buffer. +This is run after selection of trees to be exported has happened. +This selection includes tags-based selection, as well as removal +of commented and archived trees.") + +(defvar org-export-preprocess-before-backend-specifics-hook nil + "Hook run before backend-specific functions are called during preprocessing.") + +(defvar org-export-preprocess-final-hook nil + "Hook for preprocessing an export buffer. +This is run as the last thing in the preprocessing buffer, just before +returning the buffer string to the backend.") + (defgroup org-export-translation nil "Options for translating special ascii sequences for the export backends." :tag "Org Export Translation" @@ -381,7 +400,7 @@ This option can also be set with the +OPTIONS line, e.g. \"-:nil\"." (defcustom org-export-with-TeX-macros t "Non-nil means, interpret simple TeX-like macros when exporting. For example, HTML export converts \\alpha to α and \\AA to Å. -No only real TeX macros will work here, but the standard HTML entities +Not only real TeX macros will work here, but the standard HTML entities for math can be used as macro names as well. For a list of supported names in HTML export, see the constant `org-html-entities'. Not all export backends support this. @@ -522,6 +541,31 @@ Org-mode file." :group 'org-export-html :type '(string :tag "File or URL")) +(defconst org-export-html-scripts +"" +"Basic javascript that is needed by HTML files produced by Org-mode.") + (defconst org-export-html-style-default "