Commit Graph

11390 Commits

Author SHA1 Message Date
Marco Wahl 6ba251d473 Fix two typos
* lisp/org.el: Fix in documentation of variable
  org-outline-path-complete-in-steps.
2015-05-20 11:16:14 +02:00
Bastien 7e5249c9fd Merge branch 'maint'
Conflicts:
	lisp/org-list.el
2015-05-20 08:00:54 +02:00
Stefan Monnier 42228a99ca lisp/org-{macs, list}.el: Fix lexical warnings
* lisp/org-{macs,list}.el: Fix lexical warnings

    * lisp/org-list.el (org-list-struct): Remove unused var `ind'.
    (org-list-get-next-item, org-list-get-prev-item)
    (org-list-get-children): Mark unused arg `struct'.
    (org-list-use-alpha-bul-p): Remove unused var `bul'.
    (org-toggle-checkbox): Mark unused var.
    (org-update-checkbox-count): Remove unused var `box-num'.
    (org-adapt-indentation): Declare.
    (org-list-parse-list): Declare var instead of adding a dummy duplicate.
    (org-list-send-list): Remove unused var `txt'.
    (org-list-to-latex, org-list-to-texinfo): Mark unused arg `params'.
    (org-list-to-subtree): Add prefix to dyn-bind var, and declare them.

    * lisp/org-macs.el: Use `declare'.
    (org-with-limited-levels): Declare dyn-bound vars.
2015-05-20 07:57:20 +02:00
Nicolas Goaziou c8bfd52f5f ob-R: Allow more :results values
* lisp/ob-R.el (org-babel-header-args:R): Allow "drawer" and "none",
  since they are supported in `org-babel-common-header-args-w-values'.

Reported-by: Andreas Leha <andreas.leha@med.uni-goettingen.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/97683>
2015-05-19 23:22:11 +02:00
Nicolas Goaziou de8302c65a Fix `org-next-block'
* lisp/org.el (org-next-block): Preserve match data, as specified in
  the docstring.

Reported-by: Andreas Leha <andreas.leha@med.uni-goettingen.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/97707>
2015-05-19 23:12:17 +02:00
Nicolas Goaziou ed74e5bb9b ob-core: Allow never-export as :eval value
* lisp/ob-core.el (org-babel-common-header-args-w-values): Allow
  "never-export" as :eval value.
2015-05-19 15:38:08 +02:00
Nicolas Goaziou f7173d551d org-inlinetask: Fix visibility toggling
* lisp/org-inlinetask.el (org-inlinetask-toggle-visibility): Fix
  visibility toggling when starting with a link.

Reported-by: Anders Johansson <mejlaandersj@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/97603>
2015-05-17 19:22:12 +02:00
Erik Hetzner 6d88ee5ff0 org-attach.el: Fix check for git annex
* lisp/org-attach.el (org-attach-commit): Check for .git/annex dir in
addition to annex dir in root git dir to ensure that git annex is used

TINYCHANGE
2015-05-17 10:20:58 +02:00
Rasmus 00dc3b1b72 ox-html: Less generic names for table aligns.
* ox-html.el (org-html-style-default):
  (org-html-table-cell, org-html-table): Prefix left, right, center classes.
* test-org-table.el (test-org-table/to-html): Change classes.

Reported-by: Matt Price <moptop99@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/97431>
2015-05-15 13:17:10 +02:00
Nicolas Goaziou fe0f30e022 org-element: Tiny refactoring
* lisp/org-element.el (org-element-link-parser): Use `string-to-char'
  instead of (aref STRING 0).
2015-05-13 12:37:53 +02:00
Nicolas Goaziou 0e7062678e Improve docstrings
* lisp/org.el (org-metaleft):
(org-metaright): Improve docstrings.

Suggested-by: Alain Cochard <Alain.Cochard@unistra.fr>
<http://permalink.gmane.org/gmane.emacs.orgmode/97509>
2015-05-13 12:35:24 +02:00
Nicolas Goaziou d0fab8bb6f ox: Tiny refactoring
* lisp/ox.el (org-export-resolve-fuzzy-link): Use `string-to-char'
  instead of (aref STRING 0).
2015-05-11 01:33:24 +02:00
Nicolas Goaziou f653495419 ox: Tiny refactoring
* lisp/ox.el (org-export-expand-include-keyword):
(org-export--prepare-file-contents):
(org-export-with-backend): Wrap line of code within 80 columns.
(org-export--inclusion-absolute-lines): Remove unecessary `format'
call for error message.
2015-05-11 01:30:45 +02:00
Nicolas Goaziou c0dec9a8bc org-table: Fix durations extracted from node properties
* lisp/org-table.el (org-table-formula-substitute-names): Convert
  durations when needed.  Refactor code.

* testing/lisp/test-org-table.el (test-org-table/duration): New test.

Reported-by: Daniele Pizzolli <dan@toel.it>
<http://permalink.gmane.org/gmane.emacs.orgmode/97252>
2015-05-11 01:20:37 +02:00
Nicolas Goaziou fa5f8c8f90 Allow optional argument to {{{property}}} for remote entries
* lisp/org-macro.el (org-macro-initialize-templates): "property"
  template accepts an optional argument, as a search option to grab
  properties from other headlines.

* doc/org.texi (Macro replacement): Document new feature.  Improve
  documentation.
(An example): Update documentation.

* testing/lisp/test-org-macro.el (test-org/macro-replace-all): Add
  tests.
2015-05-10 11:48:13 +02:00
Nicolas Goaziou ecc8b9f3db org-macro: Fix incomplete docstring
* lisp/org-macro.el (org-macro-replace-all): Document missing KEYWORDS
  optional argument.
2015-05-10 10:05:46 +02:00
Titus von der Malsburg 6779f8f424 Fix detection of latex fragments
* org-element.el (org-element-latex-fragment-parser):
* org.el (org-latex-regexps): Fix the detection of latex
  fragments.  Uses syntax tables to detect whitespaces and punctuation
  marks following the final $ sign.

In order to qualify as a math delimiter, the final $ sign of a LaTeX
fragment has to be followed by a whitespace or punctuation mark but the
regexp used in the previous code matched only a small number of
punctuation marks and therefore missed some latex fragments.
2015-05-09 09:36:53 +02:00
Nicolas Goaziou b27e630bab org-capture: Fix "org-find-olp: Wrong type argument: stringp, nil"
* lisp/org-capture.el (org-capture-expand-file): Empyt string defaults
  to `org-default-notes-file'.
* lisp/org.el (org-default-notes-file): Do not fallback on
`remember-data-file' since "org-capture.el" is not based off
"remember.el" anymore.

Reported-by: Florian Lindner <mailinglists@xgm.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/97448>
2015-05-08 11:32:35 +02:00
Nicolas Goaziou 6ac8db9dba Fix TBLFM line handling
* lisp/org-table.el (org-table-TBLFM-begin-regexp): Take into
  consideration that table lines are not required to end with "|".
(org-table-calc-current-TBLFM): Properly clean markers at the end of
the process.
(org-table-TBLFM-begin): Small refactoring.
* lisp/org.el (org-at-TBLFM-p): Prevent false positives.

Suggested-by: Oleg Sivokon <olegsivokon@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/97461>
2015-05-08 10:46:07 +02:00
Nicolas Goaziou 4980a9dbb8 Fix indentation in empty items
* lisp/org.el (org--get-expected-indentation): Fix indentation on
  in empty items.
* testing/lisp/test-org.el (test-org/indent-line): Add test.

Reported-by: Leo Ufimtsev <lufimtse@redhat.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/97454>
2015-05-08 10:08:11 +02:00
Nicolas Goaziou 7af8ce6cb3 org-element: Fix parsing bug in items
* lisp/org-element.el (org-element-item-parser): When contents are
  empty, do not find a zero-width paragraph within.
2015-05-07 23:45:41 +02:00
Nicolas Goaziou a35c4332f2 ox-publish: Allow external references outside of publishing
* lisp/ox-publish.el (org-publish-resolve-external-link): Warn instead
  of throwing an error when a reference to a non-published external
  file is encountered.
2015-05-07 22:15:00 +02:00
Nicolas Goaziou 9aa69058bc org-list: Preserve newline characters when changing description lists
* lisp/org-list.el (org-list-to-generic): Preserve newline characters
  after description in description lists.

Reported-by: Leo Ufimtsev <lufimtse@redhat.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/97432>
2015-05-07 01:16:32 +02:00
Nicolas Goaziou e42c161109 ox-publish: Throw an error for external reference outside of publish
* lisp/ox-publish.el (org-publish-resolve-external-link): Throw an
  error when trying to resolve an external reference while not in
  a publishing process.

Reported-by: Rainer M Krug <Rainer@krugs.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/97420>
2015-05-07 00:57:22 +02:00
Nicolas Goaziou 29e33ae2af ox-publish: Fix space matching in external fuzzy links
* lisp/ox-publish.el (org-publish--collect-references):
(org-publish-resolve-external-link): Treat consecutive blank
characters as a single space, not 0.
2015-05-07 00:48:36 +02:00
Nicolas Goaziou c76006a42c org-footnote: Make `org-footnote-create-definition' non-interactive
* lisp/org-footnote.el (org-footnote-create-definition): Remove
  `interactive' status.  Allow to insert definitions outside of
  narrowed part of buffer.  Preserve position.  Return beginning
  position of created definition.
(org-footnote-new):
(org-footnote-action): Apply changes above.
2015-05-06 23:47:16 +02:00
Nicolas Goaziou 360c4633e2 org-footnote: Rename `org-footnote-goto-local-insertion-point'
* lisp/org-footnote.el (org-footnote--goto-local-insertion-point):
  Renamed from `org-footnote-goto-local-insertion-point'.
(org-footnote-normalize): Use function above.  Small refactoring.

* testing/lisp/test-org-footnote.el (test-org-footnote/normalize-in-org):
  Small refactoring.
2015-05-06 23:47:13 +02:00
Nicolas Goaziou f6492d953c org-footnote: Add optional argument to `org-footnote-goto-definition'
* lisp/org-footnote.el (org-footnote-goto-definition): Add an optional
  argument in order to avoid duplicating calls to
  `org-footnote-get-definition'.  Return non-nil when move was
  successful.
2015-05-06 23:15:42 +02:00
Nicolas Goaziou 8f394624b8 org-footnote: Fix type error when creating a new footnote
* lisp/org-footnote.el (org-footnote-get-definition): Fix type error
  when creating a new footnote.

When footnote definition is new, contents are nil.
2015-05-04 09:38:32 +02:00
Nicolas Goaziou c8e3873a5e org-footnote: Offer to widen buffer when trying to move to a definiton
* lisp/org-footnote.el (org-footnote-action): Offer to widen buffer if
  definition is outside of narrow part of buffer.
2015-05-02 16:45:54 +02:00
Nicolas Goaziou 5b49f18941 org-footnote: Fix `org-footnote-get-definition'
* lisp/org-footnote.el (org-footnote-get-definition): Footnotes
  definitions are global, so ignore narrowing right from the start.
  Also skip false positives.
2015-05-02 16:45:54 +02:00
Nicolas Goaziou 9e52d2ed01 org-src: Allow to edit inline footnote references
* lisp/org-src.el (org-src--edit-element): Do not rely on :value to
  extract contents.  Small refactoring.
(org-src--contents-area): Renamed from
  `org-src--element-contents-area'.  Throw an error on unknown
  elements.
(org-src--on-datum-p): Rename from `org-src--on-element-p'.  Handle
objects.
(org-edit-export-block, org-edit-src-code,
org-edit-fixed-width-region, org-edit-table.el): Apply renaming.
(org-edit-src-save, org-edit-src-exit): Handle inline text.
(org-edit-src-exit): Allow empty or blank code.  Handle inline text.
(org-src--edit-element): Rename an argument
(org-edit-footnote-reference): Allow to edit inline definitions.

* etc/ORG-NEWS: Document new feature.
2015-05-02 16:45:51 +02:00
Nicolas Goaziou f8d1d373fc org-src: Make area being edited read-only
* lisp/org-src.el (org-src--make-source-overlay): Add read-only
  feature to overlay.
(org-edit-src-save): Adapt to change above.
2015-05-01 21:14:19 +02:00
Nicolas Goaziou 427403d0bb org-src: Remove `org-src--type'
* lisp/org-src.el (org-src--type): Remove variable.
(org-src--contents-for-write-back): Apply removal.
(org-edit-src-code): Add indentation in post-process.
2015-05-01 18:46:33 +02:00
Nicolas Goaziou 49a656a409 ob-core: Remove `org-babel-src-name-w-name-regexp'
* lisp/ob-core.el (org-babel-get-src-block-info):
(org-babel-src-block-names): Use
`org-babel-named-src-block-regexp-for-name' instead.
2015-05-01 14:51:57 +02:00
Nicolas Goaziou cec47a635e ob-core: Change `org-babel-named-src-block-regexp-for-name' signature
* lisp/ob-core.el (org-babel-named-src-block-regexp-for-name): Allow
  to match any name.
2015-05-01 14:51:56 +02:00
Nicolas Goaziou 4aeb622336 ob-core: Use `org-next-block'
* lisp/ob-core.el (org-babel-find-named-block):
(org-babel-src-block-names): Use `org-next-block'.
2015-05-01 14:05:46 +02:00
Nicolas Goaziou a4f4343110 ob-core: Fix regexp
* lisp/ob-core.el (org-babel-named-src-block-regexp-for-name): NAME
  needs no be the last affiliated keyword.
2015-05-01 14:03:26 +02:00
Nicolas Goaziou 0b7721322a Fix `org-next-block'
* lisp/org.el (org-next-block): Use Element API.

* testing/lisp/test-org.el (test-org/next-block):
(test-org/previous-block): New tests.
2015-05-01 14:03:26 +02:00
Nicolas Goaziou bce77d0db3 org-src: Fix "not in a sub-edit buffer" error on save
* lisp/org-src.el (org-src-mode): Fix "not in a sub-edit buffer" error
  on save.

Reported-by: Detlef Steuer <detlef.steuer@gmx.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/97349>
2015-05-01 10:29:05 +02:00
Nicolas Goaziou d289eb9361 org-src: Fix docstrings
* lisp/org-src.el (org-src-mode-hook):
(org-edit-src-code): Fix docstrings.
2015-05-01 10:03:17 +02:00
Nicolas Goaziou 0046955e23 org-src: Fix docstrings
* lisp/org-src.el (org-src-mode-hook):
(org-src-mode): Fix docstring.
(org-src-mode-map): Refactor.
2015-05-01 09:49:14 +02:00
Nicolas Goaziou 2777b3fd4c org-element: Tolerate missing space after colon in keywords
* lisp/org-element.el (org-element--set-regexps):
(org-element--affiliated-re): Tolerate missing space after colon in
keywords.
2015-05-01 09:23:35 +02:00
Luke Amdor 14f5b13218 org.el: Fix use of org-open-at-point with shell and midnight cleaning
* lisp/org.el (org-open-at-point): Make sure org shell output buffer
  is a string of buffer name before appending to
  `clean-buffer-list-kill-buffer-names' for cleaning later.

TINYCHANGE
2015-04-29 23:37:18 +02:00
Nicolas Goaziou ff1b975679 Merge branch 'maint' 2015-04-29 23:32:05 +02:00
Nicolas Goaziou c763faf529 org-agenda: Fix invalid face error for priority #B
* lisp/org-agenda.el (org-agenda-fontify-priorities): Ensure face
  doesn't inherit from nil.

Reported-by: Renato <renatofdds@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/97253>
2015-04-29 23:29:36 +02:00
Nicolas Goaziou ea575950d9 org-src: Tiny fix
* lisp/org-src.el (org-src-mode): Tiny fix.
2015-04-29 13:25:34 +02:00
Nicolas Goaziou bf01f6fe66 org-src: Small fix to auto-save feature
* lisp/org-src.el (org-src-mode): Trigger auto-save even when current
  buffer is not and edit buffer.
2015-04-29 13:23:36 +02:00
Nicolas Goaziou bad0409c3b org-src: Small refactoring
* lisp/org-src.el (org-src--auto-save-timer): Renamed from
  `org-src--code-timer'.
(org-src--edit-element):
(org-src-mode): Enable auto-save features in minor mode.  Apply
variable renaming.
2015-04-29 13:16:21 +02:00
Bastien 86dcd90771 Merge branch 'maint' 2015-04-29 07:57:07 +02:00