Commit Graph

21751 Commits

Author SHA1 Message Date
Paul Eggert a6cead0d21 Backport commit 476066e89 from Emacs
* lisp/org-clock.el (org-clock-out):
* lisp/org.el (org-evaluate-time-range):
Avoid double-rounding of time-related values.  Simplify.
* lisp/org-clock.el (org-resolve-clocks-if-idle):
Use time-since instead of open-coding most of it.
* lisp/org-agenda.el (org-agenda-show-clocking-issues):
* lisp/org-capture.el (org-capture-set-target-location):
* lisp/org-table.el (org-table-sum):
* lisp/org.el (org-babel-load-file, org-2ft, org-time-stamp)
(org-read-date-analyze, org-time-stamp-to-now):
Simplify.

Note(km): Many of the changes from 476066e89 have been dropped for
compatibility with older Emacsen.

Avoid some double-rounding of Lisp timestamps
476066e89d6f0bb87220da690b8a476bf9655b80
Paul Eggert
Fri Feb 22 18:33:57 2019 -0800
2019-03-03 22:49:42 -05:00
Paul Eggert 1b15d5ef8e Backport commit eba66c1ea from Emacs
* lisp/ox-publish.el (org-publish-sitemap):
Simplify and remove assumptions about timestamp format.

Don’t assume that current-time and plain encode-time return
timestamps in (HI LO US PS) format.

Remove some timestamp format assumptions
eba66c1eafeef6512259c9b46face2b03c7433b8
Paul Eggert
Fri Feb 22 13:31:01 2019 -0800
2019-03-03 22:25:22 -05:00
Paul Eggert 6b5695aabd Backport commit b5e66f46a from Emacs
* lisp/org-id.el: Update RFC citations.

Update citations of Internet RFCs
b5e66f46a6f33f9d633e6cc3e0770a566bdfcf6b
Paul Eggert
Sat Feb 16 12:00:02 2019 -0800
2019-03-03 22:25:22 -05:00
Kyle Meyer c0f2d5d0bf org-archive: Make substring call compatible with Emacs 24
* lisp/org-archive.el (org-archive--compute-location): Pass 0 rather
than nil for FROM for Emacs 24 compatibility.
2019-03-03 22:25:10 -05:00
Nicolas Goaziou 92c3b76dd8 ox: Insert templates with lower case keywords
* lisp/ox.el (org-export-insert-default-template): Insert lower case
  keywords.
2019-02-28 19:39:39 +01:00
Feng Shu 8a2f4a21a9 org-agenda: Align multibyte tags properly
* lisp/org-agenda.el (org-agenda-align-tags): Let org-agenda align
  multibyte tags properly.
2019-02-28 15:27:44 +01:00
Feng Shu 69c211d154 Let radio target works well with Chinese
* lisp/org.el (org-update-radio-target-regexp): Let radio target works well with Chinese.

There is no need to force split words with the help
of space for Chinese, this change let the below
example works well.

<<<天空>>>

我爱天空和大地
    ^^^^
2019-02-28 14:06:17 +01:00
Marco Wahl e21ad2aea1 org-clock: Fix display of file time
* lisp/org-clock.el (org-clocktable-write-default): Fix format string.
2019-02-28 11:37:08 +01:00
Nicolas Goaziou 2afca09936 org-manual: Remove unnecessary introductory section
* doc/org-manual.org (Outlines): Remove section.
2019-02-28 00:21:52 +01:00
Nicolas Goaziou cc7c4a6732 Rationalize `org-link-(un)escape'
* contrib/lisp/org-contacts.el (org-contacts-vcard-format):
* contrib/lisp/org-link-edit.el (org-link-edit--link-data):
* contrib/lisp/org-notmuch.el (org-notmuch-search-store-link):
(org-notmuch-search-follow-link):
(org-notmuch-tree-follow-link):
* lisp/org-docview.el (org-docview-export):
* lisp/org-element.el (org-element-link-parser):
* lisp/org-lint.el (org-lint-link-to-local-file):
* lisp/org-protocol.el (org-protocol-split-data):
(org-protocol-parse-parameters):
* lisp/org.el (org-open-at-point):
(org-display-inline-images):
* lisp/ox-ascii.el (org-ascii-link):
* lisp/ox-html.el (org-html-link):
* lisp/ox-latex.el (org-latex--inline-image):
(org-latex-link):
* lisp/ox-publish.el (org-publish-resolve-external-link):
* lisp/ox.el (org-export-custom-protocol-maybe):
(org-export-resolve-fuzzy-link): Do not call `org-link-unescape' when
the link is obtained through the parser or as a user input.
* doc/org-manual.org (Link Format): Document escape syntax.

See <http://lists.gnu.org/r/emacs-orgmode/2019-02/msg00320.html>
2019-02-27 20:22:51 +01:00
Nicolas Goaziou bdbb7a255b org-protocol: Fix message string
* lisp/org-protocol.el (org-protocol-store-link): Remove spurious
  single quotes.
2019-02-27 11:06:19 +01:00
Nicolas Goaziou d437c1b5de Move obsolete function alias into "org-compat.el" 2019-02-25 13:46:41 +01:00
Allen Li cc020dbe4d Fix buffer local org-agenda-overriding-columns-format bug
* doc/org-manual.org (Using Column View in the Agenda): Updated
  reference to variable.
* lisp/org-agenda.el (org-agenda-finalize): Set buffer local variable
  instead.
* lisp/org-colview.el (org-overriding-columns-format): Renamed.
(org-agenda-overriding-columns-format): Renamed.
(org-local-columns-format): New buffer local variable.
(org-columns-edit-value): Updated reference to variable.
(org-columns-next-allowed-value): Updated reference to variable.
(org-agenda-columns): Updated reference to variable.

Setting org-agenda-overriding-columns-format as a buffer local value
interferes with how it is used as a dynamically scoped var, so use a
separate variable for buffer local setting.
2019-02-25 13:41:40 +01:00
Nicolas Goaziou 9d603b1854 org-archive: Fix archive location with multiple ARCHIVE keywords
* lisp/org-archive.el (org-get-local-archive-location):
(org-extract-archive-file):
(org-extract-archive-heading): Remove function.
(org-all-archive-files): Fix function.
(org-archive--compute-location): New function.
* lisp/org-archive.el (org-archive-subtree): Use new function.

Do not look for multiple ARCHIVE keywords.  This is already taken care
of in `org-set-regexps-and-options', through `org-archive-location'
buffer-local variable.
2019-02-25 13:24:37 +01:00
Nicolas Goaziou c07bf18b50 org-agenda: Fix wrong number of arguments error
* lisp/org-agenda.el (org-agenda-get-restriction-and-command): Fix
  typo.
2019-02-25 02:15:47 +01:00
Nicolas Goaziou 95e1f844ac Fix `org-refile' when logging multiple entries
* lisp/org.el (org-log-refile): Improve docstring.
(org-refile): Record information for every headline in the region.

Reported-by: "Eugene Sharygin" <eush77@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2019-02/msg00315.html>
2019-02-25 02:02:28 +01:00
memeplex 029cf66f01 org-agenda: don't show trailing color if no matcher
* lisp/org-agenda.el (org-agenda-get-restriction-and-command):
  when no matcher was specified there is no point in showing
  a trailing colon (and space).
2019-02-22 19:54:58 +01:00
memeplex b0932f703e org-agenda: improve todo states completion
* lisp/org-agenda.el (org-todo-list): prepare agenda buffers before
  prompting for state.
2019-02-22 19:43:16 +01:00
memeplex d6fcfc06ce Fix fast todo selection menu alignment
* lisp/org.el (org-fast-todo-selection): Avoid lines with just a
  closing delimiter.
2019-02-22 19:38:15 +01:00
Nicolas Goaziou 93c3d9d281 Fix `org-display-inline-images' with "clickable images"
* lisp/org.el (org-display-inline-images): Even though Org syntax
  doesn't support nested links, display an image when the function is
  called on a link that contains a single file name in its
  description.

Reported-by: "Dietrich Foethke" <foethke@web.de>
<http://lists.gnu.org/r/emacs-orgmode/2019-02/msg00280.html>
2019-02-22 15:15:20 +01:00
Nicolas Goaziou 29fe5a7d7f ox-icalendar: Fix `org-icalendar-blocked-headline-p'
* lisp/ox-icalendar.el (org-icalendar-blocked-headline-p): Only
  consider children when looking for blocked entries, not the headline
  itself.

Reported-by: Duane Farnsworth <dfarnsworth@clarion.edu>
<http://lists.gnu.org/r/emacs-orgmode/2019-02/msg00275.html>
2019-02-21 15:33:00 +01:00
Nicolas Goaziou 0f70354b32 ox: Add missing `org-link-unescape' calls
* lisp/ox-ascii.el (org-ascii-link):
* lisp/ox-latex.el (org-latex--inline-image):
(org-latex-link): Add missing `org-link-unescape' to handle
hex-escaped URI.

Reported-by: stardiviner <numbchild@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2019-02/msg00265.html>
2019-02-20 15:26:27 +01:00
Nicolas Goaziou 6a9e847dec org-table: Fix empty field narrowing
* lisp/org-table.el (org-table--shrink-field): Fix empty field
  narrowing.

Reported-by: Nick Helm <nick@tenpoint.co.nz>
<http://lists.gnu.org/r/emacs-orgmode/2019-02/msg00214.html>
2019-02-19 17:05:56 +01:00
Nicolas Goaziou 6b8fb446b6 org-list: Fix `org-list-demote-modify-bullet' with alpha bullets
* lisp/org-list.el (org-list-struct-indent): Match case-sensitively
  against current bullet in order the tell the difference between "a."
  and "A.".
* testing/lisp/test-org-list.el (test-org-list/indent-item): Add test.
2019-02-18 23:38:13 +01:00
Piet van Oostrum 08cb207b38 Add missing `interactive` spec to `org-show-all'
* lisp/org.el (org-show-all): Add missing `interactive` spec to
  `org-show-all'.

TINYCHANGE
2019-02-18 21:40:57 +01:00
Nicolas Goaziou d647043431 org-table: Fix last commit
* lisp/org-table.el (org-table--shrink-field): Properly shrink empty
  and blank fields.
2019-02-18 17:03:25 +01:00
Nicolas Goaziou 126a37c36c org-manual: Small fixes
* doc/org-manual.org (Macro Replacement): Shorten a macro. Fix a macro
  name.
(A Beamer example): Fix escape syntax.  Narrow example.
2019-02-17 20:52:35 +01:00
Nicolas Goaziou 1227ad468d org-table: Shrunk columns obey to alignment cookies
* lisp/org-table.el (org-table--make-shrinking-overlay): Take care of
  concatenating `org-table-separator-space' and
  `org-table-shrunk-column-indicator'.
(org-table--shrink-field): Change signature to include column's
alignment.  Improve algorithm.
(org-table--shrink-columns): Apply signature change.
2019-02-17 18:42:23 +01:00
Nicolas Goaziou 6872088c7a Prevent spurious newline characters when inserting a heading
* lisp/org.el (org-insert-heading): Do not insert spurious newline
  characters.
* testing/lisp/test-org.el (test-org/insert-heading): Update tests.

Reported-by: Leo Vivier <zaephon@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2019-02/msg00128.html>
2019-02-15 22:47:28 +01:00
Nicolas Goaziou f9015b4bbf Fix last commit
* lisp/org-clock.el (org-clock-out-if-current): Autoload function.
* lisp/org.el (org-todo): Do not call `org-clock-out-if-current' if
  `org-clock' is not loaded yet.
2019-02-15 00:20:40 +01:00
Nicolas Goaziou 8fc22d464d Fix `org-clock-out-when-done' in a narrowed buffer
* lisp/org-clock.el (org-clock-out-if-current): Ignore narrowing.
* lisp/org.el (org-todo): Call directly previous function instead of
  relying on a hook.

Reported-by: Leo Vivier <leo.vivier@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2019-02/msg00132.html>
2019-02-14 15:03:37 +01:00
Nicolas Goaziou 3abedb8b64 Bump version keyword 2019-02-13 15:43:29 +01:00
Nicolas Goaziou 20c0c49d09 ox-publish: Fix arithmetic range error on some systems
* lisp/ox-publish.el (org-publish-cache-file-needs-publishing):
(org-publish-cache-ctime-of-src): Use internal time format for
timestamps.

Reported-by: Colin Baxter <m43cap@yandex.com>
<http://lists.gnu.org/r/emacs-orgmode/2019-02/msg00072.html>
2019-02-13 15:07:47 +01:00
memeplex 0b148ba706 Fix fast tag selection menu alignment
* lisp/org.el (org-fast-tag-selection): Avoid lines with just
a closing delimiter.  Also correctly align grouped and ungrouped tags.
2019-02-13 13:05:33 +01:00
Nicolas Goaziou 8e9b8dc2eb org-timer: Further simplification
* lisp/org-timer.el (org-timer-seconds): Remove function.
(org-timer-value-string): Fix docstring.  Remove call to
`org-timer-seconds'.
2019-02-13 13:02:28 +01:00
Kyle Meyer c0213eb743 org-timer: Simplify org-timer-seconds
* lisp/org-timer.el (org-timer-seconds): Simplify.
2019-02-12 19:53:52 -05:00
Kyle Meyer 6a5be09c1d Restore some current-time to nil changes
* lisp/org-colview.el (org-columns-compute-all):
* lisp/org-timer.el (org-timer-start):
(org-timer-pause-or-continue):
(org-timer-seconds):
* lisp/org.el (org-read-date-analyze): Favor nil argument to
explicitly passing current-time result to float-time and decode-time.

Most of these "(current-time) => nil" changes were made in the Emacs
codebase, but we stayed with the original state because we relied on
explicitly overriding current-time in the tests.  As of the last
commit, we no longer need to do this and can use org-test-at-time
instead.
2019-02-12 19:46:03 -05:00
Paul Eggert 2cd1f9b028 When testing, fake the current time more robustly
The old approach required Lisp code to use (current-time)
explicitly when calling other primitives, e.g., (float-time
(current-time)).  The new approach fakes all the primitives,
so that Lisp code can now use expressions like plain (float-time).
* testing/org-test.el (org-test-at-time): New macro.
* testing/lisp/test-org-colview.el (test-org-colview/columns-summary):
* testing/lisp/test-org-timer.el (test-org-timer/with-current-time):
* testing/lisp/test-org.el (test-org/org-read-date)
(test-org/deadline-close-p, test-org/deadline)
(test-org/schedule, test-org/time-stamp):
Use it.
2019-02-12 19:34:08 -05:00
Nicolas Goaziou e54f09af50 org-macs: Fix visibility issue with file local variables
* lisp/org-macs.el (org-preserve-local-variables): When file local
  variables are preserved and located in a folded section, make sure
  to hide them again.

Reported-by: Scott Randby <srandby@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2019-02/msg00105.html>
2019-02-12 23:33:01 +01:00
Nicolas Goaziou 931b7b8faf Fix included nested relative file links
* lisp/ox.el (org-export--update-included-link): New function.
(org-export--prepare-file-contents): Use new function.  Also check
possible file links within link's description.
* testing/lisp/test-ox.el (test-org-export/expand-include/links): Fix
  prefix.  Add tests.

Reported-by: "Dietrich Foethke" <foethke@web.de>
<http://lists.gnu.org/r/emacs-orgmode/2019-02/msg00103.html>
2019-02-12 01:15:55 +01:00
Marco Wahl 476066b13c org-manual: Fix reference to binding of org-info-find-node
Reported by Ian Garmaise <ian.g@phorixsol.com>
Archived-At: <http://permalink.gmane.org/gmane.emacs.orgmode/123498>
2019-02-11 09:53:39 +01:00
Nicolas Goaziou 1b1797d446 org-list: Fix missing newline in `org-list-make-subtree'
* lisp/org-list.el (org-list-make-subtree): Add missing newline.

Reported-by: Felix Wiemuth
Fixes bug#34334
2019-02-10 23:28:18 +01:00
Nicolas Goaziou b929c3e5e4 Fix typo in docstring
* lisp/org.el (org-get-tags): Fix typo in docstring.
2019-02-09 18:52:54 +01:00
Marco Wahl 0985f72a4d org-manual: Fix documentation about org-agenda-bulk-toggle-all
Reported by Ian Garmaise.
Archived-At: <http://permalink.gmane.org/gmane.emacs.orgmode/123486>
2019-02-09 16:28:11 +01:00
Nicolas Goaziou 03d7441813 Fix `org-edit-special' on INCLUDE with additional parameters
* lisp/org.el (org-edit-special): Correctly parse filenames with
  quotes and additional parameters.

Reported-by: Joon Ro <joon.ro@outlook.com>
<http://lists.gnu.org/r/emacs-orgmode/2019-02/msg00066.html>
2019-02-06 19:32:30 +01:00
Nicolas Goaziou 70dde3f617 ob-core: Fix Noweb reference regexp
* lisp/ob-core.el (org-babel-noweb-wrap): Fix regexp, which could not
  match 2 character long references.  Add docstring.
2019-02-04 18:02:38 +01:00
Kyle Meyer 69c9f632f4 ORG-NEWS: Fix copyright year 2019-02-03 19:16:36 -05:00
Kyle Meyer c6d37c6ebd org-attach: Autoload org-attach-dired-to-subtree
* lisp/org-attach.el (org-attach-dired-to-subtree): Autoload.

A code snippet in the manual suggests binding this command in
dired-mode-map.  Autoload it so that the snippet works without an
implicit (require 'org-attach).
2019-02-03 12:04:57 -05:00
Kyle Meyer 1a16155d99 org-manual: Fix unbalanced parentheses in an example
* doc/org-manual.org (Attachments): Balance parentheses in code
snippet.
2019-02-03 12:03:54 -05:00
Nicolas Goaziou 96cc9b58c2 Bump Org version 2019-02-03 14:54:58 +01:00