1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-10-18 02:19:46 +00:00
Commit Graph

27733 Commits

Author SHA1 Message Date
Ihor Radchenko
022bb471c1
org-indent-line: Fix indentation inside src blocks with `electric-indent-mode'
* lisp/org.el (org-indent-line): Use `indent-according-to-mode' to
indent in src block's major mode.  Using `indent-line-function' fails
when `electric-indent-mode' wants to suppress <tab> indentation.
* testing/lisp/test-org.el (test-org/with-electric-indent): Add test.

Reported-by: the_wurfkreuz <the_wurfkreuz@proton.me>
Link: https://orgmode.org/list/5O9VMGb6WRaqeHR5_NXTb832Z2Lek_5L40YPDA52-S3kPwGYJspI8kLWaGtuq3DXyhtHpj1J7jTIXb39RX9BtCa2ecrWHjijZqI8QAD742U=@proton.me
2024-07-09 18:05:41 +02:00
Ihor Radchenko
db46706bec
org-agenda-category-icon-alist: Improve docstirng
* lisp/org-agenda.el (org-agenda-category-icon-alist): Refer to
`org-agenda-prefix-format' in the docstring, as it is what controls
whether the icons are rendered at all.
2024-07-07 08:25:33 +02:00
Ihor Radchenko
06eb69809a
etc/ORG-NEWS: Mention issues with yank-media on Mac and Windows
* etc/ORG-NEWS (Images and files in clipboard can be pasted): Mention
that Mac and Windows are not yet fully supported by Emacs'
yank-media library.
2024-07-04 08:37:18 +02:00
Kyle Meyer
4617d52fad Merge branch 'km/from-emacs-30' into bugfix 2024-07-01 22:33:46 -04:00
Stefan Kangas
5ec1ec3337 Backport commit 45a20d781 from Emacs
; Fix typos in symbols
45a20d781a9b00212609bf0e338bd6b1cc9ea68a
Stefan Kangas
Sat Jun 29 17:29:38 2024 +0200
2024-07-01 22:33:10 -04:00
Ihor Radchenko
83fe95d2ee
org-babel-insert-result: Improve docstring
* lisp/ob-core.el (org-babel-insert-result): Explain that
RESULT-PARAMS is a list.  Clarify the treatment of INFO.  Fix
incorrect :file parameters that is actually not used.  Instead,
document :file-desc parameter that is being used.

Reported-by: Stefan Kangas <stefankangas@gmail.com>
Link: https://orgmode.org/list/871q4fzx0k.fsf@localhost
2024-06-30 11:40:17 +02:00
Ihor Radchenko
e377f3da51
lisp/org-persist.el (org-persist--normalize-associated): Fix typos
Reported-by: Rudolf Adamkovič <rudolf@adamkovic.org>
Link: https://list.orgmode.org/orgmode/m2a5j59qi0.fsf@adamkovic.org/
2024-06-28 17:29:40 +02:00
Ihor Radchenko
7a45270b11
Update version number for the 9.7.6 release 2024-06-28 11:40:03 +02:00
Kyle Meyer
a091ca9e66 Merge branch 'km/from-emacs-30' into bugfix 2024-06-27 23:14:54 -04:00
Stefan Kangas
fa7d7ec3bd Backport commit fb11294d4 from Emacs
; Fix typos
fb11294d4156a4be45080ff286a8ee0d5a3ede9b
Stefan Kangas
Sun Jun 23 16:40:06 2024 +0200
2024-06-27 23:13:49 -04:00
Ihor Radchenko
4077e9e45b Backport commit c645e1d82 from Emacs
org-link-expand-abbrev: Do not evaluate arbitrary unsafe Elisp code
c645e1d8205f0f0663ec4a2d27575b238c646c7c
Ihor Radchenko
Sat Jun 22 00:54:36 2024 +0200

[ km: This was independently covered on the bugfix branch with
  f4cc61636.  I'm applying it here too for bookkeeping/traceability
  purposes. ]
2024-06-27 23:13:49 -04:00
Stefan Kangas
b72871ab6a Backport commit a7dff8c53 from Emacs
* lisp/ob-lua.el: Minor doc fixes.

a7dff8c53dde18c703f470cde9ad033cffe8c766
Stefan Kangas
Tue Jun 18 21:27:51 2024 +0200
2024-06-27 23:13:47 -04:00
Stefan Kangas
5d7218ceff Backport commit c0eefebab from Emacs
; Fix typos
c0eefebabfee011f0ec7631d055e482e4965a24d
Stefan Kangas
Sun Jun 16 22:38:26 2024 +0200
2024-06-27 22:47:14 -04:00
Ihor Radchenko
5ffb2675f5
org-persist: Avoid interactive query for coding system when computing hash
* lisp/org-persist.el (org-persist--normalize-associated): Force
'emacs-internal coding system when computing buffer contents hash.

Reported-by: Eli Zaretskii <eliz@gnu.org>
Link: https://orgmode.org/list/86jzia68ih.fsf@gnu.org
2024-06-27 12:07:29 +02:00
Ihor Radchenko
14e8a68a67
org--collect-keywords-1: Fix when global `tab-width' is not 8
* lisp/org.el (org--collect-keywords-1): When faking that `org-mode'
is loaded, make sure that we set correct `tab-width' for the parser to
work.

Reported-by: kazark <kazark@zoho.com>
Link: https://orgmode.org/list/19056b6b712.b56dc3e1403727.546293949229584581@zoho.com
2024-06-27 11:49:21 +02:00
Ihor Radchenko
498fd25d25
ob-R, ob-python, ob-shell: Fix async indicator regexps
* lisp/ob-R.el (ob-session-async-org-babel-R-evaluate-session):
* lisp/ob-python.el (org-babel-python-async-evaluate-session):
* lisp/ob-shell.el (org-babel-sh-evaluate): Make regexps stricter,
matching exactly for what we put there.  Previous regexps were not
always matching file names with underscores.

Reported-by: Sam Crawford <sam@crawf.uk>
Link: https://orgmode.org/list/h6c_ta-utc-ugGl4Bq1XXJpXcpXlm_rblFIGJKMH0xiPc-NnJsuVe2z8atXGNcsBlJiR9c24bqLyXFX3GO0tiWtyTUzXMJA81wRIIB-DQfo=@crawf.uk
2024-06-26 14:59:47 +02:00
Matthias Hetzenberger
bd16944e1b
org-babel-merge-params: Rename plists to alists
* lisp/ob-core.el (org-babel-merge-params): Rename PLIST(S)
variables/args to ALIST(S).

TINYCHANGE
2024-06-23 11:11:12 +02:00
Ihor Radchenko
eafa479069
Update version number for the 9.7.5 release 2024-06-22 17:53:19 +02:00
Ihor Radchenko
e6de840889
etc/ORG-NEWS: Announce security fix
* etc/ORG-NEWS (Arbitrary shell commands are no longer run when
turning on Org mode):
2024-06-22 17:53:17 +02:00
Ihor Radchenko
f4cc616369
org-link-expand-abbrev: Do not evaluate arbitrary unsafe Elisp code
* lisp/ol.el (org-link-expand-abbrev): Refuse expanding %(...) link
abbrevs that specify unsafe function.  Instead, display a warning, and
do not expand the abbrev.  Clear all the text properties from the
returned link, to avoid any potential vulnerabilities caused by
properties that may contain arbitrary Elisp.
2024-06-22 16:32:33 +02:00
Al Haji-Ali
a4ff518a2e
org-refile-get-location: Fix outline path to a symlink of current buffer
* lisp/org-refile.el (org-refile-get-location): When current buffer
file is a symlink to refile location, do not append the file name to
the outline path, just as we do when current buffer is the same as
refile location file.

TINYCHANGE
2024-06-20 16:48:28 +02:00
Morgan Smith
fc0fb90b67
; fix typos
* doc/org-manual.org: Add missing '~'.
* lisp/org-element-ast.el (org-element-deferred): Fix typo in docstring.
* lisp/org-element.el (org-element-archive-tag,
org-element-drawer-re-nogroup, org-element--cache-log-message): Fix
typos in docstring.
(org-element--current-element, org-element--cache-find,
org-element-cache-map): Fix typos in comments.
2024-06-19 17:34:31 +02:00
Raffael Stocker
157a0559e5
lisp/org-colview.el: Prevent repeated indentation of keyword lines
* org-colview.el (org-columns-dblock-write-default): Left trim keyword
and TBLFM lines to prevent repeated indentation.

Link: https://list.orgmode.org/orgmode/yplmfrtchs0u.fsf@mnet-mail.de/

TINYCHANGE
2024-06-18 14:50:53 +02:00
Ihor Radchenko
e666660c7d
ob-shell: Fix header arg definitions for specific shells
* lisp/ob-shell.el (org-babel-shell-initialize): Assign default value
from `org-babel-default-header-args:shell' and
`org-babel-header-args:shell' for specific shell variables.

Reported-by: Suhail Singh <suhailsingh247@gmail.com>
Link: https://orgmode.org/list/87frtczgu6.fsf@gmail.com
2024-06-17 17:34:28 +02:00
Kyle Meyer
165319f584 ob-core: Revert recent indentation change
* lisp/ob-core.el (org-babel-insert-result): Fix indentation change
from e4902995a.
2024-06-15 14:19:28 -04:00
Kyle Meyer
d0b1729ad5 Merge branch 'km/from-emacs-master' into bugfix 2024-06-15 13:24:08 -04:00
Stefan Kangas
8a82a06bec ORG-NEWS: Backport commit 77d0eed74 from Emacs
; Fix typos
77d0eed74e1d934e28f364cb3adb06365e71335e
Stefan Kangas
Mon Jun 10 00:40:26 2024 +0200

[km] This should have been included with 2a6a0480d.
2024-06-15 13:22:28 -04:00
Ihor Radchenko
008c28426d
ob-clojure-cli-command: Fix :type declaration
* lisp/ob-clojure.el (ob-clojure-cli-command): Allow nil value.  It
can happen, even though it will yield error (which is a different
issue).  But let's follow other defcustoms in the file.

Reported-by: Mattias Engdegård <mattias.engdegard@gmail.com>
Link: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=71566
2024-06-15 16:45:54 +02:00
Ihor Radchenko
12243b9910
lisp/ob-lilypond.el (org-src-lang-modes): Fix alist value
LilyPond-mode name should be a symbol as per `org-src-lang-modes'
spec.

Reported-by: Michael Albinus <michael.albinus@gmx.de>
Link: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=71566
2024-06-15 16:33:12 +02:00
Ihor Radchenko
a9a05dab81
lisp/org-src.el (org-src-lang-modes): Fix :type definition
Reported-by:  Mattias Engdegård <mattias.engdegard@gmail.com>
Link: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=71566
2024-06-15 16:15:45 +02:00
Ihor Radchenko
be39e61c4e
Use emacs-internal coding system to read/write Elisp data
* lisp/org-persist.el (org-persist--read-elisp-file):
(org-persist--write-elisp-file):
* lisp/ox.el (org-export-async-start):

Suggested by Emacs maintainer.

Link: https://list.orgmode.org/861q4zy0va.fsf@gnu.org/
2024-06-15 15:45:40 +02:00
Ihor Radchenko
1387e36135
Update version number for the 9.7.4 release 2024-06-15 13:14:58 +02:00
Ihor Radchenko
55fd660b4e
org-element: Auto-undefer deferred properties that depend on buffer positions
* lisp/org-element.el (org-element--get-node-properties):
(org-element--headline-parse-title):
(org-element--headline-parse-title-raw):
(org-element--headline-parse-title-parse):
(org-element-comment-block-parser):
(org-element-example-block-parser):
(org-element-export-block-parser):
(org-element-latex-environment-parser):
(org-element-src-block-parser):
(org-element-table-parser):
(org-element--parse-generic-emphasis):
(org-element-export-snippet-parser):
(org-element-inline-babel-call-parser):
(org-element-latex-fragment-parser): Auto-undefer node properties that
are calculated based on buffer position of the node.  This will make
the return value of `org-element-at-point' a little more robust once
the buffer is modified.  The :begin/:end, and other positional
properties may not be up-to-date, but at least some other properties
may be "frozen" if they are undeferred early.  Auto-undefer is still
disabled for properties that do not depend on buffer positions and may
benefit from dynamic calculation that takes into account syntax
changes that are influenced by global variables.
2024-06-14 16:22:00 +02:00
Ihor Radchenko
fd8ddf2874
org-clock-sum: Gracefully skip invalid CLOCK lines
* lisp/org-clock.el (org-clock-sum): Skip invalid CLOCK
lines (malformed or with times missing).  Display a warning.

This brings back the old behavior with such CLOCK lines being silently
skipped.  Now, we also display a warning.

Reported-by: Robert Nyman <RKNyman@NymanTechnology.com>
Link: https://list.orgmode.org/orgmode/0e2ed754-bc71-4558-9c46-f17d73981fe5@NymanTechnology.com/
2024-06-14 15:29:08 +02:00
Ihor Radchenko
2347eac669
lisp/org.el (org--dnd-rmc): Fix `read-multiple-choice' call
* lisp/org.el (org--dnd-rmc): Add docstring.  Fix the call to
`read-multiple-choice' when extended help ("?") is requested by the
user.

Reported-by: Johann Klähn <org-mode@web.jklaehn.de>
Link: https://orgmode.org/list/87ikyhg9qi.fsf@jklaehn.de
2024-06-14 15:03:49 +02:00
Ihor Radchenko
bd8b861ee9
org-num-skip-tags: Avoid using function that is not pre-loaded in autoloads
* lisp/org-num.el (org-num-skip-tags): Make sure that function used
for :safe `defcustom' slot does not require functions that are not
defined in org-loaddefs.el.  This is because `org-num-skip-tags' is
autoloaded and cannot rely upon requires in org-num.el.  Instead, it
may only use pre-loaded functions and other autoloaded Org mode
functions.

Reported-by: Eli Zaretskii <eliz@gnu.org>
Link: https://yhetil.org/emacs-devel/868qzd9hjg.fsf@gnu.org/
2024-06-14 14:25:03 +02:00
Ihor Radchenko
4bb0719374
org-capture-templates: Remove no-longer-supported variants from :type spec
* lisp/org-capture.el (org-capture-templates): Remove "sexp" type from
allowed values of capture targets.  S-exp support has been removed in
f5645675a3.
2024-06-14 13:48:10 +02:00
Ihor Radchenko
13fdbf73ff
mk: Prevent search local id: db when building manuals
* mk/org-fixup.el (org-make-manual):
(org-make-guide):
(org-make-manuals): Disable local ID db when building Org
documentation.  This makes sure that local IDs on the build machine
can never influence the build process.

Reported-by: Eli Zaretskii <eliz@gnu.org>
Link: https://yhetil.org/emacs-devel/868qzd9hjg.fsf@gnu.org/
2024-06-14 11:40:20 +02:00
Ihor Radchenko
d7b5c19daa
DnD: Create directory when `org-yank-image-save-method' is a directory
* lisp/org.el (org--dnd-attach-file): Make sure that target directory
is created before copying file when `org-yank-image-save-method' is
set to specific directory (not 'attach).

Reported-by: ISouthRain <isouthrain@qq.com>
Link: https://orgmode.org/list/tencent_AABB2DEBF7ABFBC795348C288E0EBFCFDD0A@qq.com
2024-06-13 18:03:50 +02:00
Ihor Radchenko
96113f3b59
org-export--set-variables: Fix variable assignment
* lisp/ox.el (org-export--set-variables): Assume that variables are
listed as (var value) - as a list.  Only use the second element of the
list as the value, following example in `org-export-get-environment'.
(org-export-get-environment): Use `org-export--set-variables'.
* testing/lisp/test-ox.el (test-org-export/bind-keyword): Add new
test.

Reported-by: Suhail Singh <suhailsingh247@gmail.com>
Link: https://orgmode.org/list/87cyonhuq3.fsf@gmail.com
2024-06-13 17:26:44 +02:00
Ihor Radchenko
a13d8fe83b
org-babel-exp-process-buffer: Fix edge case when src block ends at eob
* lisp/ob-exp.el (org-babel-exp-process-buffer): When src block ends
at eob, do not leave the #+end_src behind after replacement.
2024-06-13 17:26:02 +02:00
Ihor Radchenko
e4902995a0
org-babel: Reduce verbosity when running in batch mode
* lisp/ob-C.el (org-babel-C-header-to-C):
* lisp/ob-awk.el (org-babel-execute:awk):
* lisp/ob-core.el (org-babel-execute-src-block):
(org-babel-insert-result):
* lisp/ob-ditaa.el (org-babel-execute:ditaa):
* lisp/ob-gnuplot.el (org-babel-execute:gnuplot):
(org-babel-prep-session:gnuplot):
* lisp/ob-groovy.el (org-babel-execute:groovy):
* lisp/ob-maxima.el (org-babel-execute:maxima):
* lisp/ob-screen.el (org-babel-execute:screen):
* lisp/ob-sed.el (org-babel-execute:sed): Suppress progress messages
when running noninteractively (batch export, for example).  This
change follows the existing behavior of `org-babel-exp-src-block'.

Reported-by: Eli Zaretskii <eliz@gnu.org>
Link: https://yhetil.org/emacs-devel/868qzd9hjg.fsf@gnu.org/
2024-06-13 15:16:54 +02:00
Ihor Radchenko
84945f9de0
orgtbl-gather-send-defs: Fix infinite loop when table is at bob
* lisp/org-table.el (orgtbl-gather-send-defs): Avoid infinite loop
when table is at the beginning of buffer.

Reported-by: Rustom Mody <rustompmody@gmail.com>
Link: https://orgmode.org/list/CAJ+Teoehk30LKVCTwMy0uREBHkNVBvrOLDZYboUQ4wBV6Fnwzw@mail.gmail.com
2024-06-12 15:31:45 +02:00
Ihor Radchenko
a0950e9432
org-babel-execute-src-block: Handle code block moving point
* lisp/ob-core.el (org-babel-execute-src-block): Make sure that point
remain on src block after evaluation.  The function logic later
implicitly assumes that the point is on the block that has been
evaluated.
2024-06-12 12:47:48 +02:00
Ihor Radchenko
3e4c89e556
org-image--align: Fix image alignment when image is not inside paragraph
* lisp/org.el (org-image--align): Improve docstring.  Do not try to
align when image is not inside a paragraph.

Reported-by: Lin Sun <sunlin7.mail@gmail.com>
Link: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=71484
2024-06-11 12:44:57 +02:00
Kyle Meyer
9419dad48a Merge branch 'km/from-emacs-master' into bugfix 2024-06-10 18:34:04 -04:00
Stefan Monnier
008e6030ac Backport commit d3524560e from Emacs
* lisp/ox.el (org-export-filters-alist): Don't define as constant.

d3524560ee3cb075125f0af158d4af01cb2ab546
Stefan Monnier
Mon Jun 10 10:58:46 2024 -0400
2024-06-10 18:30:27 -04:00
Mattias Engdegård
6eab01c580 Backport commit 331573e40 from Emacs
* lisp/org-element.el (org-element-copy-buffer):
Repair incorrect escaping.
* lisp/org-macs.el (org--line-empty-p): Fix broken skip-set.
* lisp/org.el (org-setup-yank-dnd-handlers): Fix broken regexp.

Org: fix mistakes in regexp, skip set and doc string
331573e40731d6635acd366694493c26b480c230
Mattias Engdegård
Mon Jun 10 14:07:07 2024 +0200
2024-06-10 18:29:36 -04:00
Kyle Meyer
ce350490ca ob-core: Fix indentation
* lisp/ob-core.el (org-babel-execute-src-block): Fix indentation of
line.

Emacs's bd80717d8e7 (Re-enable TTY glyph production for batch mode
frames on Android, 2024-06-10) reverted all changes from 8d1d9798f77
(Fix bootstrap of org.texi, 2024-06-10) aside from an indentation fix.
Apply the indentation fix to avoid overwriting it on sync.
2024-06-10 18:28:27 -04:00
Ihor Radchenko
4d4d59874c
Fix indirect buffer tracking
* lisp/org-fold-core.el
(org-fold-core-decouple-indirect-buffer-folds): Actually, add newly
created indirect buffer to the tracked list.
2024-06-10 11:16:00 +02:00