* lisp/oc-basic.el (org-cite-basic--parse-bibliography): Do not use
obsolete `buffer-file-name' generalized variable. Prefer
`set-visited-file-name'.
* lisp/ol-bibtex.el (org-indent-region): Declare function.
(org-bibtex-import-from-file): Remove unused variable.
* lisp/ol.el (org-link--decode-compound): Use `ash' instead of
obsolete `lsh'.
* lisp/org-macs.el: Do no use obsolete generalized variable
`buffer-string'.
* lisp/org-plot.el (org-plot/redisplay-img-in-buffer):
* lisp/org.el (image-flush):
(org-display-inline-images): Use `image-flush' instead of obsolete
`image-refresh'.
* lisp/ox.el (org-export-to-file): Quote ' in the docstring.
All other changes are changing obsolete `point-at-bol' and
`point-at-eol' to `line-beginning-position' and `line-end-position'.
* 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
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/ol.el (org-store-link):
* lisp/org-agenda.el (org-agenda-get-timestamps)
(org-agenda-get-progress, agenda-bulk-action):
* lisp/org-capture.el (org-capture-fill-template):
* lisp/org-clock.el (org-clock-get-sum-start)
(org-clock-special-range, org-clocktable-shift)
(org-clocktable-steps):
* lisp/org-colview.el (org-colview-construct-allowed-dates):
* lisp/org-datetree.el (org-datetree-find-iso-week-create)
(org-datetree-insert-line):
* lisp/org-element.el (org-element-timestamp-interpreter):
* lisp/org-macro.el (org-macro--vc-modified-time):
* lisp/org-macs.el (org-matcher-time):
* lisp/org.el (org-current-time, org-current-effective-time)
(org-add-planning-info, org-read-date, org-read-date-display)
(org-read-date-analyze, org-eval-in-calendar)
(org-calendar-select, org-display-custom-time)
(org-calendar-select-mouse, org-time-string-to-time)
(org-time-from-absolute, org-at-clock-log-p)
(org-date-from-calendar, org-get-cursor-date)
(org-timestamp-to-time):
* testing/lisp/test-org-clock.el (org-test-clock-create-timestamp):
* lisp/ox-icalendar.el (org-icalendar-convert-timestamp):
Avoid direct calls of `encode-time', use `org-encode-time' instead.
Org supports Emacs-26, but the recommended way to call `encode-time'
changed in Emacs-27. In Emacs-29 DST and TZ elements of the single list
arguments became optional. In Org it is still convenient to call the
function with separate arguments without explicit DST and TZ arguments.
The `org-encode-time' should mitigate attempts to modernize Org code
directly in the Emacs repository.
Emacs now advises using "website" (instead of "homepage") and
consequently to use the "URL" comment header instead of "Homepage".
* README:
* README_ELPA:
* doc/org-guide.org (Creating Footnotes):
* doc/org-manual.org (Creating Footnotes):
* etc/styles/README (URL): Prefer "website" to "homepage".
* lisp/*.el:
* mk/org-fixup.el: Replace the "Homepage" header comment with "URL".
* lisp/ob-lilypond.el (org-babel-lilypond-commands):
* lisp/ob-shell.el (org-babel-shell-names):
* lisp/org-capture.el (org-capture-templates):
* lisp/org-clock.el (org-clock-ask-before-exiting):
* lisp/org-duration.el (org-duration-units):
* lisp/org-faces.el (org-set-tag-faces):
* lisp/org-footnote.el (org-footnote-section):
* lisp/org-list.el (org-plain-list-ordered-item-terminator):
(org-list-allow-alphabetical):
* lisp/org.el (org-babel-do-load-languages):
(org-set-modules):
(org-export-backends):
(org-use-fast-todo-selection):
(org-enforce-todo-dependencies):
(org-enforce-todo-checkbox-dependencies):
(org-display-custom-times):
(org-set-packages-alist):
(org-set-emph-re):
* lisp/ox-odt.el (org-odt-schema-dir): Use
`set-default-toplevel-value' instead of `set' or `set-default' in
`defcustom' :set argument.
This commit fixes a bug that occurred when using an autoload function
inside a let-binding for a custom variable when the feature defining
both the function and the custom variable had not been loaded yet.
See bug#54399 and
https://lists.gnu.org/archive/html/emacs-orgmode/2022-03/msg00085.html,
https://lists.gnu.org/archive/html/emacs-orgmode/2022-06/msg00226.html
* lisp/org-refile.el (org-refile):
* lisp/org-capture.el (org-capture-store-last-position):
Pass `format` arg to `with-demoted-errors`.
(with-demoted-errors): Warn on missing `format` arg
d52c929e31f60ff0462371bfe27ebd479e3e82bd
Stefan Monnier
Fri Feb 4 19:39:53 2022 -0500
[km] with-demoted-errors has had a format argument since Emacs 24.4.
Passing it avoids an error when compiling with Emacs's current
master (bug#54225). Once that bug is resolved, it will prevent a
warning.
* lisp/org-capture.el (org-capture-fill-template): Changed to use
completing-read-multiple.
* lisp/org.el (org-set-tags-command): Changed to use
completing-read-multiple.
(org-change-tag-in-region): Changed to use a simple completion table.
* testing/lisp/test-org.el (test-org/set-tags-command): Fixed tests.
Change various places which use `completing-read' to read tags using a
custom completion function to instead use `completing-read-multiple'
with a completion table instead.
This makes tab completion play better with alternative completion
frameworks such as vertico, selectrum, etc.
`org-change-tag-in-region' only reads a single tag, so it is changed
to use a completion table with `completing-read'. This also makes it
play better with alternative completion frameworks.
Note that there is still one use for `org-tags-completion-function',
which is for completing tag matches. Completing tag matches is
different from completing lists of tags since the separators (+, -,
etc) have semantic meaning. This commit does not address that use
case.
* lisp/org-capture.el (org-capture-set-target-location): Bind
org-end-time-was-given around the org-read-date call to get a return
value that uses the start time rather than doing custom adjustment of
the return value.
If org-capture-set-target-location detects that the answer to
org-read-date has a time range, it strips the end time from the answer
and calls org-read-date-analyze again. (org-read-date already calls
it underneath.) The regexp it uses, however, can easily match a date,
leading to a bogus result.
org-read-date-analyze is already capable of processing the time range
in a way that matches org-capture-set-target-location's intent: when
org-end-time-was-given is bound, org-read-date-analyze splits off the
end value of the range and stores it in org-end-time-was-given. Drop
the custom logic and let org-read-date-analyze handle the range.
Reported-by: Richard Lawrence <richard.lawrence@berkeley.edu>
Ref: https://orgmode.org/list/87h7obh4ct.fsf@aquinas
* lisp/org-agenda.el: Remove `generated-autoload-file' local
variable.
* lisp/org-capture.el: Ditto.
This is a continuation of a4e6a6fa7 which fixes fae16ed8f.
Reported-by: Andrii Kolomoiets <andreyk.mad@gmail.com>
* lisp/org-capture.el (org-capture-templates): Enhance description and
add 'month' value for :tree-type in description.
* doc/org-manual.org: Fix typo for displaying 'month' in :tree-type
property.
TINYCHANGE
* lisp/org-capture.el (org-capture-place-entry): Fix heading's
position when inserting a template "here" with C-0 M-x org-capture.
Reported-by: david wen riccardi-zhu <dwrz@dwrz.net>
Ref: https://orgmode.org/list/877dscaila.fsf@dwrz.net/
* lisp/org-capture.el (org-capture-templates): Add package-version
keyword for recent changes, removing the now out of date and
unnecessary version keyword.
This option changed in both d06aa486d (Add in support for filling in
the bare link in org capture, 2020-09-14) and 83c93e6fe
(org-capture.el: Give a default value when prompting for a property,
2020-09-23).
* lisp/org-capture.el (org-capture-templates)
(org-capture-fill-template): Enable declaring a default value
when prompting for a property during capture.
* lisp/org.el (org-read-property-value): Add parameter DEFAULT
for an initial/default/suggested property value.
* doc/org-manual.org: Document declaring a default value for a
prompted property during capture.
* doc/org-manual.org: Document new %L capture template formatting
directive.
* lisp/org-capture.el (org-capture-templates): Document new %L capture
template formatting directive.
* lisp/org-capture.el (org-capture-fill-template): Add in support for
%L, bare link formatting, in org-capture-fill-template.
TINYCHANGE
* lisp/org-capture.el (org-capture-finalize): Update
`org-capture-plist' with local-value before finalizing.
We use the global-variable `org-capture-plist' to populate the
local-variable `org-capture-current-plist' on the init of the
`org-capture' buffer. However, we do not do the opposite (i.e. update
the global-variable with the local-variable) on
`org-capture-finalize'.
This is fine for the majority of `org-capture-finalize', since we’re
using the LOCAL arg of `org-capture-get' to read
`org-capture-current-plist' instead of `org-capture-list', but this
trick does not work for `org-capture-after-finalize', since the hook
is run after the `org-capture-buffer' has been closed.
This causes problem with `:kill-buffer t', and it limits what can be
done with cleanup functions in `org-capture-after-finalize'.
See <https://orgmode.org/list/87h7tv9pkm.fsf@hidden/> for details.
* lisp/org-capture.el (org-capture-place-entry): Prevent breaking the
following headline inside the capture buffer. This should match the
behavior from 9.3.
(org-capture-finalize): Reverts cb2774d1a, which solves a similar
problem but only in the finalize stage, so the subtree structure would
still be broken in the middle of editing the capture.
* org-capture.el (org-capture-place-template): Allow
`org-capture-current-plist' access during `org-capture-mode-hook'
Ensure consistency between org-capture's hooks.
`org-capture-after-finalize-hook' is now the only hook that cannot
access `org-capture-current-plist' because the capture buffer is
killed when it is run.