Commit Graph

23915 Commits

Author SHA1 Message Date
Mattias Engdegård da1ebabfab Backport commit de15ca7d0 from Emacs
Fix typos
de15ca7d0065c5f77c88a90f4f14569886be3617
Mattias Engdegård
Thu Feb 18 16:50:55 2021 +0100
2021-02-21 23:08:10 -05:00
Kyle Meyer d21d200bc0 Merge branch 'maint' 2021-02-21 01:19:08 -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
Nicolas Goaziou a1cdbbfc85 ox-calendar: Require Org Agenda
* lisp/ox-icalendar.el (org-agenda): Require Org Agenda. Export fails
if Agenda is not loaded.
2021-02-20 10:41:02 +01:00
Nicolas Goaziou 57bd7b57cc ox-icalendar: Remove unnecessary inner template
* lisp/ox-icalendar.el (icalendar): Remove inner template, which is
the default value anyway.
2021-02-20 10:39:32 +01:00
Kyle Meyer f4692572ba Merge branch 'maint' 2021-02-17 00:14:39 -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
Kyle Meyer f5cfd32880 Merge branch 'maint' 2021-02-15 00:55:57 -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
Kevin J. Foley 885ee086dd org-agenda.el: Support argument collection for custom bulk functions
* lisp/org-agenda.el (org-agenda-bulk-custom-functions): Add
documentation about argument collection for custom bulk functions.
(org-agenda-bulk-action): Support function to collect arguments for
custom bulk functions.
* etc/ORG-NEWS (Option ~org-agenda-bulk-custom-functions~ now supports
collecting bulk arguments): Add entry to NEWS.
2021-02-14 21:53:14 -05:00
Kyle Meyer e0fb2339f4 Merge branch 'km/from-emacs-master'
Porting from Emacs's master to Org's maint branch has been on hold
leading up to the Emacs 27.2 release to avoid any required fixup syncs
carrying those commits into the emacs-27 branch.  This merge brings
those changes into master.  The km/from-emacs-master branch should be
merged to maint when Emacs 27.2 has been released (assuming Org 9.5
hasn't been released, in which case maint will be tracking 9.5.x and
already include these changes).
2021-02-14 18:06:23 -05:00
Stefan Monnier 7dd1cfb6ca Backport commit f8dbefbaa from Emacs
* lisp/ob-comint.el (org-babel-comint-in-buffer)
(org-babel-comint-with-output): Use `declare`.

* lisp/ob-core.el (org-babel-map-src-blocks): Use `declare`.
(org-babel-result-cond): Simplify edebug spec.

* lisp/org-clock.el (org-with-clock-position, org-with-clock):
* lisp/org-agenda.el (org-agenda-with-point-at-orig-entry):
* lisp/ob-tangle.el (org-babel-with-temp-filebuffer): Use `declare`.

Use `declare` instead of `def-edebug-spec` in most places
f8dbefbaa59bb17dd4a2dfa4d9ff560c46785792
Stefan Monnier
Fri Feb 12 16:08:01 2021 -0500
2021-02-14 17:38:07 -05:00
Stefan Kangas b7b52aa888 Backport commit ce35760b1 from Emacs
; Minor license statement fixes
ce35760b19315b634e62e2c64988018189dcdbdc
Stefan Kangas
Mon Feb 8 09:10:57 2021 +0100
2021-02-14 17:38:07 -05:00
Stefan Kangas 4aa4ae8cf0 Backport commit bbe88cd82 from Emacs
* lisp/org-table.el (org-table-edit-field):
* lisp/org.el (org-restart-font-lock): Assume font-lock-mode variable
is not void; it is preloaded.

Assume font-lock-mode variable is not void
bbe88cd82e4bbfd76df06223614ab74d1022c119
Stefan Kangas
Fri Feb 5 01:15:02 2021 +0100
2021-02-14 17:38:07 -05:00
Stefan Kangas d8e8a97a14 Backport commit a8caa6690 from Emacs
* doc/org-manual.org (Link Abbreviations):
* lisp/org/ol.el (org-link-shell-confirm-function)
(org-link-elisp-confirm-function):
* lisp/org/org.el (org-highlight-links): Avoid recommending Google.

Avoid recommending Google
a8caa66906b157c9c2b4c4dc1c447b6a9e747c5e
Stefan Kangas
Thu Jan 28 19:36:12 2021 +0100
2021-02-14 17:38:07 -05:00
Stefan Kangas a633d9aea6 Backport commit dd662fc97 from Emacs
* lisp/ob-sql.el (org-babel-sql-dbstring-vertica):
* lisp/ol-bbdb.el (org-bbdb-date-list): Fix doc strings to not exceed
80-column limits.  (Bug#44858)

Fix some over-wide docstrings
dd662fc972a75df71cdaa25a2d763d1592df1eb8
Stefan Kangas
Wed Dec 30 12:44:19 2020 +0100
2021-02-14 17:38:07 -05:00
Stefan Kangas 263d3852f6 Backport commit 34a73666d from Emacs
* lisp/org-agenda.el (org-agenda-filter-by-category): Shorten doc
strings to not exceed 80-column limits.  (Bug#44858)

Shorten some over-wide docstrings in functions and macros
34a73666d9559d948815a53b63dc36cc878d5aff
Stefan Kangas
Sat Dec 19 18:21:06 2020 +0100
2021-02-14 17:38:07 -05:00
Stefan Kangas d904f9e5da Backport commit f88a7897a from Emacs
* lisp/ob-R.el (org-babel-R-write-object-command):
* lisp/org-attach.el (org-attach-after-change-hook):
* lisp/org.el (org-stamp-time-of-day-regexp): Shorten doc strings to
not exceed 80-column limits.  (Bug#44858)

Shorten over-wide docstrings in variables
f88a7897a80ee9129bdc444cafff32d026c4b6d8
Stefan Kangas
Sat Dec 19 18:21:06 2020 +0100
2021-02-14 17:38:07 -05:00
Stefan Kangas ce22aa15fd Backport commit 5ab5c3898 from Emacs
* lisp/org-indent.el
(org-indent-mode-turns-off-org-adapt-indentation)
(org-indent-mode-turns-on-hiding-stars):
* lisp/org-protocol.el (org-protocol-project-alist): Shorten doc
strings to not exceed 80-column limits.  (Bug#44858)

Shorten over-wide docstrings in defcustoms
5ab5c3898778406103e7183bf41c7d018077092b
Stefan Kangas
Sat Dec 19 18:21:06 2020 +0100
2021-02-14 17:38:07 -05:00
Eli Zaretskii ec52bfef54 Backport commit 64d97212f from Emacs
* lisp/org-ctags.el (org-ctags-open-link-functions): Fix doc strings
to not exceed 80-column limits.  (Bug#44858)

Fix over-wide doc strings
64d97212f42bc0305560a0ae2cc2f16a3a851117
Eli Zaretskii
Sat Dec 19 13:18:11 2020 +0200
2021-02-14 17:38:07 -05:00
Mattias Engdegård 4c934424d6 Backport commit 46394dff7 from Emacs
* lisp/ob-core.el (org-babel--string-to-number): Put hyphen last in
alternative.
* lisp/org-agenda.el (org-agenda-filter): Escape '+' correctly.

Follow good regexp practice
46394dff7f01e7fe4af06a6c344e151af5c3eef4
Mattias Engdegård
Fri Dec 18 14:35:09 2020 +0100
2021-02-14 17:38:04 -05:00
Kyle Meyer ff1e8f3eba ob-java: Fix previous commit
* lisp/ob-java.el (org-babel-execute:java): Restore inspection of
:dir's value to decide whether to run from temporary directory.

My compatibility fix in the previous commit incorrectly changed the
documented and intended behavior for (:dir . nil).

Reported-by: Ian Martins <ianxm@jhu.edu>
2021-02-14 15:42:18 -05:00
Kyle Meyer 49364f904b Avoid alist-get for compatibility with Emacs 24
* lisp/ob-java.el (org-babel-execute:java):
* lisp/org-id.el (org-id-store-link): Don't use alist-get, which isn't
available until Emacs 25.
2021-02-07 20:05:51 -05:00
TEC 5b0eb9aada manual, news: Document org-html-meta-tags
* docs/org-manual.org, etc/ORG-NEWS: Document and announce the new
setting `org-html-meta-tags'.

[km: spacing and spelling tweaks]
2021-02-07 19:37:20 -05:00
Jeremie Juste 0c6ab87d11 ob-R.el: For :results value return empty string instead of nil 2021-02-06 21:36:55 +01:00
Gustav Wikström be2966abb5 org-id: Add title to description when storing id links
* lisp/org-id.el (org-id-store-link): Store title as link description
if it is available.
2021-02-06 20:46:05 +01:00
Kyle Meyer 2512fd702f Merge branch 'maint' 2021-02-05 01:21: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
Kyle Meyer 369eb27397 Merge branch 'maint' 2021-02-04 00:56:43 -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
Kyle Meyer 26773a404e Merge branch 'maint' 2021-02-03 01:27:15 -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 0414597272 Merge branch 'maint' 2021-02-02 00:26:43 -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
John Herrlin f85bef28d9 ob-java: Allow import to end with asterisk
* lisp/ob-java.el (org-babel-java--imports-re,
org-babel-java--import-maybe): Allow import to end with asterisk.

TINYCHANGE
2021-01-30 05:32:29 -05:00
Kyle Meyer bc511b1cb8 Merge branch 'maint' 2021-01-24 23:12:33 -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
Kyle Meyer 72e368a2e9 Merge branch 'maint' 2021-01-24 22:17:01 -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
Kyle Meyer a12449ac19 org-compat: Fix symbol quoting in a comment 2021-01-24 22:15:10 -05:00
stardiviner 3d80b5bff6
org-contacts.el: Display contacts buffer result.
* contrib/lisp/org-contacts.el (org-contacts-link-open): Display the
searched contacts file buffer.
2021-01-25 10:04:40 +08:00
Turbo Cafe 3916a57406 ox-md.el: Preserve radio target hyperlink
* lisp/ox-md.el (org-md-link): Format markdown hyperlink from radio
target.

TINYCHANGE
2021-01-22 00:05:47 -05:00
TEC a8df7670c8 lisp/ox-html.el: make html meta tags customizable
* lisp/ox-html.el (org-html-meta-tags): Introduce this as a new option
which can be modified to set the meta tags added in HTML exports.
(org-html--build-meta-info): Make use of `org-html-meta-tags' instead of
hardcoded meta tags.  This is leveraging the earlier restructuring of
`org-html--build-meta-info' into a much DRYer form, such that this
modification has a negligible impact on complexity and readability.
2021-01-20 22:27:02 -05:00
TEC f4b9f98088 lisp/ox-html.el: make html meta tag builder nicer
* lisp/ox-html.el (org-html--build-meta-info): Multi-line repeated
structure extracted to new function `org-html--build-meta-entry'.
The keyword value formatting is changed from `org-export-data' to
`org-html-encode-plain-text' to avoid potentially nesting HTML tags in
meta tags and the <title> element, which would violate W3C.
2021-01-20 22:02:46 -05:00
Ian Martins 7fa8173282 ob-java: Allow header to override commands
lisp/ob-java.el: Allow source block headers to override the java
compiler or runtime commands.

Currently the java compiler and runtime commands are customizable, but
cannot be overridden locally in source block hearders.  ob-python
allows overriding the runtime command and I've found it to be useful.
This does the same for ob-java.
2021-01-16 15:52:21 -05:00