Commit graph

25579 commits

Author SHA1 Message Date
Paul Eggert 1a2d2fd5e4 Backport commit c1145c31a from Emacs
* lisp/org-compat.el (file-attribute-modification-time):
Update doc string to match that of builtin Emacs.

Update org-compat doc string
c1145c31adf143460911dd87b408d35ea88a1a92
Paul Eggert
Sun Dec 5 23:24:10 2021 -0800
2022-10-04 16:27:45 -04:00
Stefan Kangas f99a8ea434 Backport commit 104e90d93 from Emacs
* lisp/org-clock.el (org-clock-persist-file):
* lisp/org-id.el (org-id-locations-file): Prefer
'locate-user-emacs-file' to fiddling with 'user-emacs-directory'
directly.

Prefer locate-user-emacs-file
104e90d93664892ed1a7a1631c5b0141d0552a60
Stefan Kangas
Tue Nov 9 07:51:27 2021 +0100
2022-10-04 16:27:45 -04:00
Stefan Kangas c7e1bbfd1c Backport commit 664094222 from Emacs
* lisp/org-capture.el (org-capture-fill-template):
* lisp/org-refile.el (org-refile-get-location): Prefer format-prompt
when it is fboundp.

Use format-prompt for many more prompts
66409422214a0a90e1d2a12ef2c4ebf86f2c01a9
Stefan Kangas
Tue Oct 5 03:44:56 2021 +0200
2022-10-04 16:27:45 -04:00
Stefan Kangas e7572fa86c Backport commit 616dcf27e from Emacs
; Fix typos in Lisp symbols
616dcf27e57388403d4c28d441bf7310bb665241
Stefan Kangas
Tue Sep 20 12:21:40 2022 +0200
2022-10-04 16:27:36 -04:00
Stefan Kangas de5bdb090d Backport commit 19de241a7 from Emacs
* doc/org-manual.org (Using CDLaTeX to enter math, Footnotes): Recommend
NonGNU ELPA over MELPA.

Recommend NonGNU ELPA over MELPA
19de241a7dc193c0d0423019824627adb28f8944
Stefan Kangas
Fri Sep 16 14:04:27 2022 +0200
2022-10-04 16:27:35 -04:00
Ihor Radchenko 506d5b12dd
org-comment-line-break-function: Avoid built-in Emacs comment machinery
* lisp/org.el (org-comment-line-break-function): Rely on Org
parser (`org-adaptive-fill-function') to determine comment filling.
Handle nil values of `fill-prefix' correctly.

* testing/lisp/test-org.el (test-org/default-indent-new-line): New
test.  Written by Kaushal Modi <kaushal.modi@gmail.com>
https://list.orgmode.org/CAFyQvY36DkBSNy2mPxDNZWeoTjUK8mAqgJM-zHxNamfReqGkuQ@mail.gmail.com/

Reported-by: Richard Lawrence <richard.lawrence@uni-tuebingen.de>
Link: https://list.orgmode.org/87lf18fue9.fsf@aquinas.i-did-not-set--mail-host-address--so-tickle-me/
2022-10-04 19:47:11 +08:00
Ihor Radchenko 9db57aee3e
Do not use visual `current-indentation' when we need real values
* lisp/org-macs.el (org-current-text-indentation): New macro
calculating the real text indentation disregarding buffer visibility.
(org-do-remove-indentation):
* lisp/org-src.el (org-src--edit-element):
* lisp/org.el (org-indent-line):
(org-indent-region):
(org-toggle-fixed-width):
(org-comment-or-uncomment-region):
* lisp/ox.el (org-export-expand-include-keyword): Use
`org-current-text-indentation' instead of `current-indentation' and
`org-current-text-column' instead of `current-column' when we need
real text values but not visible values.

See https://debbugs.gnu.org/cgi/bugreport.cgi?bug=56837

Reported-by: tony aldon <tony.aldon.adm@gmail.com>
Link: https://orgmode.org/list/87k0h49s7z.fsf@localhost
2022-10-04 15:21:20 +08:00
Ihor Radchenko 0641ece57b
org-manual: Inline single-sentence footnotes
* doc/Documentation_Standards.org (org-manual.org specific
conventions): Document that we prefer to use inline footnote
definitions when a footnote consists of a single sentence.  This is to
reduce footnote re-numbering in diffs when a new footnote is added to
the manual.
* doc/org-manual.org: Inline single-sentence footnotes.  Renumber the
rest.
2022-10-04 10:18:26 +08:00
Ihor Radchenko 180966c645
org-manual: Do not use #+findex inside Footnote
* doc/org-manual.org (Timestamps):
(Footnotes): Move #+findex entries to the footnote reference.  They do
not work when in Footnote section.
2022-10-04 10:16:47 +08:00
Kyle Meyer 9ce4727d8e org-element: Fix Emacs 29 warning about quoting style
* lisp/org-element.el (org-element--parse-generic-emphasis): Change
quoting style to avoid Emacs 29 byte compiler warning about 'wrong
usage of "fancy" single quotation marks'.
2022-10-03 18:44:25 -04:00
Kyle Meyer 2bd9db8345 Silence byte-compiler under 'make single'
These are warnings that would show up when these changes made their
way to the Emacs repo.
2022-10-03 18:44:25 -04:00
Kyle Meyer 6a30ef2781 org.el: Move definition to silence warning
* lisp/org.el (org-agenda-file-menu-enabled): Move definition upstream
of its first use.

'make single' flags this (and so would the Emacs repo's build).
2022-10-03 18:44:22 -04:00
Kyle Meyer b196a05f5a Clean up spacing to pass Emacs's pre-commit check
Avoid trailing spaces and spaces before tabs.
2022-10-03 17:57:03 -04:00
Ihor Radchenko 7b9d8e7bed
org-fold-core-style: Document that it must be set before loading Org
* lisp/org-fold-core.el (org-fold-core-style): Update docstring
highlighting that the variable must be set before loading Org.
2022-10-01 09:09:36 +08:00
Ihor Radchenko fe1f4f2ccf
fixup! org-fold-core: Respect 'ignore-indirect optimization better 2022-09-30 07:24:34 +08:00
Ihor Radchenko e9781f1c08
org-fold-core: Respect 'ignore-indirect optimization better
* lisp/org-fold-core.el (org-fold-core--property-symbol-get-create):
(org-fold-core-decouple-indirect-buffer-folds): Do not try to decouple
folding state in indirect buffers when 'ignore-indirect is requested
in `org-fold-core--optimise-for-huge-buffers'.
2022-09-29 22:28:07 +08:00
Ihor Radchenko 791ea50528
* lisp/org-element.el (org-element--cache-active-p): Fix compiler warning
Using `defsubst' here is impractical because some code above does call
`org-element--cache-active-p'.  Moving would trigger major refactoring
for little gain.  Hence, move back to using simple `defun' until we
modularize lisp/org-element.el better.

Reported-by: No Wayman <iarchivedmywholelife@gmail.com>
Link: https://orgmode.org/list/874jws2v87.fsf@gmail.com
2022-09-28 12:30:27 +08:00
Nicholas Vollmer af6b48e801
doc/org-manual.org fix capture Template elements typo 2022-09-28 12:11:41 +08:00
Ihor Radchenko d7a55bbd53
org-latex-export-to-latex: Do not suppress major modes in babel
* lisp/ox.el (org-export-to-file): Suppress loading major mode in the
exported text explicitly instead of doing it across the whole export
process.  This way, babel evaluation will not suffer from unexpected
behavior when no major modes are being loaded.

Reported-by: Asilata Bapat <asilata@gmail.com>
Link: https://list.orgmode.org/orgmode/87fsk5955a.fsf@gmail.com/
2022-09-28 12:07:14 +08:00
Bastien 252a062bf8 CONTRIBUTE.org: Try to be more effective in giving directions
Also link to Worg pages as much as possible because more people can
contribute to them.
2022-09-27 23:17:28 +02:00
Bastien c536832308 lisp/ob-clojure.el: Add Daniel Kraus as maintainer 2022-09-27 21:36:51 +02:00
Thierry Banel aa3eac143d ob-C: do not swallow double quotes on raw output
* lisp/ob-C.el (org-babel-C-execute): Remove the erroneous
  call to `org-babel-read' when output is raw.
* testing/examples/ob-C-test.org (Output),
  testing/lisp/test-ob-C.el (ob-C/ouput-doublequotes):
  Add a test with double quotes output.

https://list.orgmode.org/orgmode/bc004962-679e-498f-b245-ae253aae6271@www.fastmail.com/
2022-09-27 16:20:57 +02:00
Bhavin Gandhi 2e012db31a
org.el: Make sure `org-add-log-note' runs at the end of Org command
* lisp/org.el (org-add-log-setup): Save `this-command' and
`recursion-depth' before adding the `org-add-log-note' to
`post-command-hook'.
(org-add-log-note): Execute only if the current `(recursion-depth)'
and `this-command' are same as the ones we saved during the log-setup.

(org-log-note-this-command):
(org-log-note-recursion-depth): New variables storing `this-command'
and `recursion-depth'.

This change tries to make sure that we run the `org-add-log-note' only
after the current Org command has finished executing.  Previously, the
`post-command-hook' was getting triggered if the Org command in turn
runs some other command.

Fixes the bug originally reported by Michael Powe.

Bhavin Gandhi. [BUG] org-auto-repeat-maybe: error "Can’t expand
minibuffer to full frame" and missing log note.
Sat, 18 Jun 2022 23:30:50 +0530.
https://list.orgmode.org/CAOn=hbcsOCO++We0XgRHFoxxCEXROCpyGd1nCjzKYy-9LckQZg@mail.gmail.com/

Relevant discussion on bug-gnu-emacs: https://debbugs.gnu.org/56425
2022-09-26 20:41:54 +08:00
Ihor Radchenko 73f25bba8f
* lisp/org-macs.el (org-assert-version): Use more lax assertion
See https://orgmode.org/list/jwvczc05u7r.fsf-monnier+emacs@gnu.org
2022-09-26 19:25:20 +08:00
Ihor Radchenko c8e0a402df
org: Prefer standard version format accepted by `version-to-list'
* lisp/org.el: Rename Org version on development branch from "9.6-dev"
to "9.6-pre".  The latter is accepted by `version-to-list'.

See https://orgmode.org/list/87edvzbniw.fsf@gnu.org
2022-09-26 19:14:20 +08:00
Ihor Radchenko c29d3e997d
* mk/targets.mk (ORGVERSION): Prefer lisp/org.el version header
Do not use the latest Git tag.  Prefer the Version header in org.el.

The Git tag on main branch is only available for the latest release.
Before this commit, development Org version was indistinguishable from
the release version.

See https://orgmode.org/list/8735cfn44v.fsf@gnu.org
2022-09-26 19:14:20 +08:00
Bastien 52be6f0f4a Rename README and CONTRIBUTE as README.org and CONTRIBUTE.org
Also slightly update the contents of these files.
2022-09-26 06:48:27 +02:00
Bastien a2d1806f66 lisp/ox-latex.el: Fix docstring typos
* lisp/ox-latex.el (org-latex-src-block-backend): Fix typos in docstring.
2022-09-26 06:47:14 +02:00
Ihor Radchenko ad52345f00
org-element-cache: Report buffer size for unregistered modifications
* lisp/org-element.el (org-element--cache-sync): Provide the details
on the expected and actual values of buffer size.
2022-09-26 12:35:59 +08:00
Bastien ebbc2ffaab Merge remote-tracking branch 'github/main' 2022-09-25 11:26:07 +02:00
Giovanni Alfredo Garciliano Díaz 0d8440f55d * lisp/ox-html.el (org-html-doctype-alist): Fix system identifier for XHTML 1.1 DTD
Right DTDs are listed on https://www.w3.org/QA/2002/04/valid-dtd-list.html

TINYCHANGE
2022-09-25 11:19:28 +02:00
Ihor Radchenko cf93247473 ox-publish: Allow linking to encrypted Org files
* lisp/ox-html.el (org-html-link): Convert .org.gpg file links to
.html, in addition to previously performed .org -> .html convertion.
(org-html-link-org-files-as-html): Update the docstring.
* doc/org-manual.org (Publishing links):
* etc/ORG-NEWS (Publishing now supports links to encrypted Org files):
Document the new feature.
2022-09-25 11:19:28 +02:00
Ihor Radchenko 235c72e31f lisp/org.el: Do not skip loading org-loaddefs when using `eval-buffer'
* lisp/org.e: Do not skip loading "org-loaddefs.el" when Org mode is
loaded through M-x eval-buffer.

Fixes https://orgmode.org/list/874jwyalo1.fsf@localhost
2022-09-25 11:19:28 +02:00
Bastien fd195266dd lisp/org-macs.el: Minor docstring enhancements
* lisp/org-macs.el (org-assert-version): Minor docstring enhancements.
2022-09-25 11:16:28 +02:00
Giovanni Alfredo Garciliano Díaz 3e9f98c691
* lisp/ox-html.el (org-html-doctype-alist): Fix system identifier for XHTML 1.1 DTD
Right DTDs are listed on https://www.w3.org/QA/2002/04/valid-dtd-list.html

TINYCHANGE
2022-09-25 16:47:47 +08:00
Ihor Radchenko f99902ecdf
ox-publish: Allow linking to encrypted Org files
* lisp/ox-html.el (org-html-link): Convert .org.gpg file links to
.html, in addition to previously performed .org -> .html convertion.
(org-html-link-org-files-as-html): Update the docstring.
* doc/org-manual.org (Publishing links):
* etc/ORG-NEWS (Publishing now supports links to encrypted Org files):
Document the new feature.
2022-09-25 16:34:12 +08:00
Bastien 6b729e24f2 README_ELPA: Remove from the repository
This file is not useful anymore.
2022-09-25 09:35:33 +02:00
Bastien 1a8490b031 Remove request-assign-future.txt
The preferred way to share request-assign-future.txt is by pointing
to https://orgmode.org/request-assign-future.txt.

To access the text file from a repository, you can find it in the
orgweb repository: https://git.sr.ht/~bzg/orgweb/
2022-09-25 09:33:33 +02:00
Sajad Hosseini Balef 36c27f11d9 lisp/ox.el: Add Persian/Farsi translation to `org-export-dictionary'
* lisp/ox.el (org-export-dictionary): Add Persian/Farsi translation.

TINYCHANGE
2022-09-25 09:24:59 +02:00
Ihor Radchenko 3b0c4ad207
lisp/org.el: Do not skip loading org-loaddefs when using `eval-buffer'
* lisp/org.e: Do not skip loading "org-loaddefs.el" when Org mode is
loaded through M-x eval-buffer.

Fixes https://orgmode.org/list/874jwyalo1.fsf@localhost
2022-09-25 11:18:29 +08:00
Daniel Kraus 764642f55b ob-clojure.el: Add support for babashka and nbb backend
* lisp/ob-clojure.el: Add support for babashka and nbb backend.
2022-09-25 05:07:28 +02:00
Timothy e8a797e143
ob-core: Display babel execution time
* lisp/ob-core.el (org-babel-execute-src-block,
org-babel-format-result): Record the babel execution time, and then
supplement the "Code block evaluation complete." (etc.) messages with
the execution time when >0.05s.
2022-09-24 17:10:58 +08:00
Timothy d1c6d02092
ob-core: Display type of element babel executes
* lisp/ob-core.el (org-babel-execute-src-block): The babel execute
function is run on more than just source blocks, so it makes sense to
note the type of element being executed.  A fourth optional argument is
added to allow for explicit specification of the type of element
responsible for the execution.

* lisp/ob-lob.el (org-babel-lob-execute-maybe): Pass the type of the
execution triggering element to `org-babel-execute-src-block'.

* lisp/org.el (org-ctrl-c-ctrl-c): When executing a babel call, pass the
type of the execution triggering element to
`org-babel-execute-src-block'.
2022-09-24 17:10:46 +08:00
Timothy 392ccbbf5d
ob-core: Display position of executed babel blocks
* lisp/ob-core.el (org-babel-execute-src-block): When an unnamed babel
block is executed, show the position of the block.

This makes it easier to track the execution without having to name every
block.

ob-core: point

* lisp/ob-core.el (org-babel-execute-src-block):
2022-09-24 17:10:42 +08:00
Ihor Radchenko 0a6a56c804
org-adapt-indentation: Fix 'headline-data checks
* lisp/org.el (org--at-headline-data-p): New function used to check if
element at point belongs to headline data.
(org--get-expected-indentation):
(org-indent-line): Use `org--at-headline-data-p' instead of
explicit (and inaccurate) condition.
* testing/lisp/test-org.el (test-org/indent-region): Add tests.

Fixes incorrect LOGBOOK drawer indentation when
`org-adapt-indentation' is set to 'headline-data.
2022-09-24 14:07:31 +08:00
Ihor Radchenko 9bd8a99a6e
org-agenda-get-sexps: Avoid excessive calls to `org-agenda-skip'
* lisp/org-agenda.el (org-agenda-get-sexps): Only check if entry
should be skipped on matching sexps, when `org-diary-sexp-entry'
returns non-nil.
2022-09-23 23:34:10 +08:00
Timothy f0ff1df486
manual: Note undocumented tangle hooks
* doc/org-manual.org (Tangle hooks): Note that the pre-tangle and
tangle-body hooks are undocumented.
2022-09-23 20:14:52 +08:00
Timothy 5a96768dfa
manual: Document org-babel-tangle-finished-hook
* etc/ORG-NEWS: Mention new hook, `org-babel-tangle-finished-hook'.

* doc/org-manual.org (Tangle hooks): Mention new hook,
`org-babel-tangle-finished-hook'.
2022-09-23 20:14:52 +08:00
Timothy 6a82d17c89
ob-tangle: New tangle-finished hook
* lisp/ob-tangle.el (org-babel-tangle, org-babel-tangle-finished-hook):
Create a new hook, `org-babel-tangle-finished-hook', and run it at the
end of `org-babel-tangle'.
(org-babel-pre-tangle-hook): Update docstring to mention buffer the hook
is run in, to match the docstring of `org-babel-tangle-finished-hook`.
2022-09-23 20:14:52 +08:00
Ihor Radchenko d240386c10
org-diary-sexp-entry: Re-use cached nil return values
* lisp/org.el (org-diary-sexp-entry): Do not consider cached nil
return values as if they are not cached.
2022-09-23 12:57:13 +08:00