Commit Graph

12551 Commits

Author SHA1 Message Date
Bastien Guerry 4aaf1a4df2 Don't use `org-export-html-inline-images' to set the :inline-images property
* org-exp.el (org-export-plist-vars): Don't use
`org-export-html-inline-images' to set the :inline-images
property, use distinct properties for the various backends.

* org-publish.el (org-publish-project-alist): Ditto.

* org-latex.el (org-export-latex-links): Use
:latex-inline-images instead of :inline-images.
2013-01-01 16:27:15 +01:00
Bastien Guerry 60b23bdeac Merge branch 'maint'
Conflicts:
	contrib/lisp/htmlize.el
	etc/schema/od-manifest-schema-v1.2-os.rnc
	etc/schema/od-schema-v1.2-os.rnc
	lisp/org-exp-blocks.el
2013-01-01 16:06:17 +01:00
Bastien Guerry 98cd4687a2 Update copyright years.
Happy new year!
2013-01-01 16:04:24 +01:00
Bastien Guerry bd7c2a59e8 Merge branch 'maint' 2012-12-31 15:12:16 +01:00
Bastien Guerry 841a81007d Revert "org.el (org-fontify-meta-lines-and-blocks-1): Fix fontification bug"
This reverts commit 001b6d1ebd.
2012-12-31 15:12:09 +01:00
Bastien Guerry bf537b5139 Merge branch 'maint' 2012-12-31 11:29:26 +01:00
Bastien Guerry 001b6d1ebd org.el (org-fontify-meta-lines-and-blocks-1): Fix fontification bug
* org.el (org-fontify-meta-lines-and-blocks-1): Fix
fontification bug when fontifying a keyword with no associated
value.
2012-12-31 11:29:17 +01:00
Bastien Guerry 6fd066fb18 Merge branch 'maint' 2012-12-31 11:07:06 +01:00
Bastien Guerry 61993bc4bf org.el (org-cycle-internal-local): Don't run hooks when cycling a plain list before first headline
* org.el (org-cycle-internal-local): Don't run hooks when
cycling a plain list before first headline.
2012-12-31 11:06:55 +01:00
Bastien Guerry 6a758e26ff Merge branch 'maint' 2012-12-31 09:30:19 +01:00
Bastien Guerry a62beff06d org.el (org-ctrl-c-ctrl-c): Throw a user error when trying to toggle a blocked checkbox
* org.el (org-ctrl-c-ctrl-c): Throw a user error when trying
to toggle a blocked checkbox.
2012-12-31 09:29:45 +01:00
Bastien Guerry aa80e441dc org.el (org-indent-line): Fix table formulas indenting
* org.el (org-indent-line): Fix table formulas indenting.
2012-12-31 09:29:18 +01:00
Bastien Guerry 8897a53ff4 org-agenda.el (org-agenda-open-link): Fix bug when no link is matched
* org-agenda.el (org-agenda-open-link): Fix bug when no link
is matched.  Return a message instead of an error.
2012-12-31 09:29:14 +01:00
Bastien Guerry 839c8cdd14 Merge branch 'maint' 2012-12-30 11:35:19 +01:00
Bastien Guerry e8aaca4de6 org-agenda.el (org-agenda-priority): Fix showing priority in agenda buffers
* org-agenda.el (org-agenda-priority): Remove useless
parameter and fix showing priority in agenda buffers.

Thanks to Michael Brand for reporting this.
2012-12-30 11:30:21 +01:00
Bastien Guerry 37e562460d org-e-odt.el (org-compat): Require
* org-e-odt.el (org-compat): Require.
2012-12-30 11:05:57 +01:00
Bastien Guerry d46f0e4072 org-odt.el (org-compat): Require
* org-odt.el (org-compat): Require.
2012-12-30 11:05:38 +01:00
Bastien Guerry e1c491e72d org.el (org-parse-time-string): Parse <+1w> and friends
* org.el (org-parse-time-string): Allow strings supported by
tags/properties matcher (eg <now>, <yesterday>, <-7d>).

* test-org.el (test-org/org-parse-time-string): New test.

This is based on Ilya's commit 001bcb9.  This commit was
wrong because active timestamps were not parsed correctly
anymore.  This commit handles them correctly.

Thanks to Ivan Vilata i Balaguer for pushing this forward.
2012-12-30 10:27:02 +01:00
Bastien Guerry 460c4d4ed0 Merge branch 'maint' 2012-12-30 01:21:32 +01:00
Bastien Guerry 14c3635a0d New macro `org-with-buffer-modified-unmodified'
* org-macs.el (org-with-buffer-modified-unmodified): New
macro.

* org.el (org-entry-blocked-p): Use the new macro.

Thanks to Nick Dokos for reporting this.

The macro is a copy of `with-buffer-modified-unmodified'
which (wrongly?) lives in bookmark.el.
2012-12-30 01:21:27 +01:00
Bastien Guerry b5f93f8fe3 New option `org-clock-rounding-minutes'
* org-clock.el (org-clock-rounding-minutes): New option to
round the time by N minutes in the past when clocking in or out.
(org-clock-in, org-clock-in-last, org-clock-out): Use the new
option.

* org.el (org-current-time): New optional parameter
`rounding-minutes' to override the use of
`org-time-stamp-rounding-minutes' for rounding.

Thanks to Kevin Buchs for a preliminary patch for this feature.
2012-12-29 18:45:07 +01:00
Michael Brand a77442b37b Use nan for empty fields in Calc formulas
* doc/org.texi (Formula syntax for Calc): Add explanation and example
for empty field.
* lisp/org-table.el (org-table-eval-formula): Use `keep-empty' in more
places.
(org-table-make-reference): Use nan (not a number) for empty fields in
Calc formulas.
* testing/lisp/test-org-table.el: Adapt expected for several
ert-deftest.
(test-org-table/empty-field): New examples dealing with empty fields.
(test-org-table/copy-field): New ert-deftest with examples dealing with
empty fields.

This makes it possible to write spreadsheet Calc formulas that check
for empty fields:  To sum the first two columns unless one or both
empty:
$3 = if("$1" = "nan" || "$2" = "nan", string(""), $1 + $2); E
2012-12-29 14:33:52 +01:00
Michael Brand 764315b3fc org-table.el: Fix range len bugs and inconsistencies
* lisp/org-table.el (org-table-eval-formula): Keep empty fields during
preprocessing.
(org-table-make-reference): A range with only empty fields should not
always return 0 but also empty string, consistent with field reference
of an empty field.  Use future design for nan but replicate current
behavior.
* testing/lisp/test-org-table.el: Adapt expected for several
ert-deftest.

The range len bugs may lead to wrong calculations for range references
with empty fields when the range len is relevant.  Affects typically
Calc vmean on simple range and without format specifier EN.  Also
Lisp with e. g. `length' on simple range or with L.
2012-12-29 14:33:52 +01:00
Michael Brand f5dd9a8a7a Add ERTs for basic spreadsheet functionality
* doc/org.texi (Formula syntax for Calc): Extend explanations of
format specifiers.
* testing/lisp/test-org-table.el: Various new ert-deftest, mark with
TODO what needs to be fixed.
2012-12-29 14:33:52 +01:00
Michael Brand 0ce406151f Extend org-table-number-regexp
* lisp/org-table.el (org-table-number-regexp): Extend 0x hex to
fixed-point number, add <radix>#<number>, add Calc infinite numbers
uinf, -inf and inf.
* testing/lisp/test-org-table.el (test-org-table/align): Adapt
alignment.
2012-12-29 14:33:52 +01:00
Michael Brand ce1a8465b5 Add ERT for table alignment within Org buffer
* testing/lisp/test-org-table.el (test-org-table/align): New
ert-deftest for table alignment within Org buffer.
* testing/org-test.el (org-test-table-target-expect): New defun.

The new function org-test-table-target-expect is to simplify writing
spreadsheet ERT by providing just a target table to apply the formula
to, the expected result table and the table formula with optionally
additional variants.  The variants typically are to check the same
result with a Lisp formula and a Calc formula.  test-org-table.el is
also a howto example collection as a user documentation.
2012-12-29 14:33:52 +01:00
Michael Brand 710f445768 testing/README: add howto run ERT partially
* testing/README (Interactive testing from within Emacs): Add a
description how to run a single ERT or all tests of a single test
file.
2012-12-29 14:33:52 +01:00
Bastien Guerry 3b994e78fb org-clock.el (org-clock-special-range): Small docstring fix
* org-clock.el (org-clock-special-range): Small docstring fix.
2012-12-29 12:35:51 +01:00
Bastien Guerry 0bca49801e org-clock.el: Implement a new parameter :wstart to define the week start day
* org-clock.el (org-clock-special-range): New parameter
'weekstart to define the week start day.
(org-clock-special-range, org-dblock-write:clocktable)
(org-dblock-write:clocktable, )
(org-clocktable-write-default, org-clocktable-steps)
(org-clock-get-table-data): Use the new parameter.
(org-clocktable-defaults): Set monday as the starting day of
the week by setting :wstart to 1.

* org.texi (The clock table): Document :wstart as a way to set
the starting day of the week.

Thanks to Raghavendra D Prabhu for suggesting this feature.
2012-12-29 12:35:18 +01:00
Bastien Guerry 271bbb0a6d Merge branch 'maint' 2012-12-29 11:47:46 +01:00
Bastien Guerry e4ca9f44e3 org-src.el (org-edit-src-exit): Don't comma-escape the content of a fixed width region
* org-src.el (org-edit-src-exit): Don't comma-escape the
content of a fixed width region.

Thanks to Bernt Hansen for reporting this.
2012-12-29 11:20:10 +01:00
Bastien Guerry 42df907d48 Merge branch 'maint' 2012-12-29 11:04:47 +01:00
Bastien Guerry 7133e71242 org-inlinetask.el: Add a note about mixing inline tasks and plain list
The note reads:

;; Note that you should not try to use inline tasks within plain list,
;; visibility cycling is known to be problematic when doing so.

Thanks to Gregor Zattler for pointing at limitations in this area.
2012-12-29 11:04:33 +01:00
Bastien Guerry 7773e0d94c Merge branch 'maint' 2012-12-29 10:26:03 +01:00
Bastien Guerry aa3786bc20 org.el (org-entry-blocked-p): Don't set the buffer as modified
* org.el (org-blocker-hook): Update the docstring to mention
that functions in this hook should not modify the buffer.
(org-trigger-hook): Small docstring fix.
(org-entry-blocked-p): Use `with-buffer-modified-unmodified'
so that the function never modifies the buffer.

Thanks to Sven Bretfeld for reporting this.

When building the agenda, checking for blocked items should not
set the buffers as modified, otherwise exiting the agenda will ask
for confirmation each time it kills a buffer.
2012-12-29 09:39:42 +01:00
Bastien Guerry 197881bc1a Merge branch 'maint' 2012-12-29 09:23:28 +01:00
Bastien Guerry bdbdc4cb2c org-src.el: Fix compiler warning 2012-12-29 09:23:11 +01:00
Bastien Guerry 8477a4b215 Allow to follow internal links from the agenda
* org-agenda.el (org-agenda-open-link): Allow to open an
internal link by using the new `org-offer-links-in-entry'
function.

* org.el (org-offer-links-in-entry): Do not open the link
directly through `org-open-link-from-string', only offer to
select a link and return a cons with the link (as a string)
and the end of entry.
(org-open-at-point): Use `org-offer-links-in-entry' correctly.

Thanks to Memnon Anon for reporting this.
2012-12-29 09:20:35 +01:00
Bastien Guerry 95096f14b6 org.el (org-store-link): Fix the naming of internal links to lines starting with a keyword
* org.el (org-store-link): Fix the naming of internal links to
lines starting with a keyword.

Thanks to Thomas S. Dye for reporting a related issue.
2012-12-29 06:30:47 +01:00
Bastien Guerry 9cf6800a95 Revert "org.el: (org-mode): Use `face-background' instead of `org-find-invisible-foreground'"
This reverts commit 4549f0c99c.
2012-12-28 19:01:18 +01:00
Bastien Guerry 0276cf0975 Merge branch 'maint' 2012-12-28 18:37:53 +01:00
Bastien Guerry 2792bc11a0 org-agenda.el: Docstring fixes.
* org-agenda.el (org-agenda-Quit, org-agenda-quit)
(org-agenda-exit, org-agenda-kill-all-agenda-buffers):
Docstring fixes.
2012-12-28 18:37:47 +01:00
Abdó Roig-Maranges 5954ba9a73 org.el: Don't re-generate latex previews if already present
* org.el (org-format-latex): Do not re-generate a latex preview if the
image already exists.

This feature was lost in commit 27101a3e0e
2012-12-28 18:37:47 +01:00
Eric Schulte 43a242c44d Pass the dir option on through org-export-as-string
* lisp/org-exp.el (org-export-string): Pass the dir option on through to
  any subsequent export functions.
2012-12-28 18:37:07 +01:00
Bastien Guerry ffcd23cf30 org.el (org-cycle-internal-local): Fix bug: allow headings with leading blank characters
* org.el (org-cycle-internal-local): Fix bug: allow headings
with leading blank characters.

Thanks to Rémi Vanicat for sending a patch for this.
2012-12-28 18:37:07 +01:00
Bastien Guerry 5c4d3cbcbf org-clock.el (org-clock-persist): Docstring fix: document the 'history value
* org-clock.el (org-clock-persist): Docstring fix: document
the 'history value.

Thanks to Ivan Andrus for reporting this.
2012-12-28 18:37:07 +01:00
Bastien Guerry de6201b19c org.el (org-insert-link): Fix bug when inserting links to headlines containing the ">" character
* org.el (org-insert-link): Fix bug when inserting links to
headlines containing the ">" character.

Thanks to William Léchelle for reporting this.
2012-12-28 18:37:07 +01:00
Eric Schulte f47a7176b8 import whole bibtex files into Org-mode
* lisp/org-bibtex.el (org-bibtex-read-buffer): Reads all bibtex entries
  in a buffer.
  (org-bibtex-read-file): Read all bibtex entries in a file.
  (org-bibtex-import-from-file): Import all bibtex entries from a file
  into the current buffer.
2012-12-26 08:40:44 -07:00
Bastien Guerry 99c8732bf8 Merge branch 'maint' 2012-12-25 03:29:29 +01:00
Bastien Guerry 6671e80453 org-crypt.el (org-at-encrypted-entry-p): Fix search boundary
* org-crypt.el (org-at-encrypted-entry-p): Fix search
boundary.

Thanks to Samuel Wales for reporting this bug.
2012-12-25 03:29:17 +01:00