* org.el (org-in-fixed-width-region-p): Save match data.
(org-in-src-block-p): Use case-folding for searching the block
boundaries.
(org-activate-plain-links, org-activate-angle-links)
(org-activate-bracket-links): Prevent link activation in
source code blocks.
Thanks to Sébastien Vauban for reporting a related issue.
* org-odt.el (org-odt-cleanup-xml-buffers): Fix Emacs
Bug#13197 by setting the correct buffer before marking it
unmodified to silently kill him.
Thanks to Drew Adams for reporting this and to Jambunathan for
offering to fix it.
* ob.el (org-babel-temp-file): Fix setting of
`temporary-file-directory' on remote hosts.
* ob-eval.el (org-babel-shell-command-on-region): Use
`process-file' instead of `call-process-region'. The latter one
does not work on remote hosts.
* org.el (org-set-font-lock-defaults): Don't activate links in
source code blocks and fixed-width regions.
Thanks to Sébastien Vauban for reporting an error related to this.
* lisp/org-compat.el (org-no-popups): New wrapper macro which
let-binds the correct variables to suppress popup windows depending
on the Emacs version in use. This is a compile-time decision when
byte-compiling.
* lisp/org.el (org-get-location, org-switch-to-buffer-other-window):
Use the wrapper `org-no-popups´ to let-bind the correct variables
for suppression of popup windows.
* org.el (org-open-at-point): Throw the correct error on
non-links. Use `user-error' instead of `error'.
This fixes a bug introduced in ad35e2.
Thanks to Samuel Loury for spotting this and for submitting a patch.
* 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.