Commit Graph

432 Commits

Author SHA1 Message Date
Nicolas Goaziou 61c8903c87 Fix failing tests
* lisp/org-compat.el (org-string-collate-lessp): Reinstate function,
  inadvertently removed in last merge with maint branch.
2018-02-13 14:17:00 +01:00
Nicolas Goaziou 2a7a4a65ad Merge branch 'maint' 2018-02-13 14:10:28 +01:00
Nicolas Goaziou 7c21dfc771 ox-publish: Follow symlink directories
* lisp/org-compat.el (directory-files-recursively): Remove
  compatibility function, no longer needed.
* lisp/ox-publish.el (org-publish--expand-file-name):
(org-publish-org-to):
(org-publish-collect-index):
(org-publish--store-crossrefs):
(org-publish-resolve-external-link): Preserve symlinks in file name.
(org-publish-get-base-files): Follow symlink directories.
(org-publish-get-project-from-filename): Preserve symlinks in file
name.  Do not use `file-in-directory-p', which ignores symlinks.

Reported-by: Michel Damiens <michel.damiens@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2018-02/msg00186.html>
2018-02-13 14:06:56 +01:00
Sebastian Reuße 551d2f1fe7 Fix alphabetic sorting for headlines, tags
* org.el (org-sort-entries): Use collated sorting.
(org-tags-sort-function): Use collated sorting.
(org-string-collate-greaterp): Add helper-function to use as defcustom
option, since there is no ‘string-collate-greaterp’ in Emacs.

* org-compat.el (org-string-collate-lessp): Add proxy to fall-back on
string-lessp when string-collate-lessp is missing (Emacs ≤ 24).

* test-org.el (test-org/string-collate-lessp): Add test.
(test-org/sort-entries): Add regression test for non-ASCII inputs.

‘org-sort-entries’ and ‘org-tags-sort-function’ advertise alphabetic
sorting, but actually sort based only on character code.  This
produces non-alphabetic orderings of strings in non-ASCII locales.

E. g., German Umlauts “Ä Ü Ö” are alphabetically sorted as if they
were “A U O”, whereas sorting based on character-code will place them
after “Z”, which is unexpected.
2018-02-12 14:57:54 +01:00
Nicolas Goaziou a2471b1bb6 Silence byte-compiler 2018-02-04 00:51:00 +01:00
Nicolas Goaziou 4b2006db3d Merge branch 'maint' 2018-02-01 22:43:19 +01:00
Nicolas Goaziou e570e964a3 org-compat: Remove `org-decode-time'
* lisp/org-compat.el (org-decode-time): Remove compatibility function,
  no longer used.
2018-02-01 22:42:35 +01:00
Nicolas Goaziou 1c8e687f47 org-compat: Silence byte-compiler 2018-01-20 13:32:03 +01:00
Nicolas Goaziou d378d9ec7e Do not hijack keybindings in Calendar mode
* lisp/org-compat.el (org-calendar-to-agenda-key):
(org-calendar-insert-diary-entry-key): Moved from "org.el".
(org--setup-calendar-bindings): New function.

Fixes: Bug#10289
2018-01-20 13:07:46 +01:00
Nicolas Goaziou 0155441358 Merge branch 'maint' 2018-01-19 18:22:00 +01:00
Tim Landscheidt b289a65be7 Use https for links to orgmode.org
TINYCHANGE
2018-01-19 18:14:58 +01:00
Nicolas Goaziou 4dbb4a76a7 Implement `org-show-all'
* lisp/org.el (org-show-all): New function.
(org-cycle):
(org-cycle-internal-global):
(org-global-cycle):
(org-set-startup-visibility):
(org-set-outline-overlay-data):
(org-hide-block-all):
(org-mode-hook):
(org-tree-to-indirect-buffer):
(org-sort-entries):
(org-mode-map):
(org-org-menu):
* lisp/ob-lilypond.el (org-babel-lilypond-mark-error-line):
* lisp/org-archive.el (org-archive-subtree):
* lisp/org-capture.el (org-capture-place-template):
* lisp/org-mouse.el (org-mouse-popup-global-menu):
* lisp/ox-org.el (org-org-publish-to-org):
* testing/org-test.el (org-test-at-id):
(org-test-in-example-file): Use new function.

* lisp/org-compat.el (org-show-block-all): Mark as obsolete.
2018-01-10 15:58:21 +01:00
Kyle Meyer d94f7024bc Merge branch 'maint' 2018-01-07 00:28:35 -05:00
Kyle Meyer 3e1641ef0a Update copyright years 2018-01-07 00:27:54 -05:00
Nicolas Goaziou 2646271789 Merge branch 'maint' 2017-12-15 22:26:01 +01:00
Nicolas Goaziou 46124812d2 Fix function declarations
Fixes: 29722
2017-12-15 22:24:44 +01:00
Nicolas Goaziou 486331e323 Move some generic functions into "org-macs.el"
* lisp/org.el (org-do-wrap): Remove function.
(org-base-buffer):
(org-find-base-buffer-visiting):
(org-overlay-display):
(org-overlay-before-string):
(org-find-overlays):
(org-reverse-string):
(org-shorten-string):
(org-remove-tabs):
(org-wrap):
(org-remove-indentation):
(org-do-remove-indentation):
(org-uniquify-alist):
(org-combine-plists):
(org-skip-whitespace):
(org-in-regexp):
(org-point-in-group):
(org-get-at-eol):
(org-find-text-property-in-string):
(org-display-warning):
(org-eval):
* lisp/org-compat.el (org-add-props): Move ...

* lisp/org-macs.el: ... there.
(org--do-wrap): New function.
2017-10-22 15:34:26 +02:00
Nicolas Goaziou 7554012cef Move compatibility functions in "org-compat.el"
* lisp/org.el (org-imenu-and-speedbar):
(org-imenu-markers):
(org-imenu-new-marker):
(org-imenu-get-tree):
(org-speedbar-restriction-lock-overlay):
(org-speedbar-set-agenda-restriction):
(org--flyspell-object-check-p):
(org-mode-flyspell-verify):
(org-remove-flyspell-overlays-in):
(org-bookmark-jump-unhide):
(org-mark-jump-unhide): Move...

* lisp/org-compat.el: ... there.
2017-10-22 15:01:43 +02:00
Paul Eggert ff0dcf52a5 Backport commit bc511a64f from Emacs
Prefer HTTPS to FTP and HTTP in documentation
bc511a64f6da9ab51acc7c8865e80c4a4cb655c2
Paul Eggert
Wed Sep 13 15:54:37 2017 -0700
2017-09-17 00:28:38 -04:00
Galen Menzel 3359e05e82 Implement `org-decode-time' for backward compatibility
* lisp/org-compat.el (org-decode-time): New function.
* lisp/org-clock.el (org-clock-get-sum-start): Use new function.

Emacs 24's `decode-time' doesn't accept two arguments.
2017-08-11 15:07:45 +02:00
Nicolas Goaziou dd757f14f0 Merge branch 'maint' 2017-07-02 09:20:35 +02:00
Nicolas Goaziou 796a78222a Move an obsolete declaration in "org-compat.el"
* lisp/org-compat.el (org-capture-import-remember-templates): Moved
  from "org-capture.el".
2017-07-02 09:19:09 +02:00
Nicolas Goaziou be30c8b126 ox-texinfo: Change default table markup
* lisp/ox-texinfo.el (org-texinfo-table-default-markup): Rename from
  `org-texinfo-def-table-markup'.  Set default value to the neutral
  "@asis".
(org-texinfo-plain-list): Use new name.
* lisp/org-compat.el (org-texinfo-def-table-markup): Mark as obsolete.
* doc/org.texi (Publishing options): Document change.
2017-06-14 19:11:33 +02:00
Nicolas Goaziou 3e11697ead Merge branch 'maint' 2017-06-08 13:03:14 +02:00
Nicolas Goaziou da8b8f0774 org-compat: Add obsolete aliases for link fontification functions
* lisp/org-compat.el (org-activate-bracket-links):
(org-activate-plain-links):
(org-activate-angle-links): Define aliases for backward compatibility.
2017-06-08 13:01:44 +02:00
Nicolas Goaziou e3f21926b4 Declare `org-usenet-links-prefer-google' as obsolete
* lisp/org-compat.el (org-usenet-links-prefer-google): Declare as
  obsolete.
2017-06-05 23:03:38 +02:00
Nicolas Goaziou cecdb2bd67 Merge branch 'maint' 2017-05-02 08:24:24 +02:00
Nicolas Goaziou 823c821bc8 ob-core: Small refactoring
* lisp/ob-core.el (org-babel-read): Small refactoring.
(org-babel--string-to-number): Use `string-match-p' instead of
`string-match'.
* lisp/org-compat.el (org-babel-number-p): Move obsolete alias.
2017-05-01 15:33:09 +02:00
Nicolas Goaziou b785dcfd24 org-compat: Fix migration to `org-duration-format'
* lisp/org-compat.el (org-time-clocksum-format):
(org-time-clocksum-use-fractional):
(org-time-clocksum-fractional-format):
(org-time-clocksum-use-effort-durations): Do not make an alias to
a variable with an incompatible value.

Reported-by: Achim Gratz <Stromeko@nexgo.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/112266>
2017-02-21 18:46:32 +01:00
Nicolas Goaziou 7e8cf5f4c2 Use Org duration library
* contrib/lisp/org-depend.el (org-depend-trigger-todo): Use new
  functions.

* contrib/lisp/org-invoice.el (org-invoice-heading-info):
(org-invoice-info-to-table):
(org-invoice-list-to-table): Use new functions.

* contrib/lisp/ox-taskjuggler.el (org-taskjuggler--build-task): Use
  new functions.

* lisp/org-agenda.el (org-agenda-show-clocking-issues):
(org-agenda-format-item):
(org-agenda-filter-effort-form): Use new functions.

* lisp/org-clock.el (org-clock-get-clock-string):
(org-clock-modify-effort-estimate):
(org-clock-notify-once-if-expired):
(org-clock-out):
(org-clock-display):
(org-clock-put-overlay):
(org-clocktable-write-default): Use new functions.

* lisp/org-table.el (org-table-sort-lines): Use new functions.

* lisp/org.el (org-properties-postprocess-alist):
(org-refresh-effort-properties):
(org-set-effort):
(org-entry-properties):
(org-property-next-allowed-value): Use new functions.

(org-time-clocksum-format):
(org-time-clocksum-use-fractional):
(org-time-clocksum-use-fractional-format):
(org-time-clocksum-use-effort-durations): Declare as obsolete.  Move
to "org-compat.el".

(org-minutes-to-clocksum-string):
(org-hh:mm-string-to-minutes):
(org-duration-string-to-minutes): Declare as obsolete.  Move to
"org-compat.el".
(org-hours-to-clocksum-string): Remove function.

* lisp/org-colview.el (org-columns--collect-values): Use new
  functions.
(org-columns--duration-re): Remove variable.
(org-columns--time-to-seconds): Rename to...
(org-columns--age-to-minutes): ... this.
(org-columns--format-age): New function.
(org-columns--summary-apply-times):
(org-columns--summary-min-age):
(org-columns--summary-max-age):
(org-columns--summary-mean-age): Use new functions.

* testing/lisp/test-org-clock.el (test-org-clock-clocktable-contents-at-point):
* testing/lisp/test-org-colview.el (test-org-colview/columns-summary):
  Update tests.
2017-02-13 14:41:15 +01:00
Kyle Meyer 9c111f63d3 ob-core: Add org-babel-uppercase-example-markers option
* lisp/ob-core.el (org-babel-capitalize-example-region-markers): Mark
as obsolete.
(org-babel-uppercase-example-markers): New defcustom to replace defvar
org-babel-capitalize-example-region-markers.
(org-babel-examplify-region): Use new option.

Rather than moving org-babel-capitalize-example-region-markers to a
defcustom, give the option a new name that makes it clearer that all
characters, not just the first, will be in upper case.

Suggested-by: Vicente Vera <vicentemvp@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/111656>
2017-01-26 20:06:39 -05:00
Kyle Meyer 63aaffdc11 Merge branch 'maint' 2017-01-25 22:00:57 -05:00
Kyle Meyer ffa4502771 ob-core: Move org-babel-local-file-name to org-compat.el
* lisp/ob-core.el (org-babel-process-file-name): Move to
org-compat.el.
* lisp/org-compat.el (org-babel-local-file-name): Add compatibility
alias.
2017-01-25 22:00:48 -05:00
Nicolas Goaziou 4696d6e71d org-compat: Silence byte-compiler 2017-01-22 14:46:35 +01:00
Nicolas Goaziou 3553c0a524 org-agenda: Make `org-agenda-skip-(entry|subtree)-when.*' obsolete
* lisp/org-agenda.el (org-agenda-skip-entry-if):
(org-agenda-skip-entry-if):
(org-agenda-skip-entry-if): Move to...
* lisp/org-compat.el (org-agenda-skip-entry-when-regexp-matches):
(org-agenda-skip-subtree-when-regexp-matches):
(org-agenda-skip-entry-when-regexp-matches-in-subtree): ... here and
mark as obsolete.

These functions are not used in code base anymore, and they are easily
replaced with `org-agenda-skip-if'.
2017-01-22 13:52:43 +01:00
Kyle Meyer 0d3683f2cd Merge branch 'maint' 2017-01-05 20:23:58 -05:00
Kyle Meyer 713f785017 Update copyright years 2017-01-05 20:19:37 -05:00
Nicolas Goaziou 1c89082600 org-compat: Remove obsolete aliases 2016-12-22 13:20:39 +01:00
Nicolas Goaziou 7a90187fb1 org-compat: Silence byte-compiler 2016-12-22 13:16:30 +01:00
Nicolas Goaziou 7fd61c4f92 org-compat: Silence byte-compiler 2016-12-22 01:41:02 +01:00
Nicolas Goaziou edc8d552cd org-compat: Silence byte-compiler 2016-12-22 01:29:03 +01:00
Nicolas Goaziou d5dbf761eb ox-publish: Include directories in site-map
* lisp/ox-publish.el (org-publish-temp-files): Remove variable.
(org-publish-get-base-files-1):
(org-publish-compare-directory-files): Remove functions.
(org-publish-get-base-files): Remove optional argument.  Rewrite
function.
(org-publish-projects):
(org-publish-sitemap):
(org-publish-index-generate-theindex): Apply signature change.
(org-publish-sitemap-sort-folders): Allow to include or ignore
directories in the site-map.

* doc/org.texi (Sitemap):
* lisp/ox-publish.el (org-publish-project-alist): Document change.
2016-12-19 12:19:59 +01:00
Nicolas Goaziou 2d3e3f562a ox-publish: Improve control over site map
* lisp/ox-publish.el (org-publish-project-alist): Document
  new :sitemap-format-entry property, and change to `:sitemap-function'.
(org-publish-sitemap-file-entry-format): Make variable obsolete.
(org-publish-org-sitemap): Remove function.
(org-publish--sitemap-files-to-lisp):
(org-publish-sitemap):
(org-publish-sitemap-default-entry):
(org-publish-sitemap-default): New functions.
(org-publish-projects): Use new functions.
* lisp/org-compat: Implement directory-name-p when not available.

* doc/org.texi (Sitemap): Update documentation.

:sitemap-function is more specialized so it is easier to manipulate.  In
particular, it can make use of built-in `org-list-to-*' functions.
Also, :sitemap-format-entry, as a function, is less limited than
`org-publish-sitemap-file-entry-format' format string.
2016-12-19 12:19:58 +01:00
Charles Berry c91f750f9e org-compat.el: org-export-babel-evaluate is an obsolete variable
* lisp/org-compat.el (org-export-babel-evaluate) is marked as an
  obsolete variable.  It was marked as a function.
2016-12-01 18:34:43 -08:00
Charles Berry 3b5ce449c4 Replace `org-export-babel-evaluate' with `org-export-use-babel'
* lisp/ob-exp.el (org-babel-exp-process-buffer): Change variable
  name `org-export-babel-evaluate' to `org-export-use-babel'.  Also
  change the name in its `defcustom' and set the `:safe' key.

* lisp/ox-icalendar.el (org-icalendar-export-current-agenda): Change
  variable name.

* lisp/ox.el (org-export-as): Change variable name.

* doc/org.texi (Exporting code blocks): Change variable name.  Amplify
   the explanation of what the variable does.  Add variable index entry.

* testing/lisp/test-ob-exp.el: Change variable name.

* testing/lisp/test-ob-lob.el: Change variable name.

* testing/lisp/test-ox.el: Change variable name.

Users were often confused that setting this variable to `nil' will
cause header arguments to be ignored in addition to preventing code
from being evaluated.  It is hoped that the documentation changes and
the name `org-export-use-babel' will better convey that everything
babel does can be switched off with this variable.
2016-11-13 15:29:33 -08:00
Nicolas Goaziou adfa7649e5 org-compat: Assume `string-prefix-p' is defined
* lisp/org-compat.el: `string-prefix-p' was introduced in Emacs 24.1,
  which is below Org minimal expectations.  Only define
  `string-suffix-p' when necessary.
2016-10-29 10:02:27 +02:00
Nicolas Goaziou 9a7297a281 Silence byte-compiler 2016-09-26 23:13:52 +02:00
Nicolas Goaziou a1199f040f Move obsolete function to "org-compat"
* lisp/org.el (org-in-fixed-width-region-p): Move to...
* lisp/org-compat.el (org-in-fixed-width-region-p): ... here.
2016-09-26 23:03:49 +02:00
Aaron Ecay 092acf7e67 org.el: obsolete org-in-fixed-width-region-p
* lisp/org.el (org-in-fixed-width-region-p): Make obsolete.

It has no calls in core or contrib, and its function would be better
served by using the parser.
2016-09-26 16:56:19 +01:00
Nicolas Goaziou b5403dda35 org-compat: Silence byte-compiler 2016-09-07 18:31:23 +02:00