* 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.
* mk/targets.mk: Move copy of contrib additions to lisp/Makefile.
* lisp/Makefile: Let `autoloads´ in lisp re-generate contrib files by
depending on new target `addcontrib´ in the right order.
* lisp/org-element.el (org-element-inline-src-block-successor): Fix
inline-src-block parsing at the beginning of an item.
* testing/lisp/test-org-element.el: Add test.
* org.el (org-link-to-org-use-id, org-directory)
(org-default-notes-file, org-reverse-note-order)
(org-extend-today-until, org-finish-function)
(org-store-link-functions): Use "capture" instead of
"remember" in docstrings. Also use the `org-capture' group
when it makes sense.
* org-agenda.el (org-agenda-tree-to-indirect-buffer): Find the
correct agenda buffer. Don't split the agenda window when the
indirect buffer is displayed in another frame.
Thanks Viktor Rosenfeld for reporting this.
* org-agenda.el (org-agenda-get-restriction-and-command): Fix
the display of the number of commands for block agendas.
Thanks to Sébastien Vauban for reporting this.
* org-agenda.el (org-agenda-before-write-hook)
(org-agenda-add-entry-text-maxlines): Enhance phrasing.
(org-agenda-finalize-hook, org-agenda-mode-hook): Tell that
the buffer is writable when the hook is called.
(org-agenda-finalize): Allow org-agenda-finalize-hook to
modify the buffer.
Thanks to Moritz Ulrich and to Aaron Ecay for triggering this fix.
* org-agenda.el (org-habit-show-all-today): Only use defvar
to silent the byte-compiler.
(org-agenda-get-scheduled): Check whether some org-habit.el
options have been defined.
Thanks to Robert Horn for reporting this.
* org-capture.el (org-capture-entry): New variable.
(org-capture-string, org-capture): Use it to possibly skip the
interactive prompt for a capture template.
* org-html.el (org-export-html-preprocess)
(org-export-html-format-image): Use
`org-latex-preview-ltxpng-directory'.
* org-odt.el (org-export-odt-do-preprocess-latex-fragments):
Ditto.
Commit 8474115b20 breaks LaTeX
image exports as HTML and ODT. This fixes it.
* org.el (org-activate-plain-links): Don't try to check if we
are in a bracket link already.
This partially reverts commit ad35e2.
The problem that this commit was trying to
address needs to be rethought.
Thanks to Scott Randby for reporting this.
* org.el (org-read-date-analyze): Fix bug introduced in commit
cc5f9f: adding a time should not prevent relative answers to
be parsed correctly.
Thanks to Michael Brand for reporting this.
* org-agenda.el (org-agenda-bulk-action): Always read the date
through `org-read-date'. When possible, use the date at point
as the default date.
The previous behavior was trying to mimik the previous behavior
we had with `k m' (to mark the item at point) followed by ̀k s'
(to rescheduled it to the date at point, with no question.)
The current behavior always ask for a date/time interactively,
but takes the date at point as the current date, which makes it
fast enough.
Thanks to Nick Dokos for raising concerns about this.
* lisp/org-element.el (org-element--current-element): At the very
beginning of a footnote definition or an item, next element is
always a paragraph.
* testing/lisp/test-org-element.el: Add tests.
This patch fixes parsing for following cases:
- - text
or
[fn:1] # Some text
This reverts commit 7719734dd7.
* lisp/org-id.el: Do not use (random t), we just want a new random
number, not a re-seeding of the PRNG for which (random t) doesn't
provide enough entropy anyway. Even if (random) would always
produce the same sequence, the other components going into the MD5
hash ensure that the result will be unique.
* org-capture.el (org-capture-use-agenda-date): New option.
(org-capture): Use it.
* org-agenda.el (org-agenda-capture): New command.
(org-agenda-mode-map): Bind it to `k'.
(org-agenda-menu): Add it to the menu.
* org.texi (Agenda commands): Document the new command and the
new option.
Thanks to Eric Abrahamsen who suggested this change, along with
other merging about bulk actions.
* org-agenda.el (org-agenda-bulk-action): Possibly use the day
at point to reset the scheduled or deadline cookie. On date
headers, use it without prompting the user. On an item, use
the item's date as the default prompt for `org-read-date'.
* lisp/org-element.el (org-element-section-parser): Make sure section
cannot contain an headline.
(org-element--current-element): Fix bug requiring to parse a quote
section even when point is at an headline.
* testing/lisp/test-org-element.el: Add test.
* org-colview.el (org-columns-goto-top-level): Correctly move
the marker `org-columns-top-level-marker'.
(org-agenda-columns): Don't set
`org-agenda-overriding-columns-format' as a buffer variable,
as we only need it dynamically.
(org-agenda-colview-summarize): Fix a bug in returning the
match string.
(The problem with `org-columns-goto-top-level' was introduced
by the commit 8d9e83.)
Thanks to Hannes Schulz and Jacob Riko who reported this.
* org-agenda.el (org-agenda-span-to-ndays): Make the second
argument `starting-day' optional.
(org-agenda-goto-date): Keep parameters of custom agendas.
* org-agenda.el (org-agenda-list): Allow setting the agenda
buffer name through a temporary variable.
(org-agenda-buffer-tmp-name): New variable to temporary store
the agenda buffer name.
Thanks to Rainer Stengele for reporting this bug.
* org-agenda.el (org-agenda-goto-date): Fix behavior when
using sticky agendas.
Thanks to Charles Philip Chan and Rainer Stengele who reported
problems about this.
2012-08-25 Michael Sperber <mike@xemacs.org>
* org.el (org-fill-paragraph): Pass optional argument to
`fill-paragraph' to fix compatibility with XEmacs.
* org-agenda.el (org-diary): Don't check whether there is an
agenda buffer when trying to compile the prefix format.
(org-compile-prefix-format): Check if there is an agenda
buffer. If not, use the current buffer.
* org-agenda.el (org-agenda-get-day-entries): Set the agenda
buffer inconditionnally.
For example, when `org-agenda-get-day-entries' is called
through ̀org-diary', we need to make sure `org-agenda-buffer'
is set, otherwise org-diary triggers an error.
* ob.el (org-babel-named-src-block-regexp-for-name): Generate
a more general regexp.
Thanks to Loris Bennett for reporting this, and to Nicolas Girard for
pointing out what was the problem precisely.
Remove some duplicate declarations.
When the variable is declared in another file,
use (defvar [var]). When it is dynamically bound
in this file (defvar [var]) is enough, but mixed
installations make (defvar [var] [val]) safer.
* lisp/org-timer.el (org-timer-set-mode-line): Check
`org-timer-display' when value is 'off.
This solves the error of (org-timer-set-mode-line 'off) when
`org-timer-display' is 'mode-line. In this case `frame-title-format'
may not be a list.
TINYCHANGE
* lisp/org-clock.el (org-x11idle-exists-p): Only shell out when running
on X.
The definition of this variable currently executes "command" via the
shell during evaluation, irrespective of the platform on which
Org-mode is running. Unfortunately, on Windows, this matches the
"command.com" NT Virtual DOS Machine executable and so this gets
launched, but this is a shell and therefore sits there waiting for
user input and never returns. The net result is that Emacs will hang
on Windows when evaluating org-clock.el with the ntdvm.exe process
spinning at 100%.
The simple fix is to check that the platform is X before trying to
deal with the "x11idle" external process.
TINYCHANGE
* org-agenda.el (org-agenda-local-vars): Remove
̀org-agenda-last-arguments' from the list of local variables.
(org-agenda-mode-map): `g' does the same than `r' in buffers
with only one agenda view, but its behavior differs when there
are several views. In manually appended agendas (with `A'),
`g' displays only the agenda under the point. With multiple
agenda blocks, `g' reinitializes the view by discarding any
temporary changes (e.g. with ̀f' or `w'), while ̀r' keeps those
temporary changes for the agenda view under the point.
(org-agenda-run-series, org-agenda-redo): Implement the above
changes.
(org-agenda-mark-header-line): Don't set useless properties.
(org-agenda-list, org-todo-only, org-search-view)
(org-todo-list, org-tags-view, org-agenda-list-stuck-projects)
(org-agenda-manipulate-query, org-agenda-goto-today)
(org-agenda-later, org-agenda-change-time-span): Use text
properties for storing the last command and the last arguments
for each agenda block.
(org-unhighlight-once): Delete.
* org-agenda.el (org-agenda-pre-window-conf): Rename from
`org-pre-agenda-window-conf'.
(org-agenda-local-vars, org-agenda-prepare-window)
(org-agenda-Quit, org-agenda-quit): Use the new name.
* org-agenda.el (org-keys, org-match): New variable,
dynamically scoped in `org-agenda'.
(org-agenda, org-agenda-list, org-search-view, org-todo-list)
(org-tags-view): Use the new variables.
(org-batch-store-agenda-views): Let-bind `match'.
* org-agenda.el (org-search-view, org-todo-list)
(org-tags-view): Do not let `org-agenda-sticky' prevent the
use of these functions programmatically. Also use the sticky
agenda function correctly.
* org-agenda.el (org-agenda-fit-window-to-buffer): Rename from
`org-fit-agenda-window'.
(org-agenda-run-series, org-agenda-prepare, org-agenda-list)
(org-search-view, org-todo-list, org-tags-view): Use the new
name.
* org-agenda.el (org-agenda-list): Fix bug: don't throw an
error when called from programs as (org-agenda-list).
Thanks to Rainer Thiel for reporting this bug.
* lisp/org.el (org-mode): Call external initalizers. Now both filling
code and comments code have their own independant part in org.el.
(org-setup-filling): Renamed from `org-set-autofill-regexps'.
(org-setup-comments-handling): New function.
* lisp/org.el (org-fill-paragraph): Refine filling in comments and in
paragraphs. Allow commented blank lines. Take into consideration
the indentation of the second line of the paragraph being filled.
(org-comment-or-uncomment-region): Rewrite function. Now comment
region at a fixed column: the minimal indentation of the region.
(org-fill-context-prefix): Rename function into
`org-adaptive-fill-function'. Also, In a paragraph, choose the same
prefix as the current line.
* org-agenda.el (org-agenda): In sticky agendas, use the
current command's match to set the buffer name. This gives
more information to the user and allows to distinguish various
agendas triggered by the same key.
(org-batch-store-agenda-views): Handle the new sticky agenda
buffer name.