* 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.
* lisp/ox-ascii.el
(org-ascii--justify-lines): New function. Renamed from
`org-ascii--justify-string'.
(org-ascii--justify-element, org-ascii--current-justification): New
functions.
(org-ascii-verse-block, org-ascii-table-cell, org-ascii-table
org-ascii-src-block, org-ascii-property-drawer, org-ascii-planning,
org-ascii-paragraph, org-ascii-paragraph,
org-ascii-latex-environment, org-ascii-keyword,
org-ascii-horizontal-rule, org-ascii-fixed-width,
org-ascii-export-block, org-ascii-example-block, org-ascii-clock,
org-ascii-template--document-title,
org-ascii-template--document-title): Use new functions.
(org-ascii-center-block): Do not process contents anymore since they
are already justified.
* doc/org.texi (ASCII/Latin-1/UTF-8 export): Document new feature.
Also document `org-ascii-text-width' since this is closely related.
This patches also fixes centering of tables.
* org-agenda.el (org-agenda-local-vars): Add
`org-agenda-top-headline-filter'.
(org-agenda-filter-by-category): Fix syntax.
(org-agenda-filter-show-all-top-filter): New function.
(org-agenda-filter-by-top-headline)
(org-agenda-filter-remove-all): Use the new function.
(org-agenda-filter-top-headline-apply): Use a dedicated symbol
`top-headline'.
Thanks to Greg Troxel who provided a preliminary patch.
* ob-scheme.el (org-babel-scheme-capture-current-message)
(org-babel-scheme-execute-with-geiser): Capture scheme code results
via `current-message' both in interactive mode and non interactive
mode.
`org-babel-scheme-execute-with-geiser' uses `current-message' to get
the results of scheme code blocks, but `current-message' always
returns nil in batch mode, and this patch fixes this.
* org.el (org-entry-properties): Ensure the special property
is not commented out when matched.
Other an agenda view like (tags "DEADLINE<\"<+0d>\"" ...) will
wrongly list an entry with a commented out DEADLINE line, because
org-agenda-skip only skip commented out stuff on the current line,
with is the headline itself when using "tags" agenda.
Thanks to Sébastien for reporting this.
* org-agenda.el (org-agenda-write): Code cleanup.
(org-agenda-mark-filtered-text)
(org-agenda-unmark-filtered-text)
(org-agenda-fix-tags-filter-overlays-at): Delete.
(org-agenda-remove-marked-text): Use the `property' argument
instead of hard-coding 'org-filtered.
(org-agenda-filter-remove-all): Use `org-agenda-finalize'.
(org-agenda-filter-hide-line): Rewrite using text properties
instead of overlays.
(org-agenda-remove-filter): New function.
(org-agenda-filter-show-all-tag)
(org-agenda-filter-show-all-cat)
(org-agenda-filter-show-all-re): Rewrite using
`org-agenda-remove-filter'.
* org-attach.el (org-attach-dir): When the property is
"inherited" from a variable outside of the file, do not use
`org-entry-property-inherited-from' to find the attachment
position, assume we need to go back to the current headline.
* lisp/ox-org.el (org-org-headline): Ignore footnote sections.
(org-org-section): New function.
Some footnote definitions may be outside of the scope of the export
and, therefore, do not appear in the generated output. This patch
ensures that all footnote definitions appear at the end of the section
they belong to.
Thanks to Leonard Randall for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/86558
* ob-core.el (org-babel-insert-result): Test all list elements against
listp and (eq element 'hline) instead of checking just the first.
org-babel table output uses different formatting for a list of lists,
but detects it incorrectly causing an error. An example of a block
causing an error is an emacs lisp source block containing just 1 line:
'((1) 2)
* org.el (org-offer-links-in-entry): Use global variable
`org-any-link-re' instead of defining a string-equal local variable.
The `re' variable defined in function `org-offer-links-in-entry' is
string-equal to `org-any-link-re' and is hence replaced by the latter.
TINYCHANGE
* org.el (org-set-regexps-and-options): Allow
`org-complex-heading-regexp-format' to match [/] and [%]
cookies when they are both before and after the heading.
Thanks to Nicolas Bercher for reporting this.
* ob-core.el (org-babel-demarcate-block): Upcase or downcase
the inserted #+begin_src and #+end_src depending on the
current case of #+begin_src and #+end_src.
Thanks to Alexander Baier for reporting this.
* org-table.el (org-table-copy-increment): Use a number as a
way to force a fixed increment value.
(org-table-copy-down): Increment by the difference between the
current field and the field in the row above. This is the
default behavior. To go back to the previous behavior (to
always increment by 1 unit), set `org-table-copy-increment'
to 1.
Thanks to Michael Brand for suggesting this.
* lisp/org.el (org-indent-line): Indent source block contents
according to line above when `org-src-tab-acts-natively' is nil.
* testing/lisp/test-org.el (test-org/indent-line): Update test.
* lisp/ox-ascii.el (org-ascii-indented-line-width): Update docstring.
(org-ascii-paragraph): Do not apply indentation to the very first line
of a section.