Commit Graph

7083 Commits

Author SHA1 Message Date
Yann Hodique fc6b40a034 org-taskjuggler.el: Make use of org properties
* org-taskjuggler.el (org-taskjuggler-date): Introduce new function to
produce a taskjuggler-compatible date.
(org-taskjuggler-components): Make use of SCHEDULED/DEADLINE properties.

Infer start and end date from SCHEDULED/DEADLINE information.
2012-08-26 09:54:57 +02:00
Yann Hodique b711e70ed8 org-taskjuggler.el: Properly install local variables at export time
* org-taskjuggler.el (org-export-as-taskjuggler): Compute opt-plist, use
`org-install-letbind'.
2012-08-26 09:54:57 +02:00
Yann Hodique b183bd1d07 org-taskjuggler.el: Make task and resource properties customizable
* org-taskjuggler.el (org-export-taskjuggler-valid-task-attributes): Add
new option.
(org-export-taskjuggler-valid-resource-attributes): Add new custom
option.
2012-08-26 09:54:57 +02:00
Nicolas Goaziou ab075316b0 Merge branch 'maint' 2012-08-25 23:46:18 +02:00
Nicolas Goaziou 11082518ee org-element: Tiny refactoring
* lisp/org-element.el (org-element-paragraph-parser): Tiny refactoring.
2012-08-25 23:45:14 +02:00
Nicolas Goaziou 967f20c9a9 Merge branch 'maint' 2012-08-25 23:31:10 +02:00
Nicolas Goaziou 3113c5fce9 org-element: Small code comment clean-up
* lisp/org-element.el (org-element-paragraph-parser): Remove trailing
  code comments.
2012-08-25 23:30:29 +02:00
Nicolas Goaziou 8bf85553a3 Merge branch 'maint' 2012-08-25 15:42:26 +02:00
Nicolas Goaziou 90f6324dbf Add missing part from commit b4604d2833
* lisp/org.el (org-fill-context-prefix): Fix incorrect output when
  called at the beginning of a plain list with an affiliated keyword.
(org-fill-paragraph): Remove useless variable.
2012-08-25 15:41:01 +02:00
Nicolas Goaziou 1f3d1f55fe Merge branch 'maint' 2012-08-25 15:28:40 +02:00
Nicolas Goaziou b4604d2833 org-element: Fix filling bug in a list with affiliated keyword
* lisp/org-element.el (org-element-paragraph-parser): Fix parsing of
   paragraph at the beginning of an item.
* testing/lisp/test-org-element.el: Add test.
2012-08-25 15:27:01 +02:00
Nicolas Goaziou d86f09a854 org-element: Extract search option and application in "file"-type links
* lisp/org-element.el (org-element-link-type-is-file): New variable.
(org-element-link-parser): Extract search option and application in
"file"-type links.
* contrib/lisp/org-e-html.el (org-e-html-link): Remove components
  extraction since this in now done in `org-element-link-parser'.
* contrib/lisp/org-e-odt.el: Remove components extraction since this
  in now done in `org-element-link-parser'.
* contrib/lisp/org-e-texinfo.el (org-e-texinfo-link): Remove
  components extraction since this in now done in
  `org-element-link-parser'.
* contrib/lisp/org-e-latex.el (org-e-latex-link): Remove components
  extraction since this in now done in `org-element-link-parser'.
* contrib/lisp/org-e-man.el (org-e-man-link): Remove components
  extraction since this in now done in `org-element-link-parser'.
* contrib/lisp/org-e-groff.el (org-e-groff-link): Remove components
  extraction since this in now done in `org-element-link-parser'.
* contrib/lisp/org-md.el (org-md-link): Remove components extraction
  since this in now done in `org-element-link-parser'.
* testing/lisp/test-org-element.el: Add tests.
2012-08-25 10:38:25 +02:00
Nicolas Goaziou 53334042b5 Fix bug in comment-dwin when at a keyword
* lisp/org.el (org-mode): Set back comment-start-skip so comment-dwin
  can tell a keyword from a comment.
* testing/lisp/test-org.el: Add test.
2012-08-24 21:58:48 +02:00
Nicolas Goaziou 302fdfd2b0 Fix bug in comment-dwin when at a keyword
* lisp/org.el (org-mode): Set back comment-start-skip so comment-dwin
  can tell a keyword from a comment.
* testing/lisp/test-org.el: Add test.
2012-08-24 21:15:00 +02:00
Bastien Guerry d44b56e81e org-agenda.el: Fix bug about restoring existing window conf
* org-agenda.el (org-prepare-agenda-window): Use
`org-pre-agenda-window-conf' if already set.
(org-agenda-Quit): Set `org-pre-agenda-window-conf' to nil
when quitting.
(org-agenda-quit): Ditto.

Thanks to Moritz Ulrich for reporting a bug about this.
2012-08-24 15:54:58 +02:00
Bastien Guerry dd31878ee7 org-capture.el: Protect the text used for replacement from being further replaced
* org-capture.el (org-capture-fill-template): Protect the text
used for replacement from being further replaced.

Thanks to Moritz Ulrich for reporting this bug.
2012-08-24 15:45:03 +02:00
Nicolas Goaziou 82007c40da Fix comment auto-filling
* lisp/org.el (org-set-autofill-regexps): Install new comment line
  break function.
(org-comment-line-break-function): New function.
(org-mode): Remove unnecessary line.
2012-08-24 14:57:00 +02:00
Bastien Guerry 5e7ffbe1d4 Merge branch 'master' of orgmode.org:org-mode 2012-08-24 14:23:07 +02:00
Bastien Guerry bfe3e2102f org.el: Fix the contextual check against a function
* org.el (org-contextualize-validate-key): Fix the check
against a function.
2012-08-24 14:22:45 +02:00
Nicolas Goaziou 8a97c601a1 Do not fill verse blocks contents
* lisp/org.el (org-fill-context-prefix, org-fill-paragraph): Do not
  fill verse blocks contents.  Verse blocks can be used to format
  free-form poetry, so filling has to be done manually.
* testing/lisp/test-org.el: Remove unnecessary tests.
2012-08-24 12:58:43 +02:00
Nicolas Goaziou b1223be34d Auto-filling must not break current paragraph
* lisp/org.el (org-fill-paragraph-separate-nobreak-p): New function.
(org-set-autofill-regexps): Introduce new predicate.
(org-fill-item-nobreak-p): Remove function.
2012-08-24 12:58:42 +02:00
Nicolas Goaziou 4bc4e8ec18 org-element: Paragraphs don't end at incomplete latex environments
* lisp/org-element.el (org-element-paragraph-separate): Since this
  variable is meant to be searched forward, \end{...} shouldn't
  trigger the end of a paragraph before checking if it is the end of
  a complete environment.
(org-element-latex-environment-parser): Slight change to the regexp
matching the beginning of a latex environment.
(org-element-paragraph-parser): Paragraphs don't end at incomplete
latex environments.
(org-element-latex-or-entity-successor): Remove paragraph environments
from latex fragment search.
2012-08-24 12:58:42 +02:00
Bastien Guerry 10dbdf5fc2 Update the handling of agenda/capture keys contextualization.
* org.el (org-contextualize-keys): Rename from
`org-contextualize-agenda-or-capture'.  Fix normalization to
handle empty key replacement string.
(org-contextualize-validate-key): Rename from
`org-contexts-validate'.  Allow checking against a custom
function.

* org-agenda.el (org-agenda-custom-commands-contexts): Update.
(org-agenda): Use `org-contextualize-keys'.

* org-capture.el (org-capture-templates-contexts): Ditto.

* org.texi (Templates in contexts, Setting Options): Update to
reflect changes in how contexts options are processed.
2012-08-24 12:18:05 +02:00
Bastien Guerry 9d73d6d680 org.el (org-contextualize-agenda-or-capture): Normalize contexts
* org.el (org-contextualize-agenda-or-capture): Normalize
contexts.
2012-08-24 12:18:02 +02:00
Bastien Guerry 6c94ea0518 Implement key replacement depending on the contexts.
* org.el (org-contextualize-agenda-or-capture): Handle key
replacement depending on the contexts.

* org-capture.el (org-capture-templates-contexts): Allow to
use the context as a way to replace one capture template by
another one.

* org-agenda.el (org-agenda-custom-commands-contexts): Allow
to use the context as a way to replace one agenda custom
command by another one.

* org.texi (Templates in contexts): Document the new structure
of the variables `org-agenda-custom-commands-contexts' and
`org-capture-templates-contexts'.

In the setup below, X is not a real capture template, it is just
an alias to templates A and B in .txt and .el files.  A and B are
deactivated by default in all files.

(setq org-capture-templates
      '(("X" "Nothing but an alias")
	("A" "AAAA" entry (file+headline [...]))
	("B" "BBBB" entry (file+headline [...]))))

(setq org-capture-templates-contexts
      '(("A" "A" ((not-in-file . ".*")))
	("B" "B" ((not-in-file . ".*")))
	("X" "A" ((in-file . "\\.txt")))
	("X" "B" ((in-file . "\\.el")))))

Thanks to Carsten for suggesting this "key-replacement" idea!
2012-08-24 12:17:58 +02:00
Bastien Guerry 0c8e87b8d2 Rename UTILITIES/ to utils/ 2012-08-23 12:47:10 +02:00
Bastien Guerry d378c7b41b Implement context filtering for agenda commands and capture templates.
* org.el (org-contextualize-agenda-or-capture)
(org-rule-validate): New functions, implement context
filtering for agenda commands and capture templates.

* org-agenda.el (org-agenda-custom-commands-contexts): New
option.
(org-agenda): Use it.

* org-capture.el (org-capture-templates-contexts): New option.
(org-capture-select-template): Use it.

* org.texi (Templates in contexts): Document the new option
`org-capture-templates-contexts'.
(Storing searches): Document the new option
`org-agenda-custom-commands-contexts'.

This idea comes from Sylvain Rousseau, who implemented a similar
feature with org-context.el: https://github.com/thisirs/org-context

This implementation is a bit simpler and more general.  Simpler
because it relies on existing templates, no need to define other
contextual ones.  More general because contexts can be defined
wrt files and modes.

Thanks *very much* to Sylvain for paving the way -- certainly a
great addition to Org.
2012-08-23 11:08:47 +02:00
Achim Gratz dd76fceddc Makefile: error out on invalid values of ORGCM
* lisp/Makefile: Check validity of value given in ORGCM and terminate
  with an error message if an illegal value is used.
2012-08-22 20:02:47 +02:00
Bastien Guerry 841d949d9c org.el: Delete `org-beginning-of-defun' and `org-end-of-defun'
* org.el (org-beginning-of-defun, org-end-of-defun): Delete.
(org-mode): Set `beginning-of-defun-function' and
`end-of-defun-function' directly.
2012-08-22 19:02:39 +02:00
Bastien Guerry 53c230a9f6 org.el: Fix bug: include links abbreviations when completing
* org.el (org-insert-link): Fix bug: include links
abbreviations when completing.
2012-08-22 12:24:14 +02:00
Bastien Guerry 7d8f69068e org-icalendar.el: Fix bug.
* org-icalendar.el (org-icalendar-print-entries): Fix bug:
when `org-icalendar-use-plain-timestamp' is nil, scheduled and
deadline items should not be ignored.

Thanks to Friedrich Delgado for reporting this.
2012-08-22 02:41:18 +02:00
Bastien Guerry 655c7fb360 org.el: Small docstring clean-up
* org.el (org-ds-keyword-length, org-make-tags-matcher):
Docstring clean-up.
2012-08-22 02:39:18 +02:00
Bastien Guerry 8e307a8ef2 org-freemind.el: Fix bug when converting links
* org-freemind.el (org-freemind-convert-links-from-org):
Replace literally to prevent errors when replacing with string
containing backslashes.

Thanks to Martin Beck for reporting this.
2012-08-22 00:42:02 +02:00
Bastien Guerry 65e0b5bccd org-pcomplete.el: Allow to match and complete a "thing" containing dashes
* org-pcomplete.el (org-thing-at-point): Allow to match (and
then complete) a "thing" containing dashes.

Thanks to Aidan Gauland for reporting this problem.
2012-08-22 00:20:09 +02:00
Achim Gratz 226b15baa0 Makefile: implement different compilation methods, rename _COMPILE_ to ORGCM
* default.mk, targets.mk, lisp/Makefile: Rename _COMPILE_ to ORGCM.

* default.mk: Define ORGCM=dirall, show other possible values as
  comments

* targets.mk: Implement target `single´, temporarily set
  ORGCM (overriding configuration).  Show newly introduced
  configuration variables with `check-*´.

* lisp/Makefile: Implement dispatch for compile based on ORGCM.
  Output header that contains the target for easier debugging.

* Makefile: Document target `single´.
2012-08-21 21:24:23 +02:00
Achim Gratz 3c1c04d8bc Revert "Revert "Makefile: allow for different compilation methods""
This reverts commit 510f6464b0.
2012-08-21 21:24:21 +02:00
Bastien Guerry 51b9ad93c9 org-table.el: Better message when interactively toggling Row/Col display
* org-table.el (org-table-toggle-coordinate-overlays): Better
message when interactively toggling.
2012-08-21 20:09:25 +02:00
Jay McCarthy ade209b7c5 org-colview.el: Make sure to add a face to a string that has no face
* org-colview.el (org-columns-new-overlay): Make sure to add a
face to a string that has no face.

TINYCHANGE

See the description of the bug here:
http://thread.gmane.org/gmane.emacs.orgmode/58984
2012-08-21 20:05:34 +02:00
Bastien Guerry 5d57364256 org-table.el: Minor docstring update
* org-table.el (org-table-number-regexp): Update the docstring
to show an example of a decimal number using the comma as a
separation mark.
2012-08-21 18:31:12 +02:00
Bastien Guerry 43df5aa25a Merge branch 'master' of orgmode.org:org-mode 2012-08-21 18:16:11 +02:00
Bastien Guerry 6a69ceaed6 org-agenda.el: Fix a bug in category filtering
* org-agenda.el (org-prepare-agenda): Minor code clean-up.
(org-agenda-filter-by-category): Filtering must be turned off
only when a category filter has been set and this filter is
not empty.
2012-08-21 18:12:16 +02:00
Bastien Guerry 88213fff61 org-agenda.el: Code clean-up
* org-agenda.el (org-search-view, org-agenda-get-todos)
(org-agenda-get-timestamps, org-agenda-get-sexps)
(org-agenda-get-progress, org-agenda-get-deadlines)
(org-agenda-get-scheduled, org-agenda-get-blocks): Use
`category-pos' instead of `org-category-pos'.
2012-08-21 18:01:30 +02:00
Nicolas Goaziou 7ff8c166e6 org-table: Accept comma as a decimal mark to represent numbers
* lisp/org-table.el (org-table-number-regexp): By default, accept
  comma as a decimal mark to represent numbers.
2012-08-21 13:53:57 +02:00
Bastien Guerry c71b0dacb1 Replace "ob-" by "org-babel-" as a prefix for two functions
* ob-fortran.el (org-babel-fortran-transform-list): Rename
from `ob-fortran-transform-list'.
(org-babel-fortran-var-to-fortran): Use the new function's
name.

* ob-calc.el (org-babel-calc-maybe-resolve-var): Rename from
`ob-calc-maybe-resolve-var'.
(org-babel-execute:calc): Use the new function's name.
2012-08-21 13:17:08 +02:00
Bastien Guerry 1b35780196 Add licenses to embedded and external javascript code.
* org-jsinfo.el (org-infojs-template): Add a license.
(org-infojs-handle-options): Replace all template elements.

* org-html.el (org-export-html-scripts): Add a license.
(org-export-html-mathjax-config): Replace all template
elements.
(org-export-html-mathjax-template): Add a license.
(org-export-as-html): Minor code clean-up.
2012-08-21 12:37:32 +02:00
Bastien Guerry 0782bea46e org.el: Add "#+MATHJAX" and "#+INFOJS_OPT" to the list of keywords for completion
* org.el (org-options-keywords): Add "#+MATHJAX" and
"#+INFOJS_OPT" to the list of keywords for completion.
2012-08-21 12:34:02 +02:00
Bastien Guerry 4eb8b05a5b org.el (org-src-prevent-auto-filling): Remove unused and useless option
* org.el (org-src-prevent-auto-filling): Remove unused and
useless option.
2012-08-20 19:22:26 +02:00
Bastien Guerry d6db2566d9 org.el: Autoload `org-element-at-point' instead of requiring org-element it in some commands
* org.el (org-element-at-point): Autoload.
(org-element-up): Remove useless declaration.
(org-fill-context-prefix, org-fill-paragraph)
(org-mark-element, org-narrow-to-element)
(org-transpose-element, org-unindent-buffer): Do not require
org-element.
2012-08-20 13:31:22 +02:00
Nicolas Goaziou 49905a5669 org-element: Fix comment typo
* lisp/org-element.el (org-element-map): Fix comment typo.
2012-08-20 11:21:16 +02:00
Nicolas Goaziou ec9e7ab9c1 org-element: Add a couple of autoload cookies 2012-08-20 10:16:21 +02:00
Bastien Guerry dd7b0aa171 org.el (org-fill-paragraph): Require org-element
* org.el (org-fill-paragraph): Require org-element.
2012-08-20 08:35:54 +02:00
Bastien Guerry 4e5ed3c453 org-agenda.el (org-agenda-persistent-marks): Minor docstring enhancement
* org-agenda.el (org-agenda-persistent-marks): Minor docstring enhancement.
2012-08-20 08:02:36 +02:00
Bastien Guerry b4df37076d Don't use :version "24.3" until Emacs 24.3 is released and/or Org sync'ed in Emacs 2012-08-20 07:49:16 +02:00
Bastien Guerry 8393a76f78 Always use the compatibility function `org-region-active-p'
* org.el (org-create-math-formula): Use the compatibility
function `org-region-active-p'.

* org-odt.el (org-export-as-odf): Ditto.

* ob.el (org-babel-demarcate-block): Ditto.
2012-08-20 05:45:25 +02:00
Bastien Guerry 58a6d823ee org.el: Fix bug in `org-mark-subtree'
* org.el (org-mark-subtree): Maybe call `org-mark-element'
interactively.
(org-mark-element): Only mark further elements when called
interactively.

For example, M-x org-export RET calls `org-mark-subtree' and
should not mark the further element when an element is already
marked.

Thanks To Bernt Hansen for reporting a bug related to this.
2012-08-20 05:40:25 +02:00
Bastien Guerry 7d117bd981 org.el: Add (require 'org-element) for more org-element commands
* org.el (org-mark-element, org-narrow-to-element)
(org-transpose-element): Require org-element.
2012-08-20 04:36:38 +02:00
Bastien Guerry 523f13dd08 org-agenda.el: New 'warntime property for agenda entries
* org-agenda.el (org-agenda-get-timestamps)
(org-agenda-get-sexps, org-agenda-get-deadlines)
(org-agenda-get-scheduled): Add the 'warntime as a text
property, getting its value from the APPT_WARNTIME property.
(org-agenda-to-appt): Use the 'warntime text property.

Thanks to Ivan Kanis for reporting a bug related to this.
2012-08-19 21:48:52 +02:00
Bastien Guerry 92271aecea org-capture.el (org-capture-place-table-line): Fix bug
* org-capture.el (org-capture-place-table-line): Fix bug.

Thanks to Ian Barton for reporting this.
2012-08-19 17:41:01 +02:00
Bastien Guerry de015ad055 Merge branch 'master' of orgmode.org:org-mode
# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
2012-08-19 16:57:28 +02:00
Bastien Guerry ad35e2ac6c org.el: Don't activate a plain link when it is part of a bracketed link
* org.el (org-activate-plain-links): Don't activate a plain
link when it is part of a bracketed link, unless bracketed
links are not enlisted in `org-activate-links'.
(org-open-at-point): Don't consider the text immediately after
a bracketed link is part of a plain link.

This fixes a bug when fontifying [[http://orgmode.org][Org]]Mode --
where "Mode" should not be fontified, because it is not part of the
bracketed link.

Note that there was another related bug: C-c C-o on "Mode" used to
try opening a plain link.  Also fixed in this commit.
2012-08-19 16:56:52 +02:00
Nicolas Goaziou 2fd696716a Forgot a `save-excursion'
* lisp/org.el (org-fill-paragraph): Add a `save-excursion' to avoid
  returning funny results.
2012-08-19 15:51:55 +02:00
Nicolas Goaziou bb895827c2 Try to be smarter when filling paragraphs in message-mode
* lisp/org.el (org-fill-paragraph): Try not to include message header
  and citation lines in a paragraph when filling it.
2012-08-19 14:46:27 +02:00
Bastien Guerry 655da8d1d3 Remove useless (t nil) sexps at the end of some (cond ...) constructs
* org.el (org-compute-latex-and-specials-regexp)
(org-paste-subtree, org-sort-entries, org-store-link)
(org-open-at-point, org-file-remote-p, org-add-log-setup)
(org-set-tags-to, org-fast-tag-selection)
(org-diary-sexp-entry): Ditto.

* org-agenda.el (org-agenda-get-blocks, org-cmp-priority)
(org-cmp-effort, org-cmp-todo-state, org-cmp-alpha)
(org-cmp-tag, org-cmp-time): Remove useless (t nil) sexps at
the end of (cond ...) constructs.

* org-mobile.el (org-mobile-create-index-file): Ditto.

* org-lparse.el (org-lparse-format-table-row): Ditto.

* org-list.el (org-sort-list): Ditto.

* org-id.el (org-id-get): Ditto.

* org-html.el (org-export-html-preprocess): Ditto.

* org-exp.el (org-default-export-plist)
(org-table-clean-before-export): Ditto.

(t nil) in (cond (...) (...) (t nil)) has no other meaning that to
remind the developer that the cond sexp returns nil in case no condition
is matched.  For several (cond ...) constructs this is obvious from reading
the code.  For others, the reminder might be useful and we leave it.

See the discussion about this on emacs-devel:
http://thread.gmane.org/gmane.emacs.devel/152664
2012-08-19 14:42:54 +02:00
Nicolas Goaziou a3c4e10ac1 Fix filling in in a narrowed buffer
* lisp/org.el (org-fill-paragraph): Fix filling in a narrowed buffer.
(org-fill-context-prefix): Fill prefix doesn't depend on current
narrowing.
* testing/lisp/test-org.el: Add test.
2012-08-19 13:44:00 +02:00
Nicolas Goaziou ecb8fbd7d5 Line with a single hash sign on it is a comment
* lisp/org.el (org-mode): Line with a single hash sign on it is a comment.
2012-08-19 11:07:50 +02:00
Nicolas Goaziou e8046d2f63 Fix comment fontification
* lisp/org.el (org-set-font-lock-defaults): Fix comment fontification.
2012-08-19 10:28:21 +02:00
Bastien Guerry 6309dcae6b org.el: Be more strict about matching option keywords
* org.el (org-options-keywords): Add "TODO".
(org-make-options-regexp): Make the hashtag mandatory for
options and don't allow whitespaces between the hashtag and
the plus sign.
2012-08-19 10:15:59 +02:00
Bastien Guerry f926d9019b org.el: Allow lowercase "#+category" and "#+begin:" dynamic blocks
* org.el (org-refresh-category-properties)
(org-find-dblock, org-dblock-start-re, org-dblock-end-re):
Allow lowercase "#+category" and "#+begin:" dynamic blocks.
2012-08-19 08:48:53 +02:00
Bastien Guerry 788f7da285 org.el: Use case-folding when trying to match clocktables and source blocks contexts
* org.el (org-context): Use case-folding when trying to match
clocktables and source blocks contexts.
2012-08-19 08:26:35 +02:00
Bastien Guerry 62064c73fc org-clock.el: Fix clock overlays bug
* org-clock.el (org-clock-put-overlay): Put the overlay on the
whole headline, not only on the last character.  This fixes a
bug with overlays on headlines ending with a bracketed link.

Thanks to Ryan Kaskel for reporting this.
2012-08-19 08:01:43 +02:00
Bastien Guerry 56b731087e Fix HTML export bug for empty headlines when `org-export-with-priority' is nil
* org-html.el (org-export-as-html): Make sure we always
process a string.

* org-exp.el (org-export-cleanup-toc-line): Always return a
string.

Thanks to Friedrich Delgado for reporting this.
2012-08-18 18:44:56 +02:00
Bastien Guerry 90e9aeeff5 org.el: Fix bug in ̀org-fontify-meta-lines-and-blocks-1'
* org.el (org-fontify-meta-lines-and-blocks-1): Correctly
handle metalines with #+results[...]:.
2012-08-18 17:52:02 +02:00
Bastien Guerry f25baf9e1e org-exp.el: Merge functions for removing tables and source blocks metalines
* org-exp.el (org-export-handle-metalines): Rename from
`org-export-handle-table-metalines'.  Now also handle source
block metalines.
(org-export-res/src-name-cleanup): Delete.
(org-export-preprocess-string): Use
`org-export-handle-metalines'.  Don't use
`org-export-res/src-name-cleanup' anymore.

This fixes a but reported by Feiming Chen, thanks to him.
2012-08-18 17:49:01 +02:00
Bastien Guerry 8d382158e7 org-html.el: Don't include the caption tag for empty captions in HTML export
* org-html.el (org-format-org-table-html): Don't include the
caption tag for empty captions in HTML export.  Keep it in the
DocBook export so that it produces valid DocBook XML.
2012-08-18 16:58:28 +02:00
Nicolas Goaziou 7a1bd94df1 org-element: Fix some code comments 2012-08-18 13:34:27 +02:00
Nicolas Goaziou ad94a9433b Addendum to 50a434bb9f
* lisp/org-element.el (org-element-item-parser): Do not remove tag
  from body if list isn't descriptive.
* lisp/org-list.el (org-insert-item): Only ask about a term for
  descriptive lists.
(org-list-struct, org-list-insert-item): Do not recognize a tag in an
ordered list.
* testing/lisp/test-org-element.el: Add test.
2012-08-18 13:13:31 +02:00
Nicolas Goaziou 3f57803fb4 org-element: Generalize `org-element-adopt-element' into `org-element-adopt-elements'
* lisp/org-element.el (org-element-set-element): Rewrite function.
(org-element-adopt-elements): New function.
(org-element-adopt-element): Removed function.
(org-element--parse-elements, org-element--parse-objects): Use new function.
* testing/lisp/test-org-element.el: Update tests.
2012-08-18 10:13:35 +02:00
Nicolas Goaziou 50a434bb9f org-list: Fix list type with mixed constructs
* lisp/org-list.el (org-list-automatic-rules): Remove `bullet' rule,
  which is now hard-coded.
(org-cycle-list-bullet): Hard code `bullet' rule.
(org-list-get-list-type): Make sure a list with numbered bullets
cannot have `descriptive' type.
* testing/lisp/test-org-list.el: Add tests.
2012-08-18 09:30:33 +02:00
Nicolas Goaziou 8ab1d76529 org-element: Fix previous patch
* lisp/org-element.el (org-element-paragraph-parser): Fix previous patch.
* testing/lisp/test-org-element.el: Add tests.
2012-08-17 17:40:32 +02:00
Nicolas Goaziou b1ed817e38 org-element: Use strict comment syntax (no "#+" allowed)
* lisp/org.el (org-fill-paragraph): No need to use
  `org-element-paragraph-separate' in a verse block since blank lines
  only can end a "paragraph".
* lisp/org-element.el (org-element-paragraph-separate): Apply changes
  to comments.
(org-element-paragraph-parser): Correctly find end of paragraphs.
(org-element--current-element): Require colons for Babel calls.
(org-element-center-block-parser, org-element-dynamic-block-parser,
org-element-quote-block-parser, org-element-special-block-parser,
org-element-comment-block-parser, org-element-example-block-parser,
org-element-export-block-parser, org-element-src-block-parser,
org-element-verse-block-parser): Fall-back to paragraph parsing when
incomplete or ill-formed.
* testing/lisp/test-org-element.el: Update tests.
2012-08-17 16:58:26 +02:00
Bastien Guerry d2200b2bed org.el: Allow both "8am Wed" and "Wed 8am" to be parsed correctly
* org.el (org-read-date-analyze): Allow both "8am Wed" and
"Wed 8am" to be parsed correctly with respect to possible
values of `org-read-date-prefer-future'.
(org-read-date-prefer-future): Update docstring to remove the
restriction about inserting only the time.  The user can now
insert the time and the day.
2012-08-16 09:42:55 +02:00
Bastien Guerry 76b0d582b8 Replace Emacs version to "24.2" by "24.3"
This is needed because the current HEAD of the git repository
will not be synced with Emacs 24.2 but more likely with Emacs 24.3.
2012-08-16 09:24:58 +02:00
Bastien Guerry 009c530e83 org-icalendar.el: Code clean up.
* org-icalendar.el (org-icalendar-print-entries): Rename from
`org-print-icalendar-entries'.
(org-icalendar-start-file): Rename from
`org-start-icalendar-file'.
(org-icalendar-finish-file): Rename from
`org-finish-icalendar-file'.
(org-icalendar-ts-to-string): Rename from
`org-ical-ts-to-string'.
(org-export-icalendar): Use the correct functions.
2012-08-16 09:22:22 +02:00
Bastien Guerry e4c4d85e59 ob-ref.el (org-babel-ref-index-list): Fix bug introduced by commit e85479
* ob-ref.el (org-babel-ref-index-list): Fix bug introduced by
commit e85479.

Thanks to Ivars Finvers who reported it and gave the correct patch.
2012-08-16 00:27:35 +02:00
Bastien Guerry 5ca6e3d703 org.el: Fix bug when adjusting another clock
* org.el (org-fill-context-prefix): Require org-element.
(org-timestamp-change): Fix bug by saving excursion when
adjusting another clock.

Thanks to Steinar Bang for reporting this.
2012-08-15 21:08:45 +02:00
Bastien Guerry cacb08334a Merge branch 'org-no-properties' 2012-08-15 14:43:35 +02:00
Bastien Guerry d14ed316cc Revert "org.el: Fix bug in interpreting `org-read-date-prefer-future' for time"
This reverts commit 053d0597e6.
2012-08-15 11:11:12 +02:00
Bastien Guerry 053d0597e6 org.el: Fix bug in interpreting `org-read-date-prefer-future' for time
* org.el (org-read-date-prefer-future): Fix docstring
formatting.
(org-read-date-analyze): Fix the interpretation of
`org-read-date-prefer-future'.
2012-08-15 11:02:24 +02:00
Bastien Guerry 57166defd1 org-agenda.el (org-agenda-menu-two-column): Rename to `org-agenda-menu-two-columns'
* org-agenda.el (org-agenda-menu-two-column): Rename to
`org-agenda-menu-two-columns'.
2012-08-15 10:31:22 +02:00
Bastien Guerry b62604236d Replace `org-labels' by `let*'
* ob.el (org-babel-sha1-hash, org-babel-noweb-p): Replace
`org-labels' by `let*'.

* org-bibtex.el (org-bibtex-headline): Ditto.

* org-compat.el: Delete `org-labels'.
2012-08-15 09:56:35 +02:00
Bastien Guerry 9afc2ac56b ob-*.el: Use ̀org-no-properties' instead of `org-babel-clean-text-properties'
* ob.el (org-babel-get-src-block-info)
(org-babel-check-src-block, org-babel-current-result-hash)
(org-babel-parse-src-block-match, org-babel-read-link)
(org-babel-insert-result, org-babel-clean-text-properties):
Use ̀org-no-properties' instead of
`org-babel-clean-text-properties'.
(org-babel-clean-text-properties): Delete redundant function
`org-babel-clean-text-properties'.

* ob-tangle.el (org-babel-tangle-collect-blocks)
(org-babel-tangle-comment-links): Ditto.

* ob-table.el (sbe): Ditto.

* ob-lob.el (org-babel-lob-get-info)
(org-babel-lob-execute): Ditto.

* ob-exp.el (org-babel-exp-non-block-elements): Ditto.
2012-08-15 09:39:24 +02:00
Bastien Guerry 722e0e0c83 Remove `org-substring-no-properties' and some redundant code
* org-macs.el (org-no-properties): Allow a new parameter
`restricted' to restrict the properties removal to those in
`org-rm-props'.  The default is now to remove all properties.

* org-compat.el (org-substring-no-properties): Remove unused
defun.

* org-remember.el (org-remember-apply-template): Remove
redundant removal of text properties.
(org-remember-apply-template): Use `org-no-properties'.

* org-capture.el (org-capture-fill-template): Remove redundant
removal of text properties.
(org-capture-fill-template): Use `org-no-properties'.

* org-gnus.el (org-gnus-open, org-gnus-follow-link): Use
`org-no-properties'.
2012-08-15 09:35:21 +02:00
Bastien Guerry 16ea0364a4 Call `buffer-substring-no-properties' and remove `org-no-properties'
* org-colview-xemacs.el (org-columns-display-here): Use
`buffer-substring-no-properties' and remove `org-no-properties'.

* org-colview.el (org-columns-display-here): Ditto.

* org-table.el (org-table-eval-formula): Ditto.

* org.el (org-entry-properties): Ditto.
2012-08-15 09:22:51 +02:00
Bastien Guerry 7f6a127e46 org-icalendar.el: Fix bug about handling `alarm-time'
* org-icalendar.el (org-print-icalendar-entries): Fix bug
about handling `alarm-time'.

Thanks to Charles Philip Chan for reporting this.
2012-08-15 03:42:58 +02:00
Bastien Guerry 510f6464b0 Revert "Makefile: allow for different compilation methods"
This reverts commit 3e63c3e97a.
2012-08-15 00:10:32 +02:00
Bastien Guerry 32e3257c2d Revert "Makefile: add elint to compilation methods, ensure *.elc files exist after compilation"
This reverts commit 1e47e65e97.
2012-08-15 00:10:13 +02:00
Bastien Guerry b57a91f8dd ob-R.el (org-babel-edit-prep:R): Don't set the session
* ob-R.el (org-babel-edit-prep:R): Don't set the session.

See the discussion for this issue here:
http://article.gmane.org/gmane.emacs.orgmode/58600

Thanks to Mikhail Titov and to Andrew Young for exploring it.
2012-08-14 23:57:24 +02:00
Bastien Guerry 922772e012 org.el: Only skip comments starting with "# " when storing a note.
* org.el (org-store-log-note): Only skip comments starting
with "# " when storing a note.

Thanks to Thomas Wallrafen for reporting this bug.
2012-08-14 13:09:56 +02:00
Bastien Guerry 570e30b5dd Merge branch 'master' of orgmode.org:org-mode
# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
2012-08-14 12:02:03 +02:00
Bastien Guerry a4f5e94dc8 org.el: New command ̀org-toggle-custom-properties-visibility'
* org.el (org-custom-properties): New option.
(org-custom-properties-overlays): New variable.
(org-toggle-custom-properties-visibility): New command to
toggle the visibility of custom properties.
(org-check-before-invisible-edit): Also prevent errors when
trying to edit invisible properties.

Thanks to Torsten Wagner for triggering this discussion.
2012-08-14 11:51:09 +02:00