Commit Graph

20270 Commits

Author SHA1 Message Date
Nicolas Goaziou 007bbddbcc ox-html: Prevent spurious target below headlines
* lisp/ox-html.el (org-html-headline):
(org-html-link): Do not insert an additional target.

* lisp/ox-publish.el (org-publish-resolve-external-link): Add an
  optional argument.

* lisp/ox.el (org-export-get-reference): Improve docstring.

* testing/examples/pub/a.org:
* testing/examples/pub/b.org: New files.
* testing/lisp/test-ox-publish.el (test-org-publish/resolve-external-link):
  New test.
2017-09-10 00:23:42 +02:00
Nicolas Goaziou b3ab012d69 Merge branch 'maint' 2017-09-08 22:37:16 +02:00
Nicolas Goaziou e0259f9374 org-agenda: Fix typo
* lisp/org-agenda.el (org-search-view): Add missing :test keyword.
2017-09-08 22:35:54 +02:00
Nicolas Goaziou 2a9d8653eb Merge branch 'maint' 2017-09-08 21:19:53 +02:00
Nicolas Goaziou d059b7895b org-agenda: Better state change detection
* lisp/org-agenda.el (org-agenda-get-progress): Use appropriate regexp
  as TODO keywords are not limited to alphanumeric characters.

Reported-by: email@edgar-kalkowski.de
<http://lists.gnu.org/archive/html/emacs-orgmode/2017-09/msg00206.html>
2017-09-08 21:18:22 +02:00
Nicolas Goaziou c8aaf8f694 Merge branch 'maint' 2017-09-08 13:21:22 +02:00
Nicolas Goaziou 7ce9a24115 Fix duplicate tests
Reported-by: Stig Brautaset <stig@brautaset.org>
<http://lists.gnu.org/archive/html/emacs-orgmode/2017-09/msg00187.html>
2017-09-08 13:20:48 +02:00
Nicolas Goaziou 17013d6f38 Remove duplicate test
* testing/lisp/test-org-table.el (test-org-table/align): Remove test.
2017-09-08 13:14:55 +02:00
Nicolas Goaziou 289539e119 Merge branch 'maint' 2017-09-08 07:00:00 +02:00
Reuben Thomas a307011136 Fix logic of calling org-make-link-desciption-function
* lisp/org.el (org-insert-link): Simplify so that description is only
prompted for once, if auto-desc is not set, and takes as its default
value, in order, default-description, the return value of
org-make-link-description-function (if the variable is non-nil), and
the current desc. Update the docstring to reflect that
default-description takes precedence over
org-make-link-description-function.
(org-make-link-description-function): Remove from docstring the
statement that if the variable is nil, then the link will be used as
the default description. This is undesirable, and was not in any case
implemented.
2017-09-08 06:59:30 +02:00
Nicolas Goaziou e21768d24b Merge branch 'maint' 2017-09-08 06:49:34 +02:00
Neil Jerram e09cb53bde Improve Scheme code evaluation
* lisp/ob-scheme.el (org-babel-scheme-execute-with-geiser): Use
  Geiser's explicit 'retort' object, instead of catching and parsing
  an expected Emacs message (which for me is in any case overwritten
  by a following "Mark set" message); this also means we don't need
  the with-output-to-string approach for getting 'output' results.
  Also 'let' Geiser variables so as to avoid popping up the REPL
  and *Geiser dbg* buffers.
2017-09-08 06:48:15 +02:00
Kyle Meyer 88ffcf54d8 Merge branch 'maint' 2017-09-07 16:59:39 -04:00
Kyle Meyer 79d9f0c0ce Update customize-package-emacs-version-alist
* lisp/org.el (customize-package-emacs-version-alist): Add entries for
all existing ":package-version" values, and remove entries for
versions that aren't used as ":package-version" values.

Note that this alist has a limited effect because we specify
":version" in almost all of our defcustoms.  Two functions make use of
this alist: describe-variable-custom-version-info and
customize-changed-options.  The former only looks at the alist if
:version isn't specified, and the latter only looks at :version if an
entry for :package-version isn't found in the alist.

We should consider removing the defcustom :version specifications so
that the package-version->version mapping only needs to be maintained
in one place.
2017-09-07 16:56:15 -04:00
Kyle Meyer 6496d0ca95 Correct defcustom version information
* lisp/ob-lilypond.el (org-babel-lilypond-commands):
* lisp/ob-lua.el (org-babel-lua-command):
(org-babel-lua-mode):
(org-babel-lua-hline-to):
(org-babel-lua-None-to):
* lisp/org-agenda.el (org-agenda-search-view-max-outline-level):
* lisp/org.el (org-mouse-1-follows-link):
(org-src-fontify-natively):
(orgstruct-heading-prefix-regexp):
* lisp/ox-ascii.el (org-ascii-format-inlinetask-function):
* lisp/ox-latex.el (org-latex-format-drawer-function):
(org-latex-listings-langs):
* lisp/ox-odt.el (org-odt-format-drawer-function):
* lisp/ox.el (org-export-with-properties): Correct ":version" value.

* lisp/org-attach.el (org-attach-annex-auto-get): Correct
":package-version" value.
2017-09-07 16:56:11 -04:00
Kaushal Modi bca91bb7ee Merge branch 'maint' 2017-09-07 14:23:20 -04:00
Kaushal Modi 7a29c82e11 Make ob-sclang.el work on emacs 24.3
* contrib/lisp/ob-sclang.el: Use eval-after-load instead of
  with-eval-after-load.
2017-09-07 14:13:38 -04:00
Nicolas Goaziou d15a4a4a9b Silence byte-compiler 2017-09-07 18:21:01 +02:00
Nicolas Goaziou 7d1757f7d2 org-table: Fix failing tests
* lisp/org-table.el (org-table--shrink-columns): Use compatibility function.
2017-09-07 18:13:13 +02:00
Nicolas Goaziou f22c23277f Merge branch 'maint' 2017-09-07 18:03:03 +02:00
Nicolas Goaziou b16086d9af Fix `org-confirm-babel-evaluate' with `org-sbe'
* lisp/ob-core.el (org-babel-check-confirm-evaluate): Do not move
  point, as it is neither necessary nor expected by
  `org-babel-check-confirm-evaluate'.

Reported-by: Alex Bennée <alex.bennee@linaro.org>
http://lists.gnu.org/archive/html/emacs-orgmode/2017-09/msg00167.html
2017-09-07 17:43:32 +02:00
Nicolas Goaziou 9c5d03ca3b Merge branch 'maint' 2017-09-07 15:55:20 +02:00
Nicolas Goaziou 22e916fb36 org-agenda: Remove duplicate files when building a search view
* lisp/org-agenda.el (org-search-view): Remove duplicate files when
  building a search view.

Reported-by: Samuel Wales <samologist@gmail.com>
<http://lists.gnu.org/archive/html/emacs-orgmode/2017-09/msg00112.html>
2017-09-07 15:53:49 +02:00
Nicolas Goaziou 706932bec3 Restriction lock means no extra files in agenda search view
* lisp/org-agenda.el (org-search-view): Restriction lock means no
  extra files in agenda search view.

Reported-by: Samuel Wales <samologist@gmail.com>
<http://lists.gnu.org/archive/html/emacs-orgmode/2017-09/msg00112.html>
2017-09-07 15:51:30 +02:00
Nicolas Goaziou 19d039abd3 Merge branch 'maint' 2017-09-07 15:29:03 +02:00
Nicolas Goaziou d50170b208 Tolerate editing an export block without type
* lisp/org-src.el (org-edit-export-block): Tolerate editing an export
  block without type.
2017-09-07 15:27:55 +02:00
Nicolas Goaziou 11979e298d org-archive: Fix failing tests
* testing/lisp/test-org-archive.el (test-org-element/archive-update-status-cookie):
Fix failing tests.
2017-09-07 15:25:00 +02:00
Nicolas Goaziou 6cfc7cb958 Merge branch 'maint' 2017-09-07 15:21:35 +02:00
Nicolas Goaziou 91a76063d8 org-duration: Fix `org-duration-to-minutes' with the empty string
* lisp/org-duration.el (org-duration-to-minutes): Accept the empty
  string.

* testing/lisp/test-org-duration.el (test-org-duration/to-minutes):
  Add test.

For backward compatibility with `org-duration-string-to-minutes'
accept the empty string as a duration.
2017-09-07 15:20:26 +02:00
Nicolas Goaziou 85ba4912a0 org.texi: Fix last commit
* doc/org.texi (Column width and alignment): Fix keybinding and
  function syntax.
2017-09-07 14:40:06 +02:00
Nicolas Goaziou ad1c0faa7e Merge branch 'maint' 2017-09-07 14:38:23 +02:00
Nicolas Goaziou f1a1cad93a ORG-NEWS: Add incompatible change about `org-split-string' 2017-09-07 14:37:49 +02:00
Nicolas Goaziou ea4e3dac6d Use `split-string' instead of `org-split-string'
* contrib/lisp/org-depend.el (org-depend-trigger-todo):
(org-depend-block-todo):
* contrib/lisp/ox-bibtex.el (org-bibtex-get-arguments):
* contrib/lisp/ox-koma-letter.el (org-koma-letter-template):
* contrib/lisp/ox-taskjuggler.el (org-taskjuggler--build-unique-id):
(org-taskjuggler-resolve-dependencies):
* lisp/ob-core.el (org-babel-insert-result):
* lisp/org-agenda.el (org-search-view):
* lisp/org-lint.el (org-lint-duplicate-target):
(org-lint-wrong-header-value):
* lisp/org.el (org--setup-collect-keywords):
(org-make-org-heading-search-string):
(org-search-radio-target):
(org-local-logging):
(org-entry-add-to-multivalued-property):
(org-entry-remove-from-multivalued-property):
(org-entry-member-in-multivalued-property):
(org-entry-get-multivalued-property):
(org-entry-put-multivalued-property):
(org-wrap):
* lisp/ox-beamer.el (org-beamer-allowed-property-values):
* lisp/ox.el (org-export--get-subtree-options):
(org-export--get-inbuffer-options): Use `split-string' instead of
`org-split-string'.
2017-09-07 14:36:50 +02:00
Marco Wahl d41c256ea2 org.texi: Hint to "C-h ." to see hidden cell value 2017-09-07 11:44:25 +02:00
Nicolas Goaziou d1e03f59b8 org-agenda: Silence byte-compiler 2017-09-06 15:39:32 +02:00
Nicolas Goaziou 70d2b3c96f org-table: Obey <c> cookie when aligning a table
* lisp/org-table.el (org-table--align-field): New function.
(org-table-align): Use new function.  Refactor code.
(org-table-justify-field-maybe): Use new function.
(org-table-get-remote-range): Remove duplicate bindings.

* doc/org.texi (Column width and alignment): Remove footnote.

* testing/lisp/test-org-table.el (test-org-table/align): New test.
2017-09-06 15:21:20 +02:00
Nicolas Goaziou 6e5598dc31 Document new column display
* doc/org.texi (Column width and alignment): Document new column
  display.
2017-09-06 15:21:20 +02:00
Nicolas Goaziou 8374e6f438 org-table: Implement org-table-expand
* lisp/org-table.el (org-table-expand): New function.
(org-table--expand-all-columns): Remove function.
(org-table-with-shrunk-columns):
(org-table-insert-column):
(org-table-delete-column):
(org-table-move-column):
(org-table-toggle-column-width): Use new function.
2017-09-06 15:18:37 +02:00
Nicolas Goaziou 882f3f3fc0 org-table: Change behavior of `org-table-toggle-column-width'
* lisp/org-table.el (org-table-toggle-column-width): Change behavior
  of `org-table-toggle-column-width'.
(org-table-shrink): Allow optional arguments.

* testing/lisp/test-org-table.el (test-org-table/toggle-column-width):
  Update tests.
2017-09-06 15:18:37 +02:00
Nicolas Goaziou 73bf9b8887 org-table: Allow to shrink tables upon opening a document
* lisp/org-table.el (org-table-shrink): New function.
* lisp/org.el (org-startup-align-all-tables): Update docstring.
(org-startup-shrink-all-tables): New variable.
(org-mode): Use new function and new variable.
2017-09-06 15:18:37 +02:00
Nicolas Goaziou 23a2fde6fe Remove visual effect of width cookies in tables
* lisp/org-colview.el (org-dblock-write:columnview): Remove :width
  parameter.

* lisp/org-table.el (org-narrow-column-arrow): Remove variable.
(org-table-cleanup-narrow-column-properties): Remove function.
(org-table-align): Ignore width cookies when aligning table.
(org-table-justify-field-maybe):
(org-table-finish-edit-field):
(org-table-follow-fields-with-editor):
(orgtbl-setup): Remove reference to `org-cwidth' property.

* lisp/org.el (org-mode):
(org-hide-wide-columns): Remove function.
(org-set-font-lock-defaults): Apply previous removal.
(org-shorten-string): Ignore `org-cwidth' property.

* testing/lisp/test-org-colview.el (test-org-colview/dblock): Remove
  a test.

Export back-ends may still use width cookie to alter table's output.
2017-09-06 15:18:37 +02:00
Nicolas Goaziou 6d6a30d4cd org-table: Implement shrunk columns
* lisp/org-table.el (org-table-shrunk-column-indicator): New variable.
(org-table-with-shrunk-columns): New macro.
(org-table--shrunk-field):
(org-table--list-shrunk-columns):
(org-table--shrink-field):
(org-table--read-column-selection):
(org-table--expand-all-columns):
(org-table-toggle-column-width): New functions.

(org-table-align):
(org-table-get-field):
(org-table-insert-column):
(org-table-delete-column):
(org-table-move-column):
(org-table-move-row):
(org-table-insert-row):
(org-table-insert-hline):
(org-table-kill-row):
(org-table-sort-lines): Use new functions.

(org-table-overlay-coordinates):
(org-table-toggle-coordinate-overlays): Tiny refactoring.

* testing/lisp/test-org-table.el (test-org-table/toggle-column-width):
(test-org-table/shrunk-columns): New tests.
2017-09-06 15:18:37 +02:00
Jay Kamat 331ba68495 org-archive.el: Update statistic cookies when archiving
* lisp/org-archive.el (org-archive-subtree): Update todo statistics
  when calling `org-archive-subtree'.
(org-archive-to-archive-sibling): Update cookie statistics when
calling `org-archive-to-archive-sibling'.

* testing/lisp/test-org-archive.el: New file.

This can be disabled by setting `org-provide-todo-statistics' to nil.
2017-09-06 14:31:01 +02:00
Nicolas Goaziou 6dfcb98f13 Fix ORG-NEWS 2017-09-06 13:22:13 +02:00
Nicolas Goaziou 7d08ff06bd Merge branch 'maint' 2017-09-06 13:19:37 +02:00
Eduardo Bellani 6edec1bef5 Fix table variable with commas in ob-sqlite
* lisp/ob-sqlite.el (org-babel-sqlite-expand-vars): Stop interfering
  with the 'orgtbl-to-csv' default formatting.

* testing/lisp/test-ob-sqlite.el: New file.

The problem here was that ob-sqlite was providing a format to the
`orgtbl-to-csv' that actually overwrote the default format in that
function, and in the case where there were commas in the content of
the table, broke the table as argument mechanism.

TINYCHANGE
2017-09-06 13:18:30 +02:00
Adam Porter fccfe56659 org-agenda: Minor refactoring and tiny bug fix
* lisp/org-agenda.el (org-agenda--insert-overriding-header): Use
propertize instead of org-add-props.
(org-agenda-list): Replace nested if with cond.
(org-todo-list): Replace mapc-lambda with dolist.
(org-todo-list): Fix bug by using window-width instead of frame-width.
2017-09-06 13:14:03 +02:00
Adam Porter b6c5a174da org-agenda: Refactor org-agenda-overriding-header code
* lisp/org-agenda.el (org-agenda--insert-overriding-header): Add macro.
(org-agenda-list)
(org-search-view)
(org-todo-list)
(org-tags-view): Use macro.
(org-agenda-overriding-header): Update docstring.

* etc/ORG-NEWS: Explain that header can be disabled with empty string.

Replace org-agenda-overriding-header tests in these four functions with
calls to a macro, eliminating the duplicate code.  Also, disable the
header when the variable is set to the empty string.
2017-09-06 13:13:59 +02:00
Nicolas Goaziou 601b8e1d52 Fix org-duration-to-minutes call on ox-taskjuggler
* contrib/lisp/ox-taskjuggler.el (org-taskjuggler--build-task): Fix
  typo.

TINYCHANGE
2017-09-05 23:54:29 +02:00
Nicolas Goaziou 845138473e Merge branch 'maint' 2017-09-05 22:34:38 +02:00