* lisp/org-agenda.el (org-agenda-highlight-todo):
(org-agenda-set-mode-name):
* lisp/org-table.el (org-table-eval-formula): Avoid space before tab in
indent.
This is in preparation for syncing with the Emacs repo.
* lisp/ob-R.el (ob-session-async-org-babel-R-evaluate-session):
Make sure that `ess-inject-source' is set to the default
'function-and-buffer before running `ess-eval-buffer'. Return
`ess-inject-source' to its user-specified state afterwards.
* lisp/ob-R.el (ob-session-async-org-babel-R-evaluate-session): Make
sure that `ess-eval-visibly' is nil before evaluating the temporary
buffer, but return ess-eval-visibly to it's original state afterwards.
* lisp/ob-R.el (ob-session-async-R-indicator): Add constant
representing a prefix R to identity session.
(ob-session-async-org-babel-R-evaluate-session): New function to
evaluate R src block asynchrously.
(ob-session-async-R-value-callback): New function that calls back
the result of the asynchronous evaluation.
(org-babel-R-evaluate): Add `async' parameter and call
`ob-session-async-org-babel-R-evaluate-session' if `async'
parameter is present.
(org-babel-execute:R): Call `org-babel-comint-use-async' to check
if async is among `params' and add async parameter to
`org-babel-R-evaluate'.
* testing/lisp/test-ob-R.el: Add 7 more tests for async
evaluations, also taken from the `ob-session-async' package.
This is almost a carbon copy of Jack Kamm's `ob-session-async'.
The original source code can be found
https://github.com/jackkamm/ob-session-async.
Please refer to the following thread to trace back the discussion
on async evaluation in R:
https://list.orgmode.org/87eed9g9p6.fsf@gmail.com/
* lisp/ox-org.el (org-org-identity, org-org-template): As it has
previously been clarified on the mailing list that upper-case keywords
are only intended for the manual[1], an Org export of an Org file should
use lower-case keywords.
[1]: https://list.orgmode.org/87tuuw3n15.fsf@nicolasgoaziou.fr/
* lisp/oc-csl.el (org-cite-csl--create-structure-params): Introduce this new
function to map the extended list of supported citation styles and variants to
the corresponding citeproc-el citation structure creation parameters.
(org-cite-csl--no-affixes-p, org-cite-csl--capitalize-p,
org-cite-csl--no-author-p): Remove them since their functionality is provided
now by `org-cite-csl--create-structure-params'.
(org-cite-csl--parse-reference): Don't generate `suppress-author' cite
information as that is treated now by citeproc-el as a citation style.
(org-cite-csl--create-structure): Use `org-cite-csl--create-structure-params' to
generate style-dependent citation structure parameters.
* lisp/org.el (org-latex-default-packages-alist): Remove grffile and
textcomp from the list of default LaTeX packages to load, as they've
been obsolete for quite a few years now.
* etc/ORG-NEWS: Announce the removal of grffile and textcomp from
`org-latex-default-packages-alist'.
* lisp/org-protocol.el (org-protocol-convert-query-to-plist):
Replace "+" chars by spaces before passing parameter string
to decoder. Allow making org-protocol URIs with help of URLSearchParams
JavaScript class.
* lisp/org-protocol.el doc/org-manual.org etc/ORG-NEWS: Add examples
demonstrating new opportunity for browser bookmarklets.
Make parsing of URI parameters a bit closer to URL standard
https://url.spec.whatwg.org/#urlencoded-parsing
* lisp/org.el (org-fill-element): `mark-whole-buffer' introduced in
7b85a64da is only for interactive use and causes compiler warning.
Replace it using noninteractive commands.
* lisp/org.el (org-display-inline-image--width): Instead of interpreting
an image :width of X% as X pixels, take it as X% of the text width of
the buffer.
* lisp/org.el (org-display-inline-images,
org-display-inline-image--width): Extract the width determination in
`org-display-inline-images' into a new function
`org-display-inline-image--width' where I have taken the opportunity to
refactor the width-determination code.
* lisp/org.el (org-display-inline-images): When the image width is given
as a float less than 2, interpret the value as that portion of the text
area width. This works well with cases such as "#+attr_latex: :width
0.6\linewidth" as this will now be interpreted as 60% of the text area
width. The upper bound is set to 2 not 1, as more than 100% of the text
width can be realistic, e.g. "1.2\linewidth" in LaTeX, but more than
200% seems unrealistic.
* org-agenda.el (org-agenda--insert-overriding-header): Allow
`org-agenda-overriding-header' to be a function in addition to a
string or nil. When the custom agenda is created or updated, call that
function and insert the string it returns as the agenda header.
This allows custom commands to produce dynamic headers that include
up-to-date information. For example, this produces a header with a
current timestamp:
(push '("DHD" "Dynamic header demo"
((alltodo
""
((org-agenda-overriding-header
(lambda ()
(propertize
(format-time-string "-- Get crackin’, it’s %H:%M:%S!!\n")
'face 'org-agenda-structure)))))))
org-agenda-custom-commands)
User is free to add any face properties, use Org links, and include a
blank line or not. I am using this to count how many items are in
various inboxes and display them in an agenda.
* lisp/ob-core.el (org-babel-disassemble-tables): Avoid length> for
compatibility with Emacs versions before 28.
length> and friends were added to Emacs in 0f790464d5 (Add new
predicates for sequence lengths, 2020-12-27), which hasn't yet made it
into a release.
* lisp/org.el (org-revert-all-org-buffers): Use command substitution.
Use command substitution instead of raw keys in more places
0da8118dcbf3c54dd6ecc9c0e3314a56ca82ec51
Stefan Kangas
Fri Sep 24 21:26:08 2021 +0200
* lisp/ox-html.el (org-html-htmlize-output-type):
* lisp/org-agenda.el (org-agenda-do-in-region): Don't quote t and nil.
Don't quote nil and t in doc strings and comments
85e9e5f616fb0fd0819a04006d6d2a0fb6d93ad7
Lars Ingebrigtsen
Tue Sep 21 22:11:43 2021 +0200
* lisp/org-agenda.el (org-search-view): Don't use `format' on
strings that have no % format directives in them.
Don't use `format' on strings without % format directives
43c1ee90cb3333dc2643e58cf607399b0abebf43
Lars Ingebrigtsen
Tue Sep 21 17:52:53 2021 +0200
* lisp/org.el (org-fontify-extend-region): Fix fontification of
headline or meta line created by inserting a newline.
Unrelated to the fix: `org-fontify-extend-region' is added to
`font-lock-extend-after-change-region-function' and doesn't need to
use `save-excursion'.
* lisp/org.el (org-fontify-meta-lines-and-blocks-1): When this is run on
a src block, a "leaky" major mode called in
`org-src-font-lock-fontify-block' can modify the match data.
This is problematic, as the match data already set is important for
font-lock. To protect ourselves from this behaviour, we can wrap
`org-src-font-lock-fontify-block' in `save-match-data' to ensure that
the match data for the src block is conserved.
* lisp/oc-csl.el (org-cite-csl--processor): Citeproc-el now provides an
itemgetter constructor with all the required functionality and some more, so we
use it to create the itemgetter instead of `org-cite-csl--itemgetter' to avoid
code duplication and make use of the additional features, in particular the
ability to access bibliographies in `org-bibtex' format
(see <https://gewhere.github.io/org-bibtex>).
(org-cite-csl--itemgetter): Is removed since it is no longer used.
* lisp/org-agenda.el (org-search-view)
(org-agenda-propertize-selected-todo-keywords, org-todo-list)
(org-tags-view): Implement new org-agenda-structure-filter and
org-agenda-structure-secondary faces.
(org-agenda-get-day-face): Add condition for rendering the current
date heading in org-agenda-date-weekend-today.
* lisp/org-faces.el (org-agenda-structure-secondary)
(org-agenda-date-weekend-today, org-agenda-structure-filter)
(org-imminent-deadline): Add new faces.
(org-agenda-deadline-faces): Use the 'org-imminent-deadline' for
current deadlines instead of the generic 'org-warning'.
* lisp/ob-core.el (org-babel-disassemble-tables,
org-babel-gnuplot-process-vars): Use `proper-list-p' check instead of
`listp'.
(org-babel-disassemble-tables): Check list length before trying to
remove hline from a table assignment.
* testing/lisp/test-ob.el (test-ob/cons-cell-as-variable): Add the
test.
* lisp/ob-core.el (org-babel-default-header-args): Document ability to
use functions.
(eval-default-headers): New function to generate default header
arguments, which adds the ability to evaluate function arguments at
runtime.
(org-babel-get-src-block-info): Use new header argument evaluate
function when retreiving src block info.
* lisp/ob-exp.el (org-babel-exp-src-block): Must use new
eval-default-headers when exporting as well.
The closures are evaluated at runtime.
* lisp/org-agenda.el (org-compile-prefix-format): Use `read' instead
of pure regexp matching to determine bounds of %(sexp) expressions in
`org-agenda-prefix-format'.
Fixes https://orgmode.org/list/87fsy8yi1e.fsf@localhost/
* lisp/ob-tangle.el (org-babel-tangle-single-block,
org-babel-tangle-comment-links): Suppress org-id-link-to-org-use-id
during tangling. The links used during tangle process are transient
and do not really need to use ID. Using ID may create unexpected
edits in the tangled Org buffer when org-id-link-to-org-use-id is set
to t. Fixes [1].
[1] https://orgmode.org/list/9eb31da73b12fcaf6820484834cc8cd3@libre.brussels/T/#t
* lisp/ol-bibtex.el (org-bibtex-read): Previously, when there is no
entry at point, `nil' would be added to `org-bibtex-entries' causing
errors later, i.e. upon calling org-bibtex-write. Now, nil is never
pushed to `org-bibtex-entries'.
Fixes https://orgmode.org/list/874kd3288n.fsf@yandex.com