* lisp/org.el (org-backward-element): When called at the beginning of
first element in section, the function shouldn't return an error but
move point to headline or point-min instead.
* testing/lisp/test-org.el: Add test.
The previous related commit was to prevent an error
when M-x org-reload RET was reloading org files from
an ELPA directory. We now autoload the function so
that it is know by the time org-reload might be called.
* lisp/ob.el (org-babel-expand-noweb-references): Capture current
noweb start and end patterns then use to set buffer locals in
(with-temp-buffer) form.
This solves the problem that using different patterns for
org-babel-noweb-wrap-start and org-babel-noweb-wrap-end could be done
only globally.
TINYCHANGE
* Makefile: Include default.mk and targets.mk from mk/ where they've
been moved to.
* README_maintainer: Rename utils to make throughout.
* doc/Makefile: Rename utils to make throughout.
* doc/org.texi: Remove reference to utils/, x11idle.c is now in
contrib/scripts.
* mk/make_emacs_changelog: Add mk/ to list of directories not to be
reported in Emacs' ChangeLog. Also retain utils/ and re-add
UTILITIES; add a comment explaining why these need to stay.
* mk/default.mk: Rename utils to make throughout. Include version.mk
from mk/ where it's been moved to.
* mk/targets.mk: Rename utils to make throughout.
* mk/server.mk: Rename utils to make throughout. Only put those files
from mk/ into the archives that are needed outside the server:
default.mk targets.mk version.mk and org-fixup.el.
* lisp/org-compat.el: Rename utils to make throughout.
* .gitignore: Rename utils to make throughout.
* org-agenda.el (org-agenda-kill, org-agenda-archive-with):
Fix bug when called with a non-nil value of `org-agenda-stick'.
Thanks to Moritz Ulrich for reporting this.
* targets.mk: If $(ORGVERSION) and $(GITVERSION) are not defined and
cannot be determined from Git, try to read `version.mk´. Fall back
to "N/A" if still no definition has been made.
* utils/server.mk: Create `version.mk´ for each distribution. Append
"-dist" and "-elpa" to $(GITVERSION) to easily recognize builds from
distribution archives. Remove `version.mk´ in `cleanrel´ and use
the same globbing patterns as .gitignore.
* .gitignore: Add "version.mk", also ignore ELPA archive (no ".gz"
suffix) and only "org-version.el" (no globbing).
* utils/server.mk: Implement `upload´ (create and install everything),
`upload-elpa´ (create and install ELPA archive),
`upload-release´ (create and install release archives) and
`upload-doc´ (create and install manuals). The server layout is
hardcoded and the directory structure must be in place, the server
root is determined via variable $(SERVROOT).
* lisp/org.el (org-fill-context-prefix): Fix incorrect output when
called at the beginning of a plain list with an affiliated keyword.
(org-fill-paragraph): Remove useless variable.
* lisp/org-element.el (org-element-paragraph-parser): Fix parsing of
paragraph at the beginning of an item.
* testing/lisp/test-org-element.el: Add test.
* org-agenda.el (org-prepare-agenda-window): Use
`org-pre-agenda-window-conf' if already set.
(org-agenda-Quit): Set `org-pre-agenda-window-conf' to nil
when quitting.
(org-agenda-quit): Ditto.
Thanks to Moritz Ulrich for reporting a bug about this.
* org-capture.el (org-capture-fill-template): Protect the text
used for replacement from being further replaced.
Thanks to Moritz Ulrich for reporting this bug.
* lisp/org.el (org-fill-context-prefix, org-fill-paragraph): Do not
fill verse blocks contents. Verse blocks can be used to format
free-form poetry, so filling has to be done manually.
* testing/lisp/test-org.el: Remove unnecessary tests.
* lisp/org-element.el (org-element-paragraph-separate): Since this
variable is meant to be searched forward, \end{...} shouldn't
trigger the end of a paragraph before checking if it is the end of
a complete environment.
(org-element-latex-environment-parser): Slight change to the regexp
matching the beginning of a latex environment.
(org-element-paragraph-parser): Paragraphs don't end at incomplete
latex environments.
(org-element-latex-or-entity-successor): Remove paragraph environments
from latex fragment search.
* org.el (org-contextualize-keys): Rename from
`org-contextualize-agenda-or-capture'. Fix normalization to
handle empty key replacement string.
(org-contextualize-validate-key): Rename from
`org-contexts-validate'. Allow checking against a custom
function.
* org-agenda.el (org-agenda-custom-commands-contexts): Update.
(org-agenda): Use `org-contextualize-keys'.
* org-capture.el (org-capture-templates-contexts): Ditto.
* org.texi (Templates in contexts, Setting Options): Update to
reflect changes in how contexts options are processed.
* org.el (org-contextualize-agenda-or-capture): Handle key
replacement depending on the contexts.
* org-capture.el (org-capture-templates-contexts): Allow to
use the context as a way to replace one capture template by
another one.
* org-agenda.el (org-agenda-custom-commands-contexts): Allow
to use the context as a way to replace one agenda custom
command by another one.
* org.texi (Templates in contexts): Document the new structure
of the variables `org-agenda-custom-commands-contexts' and
`org-capture-templates-contexts'.
In the setup below, X is not a real capture template, it is just
an alias to templates A and B in .txt and .el files. A and B are
deactivated by default in all files.
(setq org-capture-templates
'(("X" "Nothing but an alias")
("A" "AAAA" entry (file+headline [...]))
("B" "BBBB" entry (file+headline [...]))))
(setq org-capture-templates-contexts
'(("A" "A" ((not-in-file . ".*")))
("B" "B" ((not-in-file . ".*")))
("X" "A" ((in-file . "\\.txt")))
("X" "B" ((in-file . "\\.el")))))
Thanks to Carsten for suggesting this "key-replacement" idea!
* contrib/lisp/org-export.el (org-export-filter-apply-functions): Nil
value from a filter means filter will be skipped. To ignore the
current element or object, the filter has to return the empty string
instead.
This change is done to ease filter writing. When writing
a backend-specific filter (and I guess most are), there's no more need
for the somewhat contrived:
(if (not (eq backend 'e-latex)) data
... filter's job...)
A more straightforward:
(when (eq backend 'e-latex)
... filter's job...)
is now enough.
On the other hand, it is not possible anymore to specify 'ignore as
a filter to ignore every element or object of a given type. To
achieve that goal, one can now write, for example:
(add-to-list 'org-export-filter-example-block-functions
(lambda (value backend info)
(when (eq backend 'e-html) "")))
It will ignore every example block in the `e-html' export back-end.
* contrib/lisp/org-export.el (org-export-collect-headlines): By
default, limit depth of headline collection to last headline level.
* contrib/lisp/org-e-html.el (org-e-html-toc): Small refactoring.
* contrib/lisp/org-e-html.el (org-e-html-toc): Accept non numeric
values for depth.
(org-e-html-template): Call previous function even when depth isn't
a number.
(org-e-html-keyword): Call previous function even when depth isn't
a number. Also react on #+HTML keywords, not #+LATEX.