Commit Graph

25804 Commits

Author SHA1 Message Date
Stefan Kangas b7aad5b095 Backport commit 318722541 from Emacs
; Prefer HTTPS to HTTP in many URLs
3187225416c66061b67e89092addc15cad2202b9
Stefan Kangas
Sat Oct 15 13:06:45 2022 +0200

[ km: Note that the staff.science.uva.nl change in the "External
  Links" table will be discarded in the merge because the value is
  supposed to be an example of an http link, not an https one (which
  is covered by the next row). ]
2022-10-16 17:42:05 -04:00
Stefan Kangas 43546a5cbe Backport commit a95062e03 from Emacs
* doc/org-manual.org (Summary): Remove broken link to Network Theory Ltd.

Delete broken link to Network Theory Ltd.
a95062e036d9d5fc45d9a3ba1c10b0bd9b587399
Stefan Kangas
Sat Oct 15 13:06:45 2022 +0200

[ km: Note that this is already covered by Org's 58a46fab0 and that
  version will be taken in the merge. ]
2022-10-16 17:40:27 -04:00
Ihor Radchenko d972cfac89
org-create-formula-image: Do not err when `noninteractive'
* lisp/org.el (org-create-formula-image): Do not err during
noninteractive export.  Just use a fallback DPI value instead of
requesting actual display DPI.

Reported-by: Daniel Guimaraes <dcguim@gmail.com>
Link: https://orgmode.org/list/e22e7cac-03c1-ddee-1b1d-09981a384bfc@gmail.com
2022-10-16 20:48:50 +08:00
Ihor Radchenko 87c294c7b6
org-agenda-new-marker: Do not create maker in killed agenda buffers
* lisp/org-agenda.el (org-agenda-new-marker): Do not create buffer
marker unless agenda buffer is live.

Reported-by: Hu Lucius <orctarorga@gmail.com>
Link: https://orgmode.org/list/CACDPnMHOfUmO4sjer_pcox5Z5sodkVN-UW29AAYdL8V-iOiGoA@mail.gmail.com
2022-10-16 18:38:49 +08:00
Ihor Radchenko 15b3aa43a8
org-store-link: Fix for sticky agenda buffers
* lisp/ol.el: Do not assume a single agenda buffer at a time.  Simply
check if we are in a buffer with `org-agenda-mode' active.
2022-10-16 16:22:38 +08:00
Bastien e47e9aa079 Merge branch 'bugfix' 2022-10-16 08:12:29 +02:00
Bastien 58a46fab0d doc/org-manual.org: Mention that Network Theory Ltd. is closed
See https://list.orgmode.org/orgmode/87edv9ti73.fsf@no.workgroup/

Suggested-by: Gregor Zattler <telegraph@gmx.net>
2022-10-16 07:43:20 +02:00
Ignacio 31f2510995
org-clock.el: resolve running clock after being idle only once
* lisp/org-clock.el (org-resolve-clocks-if-idle): Cancel timer
for `org-resolve-clocks-if-idle' while `org-clock-resolve' waits for
the user to answer the prompt.

After the user answered the prompt to resolve the running clock, the
pending scheduled calls to `org-resolve-clocks-if-idle' (one for each
minute it took the user to answer) were being executed immediately.
But after an old change in Emacs, the user answer does not reset the
idle timer anymore, so each of those calls thought that the user was
still idle and prompted them again, to the user had to answer the same
prompt again N times.  This commit fixes that bug.

TINYCHANGE
2022-10-16 13:13:26 +08:00
Ihor Radchenko 3fc782e9b8
org-manual: Fix typos
* doc/org-manual.org (Debugging formulas):
(Using third-party styles and templates):
(Publishing links): Fix typos.

Most of the suggestions have been incorporated.  A few missing are
added here.

Reported-by: TonyMc <afmcc@btinternet.com>
Link: https://orgmode.org/list/20171014123248.51568eec@Tourifreet
2022-10-16 12:37:20 +08:00
Ihor Radchenko 5fa66c7ffc
org-latex-verse-block: Fix regression from 3f60acff7
* lisp/ox-latex.el (org-latex-verse-block): Fix logic replacing sole
paragraph breaks according to the new template.
* testing/lisp/test-ox-latex.el: New test file.
(org-test-with-exported-text): New macro for testing export.
(test-ox-latex/verse): New test.
* mk/default.mk (BTEST_RE): Select the new test by default.

Reported-by: Juan Manuel Macías <maciaschain@posteo.net>
Link: https://orgmode.org/list/875ygk6a8z.fsf@posteo.net
2022-10-16 11:17:03 +08:00
Bastien 4b010e8dc3 Merge branch 'bugfix' 2022-10-15 18:01:04 +02:00
Bastien dd3c1e1284 mk/server.mk: Include cards 2022-10-15 09:08:10 +02:00
Max Nikulin 892df429f4
ox-latex: Use \empty instead of \relax after \\
* lisp/ox-latex.el (org-latex-line-break-safe, org-latex-table-row):
* testing/lisp/test-org-table.el (test-org-table/to-latex): Use \empty
instead of \relax to prevent interpreting following "*" and "[" as
optional parts of \\*[LENGTH] command.

Fix regression introduced by 3f60acff77. \\\relax\hline caused
misaligned \noalign error. Org markup:

    | a |
    |---|

\hline is allowed only immediately after \cr while \relax has some side
effects. Hope, \empty just expands to nothing.

Those who used \\ optional argument to adjust amount of space between
lines may add the following tricks:

    First,\\
    @@latex:{\vskip1em}@@second.

    | First                               |
    | @@latex:\noalign{\vskip1em}@@second |

Reported in
gerard.vermeulen, Wed, 12 Oct 2022 03:15:49 +0000.
https://list.orgmode.org/784cf8be450b7d676ddd60214cc847db@posteo.net
2022-10-14 10:27:14 +08:00
Ihor Radchenko 2d6032db96
org-manual: Clarify nil value of ~org-crypt-key~
* doc/org-manual.org (Org Crypt): Explain that nil value of
~org-crypt-key~ bypasses the per-heading properties.

Reported-by: Ignacio Casso <ignaciocasso@hotmail.com>
Link: https://orgmode.org/list/PAXPR06MB7760DA356C7C27045BEB64F6C6449@PAXPR06MB7760.eurprd06.prod.outlook.com
2022-10-14 10:16:47 +08:00
Ihor Radchenko d331f52cac
org-crypt-key-for-heading: Handle CRYPTKEY nil value
* lisp/org-crypt.el (org-crypt-key-for-heading): Do not fallback to
`org-crypt-key' when heading explicitly sets CRYPTKEY property.

Reported-by: Ignacio Casso <ignaciocasso@hotmail.com>
Link: https://orgmode.org/list/PAXPR06MB7760DA356C7C27045BEB64F6C6449@PAXPR06MB7760.eurprd06.prod.outlook.com
2022-10-14 10:16:47 +08:00
Ihor Radchenko 3e86487755
testing/lisp: Add missing `provide'
* testing/lisp/test-ob-sql.el (test-ob-sql):
* testing/lisp/test-ob-sqlite.el (test-ob-sqlite): Add missing provide
and use the correct file name in the comments.
2022-10-13 18:30:44 +08:00
Ihor Radchenko 08a1a91623
testing/lisp: Add missing `featurep' checks for required packages
* testing/lisp/test-ob-julia.el (featurep):
* testing/lisp/test-ob-ruby.el (featurep):
* testing/lisp/test-ob-scheme.el (featurep): Check for the required
external packages.
2022-10-13 18:30:07 +08:00
Ihor Radchenko 97672efdb0
testing/lisp/test-ob-eshell.el: Fix tests
* testing/lisp/test-ob-eshell.el (ob-eshell/execute):
(ob-eshell/variables-assignment): Do not expect
`org-babel-execute-src-block' to return the actual inserted src block
string.
2022-10-13 18:28:56 +08:00
Ihor Radchenko 3790bf8ea1
org-clock-sum: Do not err when have malformed clock lines
* lisp/org-clock.el: Only consider proper clock elements when
calculating clock sum.  Do not rely on crude regexp.

Reported-by: Gregor Zattler <grfz@gmx.de>
Link: https://orgmode.org/list/87y1yecmgb.fsf@localhost
2022-10-13 14:12:36 +08:00
Ihor Radchenko 0e4874f17c
org-up-element: Fix jumping up from inlinetask
* lisp/org.el (org-up-element): Do not assume that
`org-back-to-heading' skips inlinetasks.  Avoid that `if' branch by
skipping over section parents.

Reported-by: Michael Dauer <mick.dauer@gmail.com>
Link: https://orgmode.org/list/CAP7OBxKKeuK_uH46SyEqQbsuBsE=XPkB=ks1TkCZTwyPZ40KaA@mail.gmail.com
2022-10-13 11:06:36 +08:00
stardiviner 601ce688d5
lisp/ob-clojure.el: Fix :backend override not work with `org-babel-clojure-backend'
* lisp/ob-clojure.el (org-babel-expand-body:clojure): When The source
block specified header argument :backend, the global option
`org-babel-clojure-backend' value is default 'cider, the
`cider-buffer-ns` is not void error.
2022-10-13 10:51:19 +08:00
Ihor Radchenko 4c0641837c
org-babel-script-escape: Turn empty lists into nil
* lisp/ob-core.el: Translate (), {}, and [] to nil.
* testing/lisp/test-ob.el (test-ob/script-escape): Add tests.

Reported-by: Jonas Bernoulli <jonas@bernoul.li>
Link: https://list.orgmode.org/87v8opfhk1.fsf@bernoul.li/T/#u
2022-10-12 19:46:14 +08:00
Ihor Radchenko 416c839c59
lisp/org-agenda.el: Remove unused `org-agenda-last-dispatch-buffer'
* lisp/org-agenda.el (org-agenda-last-dispatch-buffer):
(org-agenda): Remove unused variable.

Reported-by: Liu Hui <liuhui1610@gmail.com>
Link: https://orgmode.org/list/87edvdinaj.fsf@gmail.com
2022-10-12 15:39:54 +08:00
Liu Hui c57b030323
org-agenda: Make sure file restriction can be removed
* lisp/org-agenda.el: (org-agenda-restrict):
(org-agenda-restrict-begin):
(org-agenda-restrict-end):
(org-agenda-overriding-restriction): add docstrings.
(org-agenda):
(org-agenda-set-restriction-lock): Set `org-agenda-restrict' non-nil
during both temporary and extended file restriction.
(org-agenda-remove-restriction-lock): Revert commit df0e96ba4.
* testing/lisp/test-org-agenda.el (test-org-agenda/file-restriction):
Add a test.
2022-10-12 15:35:12 +08:00
Ihor Radchenko eb15341b3c
org-cycle-set-visibility-according-to-property: Do not change ancestor visibility
* lisp/org-cycle.el (org-cycle-set-visibility-according-to-property):
Do not unconditionally run `org-fold-reveal' for headlines with
"VISIBILITY" property.  `org-fold-reveal' can break the global
visibility and ancestor headline visibility settings.
*
testing/lisp/test-org-fold.el (test-org-fold/set-visibility-according-to-property):
Add test.

Reported-by: Eduardo Suarez <esuarez@itccanarias.org>
Link: https://orgmode.org/list/20220409202736.GA28127@itccanarias.org
2022-10-12 13:47:41 +08:00
Ihor Radchenko 88c85d620b
org-map-entries: Do not demand file buffer when SCOPE is nil
* lisp/org.el (org-map-entries): Avoid calling
`org-agenda-prepare-buffers' for non-file buffers.
`org-agenda-prepare-buffers' expects a file buffer and gives
unexpected dialogue otherwise.  Since `org-agenda-prepare-buffer' only
contains optional cache calculations and things only useful for agenda
generation, not calling it should be reasonably safe.

Reported-by: Rodrigo Morales <moralesrodrigo1100@gmail.com>
Link: https://orgmode.org/list/871r54m6xm.fsf@gmail.com
2022-10-11 16:23:05 +08:00
Ihor Radchenko dd2212395b
org-ctrl-c-ctrl-c: Update timestamp at point inside clock lines
* lisp/org.el (org-ctrl-c-ctrl-c): Update the timestamp at point, if
any; not just the clock sum.

Reported-by: "Bruce E. Robertson" <brucer42@gmail.com>
Link: https://orgmode.org/list/87mtjo2twj.fsf@gmail.com
2022-10-11 15:54:23 +08:00
Ihor Radchenko 3f60acff77
ox-latex: Protect [...] after \\ to be interpreted as LaTeX argument
* lisp/ox-latex.el (org-latex-linebreak-safe): New constant holding
safe version of LaTeX line break.
(org-latex-table-matrix-macros):
(org-latex-clock):
(org-latex-line-break):
(org-latex-plain-text):
(org-latex-planning):
(org-latex--org-table):
(org-latex--math-table):
(org-latex-table-row):
(org-latex-verse-block): Use the new constant.

* testing/lisp/test-org-table.el (test-org-table/to-latex): Update
tests.

Reported-by: Stewart Thomas <sjt015@bucknell.edu>
Link: https://orgmode.org/list/ce760fc3-5aae-144d-2d02-7dea215f73fc@gmail.com
2022-10-11 11:32:52 +08:00
Chris Clark 4d07df718b
ob-clojure.el: Add a :backend header arg to clojure code blocks
* ob-clojure.el (org-babel-header-args:clojure,
org-babel-execute:clojure): Add a :backend header arg that can
override the configured `org-babel-clojure-backend'.

TINYCHANGE
2022-10-11 10:49:56 +08:00
Kyle Meyer e2d41c84e1 Merge branch 'km/from-emacs-master' 2022-10-10 15:41:07 -04:00
Stefan Monnier 616fc20445 Backport commit f3769bc32 from Emacs
* lisp/org.el (org-unfontify-region): Use `with-silent-modifications`.
(org-display-inline-remove-overlay): Remove ineffective binding of
`inhibit-modification-hooks` around code which doesn't modify the
buffer anyway.

org.el: Improve bindings of `inhibit-*` vars
f3769bc32a3d32377a83b33d416205f80814e422
Stefan Monnier
Fri Oct 7 12:29:56 2022 -0400
2022-10-10 15:40:05 -04:00
Ihor Radchenko 8901fd2261
Add a regression test for `org-export-with-buffer-copy'
* testing/lisp/test-ox.el (test-org-export/org-export-copy-buffer):
Make sure that `org-export-with-buffer-copy' does not show up when
Emacs is searching for buffers associated with file.
2022-10-10 17:36:11 +08:00
Ihor Radchenko 192742c9c5
org-export-with-buffer-copy: Allow safe reusable buffer copy
* lisp/ox.el (org-export--generate-copy-script):
(org-export-copy-buffer):  Accept cl-style key arguments.
* lisp/ox.el (org-export-with-buffer-copy): Allow optional cl-style
key arguments for fine-grained control on what to copy from the target
buffer and which buffer to use as a target.  Do not kill the target
buffer upon finished, when the target is provided.  Make sure that
remaining buffer copy does not preserve `buffer-file-name' from the
original buffer and that it never overwrites the file associated with
the original buffer.
* lisp/ox-html.el (org-html-format-latex): Use the new version of
`org-export-with-buffer-copy' instead of managing edge cases by
itself.

Reported-by: Rudolf Adamkovič <salutis@me.com>
Link: https://orgmode.org/list/87zge8j5iu.fsf@localhost
2022-10-10 17:36:10 +08:00
Rudolf Adamkovič e7feeb2225
org-export: Propertize keybindings in Org Export dispatch UI
* lisp/ox.el (org-export--dispatch-ui): Propertize the navigational
keybindings.
2022-10-09 15:46:14 +08:00
Ihor Radchenko 96af4a8634
* mk/default.mk (BTEST_OB_LANGUAGES): Test ob-java by default 2022-10-09 12:30:01 +08:00
Ihor Radchenko 31de027c12
test-ob-java: Use `temporary-file-directory'
* testing/lisp/test-ob-java.el (ob-java/simple-dir):
(ob-java/simple-dir-with-package): Prefer `temporary-file-directory'
over `org-babel-temporary-directory'.  The latter is nil in
noninteractive Emacs during tests.

Reported-by: Christian Köstlin <christian.koestlin@gmail.com>
2022-10-09 12:30:00 +08:00
Ihor Radchenko f4149681ee
org-babel: Fix usage of `org-babel-temporary-directory'
* lisp/ob-core.el (org-babel-temp-directory): New macro, returning
suitable temporary directory.  The macro considers remote
`default-directory' and nil values of
`org-babel-temporary-directory'.
* lisp/ob-gnuplot.el (org-babel-gnuplot-process-vars):
* lisp/ob-java.el (org-babel-execute:java):
* lisp/ob-processing.el (org-babel-processing-view-sketch): Use the
new macro.

Reported-by: Christian Köstlin <christian.koestlin@gmail.com>
2022-10-09 12:30:00 +08:00
Ihor Radchenko ba8fbd0cda
testing/lisp/test-ob-java.el: Add missing `provide' 2022-10-09 12:13:30 +08:00
Ihor Radchenko 41a409f79d
org-src-font-lock-fontify-block: Do not fold links inside src blocks
* lisp/org-src.el (org-src-font-lock-fontify-block): Overwrite link
fontification after regexp-based `org-activate-links' fontifies links
disregarding Org parser.  Hidden parts of link-looking text are
explicitly unfolded now.  This commit relies on specific fontification
order in `org-font-lock-keywords'.
(org-fold-region): Declare function.

Reported-by: Tim Loderhose <tim@loderhose.com>
Link: https://orgmode.org/list/XdWFnN3XCJ67x3SvoiVo_itGGYfboKmuWp7OxQxRZ_SGA5vgb72oWBoqTmOUUtiqUR890-kIXjI7uhlse-HFYqNVJTyVlc15zAzbP8qHVdo=@loderhose.com
2022-10-09 11:45:44 +08:00
Roméo La Spina de553d1dc7
lisp/org-clock.el: Fix bug in prompt for resolving clocks
* lisp/org-clock.el (org-clock-resolve):
Avoid unwanted disappearing of the prompt when clicking somewhere, by
using `read-char-exclusive' instead of `read-char'.

Link: https://orgmode.org/list/87o82yaeie.fsf@gmail.com

TINYCHANGE
2022-10-09 11:19:48 +08:00
Kyle Meyer 04d9d4b3db compat: Load subr-x for Emacs < 28 compatibility
* lisp/org-compat.el: Require subr-x at compile time to define
string-trim for older Emacs versions.

Before Emacs 28.1, string-trim was defined in subr-x, leading to 'make
single' complaining about an undefined string-trim in the recently
added org-string-clean-whitespace.

Reported-by: Ihor Radchenko <yantar92@gmail.com>
Link: https://list.orgmode.org/8735c01aho.fsf@localhost
2022-10-08 01:40:07 -04:00
Ihor Radchenko 233ad88651
org-export: Do not use `always' not available in Emacs <28
* lisp/ox.el (org-export--generate-copy-script): Use explicit `lambda'
instead of `always', which is not yet available in all the supported
Emacs versions.

Reported-by: Kyle Meyer <kyle@kyleam.com>
2022-10-08 13:30:36 +08:00
Ihor Radchenko ae028d0a25
org-toggle-heading: Document checkbox conversion to TODO keywords
* lisp/org.el (org-toggle-heading): Update the docstring.
2022-10-08 12:45:59 +08:00
Ihor Radchenko fcd3817450
org-toggle-heading: Use buffer-local keyword settings when possible
* lisp/org.el (org-toggle-heading): Prefer `car' of
`org-done-keywords' and `org-not-done-keywords' when converting
checkboxes to TODO-keywords.

Reported-by: autofrettage <autofrettage@protonmail.ch>
Link: https://orgmode.org/list/87v91vle4u.fsf@gmail.com
2022-10-08 12:39:31 +08:00
Ihor Radchenko 1966a7a8a8
org-manual: Document :eval yes header argument value
* doc/org-manual.org (Limit code block evaluation): Document that
:eval can be set to "yes" to evaluate the code all the time without
prompt.

Reported-by: Charles Millar <millarc@verizon.net>
Link: https://orgmode.org/list/87v8uj6l6m.fsf@localhost
2022-10-08 12:11:42 +08:00
Ihor Radchenko b68c1666c2
org-ts-regexp0: Fix matching timestamps with no day name
* lisp/org.el (org-ts-regexp1): Update regexp to match strings like
"2022-04-29 02:00" with no day name.

Reported-by: Russell Adams <RLAdams@adamsinfoserv.com>
Link: https://orgmode.org/list/87zgk8tc17.fsf@localhost
2022-10-08 12:01:14 +08:00
Ihor Radchenko eeae6ed4bf
org-agenda-lisp: Add FIXME about let-binding `inhibit-redisplay'
* lisp/org-agenda.el (org-agenda-list): The purpose of binding
`inhibit-redisplay' is unclear and apparently not in git logs.
2022-10-07 19:45:38 +08:00
Ihor Radchenko 86b6d843f6
org-html-format-latex: Prevent side effects of copying `buffer-file-name'
* lisp/ox-html.el (org-html-format-latex): Unset `buffer-file-name'
after we are done with transcoding LaTeX.

Reported-by: Rudolf Adamkovič <salutis@me.com>
Link: https://list.orgmode.org/m2k05c579o.fsf@me.com/T/#m949ed054f0f219e2742697c4c4f49fbe07909f5a
2022-10-07 18:06:19 +08:00
Ihor Radchenko 17708ab3fa
org-export-copy-buffer: Document the caveats
* lisp/ox.el (org-export-copy-buffer): Mention that `buffer-file-name'
is copied around and explain the consequences.  Document why
`buffer-file-name' is copied.
2022-10-07 18:06:12 +08:00
Ihor Radchenko 3de74bbeff
fixup! org-export-copy-buffer: Prevent saving to disk
* lisp/ox.el (org-export--generate-copy-script): Set
`write-contents-functions' after running `major-mode'.
* testing/lisp/test-ox.el (test-org-export/org-export-copy-buffer):
Add test.
2022-10-07 17:46:15 +08:00