Commit Graph

16574 Commits

Author SHA1 Message Date
Kyle Meyer e975eac4ce org.el (org-adapt-indentation): Fix typo
* lisp/org.el (org-adapt-indentation): Fix typo in docstring.
2014-11-02 09:20:24 +01:00
Nicolas Goaziou 82de7dafa3 Fix "Symbol nil may not be buffer-local" error
* lisp/org.el (org-set-regexps-and-options): Fix "Symbol nil may not
  be buffer-local" error when encountering an nonexistent startup
  keyword.

Reported-by: Mike McLean <mike.mclean@pobox.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/92279>
2014-11-01 12:07:14 +01:00
Nicolas Goaziou 17d014ec65 Fix infloop with multiple tags
* lisp/org.el (org--setup-collect-keywords): Fix infloop when parsing
  multiple tags.

Reported-by: Kyle Meyer <kyle@kyleam.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/92245>
2014-11-01 11:53:46 +01:00
Kyle Meyer aa1fd698ec org.texi: Remove reference to deleted command
* doc/org.texi (Inserting deadlines or schedules): Remove entry for
`org-mark-entry-for-agenda-action', which was deleted in commit f95e5ff.
2014-10-30 16:44:57 +01:00
Nicolas Goaziou d85ce34fc5 Fix missing syntax highlighting with #+SETUPFILE
* lisp/org.el (org--setup-collect-keywords): Fix wrong argument
  order.  Avoid needless recursion.

Reported-by: Kyle Meyer <kyle@kyleam.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/92208>
2014-10-30 16:30:43 +01:00
Nicolas Goaziou 1b92b8b8fe ox-latex: Add missing defcustom keywords
* lisp/ox-latex.el (org-latex-caption-above): Add missing keywords.
2014-10-29 22:18:00 +01:00
Nicolas Goaziou fcd4adf9cd org.texi: Update LaTeX environment syntax
* doc/org.texi (@LaTeX{} fragments): Update environments syntax.
2014-10-29 18:14:08 +01:00
Nicolas Goaziou 86ec0ac998 Fix ccde27d
* doc/org.texi (Special symbols): Fix
  ccde27ddc0.
2014-10-29 17:49:21 +01:00
rasmus ccde27ddc0 org.texi: Minor correction.
* org.texi (Special symbols): Correct output of fragment export.
2014-10-29 14:12:43 +01:00
Nicolas Goaziou e4bc5645ce Fix 8daf4a8
* lisp/org.el (org-format-latex): Fix regexp.
2014-10-29 11:57:42 +01:00
Nicolas Goaziou 8daf4a89f1 Fix preview latex
* lisp/org.el (org-toggle-latex-fragment): Fix previewing nested
  environments.
(org-format-latex): Change signature.  Rewrite using Elements.

* lisp/ox-html (org-html-format-latex):
* lisp/ox-odt (org-odt--translate-latex-fragments): Apply signature
  change.

Reported-by: Andreas Leha <andreas.leha@med.uni-goettingen.de>

<http://permalink.gmane.org/gmane.emacs.orgmode/92142>
2014-10-28 23:55:01 +01:00
Nicolas Goaziou b8d8078368 Refactor logging code
* lisp/org.el (org-log-beginning): New function.
(org-ts-regexp-inactive): New variable.
(org-add-log-setup): Use new function.
(org-skip-over-state-notes): Make function more robust to
customization.
(org-store-log-note): Update function according to previous changes.
Small refactoring.
2014-10-28 14:23:53 +01:00
Nicolas Goaziou 95c2c7f38c Update custom properties handling
* lisp/org.el (org-toggle-custom-properties-visibility): Improve
correctness and speed.

* testing/lisp/test-org.el (test-org/custom-properties): New test.
2014-10-28 14:23:53 +01:00
Nicolas Goaziou 0374533827 Fix multiple TODO keywords
* lisp/org.el (org--setup-collect-keywords): Correctly collect
  multiple TODO lines.
* testing/lisp/test-org.el (test-org/set-regexps-and-options): Add
test.

Thanks to Eric Abrahamsen for reporting it.
2014-10-28 14:23:53 +01:00
Nicolas Goaziou 705a2cdeab Fix property drawer insertion with consecutive headlines
* lisp/org.el (org-get-property-block): Fix property drawer insertion
  with consecutive headlines
* testing/lisp/test-org.el (test-org/entry-put): Add test.

Thanks to Eric Abrahamsen for reporting it.
2014-10-28 14:23:53 +01:00
Nicolas Goaziou 1aad53bd39 ORG-NEWS: Document property drawers syntax change 2014-10-28 14:23:52 +01:00
Nicolas Goaziou 4af0f94665 Document new properties drawers syntax
* doc/org.texi (Per-file keywords): Remove wrong limitation.
(Tracking your habits): Make sure state changes appear after the
properties drawer.
(Property syntax): Specify new syntax.
(Using the property API): Fix a function definition.
2014-10-28 14:23:52 +01:00
Nicolas Goaziou 9bb191e447 Add test for setup keywords initialization
* testing/lisp/test-org.el (test-org/set-regexps-and-options): New test.

* testing/examples/setupfile.org: Add a keyword for testing.
2014-10-28 14:23:52 +01:00
Nicolas Goaziou 61a241f0dc Rewrite setup keywords initialization
* lisp/org-table.el (org-table-set-constants): Remove function.
* lisp/org.el (org-set-regexps-and-options): Rewrite function.  Merge
  it with `org-set-regexps-and-options-for-tags'.
(org-set-regexps-and-options-for-tags): Remove function
(org--setup-collect-keywords, org--setup-process-tags): New functions.
(org-mode): Remove `org-set-regexps-and-options-for-tags' call.
(org-agenda-prepare-buffers): Use optimized setup for tags in all
cases.  Improve docstring.
(org-make-options-regexp): Make returned regexp more efficient.
2014-10-28 14:23:52 +01:00
Nicolas Goaziou 0b74864bfb org-table: Do not look after CONSTANTS in Orgtbl mode
* lisp/org-table.el (orgtbl-ctrl-c-ctrl-c): Do not set constants.

Orgtbl provides limited support for Org tables in an arbitrary major
mode.  Any Org syntax outside tables, including keywords, cannot be
supported in this environment.  Therefore there is no point to look
for CONSTANTS keywords.  Moreover, constants can be defined within the
table.

This change allows to move `org-table-set-constants' feature to
`org-set-regexps-and-options' and treat CONSTANTS keyword like any
other keyword (e.g., defining it in a SETUPFILE).
2014-10-28 14:23:52 +01:00
Nicolas Goaziou fd87746836 Turn buffer local syntax variables into constants
* lisp/org.el (org-ds-keyword-length, org-deadline-regexp,
  org-deadline-time-regexp, org-deadline-time-hour-regexp,
  org-deadline-line-regexp, org-scheduled-regexp,
  org-scheduled-time-regexp, org-scheduled-time-hour-regexp,
  org-closed-time-regexp, org-keyword-time-regexp,
  org-keyword-time-not-clock-regexp, org-maybe-keyword-time-regexp,
  org-all-time-keywords): Turn into a defconst, no longer
  buffer-local.
(org-set-regexps-and-options): No need to set anymore previous
variables.
2014-10-28 14:23:52 +01:00
Nicolas Goaziou 1c34ec85b0 ox: Update INCLUDE keywords wrt property drawers
* lisp/ox.el (org-export--inclusion-absolute-lines): Fix comment.
(org-export--prepare-file-contents):  Do not look for property drawers
after a drawer, since this is impossible.

* testing/examples/include.org: Fix test data.
2014-10-28 14:23:52 +01:00
Nicolas Goaziou 1ff01cc07a Small refactoring
* lisp/org.el (org-add-planning-info): Small refactoring.
2014-10-28 14:23:51 +01:00
Nicolas Goaziou ed825d738b Insert logs after planning info and property drawer
* lisp/org.el (org-add-log-setup): Set `org-log-note-marker' after
  planning info and property drawer.
2014-10-28 14:23:51 +01:00
Nicolas Goaziou 52b63aed04 org-clock: Insert clocks after meta data
* lisp/org-clock.el (org-clock-find-position): Make sure clocks, and
  possibly drawer containing them, are inserted after planning info
  and any property drawer.
2014-10-28 14:23:51 +01:00
Nicolas Goaziou 474fb12911 Add tests for property API
* testing/lisp/test-org.el (test-org/entry-put, test-org/entry-get,
  test-org/entry-delete, test-org/buffer-property-keys,
  test-org/property-values, test-org/insert-property-drawer): New
  tests.
2014-10-28 14:23:51 +01:00
Nicolas Goaziou 8d8ad98382 Rewrite `org-entry-properties'
* lisp/org.el (org-special-properties): Remove "CLOCK" as a special
  keyword.
(org-entry-properties): Rewrite function according to property drawer
syntax.  Change signature.
(org-entry-get): Apply signature change.

"CLOCK" removal is motivated by the fact that it isn't listed as
a special keyword in the manual, it is not used throughout the code
base, and there is no meaningful value for this property.
2014-10-28 14:23:51 +01:00
Nicolas Goaziou 622619334a Update property API
* lisp/org.el (org-entry-put): Refactor code, taking into account
  changes to property drawer syntax.  Fix errors when handling special
  values, which cannot be symbols.  Remove CLOCKSUM handling.
(org-entry-get): Refactor code.
(org-entry-delete): Small refactoring, do not rely on
`org-remove-empty-drawer-at' since parser is not necessary here.
(org-buffer-property-keys): Fix infloop.  Ignore final "+" in extended
properties.  Refactor code.
(org-property-values): Include extended values.
(org-entry-get-with-inheritance, org-insert-property-drawer): Small
refactoring.
(org-insert-drawer): Fix docstring and comments.
(org--update-property-plist): Renamed from org-update-property-plist.
Use side effects.  Improve speed.

CLOCKSUM special property in `org-entry-put' is buggy (symbols instead
of strings) and ignores provided value.  Since the expected behaviour
is neither clear nor documented, the property is not handled anymore
by the function.
2014-10-28 14:23:51 +01:00
Nicolas Goaziou 57d8b68d95 Update `org-get-property-block'
* lisp/org.el (org-at-property-p): Rewrite.  Don't use `org-element-at-point'.  It
is faster to retrieve the property drawer location instead.
(org-get-property-block): Update function and docstring.  Change
  signature.
(org-entry-properties, org-entry-put, org-buffer-property-keys): Apply
signature change.
2014-10-28 14:23:51 +01:00
Nicolas Goaziou ae35b8c4ad org-element: Update property drawers parsing
* lisp/org-element.el (org-element--get-node-properties,
  org-element--get-time-properties): New functions.
(org-element-headline-parser, org-element-inlinetask-parser): Use new
functions.
(org-element-property-drawer-parser): Change signature.  Simplify
parsing.
drawer.
(org-element--current-element, org-element--next-mode): Property
drawers are located right after a headline or a planning element.

* testing/lisp/test-org-element.el (test-org-element/drawer-parser,
  test-org-element/node-property,
  test-org-element/property-drawer-interpreter): Update tests.
(test-org-element/property-drawer-parser): Add tests.
* testing/lisp/test-org.el (test-org/indent-line,
  test-org/indent-region, test-org/forward-paragraph,
  test-org/backward-paragraph): Update tests.
2014-10-28 14:23:51 +01:00
Nicolas Goaziou 824faa7255 Update property drawer and node property regexps
* lisp/org.el (org-property-drawer-re, org-property-re): Update
  regexp.
2014-10-28 14:23:50 +01:00
Oleh Krehel f70439f190 ob-clojure.el: Fix compatibility issue
* lisp/ob-clojure.el (org-babel-execute:clojure): Fix compatibility
    issue with cider >0.7.0.
2014-10-27 15:26:47 +01:00
Nicolas Goaziou ca31d59f24 Fix Flyspell check in row separators and empty verse blocks
* lisp/org.el (org--flyspell-object-check-p): New function.
(org-mode-flyspell-verify): Check that table row or verse block under
point is not empty.  Use previous function.
2014-10-26 16:54:01 +01:00
Rasmus 58bb3a21f8 ox-html: Fix bug in c9ca0b6d.
* ox-html.el (org-html-inlinetask): Fix bug.
2014-10-26 02:50:14 +02:00
Nicolas Goaziou 926553c608 ox-latex: Change default value for `org-latex-caption-above'
* lisp/ox-latex.el (org-latex-caption-above): Change default value.

`org-latex-table-caption-above' is removed completely since default
value do not match anymore.

See <http://permalink.gmane.org/gmane.emacs.orgmode/91363>.
2014-10-25 00:10:02 +02:00
Nicolas Goaziou d849804ac7 ox: Remove unnecessary code comments 2014-10-24 21:13:47 +02:00
Nicolas Goaziou 7f97406542 Bump Emacs version
* lisp/ob-core.el (org-babel-examplize-region):
* lisp/ob-exp.el (org-babel-exp-inline-code-template):
* lisp/org-table.el (org-table-copy-increment):
(org-table-formula-create-columns):
* lisp/org.el (org-agenda-ignore-drawer-properties):
(org-agenda-ignore-properties):
* lisp/ox-ascii.el (org-ascii-list-margin):
* lisp/ox-html.el (org-html-format-headline-function):
(org-html-format-inlinetask-function):
* lisp/ox-latex.el (org-latex-hyperref-template):
(org-latex-custom-id-as-label):
(org-latex-format-inlinetask-function):
(org-latex-known-warnings):
* lisp/ox-odt.el (org-odt-format-headline-function):
(org-odt-format-inlinetask-function):
* lisp/ox-texinfo.el (org-texinfo-format-headline-function): Bump
  Emacs version.
2014-10-24 11:56:09 +02:00
Achim Gratz 7429f35efe Merge branch 'maint' 2014-10-22 21:10:18 +02:00
rasmus 70b336c752 ORG-NEWS: Document new options 2014-10-22 20:30:49 +02:00
Marco Wahl 8b63dc9503 org.el: Fix bindings of < and > for calendar scrolling
* lisp/org.el (org-read-date-minibuffer-local-map): Switch to the
  current calendar API for scrolling the calendar.
2014-10-20 21:47:42 +02:00
Yann Hodique d4cce42123 org.el: Use normalized names in org-agenda-file-p
* lisp/org.el (org-agenda-file-p): Make sure all filenames are
normalized before performing comparison.
2014-10-20 15:36:17 +02:00
Marco Wahl 25d50e1d3c contrib/lisp/org-velocity: Fix failure for big window
* contrib/lisp/org-velocity.el (org-velocity-incremental-read): Reversed
  the estimation against window-height.
2014-10-20 15:32:45 +02:00
Bastien Guerry eb973f90a9 org-clock.el (org-clock-select-task): Kill temporary buffer
* org-clock.el (org-clock-select-task): Kill temporary buffer.

Thanks to Marcin Borkowski for this idea.
2014-10-20 15:27:46 +02:00
Rafael Laboissiere 63afc9b20d org.texi: Remove extraneous backslash in key sequence
* doc/org.texi (ASCII bar plots): Remove the backslash character in
the key binding sequence for orgtbl-ascii-plot command.

I think that this backslash is not needed, since previously in the
same section, at subheading "Graphical plots using Gnuplot", there is
a similar key sequence without backslash @kbd{C-c " g}.

TINYCHANGE
2014-10-20 11:25:31 +02:00
Nicolas Goaziou c27d86d6f1 ox-latex: Possibly make a matrix out of tabular environment
* lisp/ox-latex.el (org-latex--math-table): Properly create matrix if
  "tabular" environment is used.  Make sure cells are centered instead
  of applying usual alignment rules.
2014-10-18 10:16:04 +02:00
Nicolas Goaziou 79789e47aa ox-latex: Tiny fix to latex-matrices pseudo-elements
* lisp/ox-latex.el (org-latex--wrap-latex-matrices): Make sure
  contiguous element is also an Org table.
2014-10-18 10:15:29 +02:00
Nicolas Goaziou 3bb75bc14c ox-latex: Add `org-latex-caption-above'
* lisp/ox-latex.el (org-latex-caption-above): New variable.
(org-latex-table-caption-above): Remove variable.  Make it an obsolete
alias of the previous one.
(org-latex--caption-above-p): New function.
(org-latex--inline-image, org-latex-src-block,
org-latex-special-block, org-latex table): Handle new variable.

* doc/org.texi (Publishing options):
* etc/ORG-NEWS: Document new option.
2014-10-17 21:42:17 +02:00
Nicolas Goaziou 33719e2ef9 ox-latex: Refactor matrices code
* lisp/ox-latex.el (latex): Introduce a dedicated pseudo-element:
  `latex-matrices'.
  (org-latex--wrap-latex-matrices, org-latex-matrices,
  org-latex-matrices-tree-filter): New functions.
  (org-latex--math-table): Delegate environment wrapping to new
  pseudo-element translator.
2014-10-17 21:33:25 +02:00
Nicolas Goaziou 632395ba71 ORG-NEWS: Document new hook and new defcustom 2014-10-17 00:26:51 +02:00
Kyle Meyer 70e0b08e66 org-clock: Fix CLOCK_INTO_DRAWER property check
* lisp/org-clock.el (org-clock-into-drawer): Fix processing of
properties so that they can override global value.

Previously, if the 'CLOCK_INTO_DRAWER' or 'LOG_INTO_DRAWER' property was
nil, the local property setting would not override the global
variable [1]. These changes make the behavior match the docstring
description ('CLOCK_INTO_DRAWER' and 'LOG_INTO_DRAWER' properties
override `org-clock-into-drawer', with 'CLOCK_INTO_DRAWER' given
precedence).

[1] http://stackoverflow.com/questions/26405415/how-to-locally-unset-org-clock-into-drawer-t

TINYCHANGE
2014-10-17 00:09:32 +02:00