Most copyright years were updated with the port of Emacs's cae528457
in e0815d754. Update the remaining copyright years for files that
have Free Software Foundation as the copyright holder but aren't
included in the Emacs repo.
* lisp/org-macs.el (org-assert-version): Make quoting "'" in the
message more readable.
Thanks to Stefan Monnier <monnier@iro.umontreal.ca> for the
suggestion.
* testing/lisp/test-ob-octave.el (ob-octave/graphics-file):
(ob-octave/graphics-file-session):
(ob-octave/graphics-file-space): Do not check the created image file
size. This tests causes race condition between the test and Octave
writing image to disk. Also, the correctness of image file is nothing
of Org's business as long as ob-ocatave's Elisp implementation is
concerned.
* lisp/org-persist.el (org-persist-register): Document that MISC must
be a plist.
(org-persist--get-collection): Throw an error when MISC is not a
plist. Fix arglist - MISC is now passed explicitly as a single
object.
(org-persist--storage-version): Bump version to avoid obsolete
malformed containers with improperly included MISC.
* testing/lisp/test-ob-octave.el (ob-octave/graphics-file):
(ob-octave/graphics-file-session):
(ob-octave/graphics-file-space): Delay `should' condition waiting for
file contents to be written by octave. This may be necessary when
octave has not yet written the file contents (on slow machines).
Re-enable tests.
Link: https://orgmode.org/list/87r0wk29dz.fsf@localhost
* lisp/org-element.el (org-element-inlinetask-parser): Parse
inlinetasks closer to headings. In particular, recognize COMMENT
keyword and ARCHIVE tag in inlinetasks on parser level.
* testing/lisp/test-org.el (test-org/comment-dwim): Add tests for
inlinetasks and for uncommenting headings.
Reported-by: Alain.Cochard@unistra.fr
Link: https://orgmode.org/list/25508.20192.899342.932809@gargle.gargle.HOWL
* lisp/oc-basic.el (org-cite-basic--parse-json): Make sure
`org-cite-basic--parse-json' produces a string for the editors field.
The function `org-cite-basic--get-author' expects a string for both the
"authors" field and the "editors" field.
The conversion to string was only done for the "authors" field in
`org-cite-basic--parse-json'. This patch fixes the issue by applying the
transformation to both "authors" and "editors".
This points to a more general issue where `org-cite-basic--get-field' is
expected to return nil or a string, but calls
`org-cite-basic--get-entry' that may return an association list.
TINYCHANGE
* lisp/org-persist.el: Create `org-persist-directory' early, when we
decide the directory name. This way, even if third party code gets to
know the directory name in /tmp, it cannot raise file permissions by
creating `org-persist-directory' with loose access rights ahead of us.
Also, create and set `org-persist-directory' before we check if have
have proper access rights to write to it.
(org-persist-write-all): Do better job clearing
`org-persist-directory' if nothing is going to be written inside.
(org-persist-clear-storage-maybe): New function to be called before
exiting Emacs. It is used to remove the persistent data before
exiting. Multi-session persistence is not and must not be needed when
calling Emacs with -Q command line argument. Call the function before
exiting Emacs in `kill-emacs-hook'.
Reported-by: Stefan Monnier <monnier@iro.umontreal.ca>
Link: https://yhetil.org/emacs-devel/jwvwn6kpmir.fsf-monnier+emacs@gnu.org
Remove the directory created by `make-temp-file' when Emacs is called
with -Q command line argument. Only use the return value as the
directory to be created when something is actually stored by
org-persist while running Emacs.
Reported-by: William Denton <wtd@pobox.com>
Link: https://orgmode.org/list/alpine.DEB.2.22.394.2212211213480.270543@shell3.miskatonic.org
* lisp/ob-tangle.el (org-babel-tangle--unbracketed-link): Add the let
bound variable l to the and statement to prevent l from being passed
to `string-match' in the event that it is nil.
When tangling nested noweb blocks during export it is possible for the
results of `org-store-link' to return nil. This commit ensures that
the value returned for l is only passed to `string-match' when it is
non-nil, avoiding a `wrong-type-argument' (stringp nil) error.
Handling of comments and nesting of babel blocks is known to have
issues. The bug is from 8a781d35dc
where new code was introduced to obtain the value for bare which was
not present in early code. I'm guessing that the bug appears now
because `string-match' is called on l (aka link) at a point in time
when it was never previously called and it was thus masked because in
the old version it was impossible to call `string-match' when `link'
was nil because another variable was always nil, masking the issue.
(ob-octave/graphics-file):
(ob-octave/graphics-file-session):
(ob-octave/graphics-file-space): Disable tests until we figure the
origin of CI failures. The tests are passing locally.
Link: https://orgmode.org/list/87cz8ifioa.fsf@localhost
* lisp/ob-core.el (org-babel-insert-result): Do not treat table lines
in RESULT verbatim.
* testing/lisp/test-ob-shell.el (ob-shell/results-list): Add new test.
Reported-by: Rudolf Adamkovič <salutis@me.com>
Link: https://orgmode.org/list/m2tu1v8gj8.fsf@me.com
* lisp/org-persist.el (org-persist--disable-when-emacs-Q): Rename
`org-persist-disable-when-emacs-Q' to internal variable. Update the
docstring.
(org-persist-read):
(org-persist-write):
(org-persist-gc): Do not disable persistence. Persistence is
necessary for remote file caching to work within a single Emacs
session. Instead, use temporary directory as index for emacs -Q.
* lisp/org-persist.el (org-persist-write-all): Do not create
`org-persist-directory' when index does not contain any data except
index version.
Link: https://orgmode.org/list/875yedw0ib.fsf@localhost
* lisp/ob-octave.el (org-babel-execute:octave):
-Ensure that the special Octave variable `ans' is bound when
GFX-FILE is non-nil. The glue code in
ORG-BABEL-OCTAVE-WRAPPER-METHOD causes Octave to exit with a
non-zero exit code when `ans' is not bound.
-Change format control string to %S from %s. Ensure the graphics
filename is quoted. If it is not, Octave may create a mis-named
file or fail entirely.
* testing/examples/ob-octave-test.org:
Update the Graphical tests section:
-put in the correct headers;
-add a remark about where to find each test.
* testing/lisp/test-ob-octave.el:
Add the three tests ob-octave/graphics-file,
ob-octave/graphics-file-session and ob-octave/graphics-file-space.
-ob-octave/graphics-file: The first test verifies that the first bug
identified above is fixed; it also verifies that graphics file
creation works correctly for scripting.
-ob-octave/graphics-file-session: The second test verifies graphics
file creation works correctly for sessions. The Octave command
`crash_dumps_octave_core(0)' is included to prevent the creation of
a core file (`octave-workspace').
-ob-octave/graphics-file-space: The third test verifies that a
graphics filename with a space in it is created correctly.
Thanks to Ihor Radchenko for helpful feedback.
Ref: https://list.orgmode.org/8735asbtfe.fsf@localhost/T/#u
* ob-R.el (org-babel-R-assign-elisp): Use the patch from
ccberry@health.ucsd.edu, to print org-list as a one column table as it
was the case in release_9.5. The break in R is due commit b4e437f96 *
ob-core: Resolve named list references to simple lists.
* test-ob-R.el (ob-R-nested-list): New function to test that org list
with multiple level are handled as expected in R.
see https://list.orgmode.org/87bkofh0ir.fsf@localhost/ for context.
* test-ob-R.el (ob-session-R-result-output): This test will check if
output is printed to buffer in a session with :results output. This
test is to prevent the bug mentioned in https://list.orgmode.org/877czca7oj.fsf@u-bordeaux.fr/
does not happen again.
* lisp/org-persist.el (org-persist-write:url): Since the url write
function is called as part of `org-persist-write-all', it is worth
adding a check to avoid re-downloading the file if a file already exists
in the expected location.
* lisp/org.el (org--confirm-resource-safe, org--safe-remote-resource-p):
Replace instances of buffer-file-name
with (buffer-file-name (buffer-base-buffer)) so these functions work in
indirect buffers.
* lisp/ox.el (org-export-link-localise): When no local copy of the link
resource could be fetched, produce a warning message and do nothing
instead of setting the link :path to nil.
* lisp/org.el (org-hide-drawer-startup): Make alias to
`org-cycle-hide-drawer-startup'.
Reported-by: Kévin Le Gouguec <kevin.legouguec@gmail.com>
Link: https://orgmode.org/list/877cyvzrcu.fsf@gmail.com
* lisp/org-element.el (org-element-use-cache): Autoload to silence
byte compiler warning in Emacs repo.
On Emacs's emacs-29 branch, compiling lisp/org/org-loaddefs.el gives
the following warning that stems from an autoloaded defsubst,
org-element-at-point-no-context (new to Org 9.6):
In org-element-at-point-no-context:
org/org-loaddefs.el:846:61: Warning: Unused lexical variable
`org-element-use-cache'
That doesn't show up in the Org repo because mk/org-fixup.el generates
org-loaddefs.el via autoload.el's generate-file-autoloads, which adds
"no-byte-compile: t" to its output file. However, in Emacs 29,
autoload.el is now deprecated, and the Emacs build uses
loaddefs-gen.el's loaddefs-generate--emacs-batch, which does include
no-byte-compile.
* lisp/org.el (org-display-inline-remove-overlay): Force remove
overlay images from Emacs image cache when un-displaying inline image
overlays. This change should: (1) slightly improve Emacs memory usage
when the number of inline images is large; (2) Clear images from cache
every time Emacs removes the overlay for any
reason. (`org-display-inline-remove-overlay' is used in
overlay 'modification-hooks.)