* lisp/org.el (org-find-invisible-foreground): Do not use the value of
variables `default-frame-alist´, `initial-frame-alist´ and
`window-system-default-frame-alist´ when their symbol is not bound.
This avoids an error with Emacs 22, which does not define
`window-system-default-frame-alist´, that prevents the test suite from
even starting, the other variables are treated the same as a defensive
measure.
* lisp/org-element.el (org-element--parse-elements,
org-element-at-point): Fix parsing of a list in a block in a list.
* testing/lisp/test-org-element.el: Add test.
* org.el (org-in-fixed-width-region-p): New function.
(org-edit-special): Fix bug: make sure to DTRT in every
special environment. Also use the new function to check
against fixed-width environment.
Thanks to Bernt Hansen for reporting a bug in this area.
* org-src.el: Create a marker to pass to copy-marker.
This fixes a 'wrong type argument' error when running
org-edit-src-code (observed on Emacs 23.2.1).
The problem was that copy-marker expects a marker, and it was given
nil. This change gives it a marker that doesn't point anywhere, but
still lets us set the insertion type of the end marker.
TINYCHANGE
* lisp/org-element.el (org-element-context): When point is between two
objects, be sure to return the second one.
* testing/lisp/test-org-element.el: Add test.
* lisp/org-list.el (org-list-separating-blank-lines-number): When
computing number of blank lines separating items, also count those
in unparsed blocks, like example blocks.
* testing/lisp/test-org-list.el: Add tests.
In the following situation, with `org-blank-before-new-entry' set to
`auto' for `plain-list-item, a blank line should be inserted when
inserting the following item:
- item1
#+BEGIN_EXAMPLE
contents
#+END_EXAMPLE
* lisp/org.el (org-beginning-of-line): check `visual-line-mode'
instead of `line-visual-mode' to determine whether to move by visual
lines.
* lisp/org.el (org-kill-line): use of org-bound-and-true-p macro.
* testing/lisp/test-org.el: Add test
* lisp/Makefile: The added files from contrib need to be known before
LISPF is constructed. Also, make all variables simply defined to
avoid recursive evaluation.
* lisp/org.el (org-end-of-line): On a hidden block make sure to
delegate motion to `end-of-line' instead of `move-end-of-line' in
order to stay on the current line.
* testing/lisp/test-org.el: Update test.
* org-remember.el (org-remember-handler): Correctly strip the comment lines
in the temporary buffer *Remember* when handling a remember note.
TINYCHANGE
* org-remember.el (org-remember-apply-template): Start the commented
lines in the Remember temporary buffer with the appropriate
characters.
TINYCHANGE
* org-latex.el (org-export-as-latex): Remove obsolete argument
`hidden'. Also fix the docstring: using 'string as the value
for `to-buffer' outputs a string with no LaTeX header.
(org-export-as-latex-batch)
(org-export-as-latex-to-buffer, org-export-region-as-latex)
(org-export-as-pdf): Don't use the obsoleted argument.
* ob-haskell.el (org-export-as-latex): Don't use the obsoleted
argument `hidden'.
* org.el (org-refile): Run within `with-demoted-errors' so
that a corrupted bookmark file does not stop the refile
process.
* org-capture.el (org-capture-bookmark-last-stored-position):
Ditto for the capture process.
Note: we do not prevent such errors in org-remember.el as this
libary will be obsoleted for the next major release of Org.
* lisp/org-clock.el (org-clock-in): Moved the call to
org-clock-in-prepare-hook until the task's properties
can be accessed.
The problem was when using a function to add an effort
property via the hook, it would not recognise an existing
effort property when called with the prefix (C-u C-c C-x C-i)
with the point at a place other than at the task.
TINYCHANGE
* lisp/org-agenda.el (org-agenda-get-sexps): Reset `extra' to nil at
beginning of re-search-forward loop, otherwise next iteration picks up
`extra' value from previous entry.
* lisp/ob-scala.el (org-babel-scala-wrapper-method): Use a Scala
block enclosing the submitted code.
The string representing an well formed block was not an Scala code. I
put the string from the user into an block, surrounded by an call to
replace the default output stream.
TINYCHANGE
* org.el (org-refile-check-position): Throw an error when the
refile target is the current buffer and is not a file.
(org-agenda-file-to-front, org-remove-file): Throw an error
when the current buffer is not a file.
(org-check-agenda-file): Enhance the message.
(org-element-type): Autoload.
(org-element-context, org-element-paragraph-parser): Don't
declare as these two functions are not used in org.el.
* org-clock.el (org-clock-modeline-total): Make obsolete.
(org-clock-mode-line-total): Rename from
`org-clock-modeline-total'.
(org-clock-get-sum-start): Fix references to
`org-clock-modeline-total'.
* org-faces.el (org-agenda-filter-tags)
(org-agenda-filter-category, mode-line): Use the 'mode-line
face instead of the obsolete 'modeline.
Thanks to Brendan Halpin for reporting this.
* lisp/org.el (org-auto-fill-function): Make sure `adaptive-fill-mode'
mode is nil when pre-computed `fill-prefix' is the empty string.
Otherwise filling functions from fill.el think it has to be computed
again and overwrite it.
* lisp/org.el (org-end-of-line): Do not call `end-of-visual-line' when
moving to the end of line. Also improve behaviour on elements that
can be hidden.
* testing/lisp/test-org.el: Add tests.
* lisp/org-element.el (org-element--get-next-object-candidates): Fix
parsing of objects of the same type in a single paragraph.
* testing/lisp/test-org-element.el: Add tests.
* lisp/org-element.el (org-element-sub/superscript-successor): Fix
parsing of sub/superscript at beginning of item.
(org-element-latex-or-entity-successor): Fix parsing of latex
fragments at beginning of item.
* testing/lisp/test-org-element.el: Add test.
* lisp/org.el: Remove utf-8 codepoints in docstrings, bytecode doesn't
work when loaded from compressed files.
Probably a bug in Emacs, but since this is unlikely to be fixed in old
Emacsen, simply don't do it.
* lisp/org-compat.el: Make sure that file-name-directory is getting a
stringp. This avoids a possible "(wrong-type-argument stringp nil)"
error when the library in question does not exist.
* lisp/Makefile: Arrange for an uncompiled org-install.el. This also
ensures that if there's an old org-install.el in the installation
directory, it will be replaced and not linger.
* lisp/org-install.el: Provide an empty file that prints a warning
about an outdated configuration.
* lisp/org-element.el (org-element-context,
org-element--get-next-object-candidates): Fix `org-element-context'.
In particular, the restrictions for an object may be different from
those of its container (i.e. table rows and table cells).
* testing/lisp/test-org-element.el: Add tests.
* lisp/org-element.el (org-element-example-block-parser,
org-element-src-block-parser): Store value of example-blocks and
src-blocks unescaped.
(org-element-example-block-interpreter,
org-element-src-block-interpreter): Escape value again when storing
it.
* contrib/lisp/org-export.el (org-export-unravel-code): Don't clean
commas from code since org-element already took care of it.
* testing/lisp/test-org-export.el: Update test.
* testing/lisp/test-org-element.el: Add tests.
* lisp/org-src.el (org-escape-code-in-string,
org-unescape-code-in-string, org-escape-code-in-region,
org-unescape-code-in-region): New functions.
(org-edit-src-code, org-edit-src-exit): Use new functions.
* lisp/org.el (org-strip-protective-commas): Removed function.
* lisp/org-exp.el (org-export-select-backend-specific-text): Use new
function.
* lisp/ob.el (org-babel-parse-src-block-match,
org-babel-parse-inline-src-block-match, org-babel-insert-result):
Always escape produced blocks, independently on the language of the
block, if any. Use new functions.
* doc/org.texi: Update documentation.
* testing/lisp/test-ob.el: Update test.
* org-agenda.el (org-agenda-get-timestamps): Check if the item
is an habit when formatting it with `org-agenda-format-item'.
(org-agenda-get-blocks): Fix bug: don't assume the item is an
habit when formatting with `org-agenda-format-item'.
Thanks to George McNinch for reporting this.
* org.el (org-calendar-agenda-action-key): Delete an option.
(org-mode-map): Delete its keybinding.
(org-agenda-action-marker, org-mark-entry-for-agenda-action):
Delete.
* org-agenda.el (org-agenda-diary-entry): Don't prevent from
being used outside of Org agendas, as it can be used in
calendar buffers too.
Note that we may have to reimplement the functions related to
"k" in the calendar.
Don't use the abbreviation "win" to refer to Windows (Bug#10421).
* ob-lilypond.el (ly-w32-ly-path): Rename from ly-win32-ly-path.
(ly-w32-pdf-path): Rename from ly-win32-pdf-path.
(ly-w32-midi-path): Rename from ly-win32-midi-path.
(ly-determine-ly-path, ly-determine-pdf-path, ly-determine-midi-path):
Check for "windows-nt", not "win32", in system-type.
See http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=607bfb
* org.el (org-make-link-description-function): Enhance
docstring.
(org-insert-link): Fall back on interactive prompt when
`org-make-link-description-function' fails.
Thanks to Sylvain Rousseau for triggering this.
* org-agenda.el (org-agenda-quit): Delete last indirect buffer.
(org-agenda-pre-follow-window-conf): New variable.
(org-agenda-tree-to-indirect-buffer): Fix bug: don't split
agenda window when there an indirect buffer is already
displayed.
* lisp/org-element.el (org-element-headline-parser): Fix parsing for
headlines with a single COMMENT or QUOTE keyword.
* testing/lisp/test-org-element.el: Add tests.
* ob.el (org-babel-insert-result): Replace key sequence with
function call. Use a more informative flag to the local function.
(org-add-protective-commas): Declare a new external function.
* org-src.el (org-add-protective-commas): This should be its own
function.
(org-edit-src-exit): Use the new function.
* org-agenda.el (org-agenda-change-all-lines): Speedup
refresh of a single line of agenda by narrowing the agenda
buffer to just that line before calling `org-agenda-finalize'.
* org-agenda.el (org-agenda-manipulate-query)
(org-agenda-goto-date, org-agenda-goto-today)
(org-agenda-find-same-or-today-or-agenda, )
(org-agenda-later, org-agenda-change-time-span)
(org-agenda-change-all-lines)
(org-agenda-execute-calendar-command)
(org-agenda-goto-calendar, org-agenda-convert-date): Make sure
to get a property from (1- (point-max)), not (point-max)).
Thanks to Juan Pechiar for reporting a related problem.
* org-table.el (org-table-eval-formula): Convert time-stamps
to inactive time-stamp so that Calc can handle them correctly.
Thanks to Daniel E. Doherty for reporting this.
* org-publish.el (org-publish-cache-ctime-of-src): Delete
the base-dir argument and use (file-name-directory file) to
get the file's directory.
(org-publish-update-timestamp)
(org-publish-cache-file-needs-publishing): Call
`org-publish-cache-ctime-of-src' with only one argument.
Thanks to T.F. Torrey who suggested a fix for this.
* org.el (org-priority): Use a new argument to show priority
instead of setting it.
(org-show-priority): New function to show priority both in
normal Org buffers and in Org Agenda buffers.
(org-speed-commands-default): Use "," as a speed command for
setting priority.
* org-agenda.el (org-agenda-mode-map): Bind
`org-agenda-priority' to `C-c ,' as it was before.
(org-agenda-show-priority): Delete.
(org-agenda-priority): Use a new argument to show priority
instead of setting it.
Thanks to Robert Horn for triggering this change.
* org.el (org-font-lock-hook, org-set-font-lock-defaults): Add
a docstring.
(org-display-inline-remove-overlay): Rename from
`org-display-inline-modification-hook'.
(org-speed-command-activate): Rename from
`org-speed-command-default-hook'.
(org-babel-speed-command-hook): Rename from
`org-babel-speed-command-activate'.
* org-agenda.el (org-agenda-update-agenda-type): Rename from
`org-agenda-post-command-hook'.
(org-agenda-mode): Use the new name.
(org-agenda-post-command-hook): Define as obsolete function.
* org-lparse.el (org-lparse): Temporarily activate the hooks
needed for the ODT conversion.
(org-lparse-preprocess-after-blockquote): Rename from
`org-lparse-preprocess-after-blockquote-hook'.
(org-lparse-strip-experimental-blocks-maybe): Rename from
`org-lparse-strip-experimental-blocks-maybe'.
(org-lparse-preprocess-after-blockquote-hook)
(org-lparse-strip-experimental-blocks-maybe-hook): Define as
obsolete functions.
* org-src.el (org-edit-src-code, org-edit-src-exit): Fix bug
about saving the source editing window with the default value
for `org-src-window-setup' (i.e. 'reorganize-frame).
* ob.el (org-babel-common-header-args-w-values)
(org-babel-insert-result): Reintroduce ":results org" but
using "#+BEGIN_SRC org", not "#+BEGIN_ORG".
* org.texi (results): Update documentation for ":results
drawer" and ":results org".
* ob.el (org-babel-common-header-args-w-values): Remove "org"
the list of predefined values for the ":results" parameter.
This complete the previous fix (commit 203e50b).
* ob.el (org-babel-insert-result): Remove support for
":results org".
The insertion of #+BEGIN_ORG was confusing. You can either use
":results raw" to insert the raw results or ":results drawer" to
wrap them into a :RESULTS: ... :END: drawer.
* org-capture.el (org-at-encrypted-entry-p)
(org-encrypt-entry, org-decrypt-entry): Declare.
(org-capture-set-target-location): Check whether `org-crypt'
has been loaded.
Thanks to Mike McLean for reporting this.
* org-capture.el (org-capture-finalize): Maybe re-encrypt
the target headline if it was decrypted.
(org-capture-set-target-location): Maybe decrypt the target
headline.
* org-crypt.el (org-at-encrypted-entry-p): New function.
Thanks to Guilherme Gondim for suggesting this.
Mention COPYING in READMEs.
Fix the header of ob-fortran.el (see this fix in Emacs trunk:
http://lists.gnu.org/archive/html/emacs-diffs/2012-09/msg00365.html)
Specify that org-colview-xemacs.el is *not* part of Emacs.
Specify that org-element.el is part of Emacs (prepare the sync.)
Add COPYING in the release (mk/server.mk).
* org.el (org-in-subtree-not-table-p): New utility function
for building the menu.
(org-org-menu): Add an item for refiling. Check more contexts
when activating items.
(org-tree-to-indirect-buffer): Use `org-up-heading-safe'.
* org-agenda.el (org-agenda-tree-to-indirect-buffer)
(org-agenda-do-tree-to-indirect-buffer): Use argument `arg'.
* org-capture.el (org-capture-set-target-location): Set a
correct time value when storing a note in a datetree and
prompting the user for a date.
Thanks to Gregor Zattler for reporting this.
* org-agenda.el (org-agenda-menu-two-column)
(org-finalize-agenda-hook, org-agenda-ndays): Use
`define-obsolete-variable-alias' instead of
`make-obsolete-variable'.
* org.el (org-link-to-org-use-id): Move to org-id.el.
* org-id.el (org-id-link-to-org-use-id): Rename from
`org-link-to-org-use-id'. Use `nil' as the default value.
(org-link-to-org-use-id): Alias and define as obsolete.
`org-link-to-org-use-id' was previously defined in org.el but only
active when org-id.el was loaded. This is wrong. It now belongs
to org-id.el.
Also, as some libraries require org-id.el on the fly, a non-nil
default value for `org-link-to-org-use-id' had the side-effect of
changing the behavior of `org-store-link' behind the user's back.
Which is wrong too. The new default value is `nil' so that, even
when a library requires org-id.el without the user noticing it,
the behavior of `org-store-link' will not change.
Users who want to keep the previous behavior can set the variable
to 'create-if-interactive-and-no-custom-id
INCOMPATIBLE
* lisp/ob-R.el (org-babel-R-initiate-session): Protect against use of
unbound variable `ess-ask-for-ess-directory´. The default for this
variable is true, so act accordingly if it is found unbound.
* lisp/ob-R.el: Remove initialization with `nil´ from
`ess-ask-for-ess-directory´ and `ess-local-process-name´. Remove
second declaration for `ess-local-process-name´.
* testing/lisp/test-ob-R.el (test-ob-R/simple-session): Bind
`ess-ask-for-ess-directory´ to nil to facilitate batch testing.
* org-agenda.el (org-search-view, org-agenda-get-todos)
(org-agenda-get-timestamps, org-agenda-get-blocks): Use the
dotime parameter of `org-agenda-format-item' so that 'time-up
and 'time-down agenda sorting strategies are handled correctly.
Thanks to Richard Lawrence who reported this.