* lisp/org-src.el (org-src-font-lock-fontify-block): If fontified text
has `invisible' text property, avoid interfering with Org folding
making the invisibility of lower priority compared to folding.
Fixes https://orgmode.org/list/87zgghrsd2.fsf@gmail.com
* lisp/org-src.el (org-edit-comment-block): New command to edit
comment block elements. The command auto-escapes Org markup inside.
(org-src--contents-area):
* lisp/org.el (org-insert-structure-template):
(org-edit-special): Support comment blocks.
* etc/ORG-NEWS (Interactive commands now support escaping text inside
comment blocks):
(New command ~org-edit-comment-block~ to edit comment block at point):
Document the new features.
See https://orgmode.org/list/87y1wc3ruw.fsf@mat.ucm.es
* (org-latex-language-alist): Alist between language code and
corresponding properties, such as Babel/Polyglossia options and
language names. Each element of the list consists of a cons cell,
where car is the language code and cdr is a property list.
* (org-latex-guess-babel-language): Modified to adapt the function to
the new structure of `org-latex-language-alist'.
* (org-latex-guess-polyglossia-language): Modified to adapt the function to
the new structure of `org-latex-language-alist'.
* (org-latex--format-spec): Modified to adapt the function to
the new structure of `org-latex-language-alist'.
* test-ol (test-ol-with-link-parameters-as): Convenience macro for
testing.
(test-ol-insert-link-get-desc): Convenience macro for testing.
(test-ol/return-foobar): Convenience function for testing.
(test-ol/insert-link-insert-description): Test for various values of
`:insert-description' in `org-link-parameters' (including
`test-ol/return-foobar').
* ol.el (org-link-parameters): Add parameter `:insert-description', a
string or a function.
* (org-insert-link): If no description is provided (pre-existing or as
an argument), next option is to use the `:insert-description' (if
non-nil) parameter to generate one.
* (org-link-make-description-function): Add documentation to describe
behaviour of nil return value, like that of `:insert-description'.
Default descriptions are predictable within a link type, but because
link types are quite diverse, are NOT predictable across many types.
A type-parameter is thus a good place to store information on the
default description.
* lisp/org-macs.el (org-current-text-column): New macro calculating
current column without accounting display text properties.
* lisp/org-colview.el (org-columns-check-computed):
(org-columns-next-allowed-value):
(org-columns-new):
(org-columns-delete):
(org-columns-edit-attributes):
(org-columns-widen):
(org-columns-move-right):
(org-columns-move-left):
(org-columns-update): Use the new macro when calculating point
position in the column view table overlay. Do _not_ use the new
macro when we want to get the visual column position of the point.
Fixes "test-org-colview/" failures on Emacs 29 after Emacs commit
4243747b1b8c3b7e3463822804b32e83febe2878:
;; Fix 'current-column' in the presence of display strings
;; * src/indent.c (check_display_width): Support calculation of width
;; of 'display' properties whose values are strings. This fixes the
;; value returned by 'current-column' when display strings are
;; present between BOL and point. (Bug#53795)
See https://orgmode.org/list/CACnOyijQc7BDDtrYQb+=VoGWkpWAyMu7O4qsvGpsU6SCgwiM8Q@mail.gmail.com
This reverts commit e22b4eb7aa.
See
https://list.orgmode.org/87r11wkmew.fsf@ucl.ac.uk/T/#mab6359ed2107d5515c6bb6b266551f0c5049ceca
The problem with the commit is that correctly loading local variables
early requires re-implementing all the built-in tricks done by Emacs,
like not enabling local variables in temp buffers or non-file buffers.
In addition, even if we call `hack-local-variables' manually, Emacs
will repeat the normal call later, possibly asking for non-safe
variables twice.
In conclusion, the whole idea of manual triggering local variables is
fragile and should better be handled by Emacs itself via stable API.
testing/.dir-locals.el is kept.
* doc/org-manual.org (The global TODO list): Fix typo in manual
section for "The global TODO list". Change "the" to "that" in the
third sentence to get "By default, this lists items with a state that
is not a DONE state."
TINYCHANGE
* lisp/org-id.el (org-id-locations-load): Update error message.
Hi,
While doing some stuff with org-mode, I noticed the error message "Could
not read ‘org-id-values’ from ~/.emacs.d/whatever, setting it to nil".
I quicly understood it’s related to org-id, but the only occurence I
found for ‘org-id-values’ was in that exact error message.
I wonder if this is not a little typo and the error message should speak
of ‘ord-id-locations’ instead?
This patch fix that problem.
I’ve signed the GNU paper to make patch to GNU project if it matters. I can
send a copy of it to anyone if needed.
As this is my first contribution, I hope I do it well.
Have a nice day,
Étienne
Signed-off-by: Étienne Deparis <etienne@depar.is>
* lisp/org.el (org-mode): Avoid triggering fontification when
`hack-local-variables' popup window is displayed. Font-lock settings
are not configured yet at this point.
Fixes https://orgmode.org/list/87r120kodw.fsf@yandex.com
* lisp/org.el (org-mode): Call `hack-local-variables' early during Org
mode startup. This way, Org startup options will regard local
variable settings.
* testing/.dir-locals.el: Create a stub dir-locals file to prevent
tests from being affected by directory-local settings of the root Org
repo folder.
Fixes
https://list.orgmode.org/587be554-906c-5370-2cf2-f08b14fa58ff@gmail.com/T/#u
* lisp/org-macs.el (org-compile-file): When PROCESS is a list, keep
output of all the listed commands, not just the last one.
* lisp/ox-latex.el (org-latex-pdf-process): Clarify that the process
output is parsed to detect compilation errors/warnings.
* lisp/ox-icalendar.el (org-icalendar-force-alarm): Option to set alarm
even if alarm time is set to zero.
* lisp/ox-icalendar.el (org-icalendar--valarm): create VALARM at the
event start if the alarm time is set to zero and
`org-icalendar-force-alarm' is set to true.
TINYCHANGE
* lisp/ob-core.el (org-babel-expand-noweb-references--cache):
(org-babel-expand-noweb-references--cache-buffer): New variables
storing info cache.
(org-babel-expand-noweb-references): Make use of global info cache to
avoid extra parsing. Use `cl-macrolet' instead of defining transient
lambda functions on every call.
* lisp/org-capture.el (org-capture-place-entry):
(org-capture-place-item):
(org-capture-place-table-line):
(org-capture-place-plain-text): Store beginning of the capture region
as marker. This will make the ORIGIN move if
`org-capture-empty-lines-before` has to add/remove lines.
Fixes https://orgmode.org/list/CAGyCDkPos+W_MEJffSZga83NsOLZx2XGTYEmSGQuHQvS-sNa8A@mail.gmail.com
* lisp/org.el (org-paste-subtree): Use `insert' instead of
`insert-before-markers'. The former is what people usually expect and
doing otherwise is surprising.
* lisp/org-archive.el (org-archive-to-archive-sibling): Do not expect
`org-paste-subtree' to insert before markers.
* lisp/oc-csl.el (org-cite-csl--rendered-bibliographies): New function
to collect all #+print_bibliography keywords with their properties and
call Citeproc to render all sub-bibliographies in one go as required
by the API. Return the formatted bibliographies as values in an alist
in which keys are the #+print_bibliography keyword options as plists.
Cache the return value in the export communication channel.
(org-cite-csl--bibliography-filter): New helper function to convert
plists representing #+print_bibliography options to the alist filter
form expected by Citeproc.
(org-cite-csl--rendered-citations): Call
`org-cite-csl--rendered-bibliographies' before rendering citations to
make sure that the complete sub-bibliography information is added to
the processor and, therefore, citation numbers are correct.
(org-cite-csl--render-bibliography): Instead of directly calling
Citeproc to render the bibliography, call
`org-cite-csl--rendered-bibliographies' and retrieve the formatted
bibliography from its return value based on the options passed as the
`props' argument.
* lisp/org-fold.el (org-fold-show-entry): Do not fold drawers in the
unfolded entry unless the new optional argument is non-nil. Folding
the drawers was introduced in 1027e02569, but does not follow the
function docstring. Moreover, folding drawers creates unexpected
behaviour in some cases. See
https://orgmode.org/list/m2a6bl4mmr.fsf@andrew.cmu.edu
* etc/ORG-NEWS (~org-fold-show-entry~ does not fold drawers by default
anymore): Document the change.
* lisp/org-agenda.el (org-agenda-show):
(org-agenda-show-and-scroll-up):
(org-agenda-show-1):
* lisp/org-compat.el (outline-toggle-children):
* lisp/org.el (org-move-subtree-down):
(org-return): Explicitly request folding drawers inside the revealed
entry in the places where it appears to make sense.
* lisp/org-timer.el (org-timer--get-timer-title): Do not unfold entry
at all. This is a noninteractive function.
* lisp/ox-latex.el: (org-latex-template): When no date is provided or
the export option date is nil, the empty '\date{}' string is no
longer included in the exported latex document.
The default behaviour for ox-latex was to include an empty date line as
'\date{}'. This empty date line can affect more complex latex templates
when the date is for example set by the template on compilation, or when
the date command is overwritten entirely. In this new patch, the date
line is omitted from the exported document.
TINYCHANGE
* testing/lisp/test-ol.el (test-ol/encode): Rename to
`test-org-link/encode'.
(test-ol/decode): Rename to `test-org-link/decode'.
(test-ol/encode-url-with-escaped-char): Rename to
`test-org-link/encode-url-with-escaped-char'.
(test-ol/org-toggle-link-display): Rename to
`test-org-link/toggle-link-display'.
(test-ol/escape): Rename to `test-org-link/escape'.
(test-ol/unescape): Rename to `test-org-link/unescape'.
(test-ol/make-string): Rename to `test-org-link/make-string'.
(test-ol/store-link): Rename to `test-org-link/store-link'.
(test-ol/update-radio-target-regexp): Rename to
`test-org-link/update-radio-target-regexp'.
(test-ol/next-link): Rename to `test-org-link/next-link'.
(test-ol/previous-link): Rename to `test-org-link/previous-link'.
(test-ol/plain-link-re): Rename to `test-org-link/plain-link-re'.
Only `test-ol/org-toggle-link-display' was executed during
"make test" since it is the only name matched by the "org|ob" default
selector. Reported in: Ihor Radchenko to emacs-orgmode.
Re [PATCH v7] ol.el: add description format parameter
to org-link-parameters. Sun, 24 Jul 2022 21:15:31 +0800.
https://list.orgmode.org/87v8rmd53g.fsf@localhost/
The Emacs doc string convention is to document values as-is when that
is clear, and surrounded by `single quotes' otherwise. For example, a
doc string "(a b c)" stands for a list of symbols, and the doc string
"`a'" stands for a single symbol. The doc string "\\=`a" is typically
not correct for that single symbol, because that is equivalent to
"(quote a)" and the typical intent is to talk about the symbol, not
about the Lisp quoting construct. One needs "\\=`X" only when talking
about something intended to be equivalent to "(quote X)", as in the
doc string "(provide \\='org-xyz)".
* lisp/ox-latex.el (org-latex--inline-image): Testing with TeXLive 2022
finds that while \includegraphics is fine with unicode characters in the
file path, \includesvg needs \detokenize{...} to prevent errors.
* lisp/org-macro.el (org-macro--vc-modified-time): Not all the vc
components needed are autoloaded, allowing for the error:
"vc-call-backend: Symbol’s value as variable is void: vc-log-view-type".
To prevent this issue from cropping up, vc is now required at the start
of `org-macro--vc-modified-time'.
As mentioned in 2e36ac2ac (Merge single quote fixes from Emacs's
master, 2022-07-24), this merge is keeping Org main's side of
org-babel-lua-read-string and org-agenda-sorting-strategy rather than
the variant introduced in the Emacs repo that's now in bugfix.
Note that for org-agenda-sorting-strategy docstring I think it'd
probably be preferable to change main's
\\='(time-up category-keep priority-down)
to a bare
(time-up category-keep priority-down)
but, at least for this merge, I'm sticking to choosing between the
variables that are in one of the sides.
This brings in ports of bbf389ea6de (Audit quoting the quote character
in doc strings, 2022-04-22), 2d71fd3b041 (Further doc string quoting
fixes, 2022-04-22), and b2bce107b15 (Further audits of single quotes
in Lisp doc strings, 2022-05-24) from Emacs's master branch, resolving
conflicts with 01b0fb14b (Backport from main: Escape single left
quotes in docstrings, 2022-07-24).
In all cases, take Emacs's side. There are two cases where I think
Org's version is preferable, org-babel-lua-read-string and
org-agenda-sorting-strategy. Don't keep those _on bugfix_ to avoid
conflicts when Emacs's emacs-28 branch is merged to its master branch.
When I merge bugfix to main, I'll keep Org's variant, so they'll
eventually make it to Emacs's tree, just not as part of the Org 9.5.x
to emacs-28 syncing.
* lisp/org.el (org-latex-to-html-convert-command):
* lisp/org-agenda.el (org-agenda-sorting-strategy): Audit use of
various single quotes in Lisp doc strings.
Further audits of single quotes in Lisp doc strings
b2bce107b15d6e0c2b773704179c6bf463525459
Lars Ingebrigtsen
Tue May 24 13:17:53 2022 +0200
[km] Org's bugfix branch is currently receiving commits from emacs-28,
but this commit comes from Emacs's master branch. I'm porting it
because it has conflicts with bugfix's 01b0fb14b (Backport from
main: Escape single left quotes in docstrings, 2022-07-24) and
only touches docstrings.
* lisp/ob-table.el (org-sbe): Further quoting fixes in doc strings.
Further doc string quoting fixes
2d71fd3b041506c68b5f1cd1e409e09e25778c34
Lars Ingebrigtsen
Fri Apr 22 17:16:42 2022 +0200
[km] Org's bugfix branch is currently receiving commits from emacs-28,
but this commit comes from Emacs's master branch. I'm porting it
because it has conflicts with bugfix's 01b0fb14b (Backport from
main: Escape single left quotes in docstrings, 2022-07-24) and
only touches docstrings.
* lisp/ox-publish.el (org-publish-find-property):
* lisp/ox-html.el (org-html--unlabel-latex-environment):
* lisp/org-table.el (org-table-collapse-header):
* lisp/org-plot.el (org--plot/prime-factors):
* lisp/org-agenda.el (org-agenda--mark-blocked-entry):
(org-agenda-set-restriction-lock):
* lisp/ob-lua.el (org-babel-lua-read-string):
* lisp/ob-julia.el (org-babel-julia-evaluate-external-process):
(org-babel-julia-evaluate-session):
* lisp/ob-core.el (org-babel-default-header-args): Fix
quoting in doc strings. In code examples, the ' character is
quoted with \\=, and regularize 'foo to `foo', and quote strings
like "foo" instead of 'foo'.
Audit quoting the quote character in doc strings
bbf389ea6deab229ba18dc519fe712ec982609d1
Lars Ingebrigtsen
Fri Apr 22 16:17:22 2022 +0200
[km] Org's bugfix branch is currently receiving commits from emacs-28,
but this commit comes from Emacs's master branch. I'm porting it
because it has conflicts with bugfix's 01b0fb14b (Backport from
main: Escape single left quotes in docstrings, 2022-07-24) and
only touches docstrings.