Commit Graph

23570 Commits

Author SHA1 Message Date
Kyle Meyer 7c23fc7efa ob-ocaml: Update stale tuareg-mode link in commentary
Reported-by: Stefan Monnier <monnier@iro.umontreal.ca>
2021-03-29 00:33:49 -04:00
Maxim Nikulin 4de2fff87d Add quotes to emacsclient arguments in examples
* doc/org-manual.org:
* lisp/org-protocol.el: Quote emacsclient arguments
in examples to prevent interpreting of ampersands as intent
to run processes in background by bash and similar shells.
Single quotes may cause a problem with cmd.exe, so use
double quotes despite they are a bit less safe in bash and Co.
2021-03-29 00:32:29 -04:00
Maxim Nikulin a17243f9a5 org-manual.org: Fix typo in org-protocol capture example
* doc/org-manual.org: Use "&" as parameter separator in query part
of example for org-protocol capture URI.
2021-03-29 00:32:29 -04:00
Bastien 287af207fe lisp/org.el: Bump version header to 9.4.5 2021-03-28 08:36:11 +02:00
Sébastien Miquel 36622362d1 org.el (org-do-latex-and-related): Fix duplicate 'latex faces
* lisp/org.el (org-do-latex-and-related): Do not add a
'org-latex-and-related face beyond the fontification limit.
2021-03-27 02:05:30 -04:00
Kyle Meyer 478929ae61 ox-html: Fix org-html-format-drawer-function's docstring
* lisp/ox-html.el (org-html-format-drawer-function): Drop leftover
text from when an example used to be included.

adcebf38f (Fix errors reported by cus-test.el, 2013-11-14) dropped the
example but left the leading part.

Reported-by: Jean-Baptiste Mazon <jmazon@gmail.com>
Ref: https://orgmode.org/list/0e5569e6-15a7-d4c4-0558-8b0ef96a515c@gmail.com
2021-03-24 22:45:22 -04:00
Kyle Meyer 4f98c86b3b manual: Grammar fix
* doc/org-manual.org (Publishing action): Fix conjugation.
2021-03-24 22:24:59 -04:00
Greg Minshall d156399445 Update example :publishing-function names in manual
* doc/org-manual.org (Publishing action): Fix references to
org-latex-publish-to-pdf and org-org-publish-to-org.
2021-03-24 22:24:55 -04:00
Kyle Meyer 5450d64202 ob-export: Give more informative error on unknown call reference
* lisp/ob-exp.el (org-babel-exp-process-buffer): Signal user-error
with an informative message rather than letting
org-babel-exp-do-export call fail due to an invalid INFO argument.
* testing/lisp/test-ob-exp.el (ob-exp/unknown-call-reference): Add
test.

Reported-by: Greg Minshall <minshall@umich.edu>
Ref: https://orgmode.org/list/628738.1616259666@apollo2.minshall.org
2021-03-21 13:41:31 -04:00
Maxim Nikulin 5db61eb0f9 org.el: Avoid xdg-open silent failure
* lisp/org.el (org-open-file): Use 'pipe :connection-type instead of
'pty to prevent killing of background process on handler exit.
(Bug#44824)

Problem happens only in some desktop environments where configured
through `org-file-apps' or mailcap handlers launches actual viewer
(as defined in .desktop files and obtained from mimeapps.list)
in background.  E.g. xdg-open invokes "gio open" or kde-open5 for Gnome
or KDE accordingly and these handlers launches e.g. eog or okular in
background.  As soon as main process exits, temporary terminal session
created by `start-process-shell-command' is terminated.  As a result
background processes receive SIGHUP.

Previously command were executed with no buffer, so the change
does not affect "needsterminal" and "copiousoutput" mailcap features,
they are not supported as earlier.

If handler main process fails then show a message with exit reason.
Output (including error messages) is ignored as before.
Gtk application tends to report significant amount of failed asserts
hardly informative for majority of users.

TINYCHANGE
2021-03-21 10:38:39 -04:00
Kyle Meyer dbc84311c0 ob-smiles.el: Fix reference to free variable
* contrib/lisp/ob-smiles.el (molecule-jump): Format string with NAME
argument rather than undefined variable `path'.
2021-03-19 00:39:09 -04:00
Lein Matsumaru 1738b455b3 ob-smiles.el: Update org babel API
* contrib/lisp/ob-smiles.el (org-link): Fix from org-add-link-type to
org-link-set-parameters

TINYCHANGE
2021-03-19 00:39:09 -04:00
Kyle Meyer e07cb2ad3c manual: Fix org-latex-listings reference in footnote
* doc/org-manual.org (Footnotes): Refer to org-latex-listings instead
of org-export-latex-listings.

The last occurrence of org-export-latex-listings was deleted with the
contrib/oldexp/ removal in Org 8.
2021-03-16 23:52:09 -04:00
Kyle Meyer 7470ee93a6 test-org-clock: Avoid daylight saving time failure
* testing/lisp/test-org-clock.el (test-org-clock/clocktable/match):
Shift times away from the beginning of the day to avoid unexpected
time totals due to DST changes.

test-org-clock/clocktable/match fails today in the US because at 2:00
clocks jumped to 3:00, and the total time check uses the range
2:00-4:00.
2021-03-14 22:06:22 -04:00
Kyle Meyer b712b9618a manual: Add publishing-function to publishing example
* doc/org-manual.org (Example: simple publishing configuration): Add
:publishing-function to org-publish-project-alist.

This appears to have been necessary since 0ccf650b4 (org-e-publish:
Remove default value for publishing function, 2012-10-08).

Reported-by: dalanicolai <dalanicolai@gmail.com>
Ref: https://orgmode.org/list/CACJP=3k2jL1z0d-uALFGoutffFF2o=7-L39zUns6si0KAhZ-_g@mail.gmail.com
2021-03-02 01:13:11 -05:00
Kyle Meyer 8244e7ba85 manual: Fix org-html-publish-to-html reference
* doc/org-manual.org (Publishing action): Fix reference to
org-html-publish-to-html.

Reported-by: dalanicolai <dalanicolai@gmail.com>
Ref: https://orgmode.org/list/CACJP=3k2jL1z0d-uALFGoutffFF2o=7-L39zUns6si0KAhZ-_g@mail.gmail.com
2021-03-02 01:12:48 -05:00
Kyle Meyer 3a522ad539 agenda: Restore org-agenda-goto-date's date argument
* lisp/org-agenda.el (org-agenda-goto-date): Restore DATE argument
(removed in 7.9.3e), replacing unused SPAN argument.
* testing/lisp/test-org-agenda.el (test-org-agenda/goto-date): Add
test.

Among other changes, 93fcfe4d3 (2012-08-30) switched
org-agenda-goto-date's DATE argument to SPAN, moving the org-read-date
call out of the interactive form.  The new argument is unused, and
it's not clear that this part of the change was needed for the fix.
It prevents lisp callers from specifying a date, so move the
org-read-date call back to the interactive form.

Reported-by: Alan Schmitt <alan.schmitt@polytechnique.org>
Ref: https://orgmode.org/list/87pn10t83u.fsf@m4x.org
2021-02-21 01:18:07 -05:00
Kyle Meyer 4ab2a4be51 org-adapt-indentation: Tweak headline-data addition
* lisp/org.el (org-adapt-indentation): Adjust :safe value for
headline-data, avoid unnecessary quote in :type value, and follow the
convention for quoting symbols in docstrings.
2021-02-17 00:14:26 -05:00
Jean-Marie Gaillourdet ee4ffa5672 org-clock: fix runtime error in org-clock-in
* org-clock.el (org-clock-in): Under certain configurations of org,
Emacs doom, evil-org-mode and my custom settings, org-clock-in aborts
with an an error because indent-line-to is called with -2.

TINYCHANGE
2021-02-16 23:33:19 -05:00
Ihor Radchenko 75ccb9719f Allow tags containing capital letters in org-agenda-filter
* lisp/org-agenda.el (org-agenda-filter): Downcase tags in the search
string provided by user.  This is needed because all the tags stored
in 'tags text property are downcased.

Example when old code did not work is a tag like COMMON.  The user
would not expect a need to input +|-common in the agenda filter
instead of +|-COMMON.  The latter would only result in
"COMMON filter ignored because tag/category is not represented".
2021-02-15 00:50:05 -05:00
Kyle Meyer 61336f80dc mk/targets.mk: Add version fallback for tag-less repos
* mk/targets.mk (ORGVERSION, GITVERSION): Get version from lisp/org.el
header if it can't be retrieved from git-describe.

As of elpa.git's ee03829f90 (Finalize the new master branch,
2020-12-14), org-release and org-git-version are empty strings in
https://elpa.gnu.org/packages/org-*.tar files.  This is because the
new setup executes `make autoloads info' in an elpa.git worktree with
an Org branch checked out, but elpa.git of course doesn't have Org's
release tags.

Maintaining the org.el version header has been a point of contention
in the past [1], but the header has been there for a while now.  Use
it to avoid the above elpa.git issue.  In the case of the master
branch, the org-release value generated in a tag-less repo will have a
different version than the one from a regular repo because org.el's
version header has a "-dev" suffix, but that's still better than an
empty version.

[1] For example: https://orgmode.org/list/87zj1uhix6.fsf@gmx.us/

Reported-by: Pierre Langlois <pierre.langlois@gmx.com>
Ref: https://orgmode.org/list/87y2hi9qev.fsf@gmx.com
2021-02-05 01:20:09 -05:00
Alan Light 862048d4cb ob-sql.el: Respect the value of sql-postgres-program
* ob-sql.el (org-babel-execute:sql): Use `sql-postgres-program' as
postgresql executable (instead of psql) when defined.  psql will be
the default.

[km: tweaked commit message, added bound-and-true-p guard]

TINYCHANGE
2021-02-03 23:08:21 -05:00
Kyle Meyer e879596159 footnote: Silence byte-compiler under 'make single' 2021-02-03 23:07:33 -05:00
Stefan Kangas 2ed1c20ff7 Remove Emacs 21 compat code for bookmark-after-jump-hook
* lisp/org-compat.el (bookmark-after-jump-hook): Remove Emacs 21
compat code.
2021-02-03 01:26:51 -05:00
Kyle Meyer 3e64d3475d capture: Fix handling of time range for :time-prompt
* lisp/org-capture.el (org-capture-set-target-location): Bind
org-end-time-was-given around the org-read-date call to get a return
value that uses the start time rather than doing custom adjustment of
the return value.

If org-capture-set-target-location detects that the answer to
org-read-date has a time range, it strips the end time from the answer
and calls org-read-date-analyze again.  (org-read-date already calls
it underneath.)  The regexp it uses, however, can easily match a date,
leading to a bogus result.

org-read-date-analyze is already capable of processing the time range
in a way that matches org-capture-set-target-location's intent: when
org-end-time-was-given is bound, org-read-date-analyze splits off the
end value of the range and stores it in org-end-time-was-given.  Drop
the custom logic and let org-read-date-analyze handle the range.

Reported-by: Richard Lawrence <richard.lawrence@berkeley.edu>
Ref: https://orgmode.org/list/87h7obh4ct.fsf@aquinas
2021-02-01 23:18:03 -05:00
Basile Pesin 0abd4a44cb ox-latex.el: Use [Objective]Caml dialect
* ox-latex.el (org-latex-listings-langs): Change the binding for
  `ocaml' to "[Objective]Caml"

The "[Objective]Caml" dialect syntax highlighting is different from the
"Caml" one (reflecting the added features of OCaml compared to
Caml-light).

TINYCHANGE
2021-01-24 23:05:53 -05:00
Stefan Kangas a50a42ceae Use lexical-binding cookie in some trivial files
* mk/org-fixup.el (org-make-org-version): Add lexical-binding cookie
to autogenerated files.
* lisp/org-install.el: Use lexical-binding.
2021-01-24 22:36:30 -05:00
Tara Lorenz 13e98e2a13 ox-latex.el: fix interpretation of org-latex-pdf-process
* ox-latex.el (org-latex-export-to-pdf):  The documentation for
`org-latex-pdf-process' states that "%bib" will be expanded into the
current binding of `org-latex-bibtex-compiler'.  However, the
`org-latex-export-to-pdf', where the expansion takes place, expects
"%bibtex" instead.  This fix will accept "%bib" as well as "%bibtex"
as markers for `org-latex-bib-compiler'.

This fixes a regression from f6187deca (ox-latex: Small refactor,
2015-09-13).

TINYCHANGE
2021-01-24 22:16:45 -05:00
Kyle Meyer b99beaad18 org-macs: Add basic tests for org-matcher-time
* testing/lisp/test-org-macs.el (test-org-matcher-time): Add tests.

This includes of a test for the missing hour modifier added in the
previous commit.
2021-01-24 22:16:45 -05:00
Daniel Gröber aeb9f036ff org-macs: Allow specifying relative time in hours
* lisp/org-macs.el (org-matcher-time): Handle hour ("h") time stamp
modifier.
* doc/org-manual.org (The date/time prompt): Document hour modifier.

This adds support for date expressions such as +12h to
org-matcher-time. The regexp this function uses to parse such relative
expressions already includes the "h" character but doesn't actually
handle that case.

AFAICT org-mode commit ec921a2a68 ("Support hourly repeat cookies")
neglected to add support here.

TINYCHANGE
2021-01-24 22:16:45 -05:00
tbanelwebmin@free.fr 9e8215f4a5 ob-C.el: Fix missing C, C++ declaration
* lisp/ob-C.el (org-babel-C-utility-header-to-C): Add declaration of
  strcmp() for C and C++.

* testing/examples/ob-C-test.org (Simple tests): Remove a spurious \n
  new line.
2021-01-14 21:20:00 +01:00
TRS-80 1806abdc39 org-footnote: Fix inserting new footnote mangling drawers
* org-footnote.el (org-footnote-create-definition): Replace
  `forward-line' with `org-end-of-meta-data' to skip over any
  properties and/or drawers that may be present on the
  `org-footnote-section' heading (default "Footnotes").

TINYCHANGE
2021-01-14 00:16:40 -05:00
Christian Garbs d02c0218ef testing/lisp/test-org-archive.el: Fix test
* testing/lisp/test-org-archive.el
(test-org-archive/datetree): Fix test for locales that don't use
English weekday names.
2021-01-14 00:15:34 -05:00
Kyle Meyer 33de2bd8ef org-compat: Take in obsolete org-copy
* lisp/org-compat.el (org-copy): Move from org-refile.el.
* lisp/org-refile.el (org-copy): Move to org-compat.el.

Suggested-by: Marco Wahl <marcowahlsoft@gmail.com>
Ref: https://orgmode.org/list/87o8i2cpb2.fsf@gmail.com
2021-01-07 00:14:27 -05:00
Stefan Monnier 248dfcd711 Backport commit 5ada3eece from Emacs
* lisp/org-refile.el (org-copy): Fix missing obsoletion version.

5ada3eecec79703a84e2f2c38cae16ef4b2600cc
Stefan Monnier
Thu Dec 17 18:21:47 2020 -0500
2021-01-07 00:13:50 -05:00
Nicolas Goaziou 332da69b3c element: Fix table.el parsing... again!
* lisp/org-element.el (org-element--current-element): Properly parse
table.el tables ending at limit.

Reported-by: Kaushal Modi <kaushal.modi@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2021-01/msg00067.html>
2021-01-05 18:06:31 +01:00
Kyle Meyer 273391c978 duration: Avoid recursive load error
* lisp/org-duration.el (org-duration-units): Guard against recursive
load error when org-duration-units is set via the Customize interface
before org-duration is loaded.

This follows the same approach used by erc-nickserv-identify-mode in
the Emacs repository.

Reported-by: Mario Bourgoin <m.bourgoin@gmail.com>
Ref: https://orgmode.org/list/CAM0Tqh+u+L+UgZizJrH+a+W7Lo1stPJgTsRABxD3HobOnOCrNA@mail.gmail.com
2021-01-04 00:30:00 -05:00
Kyle Meyer 99eafe3787 Update copyright year to 2021 2021-01-01 14:59:01 -05:00
Kyle Meyer bd1c3187cf .dir-locals.el: Set indent-tabs-mode to nil in Elisp sources
Despite .dir-locals.el having a catchall value of t for
indent-tabs-mode, Org's Elisp files are a mix of tabs and spaces.
Emacs has used a value of nil for indent-tabs-mode since 93d4412046
(Set indent-tabs-mode to nil in (most) Elisp sources, 2015-04-15).  Do
the same.

Ref: https://orgmode.org/list/87eejsg9vw.fsf@gnu.org
2020-12-23 00:00:26 -05:00
Nicolas Goaziou 97f1d8e340 element: Improve table.el tables dectection
* lisp/org-element.el (org-element--current-element): Limit possible
false positives.
2020-12-22 14:54:43 +01:00
Nicolas Goaziou 118da7d280 element: Fix table.el tables parsing
* lisp/org-element.el (org-element--current-element): Fix regexp
matching a non-data-line.  Use rx.

Reported-by: Nick Dokos <ndokos@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2020-12/msg00561.html>
2020-12-22 12:43:48 +01:00
Bastien abedf386b3 lisp/org.el: Bump version to 9.4.4 2020-12-22 10:18:23 +01:00
Bastien 5e7c09e277 org-agenda.el and org-capture.el: Remove `generated-autoload-file'
* lisp/org-agenda.el: Remove `generated-autoload-file' local
variable.

* lisp/org-capture.el: Ditto.

This is a continuation of a4e6a6fa7 which fixes fae16ed8f.
Reported-by: Andrii Kolomoiets <andreyk.mad@gmail.com>
2020-12-22 09:22:14 +01:00
Marco Wahl 6ec2bb04e3 org-macs: Improve navigation in org-mks window
* lisp/org-macs.el (org--mks-read-key): New function parameter
navigation-keys to enable navigation keys. M-v has been added to the
navigation keys.
(org-mks): Supress spurious output in minibuffer.

This commit is a reaction to
https://orgmode.org/list/trinity-b89ea3b3-3d0d-4648-bcfc-0054a4a7fdaa-1607976126186@3c-app-mailcom-bs08/
2020-12-16 22:15:39 +01:00
Bastien 86af7e0c2f lisp/org.el: Bump version to 9.4.3 2020-12-16 10:41:33 +01:00
Bastien a4e6a6fa77 lisp/org.el: Remove local variable `generated-autoload-file'
* lisp/org.el: Remove local variable `generated-autoload-file'.

Fix fae16ed8f and https://debbugs.gnu.org/cgi/bugreport.cgi?bug=45259.
2020-12-16 10:40:18 +01:00
Fatih Aydin 5ee39c3524 ox-html: Add margin to fix overflow visibility problem
* lisp/ox-html.el (org-html-style-default): Add the margin-top
property to pre.src:hover:before so that the programming language is
fully visible.

TINYCHANGE
2020-12-16 00:43:39 -05:00
Jan Lübke a4d0607e19 contrib/org-mac-link.el: fix Mail.app link compatibility with macOS 11
* org-mac-link.el (org-mac-message-open): Replace angular brackets
with encoded version (< to %3C and > to %3E) so macOS 11 Big Sur can
open the message in mail.app.

macOS 11 does not open the mail link with angular brackets any more.
This fix is backwards compatible.  I have tested it on macOS 10.15.7.

TINYCHANGE
2020-12-16 00:40:09 -05:00
Bastien a846152e4d doc/org-manual.org: Enhance examples
* doc/org-manual.org (Link Abbreviations): Enhance examples.
2020-12-15 14:56:45 +01:00
Bastien 678f4d4b35 doc/org-manual.org: Remove a reference
* doc/org-manual.org (Cache results of evaluation): Remove a
reference.

The reference leads to a bug report that does not clearly explain the
situation here.  Also, it contains the string "@somewhere" that fails
to be correctly exported in Texinfo.
2020-12-15 09:02:45 +01:00