Commit Graph

26095 Commits

Author SHA1 Message Date
Ihor Radchenko 17608670a4
Update version number for the 9.6.6 release 2023-05-14 09:37:51 +02:00
Ihor Radchenko 08077812ef
org-clock-update-time-maybe: Fix return value
* lisp/org-clock.el: Ensure that we return expected value.
* testing/lisp/test-org-clock.el
(test-org-clok/org-clock-update-time-maybe): Add new test.
2023-05-01 12:15:09 +02:00
Stefan Monnier 2993f482c1 Backport commit 2bcf11d0e from Emacs
* lisp/org-macs.el (org--inhibit-version-check): Fix docstring.

2bcf11d0efecd18a1be8bcf0ac1a1dadb14d971a
Stefan Monnier
Sun Apr 30 09:41:13 2023 -0400
2023-04-30 19:34:05 -04:00
Kyle Meyer 2ab083dd1a Merge branch 'km/from-emacs-master' into bugfix
Both Org bugfix's 52dc48050 (Handle compiler warnings from Emacs
master, 2023-04-27) and Emacs master's 4f0849a9e6d (Remove unused
values in effect context, 2023-04-09) comment out an unused condition
in org-babel-insert-result to silence a compiler warning that's new to
the Emacs master branch.  However, the changes are slightly different,
so the next sync to emacs-29 will trigger a conflict when merged to
master.

Takes Emacs's variant to 1) avoid the conflict and 2) undo the
unrelated space change from Org's variant.  (52dc48050 improved the
comment slightly, but it's not worth the conflict.)
2023-04-30 19:32:33 -04:00
Mattias Engdegård b77a209f78 Backport commit 4f0849a9e from Emacs
* lisp/ob-core.el (org-babel-insert-result): Silence
ignored-return-value warnings about calls to side-effect-free
functions in the last clause of `cond` statements whose values are
unused.

Remove unused values in effect context
4f0849a9e6d29e25d23e061bd81bacce9468856d
Mattias Engdegård
Sun Apr 9 16:45:40 2023 +0200
2023-04-30 19:19:03 -04:00
Ihor Radchenko 921e0e8bc1
Update version number for the 9.6.5 release 2023-04-30 19:28:18 +02:00
Ihor Radchenko c756f8a853
org-odt-plain-text: Fix when TEXT is a blank string
* lisp/ox-odt.el: Do not re-fill newlines when TEXT only contains
spaces.

Reported-by: Damien Cassou <damien@cassou.me>
Link: https://orgmode.org/list/87ttwxphm6.fsf@cassou.me
2023-04-30 19:12:42 +02:00
Ihor Radchenko 52dc48050e
Handle compiler warnings from Emacs master
* lisp/ob-core.el (org-babel-insert-result): Comment out unused `cond'
clause.  Still leave it there for readability of the logic.
* lisp/org.el (org-agenda-restrict-begin):
(org-agenda-restrict):
(org-agenda-restrict-end): Mark variables from org-agenda.
2023-04-27 22:42:39 +02:00
Eli Zaretskii 8eb209984e
Backport commit 62e4eb8fcf7 from Emacs
Fix build when Org's version changes

* lisp/org/org-macs.el (org--inhibit-version-check): Rename from
'org--built-in-p' and make it a defvar.  All users changed.
(Bug#62762)

62e4eb8fcf71a852117b372809bd4a7953f9b679
Eli Zaretskii
Mon Apr 24 14:16:05 2023 +0300
2023-04-24 14:24:27 +02:00
Ihor Radchenko 92f9135b3c
org-open-at-point: Fix opening multiple file links
* lisp/org.el (org-open-at-point): Keep link selection buffer current
when looping over links to be opened.  Otherwise, opening a link might
change current buffer, breaking the code logic.

Reported-by: cro cefisso <crocefisso@gmx.com>
Link: https://orgmode.org/list/trinity-3a7c01d2-99d9-4b8a-b317-d62c02d75e72-1682242700508@3c-app-mailcom-bs02
2023-04-23 16:47:02 +02:00
Ruijie Yu 14dccff8b3
* lisp/org.el org-latex-packages-alist: fixed type definition 2023-04-22 15:25:04 +02:00
Ihor Radchenko 27ee55ebfd
ox-latex: Fix << and >> in verbatim and code markup
* lisp/ox-latex.el (org-latex--protect-texttt): Protect "<<" and ">>"
sequences.

Reported-by: Garid Z. <garidzorigoo@gmail.com>
Link: https://orgmode.org/list/871qkhtb4o.fsf@gmail.com
2023-04-20 11:03:17 +02:00
Ihor Radchenko 2ebc518675
* lisp/ob-R.el: Fix ESS compatibility
(org-babel-R-initiate-session): Fix `require'.  Do not use obsolete
`R' function.
2023-04-17 20:17:55 +02:00
Ihor Radchenko 7d8a9324f8
org-babel-js-function-wrapper: Fix when the last line is a comment
* lisp/ob-js.el (org-babel-js-function-wrapper): Ensure that last line
of the body being comment does not shadow the closing parenthesis.

Reported-by: sgherdao@tuta.io
Link: https://orgmode.org/list/NT8rSmu--F-9@tutanota.com
2023-04-17 13:10:10 +02:00
Ihor Radchenko c827341dfb
org-cite-activate: Ensure that we keep the correct match-data
* lisp/oc.el (org-cite-activate): Discard match data set by activate
function.  We already move the point after citation by force, so can
as well ensure that match-data remain accurate for later font-lock
use.

Reported-by: Lin Jian <me@linj.tech>
Link: https://orgmode.org/list/87sfczztg6.fsf@linj.tech
2023-04-17 12:45:07 +02:00
Ihor Radchenko 0f6ae7296e
org-agenda-dim-blocked-tasks: Fix when the value is 'invisible
* lisp/org.el (org-blocked-by-checkboxes): Declare as dynamically
scoped variable.

Reported-by: Gautier Ponsinet <gautier@gautierponsinet.xyz>
Link: https://orgmode.org/list/875y9wrvv1.fsf@gautierponsinet.xyz
2023-04-16 13:53:56 +02:00
Ihor Radchenko a8a95b6c2c
* lisp/org-agenda.el: Do not modify string constant " "
(org-agenda-highlight-todo): Use `propertize' that copies the argument
string instead of `org-add-props'.  Otherwise, if the compiler
optimizes string constants into a single object, the properties may
populate in unexpected places.

Reported-by: Gustavo Barros <gusbrs.2016@gmail.com>
Link: https://orgmode.org/list/CAM9ALR95F_ZHV2_WsqAz0-35-S2rwxbHqsA5VGftvq51Yz3ZAQ@mail.gmail.com
2023-04-16 13:18:42 +02:00
Ihor Radchenko f1fd1f22f4
Update version number for the 9.6.4 release 2023-04-15 13:53:24 +02:00
Ihor Radchenko 07508fb097
org-assert-version: Skip version check when Org is a part of Emacs
* lisp/org-macs.el (org--built-in-p): New constant indicating if Org
source is a part of Emacs source tree.
(org-assert-version): Skip check when Org is built-in.
2023-04-15 13:50:42 +02:00
TEC 6a96054f05
ob-tangle: Edit default file mode to match docstr
* lisp/ob-tangle.el (org-babel-tangle-default-file-mode): The docstring
states that it the default value is read-write for the user, read only
for everyone else.  This is not consistent with the default value which
is actually read-*execute* for the user, read only for everyone else.
The default value is updated to be read-write for the user, as stated in
the docstring.

Reported-by: Ruijie Yu <ruijie@netyu.xyz>
Link: https://list.orgmode.org/orgmode/sdv3554xtat.fsf@fw.net.yu
2023-04-13 08:59:47 +02:00
TEC 81fc8c06ce
ob-tangle: Fix interpretation of rw-r--r-- modes
* lisp/ob-tangle.el (org-babel-interpret-file-mode): When specifying a
file mode in the "rw-r--r--" style, this is interpreted by splicing the
user, group, and other compenents into a "u=rw,g=r,o=r" style string and
applying `file-modes-symbolic-to-number`.  For correct interpretation,
we need to ensure the dashes are removed in this process.
2023-04-13 08:59:27 +02:00
Ihor Radchenko 5ac1ebaa15
org-latex--protect-texttt: Fix "---"
* lisp/ox-latex.el (org-latex--protect-texttt): Fix >2 consecutive
dashes.

Reported-by: Garid Zorigoo <garidzorigoo@gmail.com>
Link: https://orgmode.org/list/CAEDgBW44j4NpYUpppLpOA5Pmmsfi-GbCzDH4rTmRjf-F64mSaA@mail.gmail.com
2023-04-12 10:57:34 +02:00
Ihor Radchenko 60ce29dc41
org-odt-plain-text: Fix when text contains leading spaces
* lisp/ox-odt.el (org-odt-plain-text): Do not count leading spaces
twice.

Reported-by: Damien Cassou <damien@cassou.me>
Link: https://orgmode.org/list/87v8i3y135.fsf@cassou.me
2023-04-11 12:25:13 +02:00
Ihor Radchenko 56dd046da8
* doc/org-manual.org: Add a link to Diary section of Emacs manual
(Timestamps): Add a link to Emacs manual when explaining diary style
sexp timestamps.

Reported-by: David Masterson <dsmasterson@gmail.com>
Link: https://orgmode.org/list/SJ0PR03MB5455892B11B07344346194B9A2959@SJ0PR03MB5455.namprd03.prod.outlook.com
2023-04-10 19:22:49 +02:00
Ihor Radchenko 072ddbc975
org-element-cache: Disable extra consistency checks
* lisp/org-element.el (org-element--cache-self-verify): Switch to nil
by default, disabling costly cache self-verification.  This is
relatively safe as no relevant bug reports have been submitted for a
while.  Also, the most critical cache failures are still monitored.
2023-04-09 13:13:25 +02:00
Aaron L. Zeng 19b0d0e5aa
org-table: Fix incorrect input when used with evil-escape
* org-table.el (org-self-insert-command): Use `last-command-event'
instead of `last-input-event'.  Using `last-input-event' causes
problems in the presence of `evil-escape'.  Consider a buffer that has
`orgtbl-mode' enabled while evil-escape is in use.  Assume the
evil-escape sequence is "fd".  Typing "f RET" will instead insert "RET
RET" into the buffer, since `last-input-event' is "RET", but
`last-command-event' is "f".

TINYCHANGE
2023-04-07 12:35:43 +02:00
Aaron L. Zeng 54a743cd72
org-table: Refactor away unnecessary variable
* org-table.el (orgtbl-self-insert-command): Remove unnecessary
intermediate variable.  `(cdr nil)` is nil.

TINYCHANGE
2023-04-07 12:35:42 +02:00
Ihor Radchenko f2949d4d1d
org-babel-comint-with-output: Fix edge case for partial prompts
* lisp/ob-comint.el (org-babel-comint-with-output): Do not try to
filter out prompts in `comint-output-filter-functions'.  The prompts
may arrive there arbitrarily - multiple prompts together, partial
prompts, full prompts, etc.  For example "ghci> " prompt may arrive as
"gh" + "ci> " with second part still matching `comint-prompt-regexp'.
As a result, if we keep using `comint-output-filter-functions', the
split prompts may sometimes retain their initial part, littering the
results.  Now, we postpone filtering to after receiving the output,
still making sure that agglomerated prompts gets filtered using a
custom regexp derived from `comint-prompt-regexp'.
2023-04-02 12:15:10 +02:00
Ihor Radchenko 7fa9e9a4b3
org-babel-comint-with-output: Handle agglomerated prompts better
* lisp/ob-comint.el (org-babel-comint-with-output): Consider that
comint can sometimes agglomerate multiple prompts together even within
a single output increment as passed to
`comint-output-filter-functions'.

Example in GHC comint buffer:

GHCi, version 9.0.2: https://www.haskell.org/ghc/  :? for help
ghci> ghci> :{
main :: IO ()
main = putStrLn "Hello World!"
:}

main
"org-babel-haskell-eoe"
ghci| ghci| ghci| ghci> ghci> Hello World!
ghci> "org-babel-haskell-eoe"
ghci>
2023-04-02 12:15:06 +02:00
Ihor Radchenko f9bbc79d62
Update version number for the 9.6.3 release
This release is mostly a bugfix for 9.6.2 release tag, which was not
signed and was not annotated.  See
https://orgmode.org/worg/org-maintenance.html#release-tags
2023-04-02 10:36:55 +02:00
Ihor Radchenko 638e0ecc0b
Fix some compiler warnings
* lisp/org.el (org-remove-timestamp-with-keyword): Use `delete-char'
instead of for-interactive-use-only `backward-delete-char'.
(org-fast-tag-selection): Remove unnecessary `condition-case'.
(org-delete-backward-char): Make it explicit that we fall back to
normal interactive call.

Link: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=62518
2023-03-29 16:58:43 +02:00
Stephen J. Eglen fcd813c406
lisp/org.el: Docstring fixes
* lisp/org.el (org-hide-emphasis-markers)
(org-hide-macro-markers)
(org-pretty-entities-include-sub-superscripts): Follow elisp
convention for docstrings: 'Non-nil means ...'.
2023-03-27 13:11:08 +02:00
Ihor Radchenko c1e8e2ffc7
Update version number for the 9.6.2 release 2023-03-26 11:33:48 +02:00
Ihor Radchenko 4c01eba265
org-texinfo-supports-math-p: Fix CI test failures
* lisp/ox-texinfo.el (org-texinfo-supports-math-p): Consider
compilation error as indication that math is not supported.  texinfo
compiler throws "unknown command `displaymath'" error in such case,
causing `org-texinfo-compile' to err as well.

Fixes CI tests failures when testing with Texinfo versions with no
math support.

https://builds.sr.ht/~bzg/job/959487
2023-03-19 13:58:07 +01:00
Ihor Radchenko 92471e5303
org-agenda-run-series: Fix `org-agenda-list' call
* lisp/org-agenda.el (org-agenda-run-series): Fix arguments in the
call.  "agenda*" should include appointments and thus HOURS argument
should be non-nil.  See `org-agenda' for analogous call.
2023-03-18 13:01:58 +01:00
Ihor Radchenko 6fc420167c
org-persist: Fix file path calculation
* lisp/org-persist.el (org-persist-read:file):
(org-persist-read:url): Use `org-file-name-concat' instead of simple
`concat'.
2023-03-14 14:45:00 +01:00
Pedro Andres Aranda Gutierrez 3eb51d8dbc
* lisp/ox-latex.el (org-latex-generate-engraved-preamble): Fix typo 2023-03-14 13:20:29 +01:00
Xi Lu a8006ea580
* lisp/ob-latex.el: Fix command injection vulnerability
(org-babel-execute:latex):
Replaced the `(shell-command "mv BAR NEWBAR")' with `rename-file'.

TINYCHANGE
2023-03-12 12:23:46 +01:00
Ihor Radchenko dd25e2704f
org-src--construct-edit-buffer-name: Fix docstring
* lisp/org-src.el (org-src--construct-edit-buffer-name): Fix the
docstring to conform to the existing buffer name pattern.

Reported-by: Rudolf Adamkovič <salutis@me.com>
Link: https://orgmode.org/list/20230302140224.6169-1-salutis@me.com
2023-03-10 12:08:44 +01:00
Rudolf Adamkovič eb6379a417
Fix LaTeX spelled as Latex
etc/ORG-NEWS (Non-floating minted listings in LaTeX export):
* lisp/ob-latex.el: (org-babel-execute:latex):
* lisp/org-element.el:
* lisp/ox-ascii.el:
* lisp/ox-html.el:
* lisp/ox-latex.el:
* lisp/ox-md.el:
* lisp/ox-odt.el:
* testing/examples/ob-maxima-test.org (LaTeX output):
* testing/lisp/test-org-element.el (test-org-element/cache): Spell LaTeX
correctly.
2023-03-07 14:08:40 +01:00
Rudolf Adamkovič 4f6bf89547
Fix BibTeX spelled as Bibtex
* lisp/ol-bibtex.el: Spell BibTeX correctly
* etc/ORG-NEWS (Org-BibTeX -- major improvements): Spell BibTeX correctly
2023-03-07 14:06:01 +01:00
Xi Lu 8f8ec2ccf3
* lisp/ob-latex.el (org-babel-execute:latex): Fix command injection vulnerability
Link: https://orgmode.org/list/tencent_5C4D5D0DEFDDBBFC66F855703927E60C7706@qq.com

TINYCHANGE
2023-03-07 13:26:13 +01:00
Rudolf Adamkovič 3d817c52c9
org-clock: Add a trailing space to the mode line string
* lisp/org-clock.el (org-clock-get-clock-string): End the mode line
element in a space, instead of beginning with space, to make it play
well with other mode line strings, which typically end a space.  For
reference, see the mode line string of the Display Time mode.
2023-03-05 13:20:30 +01:00
Max Nikulin 233a8479ca
orgcard.tex: Fix `org-force-cycle-archived' binding
* doc/orgcard.tex (Capture): Fix `org-force-cycle-archived' binding.

Changed in the release 9.4 to avoid conflict with tab-bar.el, see

9092c289b 2020-06-01 14:39:28 +0200 Bastien: Bind `org-force-cycle-archived' to C-c C-TAB
2023-03-05 13:07:52 +01:00
Gerard Vermeulen e8010e8a91
org.el: Sync org-babel-load-languages with Babel files in Org
* lisp/org.el (org-babel-load-languages): Sync with Babel files

(org-babel-load-languages): Synchronize the defcustom with the rest of
the code base, group languages by Org Babel file, and spell languages
using camel case (the current fashion).

Link: https://list.orgmode.org/712f2ef5b4edb2d9b565f6467e582030@posteo.net/
2023-03-03 15:55:14 +01:00
Ihor Radchenko 911d6a1027
org-manual: Clarify that :eval yes obeys `org-confirm-babel-evaluate'
* doc/org-manual.org (Limit code block evaluation): Clarify :eval yes
value.

Reported-by: Dan Drake <dan.drake@gmail.com>
Link: https://orgmode.org/list/CAKqbAeFRGDzQQQkXHKvDPtgM7NYybWgxpJj3yoRKnuD2bSwyVw@mail.gmail.com
2023-02-28 13:34:45 +03:00
Damien Cassou f9aeba5dd7
org.el: Avoid crash in `org-file-contents' in case of network failure
* lisp/org.el (org-file-contents): Wrap the
`url-retrieve-synchronously' call into a `condition-case' block to
avoid throwing an error when NOERROR is non-nil.

TINYCHANGE
2023-02-26 14:42:13 +03:00
Ihor Radchenko 7a90f596d9
org-clock-timestamps-change: Fix when on opening timestamp
* lisp/org-clock.el (org-clock-timestamps-change): Do not rely on
global `org-last-changed-timestamp'.
*
testing/lisp/test-org-clock.el (test-org-clok/org-clock-timestamps-change):
Add new test.

Reported-by: sting.startup-0y@icloud.com
Link: https://orgmode.org/list/2380D54F-DE06-4CBE-88AC-5906A6E9253A@gmail.com
2023-02-22 13:19:06 +03:00
Ihor Radchenko eea8da0315
Fix some compiler warnings
* lisp/ob-octave.el (org-babel-octave-evaluate-session):
* lisp/org-agenda.el (org-agenda-format-item):
* lisp/org-element.el (org-element-cache-map): Do not use `eq' when
matching for equality by contents.
2023-02-17 13:38:54 +03:00
Rudolf Adamkovič 99c8ed09f8
ox-texinfo: Fix invalid syntax in Texinfo version detection code
* lisp/ox-texinfo.el (org-texinfo-supports-math-p): Fix the incorrect
syntax @displaymath{1 + 1 = 2} used to detect whether Texinfo supports
TeX "math mode".  Instead, use the correct syntax @math{1 + 1 = 2}.
2023-02-17 13:30:16 +03:00