* lisp/org-element.el (org-element-cache-sync-idle-time,
org-element-cache-sync-break): Increase values as synchronizing
cache too makes editing somewhat sluggish without any benefit.
* lisp/org-element.el (org-element--cache-for-removal): New function.
(org-element--cache-submit-request): Do not synchronize cache when
changes can be merged with next request.
This shortcut is particularly useful when many changes happen in the
same area, which is expensive to parse (e.g., a large list).
* lisp/org-element.el (org-element--cache-sync,
org-element--cache-process-request): Change signature.
(org-element--cache-before-change): Do not synchronize cache
preemptively.
(org-element--cache-submit-request): Synchronize cache preemptively.
This change makes possible to skip cache preemptive synchronization
under some circumstances.
* lisp/org-element.el (org-element--cache-sync-requests): Also store
beginning position for buffer modifications.
(org-element--cache-sync, org-element--cache-process-request)
(org-element--cache-submit-request): Adapt to new request template.
This change is required for a future cache optimization.
* lisp/org-element.el (org-element--cache-sync): Do not check return
value from `org-element--cache-process-request'.
(org-element--cache-process-request): Throw `interrupt' when the
request cannot be processed.
(org-element--cache-process-request): Do not catch interruption from
`org-element--parse-to'.
(org-element--parse-to): Throw `interrupt' when the process stops
before finding the result.
* lisp/org-element.el (org-element-headline-parser,
org-element-inlinetask-parser): First find appropriate property
drawer in order to read properties.
* testing/lisp/test-org-element.el (test-org-element/headline-properties):
Add tests.
Thanks to Sébastien Vauban for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/87701
* lisp/org-element.el (org-element-link-parser): Do not expand file
name when parsing links so that Tramp doesn't kick in.
Thanks to Sébastien Vauban for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/87696
* lisp/ox-beamer.el (beamer): Re-order keywords.
(org-beamer-insert-options-template): Remove function.
* doc/org.texi (Beamer export): Remove reference to the previous
function.
Use the generic insertion mechanism provided in "ox.el"
instead (`org-export-insert-default-template') in order to avoid code
duplication.
* lisp/ob-core.el (org-babel-noweb-error-all-langs): Raise noweb
errors regardless of language.
(org-babel-expand-noweb-references): Make use of the new
`org-babel-noweb-error-all-langs' variable.
* lisp/org.el (org-adaptive-fill-function): Do not compute fill prefix
if point is at a heading or an inlinetask. Also change "? " into
"?\s" for better code readability.
* lisp/ob-exp.el (org-babel-exp-process-buffer): Fix error when
`org-confirm-babel-evaluate' is set to a function.
Thanks to Charles C. Berry for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/87403
* org.el (org-insert-heading): With one universal prefix
argument or `org-insert-heading-respect-content' set to `t',
always respect the content, i.e. don't insert a list item and
don't convert normal lines into headings. Update docstring.
(org-insert-heading-respect-content): Remove unused arg.
(org-insert-todo-heading-respect-content): Don't use
`org-insert-todo-heading-respect-content', use the second
argument of `org-insert-todo-heading' instead.
* org-mobile.el (org-mobile-edit): Use only one arg.
Thanks to Bernt Hansen for reporting this.
* lisp/org.el (org-insert-heading): Fix error when inserting
a headline before first headline, with point not at bol. Remove
source block check for consistency with behavior after first
headline. Tiny fix to docstring.
* testing/lisp/test-org.el (test-org/meta-return): Remove unnecessary
test (not testing specifications).
(test-org/insert-heading): New test.
* ob-C.el: handling of non-homogeneous tables,
support for table header,
support for iterating over table cells.
(org-babel-expand-body:C++): uncomment
(org-babel-C-execute): cosmetic changes
(org-babel-C-expand-C): add support for table columns names,
add support for table dimensions,
add standard includes
(org-babel-C-val-to-C-type): rewrite to support non-homogeneous
tables cells
(org-babel-C-table-sizes-to-C): new function to gain access
to the table dimensions
(org-babel-C-utility-header-to-C):
(org-babel-C-header-to-C): new functions to generate
support for table header.
* ob-C-test.org: added D sibling tests similar to C++,
added non-homogeneous table example for C++ and D
* test-ob-C.el: new tests for D and non-homogeneous tables
(ob-C/simple-program):
(ob-C/simple-program):
(ob-D/simple-program):
(ob-C/integer-var):
(ob-D/integer-var):
(ob-C/two-integer-var):
(ob-D/two-integer-var):
(ob-C/string-var):
(ob-D/string-var):
(ob-C/preprocessor):
(ob-C/table):
(ob-D/table):
(ob-C/list-var):
(ob-D/list-var):
(ob-C/vector-var):
(ob-D/vector-var):
(ob-C/list-list-var):
(ob-D/list-list-var):
(ob-C/inhomogeneous_table):
(ob-D/inhomogeneous_table): add compiler availability check
(ob-D/simple-program):
(ob-D/integer-var):
(ob-D/two-integer-var):
(ob-D/string-var):
(ob-D/table):
(ob-D/list-var):
(ob-D/vector-var):
(ob-D/list-list-var):
(ob-D/inhomogeneous_table): add D unit tests
(ob-C/inhomogeneous_table):
(ob-D/inhomogeneous_table): add non-homogeneous table
unit tests
* lisp/ox.el (org-export-expand-include-keyword): Change parsing so
that arbitrary blocks around the included content can be used.
Content is not code-escaped unless it is a literal block, this
applies to "src" and "example".
* doc/org.texi (Include files): Document the additional markup.
* testing/lisp/test-ox.el (test-org-export/expand-include): Add test
for an #+INCLUDE with "html" and "center" markup.
* testing/examples/include.html: New file, used for testing
"#+INCLUDE html".
* lisp/ob-tangle.el (org-babel-tangle-comment-format-beg): Mention the
new `org-babel-tangle-uncomment-comments' variable in the
documentation.
(org-babel-tangle-comment-format-end): Mention the new
`org-babel-tangle-uncomment-comments' variable in the documentation.
(org-babel-tangle-uncomment-comments): New customization variable to
inhibit the post-processing of tangle comments.
(org-babel-spec-to-string): Post-processing of tangle comments is
now dependent upon a customization variable.
* lisp/org-element.el (org-element--cache-generate-key): Small fix.
Check if UPPER is non nil before comparing its car with 1. This is
a safety feature, though, as a key shouldn't end on 0 anyway.
thank you test suite
* lisp/ob-awk.el (org-babel-execute:awk): Don't need to apply the
append, just need to append.
* testing/lisp/test-ob-awk.el (ob-awk/input-src-block-1): Renamed to
avoid name duplication and over-definition.
(ob-awk/input-src-block-2): Renamed to avoid name duplication and
over-definition.
Thanks to Greg Minshall for suggesting these changes.
* lisp/ob-awk.el (org-babel-expand-body:awk): Simply return the body
unmodified.
(org-babel-execute:awk): Assign variables on the command line using
the `-v' command line option to awk.
* lisp/ob-exp.el (org-babel-exp-in-export-file): Instead of using the
headline text use the headline ID when one is present. This fixes a
bug in the resolution of code block headers in properties during
export when multiple headlines with the same name are present.
* lisp/ox.el (org-export--get-inbuffer-options): Return the empty
string instead of nil when TITLE keywords has no value.
(org-export--get-buffer-attributes): Do not set :title property
early.
(org-export--get-global-options): Do not ignore anymore nil values.
Small refactoring.
(org-export-as): Correctly set :title here.
Thanks to Nicolas Richard for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/87149
* org.el (org-property-re): Also match null properties by
default.
(org-entry-delete): Also delete null properties.
(org-read-property-value): Allow the empty string as a new
value.
(org-delete-property): Throw a message when there is not
property to delete.
Thanks to Andrea Rossetti for reporting this.
* lisp/org.el: Forward declare `org-clock-sum',
`org-table-end-of-field', `org-element-cache-refresh'.
These have been introduced with b5554077cb, b76071f2b6 and 6eb940a8dc.
* lisp/org-compat.el: Provide compatibility definition for
`font-lock-ensure' falling back to `font-lock-fontify-buffer' via an
alias.
This fallback fixes f36b19eef6. Using a simple alias means we can't
use the optional arguments for `font-lock-ensure' or would have to
provide a macro if we ever want to use them.
* org-footnote.el (org-footnote-new): When point is at a
position where no footnote can be inserted, offer the menu
from `org-footnote-action' instead.
(org-footnote-inline-footnotes): New command.
(org-footnote-action): Make the new command accessible through
the menu.
Thanks to Leonard Randall for the suggestion.
* org.el (org-re-property): New parameter `allow-null' to
match property with a null value.
(org-entry-put): Correctly update a property with a null
value.
Thanks to Andrea Rossetti for reporting this and suggesting a fix.
* org.el: Send a warning when org-loaddefs.el could not be
found in the directory where this org.el file is loaded from.
* ox-org.el (org-org-publish-to-org):
* ox-odt.el (org-odt-do-format-code):
* ox-html.el (org-html-fontify-code):
* org.el (org-fontify-like-in-org-mode):
* org-src.el (org-src-font-lock-fontify-block):
* org-clock.el (org-clock-get-clocktable): Use
`font-lock-ensure' instead of `font-lock-fontify-buffer'.
* org.el (org-outline-level, org-copy-subtree)
(org-sort-entries, orgstruct-setup, org-show-context)
(org-create-formula-image-with-dvipng)
(org-create-formula-image-with-imagemagick)
(org-goto-sibling, org-goto-first-child, org-show-entry): Use
`ignore-errors' instead of (condition-case nil ... (error nil)).
People trying to load org.el when org-loaddefs.el is not available
has been a major cause of trouble when installing Org. The warning
tells them what they need to do.
* ox-md.el (org-md-headline): When exporting with a HTML table
of contents, add HTML anchors to Markdown headlines.
Thanks to Marko Dimjašević for reporting this.
* org.el (org-shiftmetaup, org-shiftmetadown): Don't move the
subtree or list item at point up or down, as this feature is
already accessible through `org-metaup' and `org-metadown'.
Update the docstrings to reflect the new behavior.
* lisp/ox-ascii.el:
* lisp/ox-beamer.el:
* lisp/ox-html.el:
* lisp/ox-latex.el:
* lisp/ox-man.el:
* lisp/ox-md.el:
* lisp/ox-odt.el:
* lisp/ox-org.el:
* lisp/ox-texinfo.el: All defcustoms are defined as options in the
back-end.
* lisp/ox-icalendar.el (icalendar): Ditto. Also rename :with-vtodo
property to :icalendar-include-todo.
* doc/org.texi (Publishing options): Update back-end specific
properties. Remove @vindex entries so as not to clobber variables
index.
This change allows to change default value for any defcustom on the
fly when publishing. It also normalizes how to choose and name what
variables to define as back-end options.
* lisp/ob-core.el: Add comment to forward declaration of
'org-src-preserve-indentations'.
* lisp/ob-exp.el: Require org-src to import
'org-src-preserve-indentations'.
* lisp/ob-haskell.el, lisp/ob-python.el: Remove superfluous forward
declaration of 'org-src-preserve-indentations', since it gets
imported by other requires.
* lisp/ox.el (org-export-get-parent): Move definition of
'org-export-get-parent' before first use. Leave comment at original
place of definition.
* lisp/org.el (org-uniquify): Move definition of 'org-uniquify' before
first use. Leave comment at original place of definition.
* org-agenda.el (org-agenda-custom-commands-local-options):
Add `org-agenda-effort-filter-preset'.
(org-agenda-filter-effort-default-operator): Delete.
(org-agenda-local-vars): Add `org-agenda-effort-filter'.
(org-agenda-mode-map): Use "_" to filter by effort.
(org-agenda-effort-filter, org-agenda-effort-filter-preset):
New variables.
(org-agenda-prepare-window, org-agenda-prepare)
(org-agenda-finalize, org-agenda-redo)
(org-agenda-filter-remove-all, org-agenda-filter-apply)
(org-agenda-set-mode-name, org-agenda-reapply-filters): Handle
effort filter.
(org-agenda-finalize-entries): Use
`org-sort-agenda-noeffort-is-high'.
(org-agenda-limit-entries): Get the property from the correct
location.
(org-agenda-limit-interactively): Throw a user error on wrong
input.
(org-agenda-filter-by-effort): New command.
(org-agenda-filter-by-tag): Don't filter by effort.
(org-agenda-filter-make-matcher): Handle effort filter.
(org-agenda-compare-effort): Don't handle the "?" operator.
(org-agenda-filter-show-all-effort): New command.
Note: This calls for some refactoring in the filter area.
* org.el (org-refresh-property): New function.
(org-refresh-properties, org-set-effort)
(org-property-next-allowed-value): Use it.
* org-timer.el (org-timer-set-timer): Get the correct number
of minutes from text properties, both in an `org-mode' and
`org-agenda-mode' buffer.
* org-agenda.el (org-agenda-finalize-entries): Remove spurious
variable in the (let ...) construct.
(org-agenda-limit-interactively): Allow to remove the
limitation by passing a universal prefix argument. Enhance
the prompt.
* org.el (org-open-link-in-comment-or-property): New function.
(org-open-at-point): Use it.
See http://thread.gmane.org/gmane.emacs.orgmode/84300/focus=84300 for
the follow-up of a discussion on whether links should be supported in
comments and properties.
* org.el (org-fontify-entities): Use `org-at-comment-p'.
(org-in-commented-line): Delete.
(org-in-indented-comment-line): Delete.
(org-at-comment-p): Also match indented comments and save
match data.
* org-footnote.el (org-footnote-in-valid-context-p): Use
`org-at-comment-p'.
* org-agenda.el (org-agenda-prepare-window): New parameter
`filter-alist' to set the filters correctly when
`org-agenda-persistent-filter' is on.
(org-agenda-prepare): Use the new parameter for
`org-agenda-prepare-window'.
Thanks to Thomas Morgan for reporting this.
* org-compat.el (org-in-invisibility-spec-p): Tiny code
cleanup.
(org-move-to-column): Only remove '(org-filtered) from
`buffer-invisibility-spec'.
* org-agenda.el (org-agenda-mode): Add buffer invisibility
specs.
(org-agenda-filter-hide-line, org-agenda-remove-filter): Set
the 'invisible text property to 'org-filtered.
(org-agenda-show-new-time): Add the default face to avoid the
foreground of the last character on the line to leak into the
timestamp notification.
Thanks to Thomas Morgan for reporting this.
* org.el (org-sort-entries): When sorting by TODO keywords,
put TODO entries first, then entries without a TODO keyword,
then DONE entries.
Thanks to Eric Abrahamsen for triggering this.
org-table.el (org-table-align): Use `org-string-width'.
This aims at better guessing how wide a narrowed table column should
actually be. This won't work perfectly with variable-width scripts,
as it still only narrows in full-column increments, but it's better
than before.
org-table.el (org-table-justify-field-maybe): Use
`org-string-width' instead of `length' to calculate the visual
width of table cells.
This is useful for e.g. double-width charsets.
* org-agenda.el (org-agenda-set-restriction-lock): Remove
restriction lock before setting it.
This fixes a small bug: when restriction lock is active on a subtree
and C-c C-x < before the first headline, the new restriction is set to
the entire file, but the old one was still present.
* org-agenda.el (org-agenda-format-item): Don't add the
'effort and 'effort-minutes text properties as they are
already accessible through the 'txt property of agenda lines.
* org-clock.el (org-clock-in): Refresh both the 'effort and
'effort-minutes text properties.
* org-rmail.el (rmail, rmail-file-name): Silent byte-compiler.
* org.el (org-refresh-properties): Allow to set several text
properties by passing an alist to the TPROP argument.
(org-set-effort, org-property-next-allowed-value): Use 'effort
instead of 'org-effort.
(org-agenda-prepare-buffers): Update both 'effort and
'effort-minutes.
(org-mark-jump-unhide): Move up to silent the byte-compiler.
* org.el (org-refresh-category-properties): Don't put the
'org-category-position property.
(org-refresh-stats-properties): New function.
(org-agenda-ignore-properties): Rename from
`org-agenda-ignore-drawer-properties', which is now obsolete.
Allow to use 'stats.
(org-agenda-prepare-buffers): Check stats properties.
(org-get-at-bol): Make a defsubst.
(org-get-at-eol): New function.
* org-agenda.el (org-entries-lessp): Sort by statistic
cookies.
(org-search-view, org-agenda-get-todos)
(org-agenda-get-timestamps, org-agenda-get-sexps)
(org-agenda-get-progress, org-agenda-get-deadlines)
(org-agenda-get-scheduled, org-agenda-get-blocks): Don't set
the 'org-category and 'org-category-pos text properties.
'org-category-pos is useless and 'org-category is set through
`org-agenda-format-item'.
(org-agenda-format-item): Remove useless code.
(org-cmp-priority): Delete.
(org-cmp-values): New function to compare text properties
values.
(org-cmp-effort, org-agenda-to-appt): Check against the end of
the line.
(org-agenda-filter-by-category, org-agenda-filter-apply)
(org-agenda-change-all-lines): Use `org-get-at-eol'.
* org-capture.el (org-capture-steal-local-variables): Don't
steal `mark-active', which should be nil in the target buffer.
Thanks to Alex Kosorukoff for raising this issue.
* org.el (org-move-subtree-down): Use `org-end-of-subtree'
instead of `outline-end-of-subtree'.
(outline-end-of-subtree): Remove advice.
* org-mouse.el (org-mouse-move-tree, org-mouse-do-remotely):
Use `org-end-of-subtree' instead of `outline-end-of-subtree'.
* org.el (org-cycle-internal-local): Don't show a trailing
character when cycling a subtree that ends with a non-newline
character at the end of the buffer or the narrowed region.