* lisp/org-macs.el (org-string-width): Add new optional argument
providing reference face to be used for relative width calculation.
Use `ceiling' when the total string width is a fraction of "a" width.
* lisp/org-table.el (org-table-blank-field):
(org-table-clean-line):
(org-table--shrink-field):
(org-table--align-field):
(org-table-align):
(org-table-justify-field-maybe): Use org-table face as reference for
width calculation.
When org-table face is not default, `org-string-width' may not return
correct width as " " and "-" in the table may not have the same width
as "a" with default face used as reference in `org-string-width'.
With this patch, the width calculation becomes more accurate, although
may still be off if the table faces are customized to be more
piece-mill.
Reported-by: ltmsyvag
Link: https://emacs-china.org/t/org-9-6-5-org/24484
* lisp/org-macs.el (org-assert-version): Record
`org--inhibit-version-check' during compile time inside
`org-assert-version'. This way, .elc files generated when compiling
built-in Org mode in Emacs git tree never trigger version mismatch
warning.
Link: https://yhetil.org/emacs-devel/87zfxzdbna.fsf@yahoo.com
* lisp/org-element.el (org-element-with-buffer-copy):
* lisp/ox.el (org-export-with-buffer-copy): Make sure that keyword
arguments in the macro are not duplicated into BODY, which happens for
&rest body + &allow-other-keys in `cl-defmacro'.
Reported-by: João Távora <joaotavora@gmail.com>
Link: https://yhetil.org/emacs-devel/CALDnm53p7nXdnbA2PuH-VHL7EeGQUXYy3x_87hp3oj2pkyWS9Q@mail.gmail.com/
* lisp/org-macs.el (org-assert-version): Record
`org--inhibit-version-check' during compile time inside
`org-assert-version'. This way, .elc files generated when compiling
built-in Org mode in Emacs git tree never trigger version mismatch
warning.
Link: https://yhetil.org/emacs-devel/87zfxzdbna.fsf@yahoo.com
This reverts commit 36f61a9c8b.
Because of complex dependencies, it is not easy to properly "require"
`org-element-with-buffer-copy' in oc.el. So, reverting for now.
lisp/org-agenda.el (org-agenda-goto-date): Check agenda type earlier.
Also remove redundant error.
When this function is run on a todo agenda the user is given the
undescriptive error "(wrong-type-argument listp "todo")" because we
attempt to parse the 'org-last-args text-property prematurely. With
this change users will get the much better error "Not allowed in
'todo'-type agenda buffer or component".
* lisp/org-macs.el (org-assert-version): Do not throw an error - it is
preventing Org loading and creating more breakage than the problem it
is trying to solve (the version mismatch is problematic occasionally,
while the error was thrown every single time). Document what to do
when version mismatch is encountered for Org mode built inside Emacs
git repository.
Link: https://yhetil.org/emacs-devel/83frzsccuy.fsf@gnu.org/T/#t
* lisp/ox-latex.el (org-latex-table-row): Use all the rows when
constructing header definition.
* testing/lisp/test-ox-latex.el (test-ox-latex/longtable): Add new
test.
Reported-by: Brett Presnell <presnell@member.fsf.org>
Link: https://orgmode.org/list/87mt9zywco.fsf@localhost
M-x package-install does not work as built-in packages are not
filtered from the completion list. Users must go through
`list-packages' instead.
Reported-by: Carlos Pita <carlosjosepita2@gmail.com>
Link: https://orgmode.org/list/878rdbwlf3.fsf@localhost
* lisp/org.el (org-image--align, org-image-align,
org-toggle-inline-images): Add the ability to left-align, center
or right-align inline image previews in the Emacs window. This is
controlled globally using the new user option `org-image-align'.
Alignment can be specified per image using the `#+ATTR.*'
affiliated keywords. The function `org-image--align' determines
the kind of alignment for its argument link.
* lisp/org-lint.el (org-lint-invalid-image-alignment): Add an
org-lint checker to catch invalid ":align" and ":center"
attributes in `#+attr_org' keywords.
* doc/org-manual.org: Document the new feature under the Images
section.
* lisp/org-element.el (org-element-plain-list-interpreter): Use
`org-element-with-buffer-copy' and make sure that we do not run user
hooks. User hooks are often not designed to work in temporary
buffers. The changed approach also follows similar code elsewhere in
Org code.
* lisp/oc-csl.el (org-cite-csl-latex-label-separator): Make first line
of the docstring full sentence. Fix double space between sentences.
(org-cite-csl--create-structure-params): re-fill.
(org-cite-csl--no-citelinks-p): Document the function arguments.
* lisp/org-persist.el (org-persist-gc-lock-file): New constant naming
the lock file to store active sessions in.
(org-persist-gc-lock-interval): New variable defining session lock
refresh frequency.
(org-persist-gc-lock-expiry): New variable defining which sessions are
considered expired.
(org-persist--refresh-gc-lock): New function refreshing session
timestamp in `org-persist-gc-lock-file'.
(org-persist--gc-orphan-p): New function checking whether orphan files
should be garbage collected.
(org-persist-gc): Use `org-persist--gc-orphan-p'.
(org-persist--refresh-gc-lock-timer): New variable holding timer
refreshing GC lock file. Run the timer every
`org-persist-gc-lock-interval'.
This patch prevents files created in the other running Emacs sessions
from being garbage-collected.
* lisp/org.el (org-sort-entries): Make sure that we extend sorted
region to the full subtree if it spans beyond end of region.
* testing/lisp/test-org.el (test-org/sort-entries): Add test.
* lisp/org-lint.el (org-lint-colon-in-name):
(colon-in-name): Remove the checker. It is no longer a problem after
b5cfc311d that allows referring to named elements with name containing
colon.
* testing/lisp/test-org-lint.el (test-org-lint/colon-in-name): Remove
test.
* lisp/ox-texinfo.el (org-texinfo--normalize-headlines): Do not rely
upon undocumented implementation side-effects in `org-element-create'
that have been changed.
*
testing/lisp/test-ox-texinfo.el (test-ox-texinfo/normalize-headlines):
New test.
Reported-by: Jonas Bernoulli <jonas@bernoul.li>
Link: https://orgmode.org/list/87zfybnqwf.fsf@bernoul.li
* lisp/org-clock.el (org-clock--auto-clockout-timer-obj): New internal
variable holding the auto-clockout timer.
(org-clock--auto-clockout-maybe): New function to be used in timer.
Use `org-user-idle-seconds' to check for idleness. Make sure that we
correctly handle system idle time, which may be lesser than Emacs idle
time.
(org-clock-auto-clockout): Do not create duplicate timers. Use the
new internal helper function.
Reported-by: Vladimir Nikishkin <lockywolf@gmail.com>
Link: https://orgmode.org/list/87ttqv6l2g.fsf@laptop.lockywolf.net