Commit Graph

21832 Commits

Author SHA1 Message Date
Nicolas Goaziou 97c14ca8cd ox-latex: Fix Brazilian entry in Polyglossia languages
* lisp/ox-latex.el (org-latex-polyglossia-language-alist): Fix
Brazilian entry.  Sort lines.
2019-09-05 15:05:06 +02:00
Bastien cff97c361a Bump Version keyword 2019-09-04 06:53:49 +02:00
Paul Eggert 190a3b6c4e Backport commit 221a3272a from Emacs
* lisp/org-table.el (org-table-message-once-per-second):
Fix bug when clock difference goes past a 65536-second boundary.
Don’t assume particular format for current-time result.

Fix org-table 65536-second bug
221a3272ad4a1befb41dda2990d672782bc0257f
Paul Eggert
Mon Aug 19 18:05:15 2019 -0700

Note(km): time-less-p and time-subtract have been replaced with the
corresponding Org compatibility functions.
2019-08-25 11:47:17 -04:00
Kyle Meyer 9e1b9fe627 Port more time-related changes
* lisp/org-agenda.el (org-agenda-check-clock-gap):
* lisp/org-clock.el (org-clock-get-clocked-time)
(org-clock-resolve-clock, (org-clock-resolve)
(org-resolve-clocks, org-resolve-clocks-if-idle)
(org-clock-in, org-clock-out, org-clock-sum, org-clocktable-steps):
* lisp/org-element.el (org-element-cache-sync-duration)
(org-element--cache-set-timer, org-element--cache-interrupt-p):
(org-element--cache-sync):
* lisp/org-habit.el (org-habit-insert-consistency-graphs):
* lisp/org-indent.el (org-indent-add-properties):
* lisp/org-timer.el (org-timer-start):
(org-timer-pause-or-continue, org-timer-set-timer):
* lisp/org.el (org-today, org-auto-repeat-maybe): Port time-related
changes from the Emacs repo by using compatibility wrappers.

In the Emacs repo, there has been a lot of changes to Org files
involving time-related code.  I've ported some of those changes but
have largely ignored any changes that break compatibility with older
Emacsen that we support.  That, however, isn't a good approach because
it will be hard to do a systematic update once we bump our minimum
Emacs requirement.  Instead use the recently added compatibility
wrappers where needed, which is ugly but more maintainable.

The main time-related changes this leaves unported are changes that
replace (apply #'encode-time args) calls with (encode-time args).
Until the first form is unsupported, adding a compatibility function
doesn't seem worth the churn.

Relevant Emacs commits include
c75f505dea6a560b825384cf3d277690f86840bf,
57c74793c46c6533b63836f00aecaf3ac2accb6d,
988e37fa0f922b852715671d59a0e3f682373411,
476066e89d6f0bb87220da690b8a476bf9655b80,
89c63b3522b62c0fd725f0b348927a2069238452.
2019-08-18 17:37:51 -04:00
Kyle Meyer d72b4af96e org-clock: Adjust steps calculation for Emacs 24 compatibility
* lisp/org-clock.el (org-clocktable-increment-day): Use
org-decode-time so that integer can be given for time on Emacs 24.
(org-clocktable-steps): Work with a float rather than internal time to
avoid "Invalid time specification" error on Emacs 24.

This fixes the failure of test-org-clock/clocktable/step on Emacs 24.
Note that the version of org-clocktable-steps on master has been
reworked and does not share this issue.
2019-08-18 17:36:13 -04:00
Kyle Meyer a23d0225ab org-time-stamp: Simplify encode-time call
* lisp/org.el (org-time-stamp): Use org-time-string-to-time.

This should have been applied with a6cead0d2 (Backport commit
476066e89 from Emacs, 2019-02-22).
2019-08-18 17:36:13 -04:00
Paul Eggert 74bf99502d Backport commit 988e37fa0 from Emacs
* lisp/org-agenda.el (org-agenda-get-timestamps, org-agenda-get-progress)
(org-agenda-show-clocking-issues):
* lisp/org-capture.el (org-capture-set-target-location):
* lisp/org-clock.el (org-clock-get-sum-start):
* lisp/org.el (org-current-time, org-store-link)
(org-read-date, org-read-date-display)
(org-display-custom-time, org-timestamp-to-time)
Simplify use of encode-time.
* lisp/org-clock.el (org-clock-in, org-clock-update-time-maybe):
* lisp/org-colview.el (org-columns--age-to-minutes):
* lisp/org-macs.el (org-2ft):
* lisp/org.el (org-get-scheduled-time, org-get-deadline-time)
(org-add-planning-info, org-time-string-to-absolute)
(org-closest-date):
Use org-time-string-to-time instead of doing it by hand with
encode-time.
* lisp/org.el (org-read-date): Avoid extra trip through encode-time.

Simplify use of encode-time
988e37fa0f922b852715671d59a0e3f682373411
Paul Eggert
Sun Feb 10 23:54:35 2019 -0800

Note(km): org-current-time has been modified to use org-time-subtract
and org-time-less-p for backward compatibility.  Some changes from
988e37fa0 have been dropped to keep encode-time's call compatible with
older Emacsen.
2019-08-18 17:36:13 -04:00
Paul Eggert a3fcf6dff4 Backport commit 3d1c9a77c from Emacs
* lisp/org-timer.el (org-timer-show-remaining-time):
Don’t assume the remaining time is less than one hour.
Simplify.  The simplification removes the need for a
decode-time, and fixes a typo I introduced recently.

Fix org-timer-show-remaining-time > 1 hour
3d1c9a77c52664c8c3e4fa1ae25e1d13aab9b2f9
Paul Eggert
Sat Aug 17 17:22:25 2019 -0700

Note(km): This replaces porting of Emacs's c90a420779 (Add FIXMEs for
subsecond support, 2019-08-17).  It's modified to use
org-time-subtract and org-time-convert-to-integer for backward
compatibility.
2019-08-18 17:36:13 -04:00
Kyle Meyer bdc5861cf7 org-compat: Add kludges for time-related functions
* lisp/org-compat.el (org-decode-time, org-format-time-string)
(org-time-add, org-time-less-p, org-time-since, org-time-subtract):
New compatibility functions.

On Emacs 24, these functions are stricter about what they accept for
time.  These new function will be used to port over changes in the
Emacs repo.  Don't bother doing a bulk substitution in existing Org
code because that would produce a lot of churn and these calls should
already be compatible with Emacs 24.
2019-08-18 17:36:12 -04:00
Kyle Meyer 24ba689506 org-compat: Add time-convert compatibility wrappers
* lisp/org-compat.el (org-time-convert-to-integer)
(org-time-convert-to-list): New defsubt's to replace common
invocations of time-convert (new in Emacs 27).
* lisp/org-compat.el (org-current-time-as-list): Drop in favor of
org-time-convert-to-list.

These will be used to port changes from the Emacs repo.
2019-08-18 17:31:05 -04:00
Kyle Meyer 4e3a1b3f5a org-compat: Move proper-list-p kludge to proper section 2019-08-17 09:54:35 -04:00
Kyle Meyer 531f4be256 org-compat: Define org-xor as alias for xor if available
* lisp/org-macs.el (org-xor): Move to ...
* lisp/org-compat.el (org-xor): ... here, making it an alias for xor
on Emacs 27.

This is an alternative to porting Emacs's
c676444a43e4634c1f98ec286b5bd9e46b23216b, which targets the code prior
to 45a1918ef (Move `org-xor' into "org-macs.el", 2017-10-17).
2019-08-17 09:54:32 -04:00
Paul Eggert 218e694964 Backport commit c6ba8100e from Emacs
* lisp/org-id.el (org-id-time-to-b36):
Remove unnecessary ‘or’.

Fix minor Org timestamp inefficiencies
c6ba8100ea1db4616d3fe8485430b29143bc3d2e
Paul Eggert
Mon Aug 5 17:38:15 2019 -0700
2019-08-17 09:45:22 -04:00
Paul Eggert 08c7bbbf71 Backport commit a5b796a87 from Emacs
* lisp/ob-haskell.el (org-babel-haskell-export-to-lhs):
Omit unnecessary ‘?’ after nullable pattern.
* lisp/org-capture.el (org-capture-fill-template):
Match upper-case as well as lower-case letters.

Fix 2019-08-04 regex lint
a5b796a8798a809044d847568e6472cc5eca077e
Paul Eggert
Sun Aug 4 11:39:54 2019 -0700
2019-08-17 09:45:22 -04:00
Paul Eggert 71ce18920a Backport commit 5f3f3884a from Emacs
Improve time function doc
5f3f3884a0d2a88101d330b82ef5b584cfc02aa6
Paul Eggert
Sun Aug 4 10:09:25 2019 -0700
2019-08-17 09:45:22 -04:00
Basil L. Contovounesios 765577d9b3 Backport commit 2267110b6 from Emacs
* lisp/ob-exp.el (org-babel-exp-process-buffer):
* lisp/org-agenda.el (org-agenda-show-new-time):
Always pass an explicit plist to remove-text-properties.

Fix usage of remove-text-properties
2267110b6f00bbb0ad87f4621e6ecd9dc1bd8581
Basil L. Contovounesios
Thu Aug 1 17:04:53 2019 +0300
2019-08-17 09:45:22 -04:00
Nicolas Goaziou 4cb3a37533 org-manual: Fix typo
* doc/org-manual.org (LaTeX specific export settings): Fix typo.

Reported-by: Emmanuel Charpentier <emm.charpentier@free.fr>
<http://lists.gnu.org/r/emacs-orgmode/2019-07/msg00153.html>
2019-08-17 15:29:16 +02:00
Nicolas Goaziou bf8ae63588 ox-latex: Fix typo in Brazilian language code
* lisp/ox-latex.el (org-latex-babel-language-alist): Fix typo.
2019-08-15 10:05:42 +02:00
Nicolas Goaziou ff6508ad4b Bump Version keyword
* lisp/org.el: Bump Version keyword.

This is necessary for GNU ELPA. Ideally, such a change should be
tagged with the official release.
2019-08-02 09:55:53 +02:00
Kyle Meyer 9a543b97a5 orgguide: Fix typo
* doc/orgguide.texi (Embedded @LaTeX{}): Fix typo.

Reported-by: Thomas Nguyen <thomas.nguyen1@okcps.org>
2019-07-23 23:24:31 -04:00
Kyle Meyer be47489c31 org-gnus: Add note about integer overflow guard
* lisp/org-gnus.el (org-gnus-follow-link): Add compatibility note to
code that guards against integer overflow.

Emacs's 7e294d55e1 (Remove some obsolete integer overflow handling,
2019-07-22) removes this, but we can't port that for compatibility
reasons.
2019-07-23 23:24:13 -04:00
Tim Landscheidt 1c3eae8f37 ox-rss: Fix typos 2019-07-16 15:24:18 +02:00
Marcin Borkowski 3b006f9a3e Fix a bug when `org-agenda-todo-ignore-deadlines` is set to t
* lisp/org-agenda.el (org-agenda-check-for-timestamp-as-reason-to-ignore-todo-item):
Make `t' synonymous with `near' instead of `all' (as is stated in the
docstring).
2019-07-14 23:59:55 +02:00
Ismail S 64262af685 Backport commit fb48eb48f from Emacs
* lisp/org-capture.el (org-capture-templates): Fix typo in doc
string (bug#36491).

Fix minor typo in org-capture-templates
fb48eb48f3bd432307821bc7158d1090f0e4bbf0
Ismail S
Tue Jul 9 00:53:18 2019 +0200

TINYCHANGE
2019-07-14 11:12:33 -04:00
Konstantin Kharlamov c0d699e9ba Backport commit dfc322d77 from Emacs
* lisp/org-mobile.el (org-mobile-copy-agenda-files)
(org-mobile-update-checksum-for-capture-file):
* lisp/org-table.el (org-table-number-regexp):
Replace various combinations of [0-9a-fA-F] with [[:xdigit:]].
(Bug#36167)

Replace manually crafted hex regexes with [:xdigit:]
dfc322d77fd1ce3aa4d852e0ff07bb36944f6432
Konstantin Kharlamov
Sat Jul 6 10:54:25 2019 +0300
2019-07-14 11:12:12 -04:00
Nicolas Goaziou 63e851ddbd ox: Add test
* testing/lisp/test-ox.el (test-org-export/uninterpreted): Add test.
2019-07-09 12:42:49 +02:00
Nicolas Goaziou 9bde6350d1 ox: Add post-blanks when latex is verbatim
* lisp/ox.el (org-export--remove-uninterpreted-data): Add post-blanks
  when latex is verbatim.
2019-07-09 12:42:46 +02:00
Nicolas Goaziou d73f65b57a org-list: Fix wrong list indentation
* lisp/org-list.el (org-list-struct-indent): Small refactoring.
(org-list-indent-item-generic): Copy old structure so
`org-list-write-struct' can notice bullet change.

Reported-by: Gustavo Barros <gusbrs.2016@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2019-07/msg00033.html>
2019-07-09 11:56:47 +02:00
Nicolas Goaziou acf4f0881a org-agenda: Fix "Args out of range" error in `org-agenda-list'
* lisp/org-agenda.el (org-agenda-list): Do not add text properties on
empty headers.
2019-07-06 10:24:11 +02:00
Nicolas Goaziou 7bc6f8d619 org-table: Prevent formula evaluation from widening all tables
* lisp/org-table.el (org-table-recalculate): When a formula is
  evaluated, do not expand shrunk columns across the whole buffer.
2019-06-28 17:49:25 +02:00
Nicolas Goaziou 0553f2e31c org-table: Fix `org-table-next-row' at eob
* lisp/org-table.el (org-table-next-row): Fix misbehaviour when called
  on the last row, at the end of the buffer, without a final newline.
2019-06-28 00:05:44 +02:00
Thomas Plass 0d7d12ffe6 ox: Make `org-export-table-cell-alignment' more robust
* lisp/ox.el (org-export-table-cell-alignment): Make
`org-export-table-cell-alignment' handle tables with rows containing
unequal numbers of cells.

Patch modeled after previous fix for `org-export-table-cell-width'.

TINYCHANGE
2019-06-12 18:22:00 +02:00
Paul Eggert 65a6f54605 Backport commit 852d28176 from Emacs
Update author/maintainer info
852d28176990d035366142bfde36a0440a317228
Paul Eggert
Sun May 26 01:00:16 2019 -0700
2019-06-09 21:35:45 -04:00
Paul Eggert 55e19d973e Backport commit 797ee5871 from Emacs
The convention is that a file with Author: but not Maintainer:
means the author is a maintainer, which makes it confusing
when a file lists the same person as author and maintainer.
Avoid the confusion by removing the duplicate Maintainer: line.

Remove Maintainer: when it duplicates Author:
797ee5871e458d6d97f57a24405412a053f5ef32
Paul Eggert
Sun May 26 01:00:15 2019 -0700
2019-06-09 21:28:44 -04:00
Paul Eggert 43bdc85b9d Backport commit 542443645 from Emacs
* lisp/org-id.el (org-id-link-to-org-use-id):
* lisp/org.el (org-support-shift-select, org-file-apps):
Remove backslash-newline that immediately precedes another
newline, as this is not the usual style and is confusing.

Avoid backslash-newline-newline in source code
5424436452bc0b3d8a62a8398f92d0c2db81e22b
Paul Eggert
Wed May 22 23:59:36 2019 -0700
2019-06-09 21:26:08 -04:00
Paul Eggert 96f439226e Backport commit bef1be873 from Emacs
Fixes for "Maintainer:" and related lines
bef1be873009d6e9f5a097396179f63a565bb6fd
Paul Eggert
Sun May 19 21:34:27 2019 -0700
2019-06-09 21:25:24 -04:00
Nicolas Goaziou 967801e2b8 ox: Make `org-export-table-cell-width' more robust
* lisp/ox.el (org-export-table-cell-width): Make
  `org-export-table-cell-width' robust against malformed tables.

Reported-by: michael <m.schoenwaelder@posteo.de>
<http://lists.gnu.org/r/emacs-orgmode/2019-05/msg00215.html>
2019-05-30 14:59:10 +02:00
Nicolas Goaziou 24555a0c00 Revert "Fix strike-through fontification on heading"
This reverts commit 42abf5c695.
2019-05-30 14:19:09 +02:00
Cheong Yiu Fung e4f5a194c7 org.el: Fix docstring of org-latex-packages-alist
* lisp/org.el (org-latex-packages-alist): Fix docstring to match
`org-latex-default-packages-alist'

TINYCHANGE
2019-05-28 11:19:51 +02:00
Nicolas Goaziou 31873ed27d ox-html: Do not generate empty validation link
* lisp/ox-html.el (org-html--build-pre/postamble): Do not generate
  empty validation link.

Reported-by: Nick Dokos <ndokos@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2019-05/msg00153.html>
2019-05-21 10:16:51 +02:00
Cheong Yiu Fung 2c9f259d65 org-manual: Small fixes
* doc/org-manual.org (Handling Links): Update variable
`org-id-link-to-org-use-id', which was changed in v7.9.2.

TINYCHANGE
2019-05-16 21:22:19 -04:00
Achim Gratz be1d65b72f Ruby tests
Ruby tests have been failing for quite some time, here's my fix.

From 2f1bbaab939f6b6ceceb72862470e0576a8e2cba Mon Sep 17 00:00:00 2001
From: Achim Gratz <Stromeko@Stromeko.DE>
Date: Sun, 12 May 2019 13:14:04 +0200
Subject: [PATCH 1/1] test-ob-ruby.el: fix tests

* testing/lisp/test-ob-ruby.el: Output no longer contains a trailing
  newline, remove from the template to compare against.  Session must
  be named for the tests to actually work, also add some extra code to
  ascertain that the code after the output statement has actually run
  in the session.
2019-05-16 10:43:14 +02:00
Josiah Schwab 4df7051255 manual: Update ADS link abbreviation example
* doc/org-manual.org (Link Abbreviations): Change URL.

Reported-by: Alain Kalker <a.c.kalker@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2019-05/msg00083.html>

TINYCHANGE
2019-05-10 19:36:58 +02:00
Ingo Lohmar d1ce59571f Fix fast tag selection affecting wrong line
* lisp/org.el (org-fast-tag-selection): Wrap `save-window-excursion'
with `save-excursion'.

In the case when the tags are changed remotely from the agenda, and
the affected buffer is already visible in another window, the tag
change was applied to the currently visible line in the target buffer,
not the headline in the agenda.
2019-05-09 22:00:00 +02:00
Nicolas Goaziou e95ac0bac3 org-manual: Delete reference to removed function
* doc/org-manual.org (Inserting deadlines or schedules): Remove
  reference to `org-mark-entry-for-agenda-action`.

Reported-by: Christian Heinrich <com-orgmode@gladbachcity.de>
<http://lists.gnu.org/r/emacs-orgmode/2019-05/msg00060.html>
2019-05-08 14:17:30 +02:00
Nicolas Goaziou e91bf47e4d Fix docstring
* lisp/org.el (org-timestamp-change): Fix docstring.

Reported-by: Tim Landscheidt <tim@tim-landscheidt.de>
<http://lists.gnu.org/r/emacs-orgmode/2019-05/msg00047.html>
2019-05-07 07:32:20 +02:00
Nicolas Goaziou 727c3f442b org-macro: Exit early when looking for keywords
* lisp/org-macro.el (org-macro--find-keyword-value): Change signature.
* testing/lisp/test-org-macro.el (test-org-macro/keyword): Remove
  a test.
2019-04-29 20:48:00 +02:00
Nicolas Goaziou 14132a356a Collect buffer-specific built-in macros in setup files
* lisp/org-macro.el (org-macro--set-template): New function.
(org-macro--collect-macros): Also collect "author", "email", "title"
and "date" macros.
(org-macro-initialize-templates): Do not collect previous macros here,
when it is too late.
(org-macro--find-date): New function.
* testing/lisp/test-org-macro.el (test-org/macro-replace-all): Remove
  test, since we cannot guarantee anymore that user-defined macros can
  take precedence over built-in ones.

Reported-by: emsenn <emsenn@emsenn.net>
<http://lists.gnu.org/r/emacs-orgmode/2019-04/msg00234.html>
2019-04-29 20:35:23 +02:00
Kévin Le Gouguec 42abf5c695 Fix strike-through fontification on heading
* lisp/org.el (org-do-emphasis-faces): Fix face priority.
2019-04-27 18:52:57 +02:00
Sebastian Miele 4ec550fd5a org-manual: Fix typo
* doc/org-manual.org (Footnotes): Fix typo.
2019-04-25 10:28:05 +02:00