Commit Graph

7138 Commits

Author SHA1 Message Date
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
Nicolas Goaziou 16a2203f6f org-element: Small refactoring
* lisp/org-element.el (org-element-swap-A-B): Small refactoring.
2012-08-14 10:18:42 +02:00
Bastien Guerry fdcf9dceb7 org-datetree.el: New option `org-datetree-add-timestamp'
* org-datetree.el (org-datetree-add-timestamp): New option.
(org-datetree-insert-line): Use it.
2012-08-14 10:09:40 +02:00
Bastien Guerry 944fd9d651 org.el: Fix bug in `org-fill-template'
* org.el (org-fill-template): Fix bug when filling template for
a key associated to the nil value.

Thanks to Ken Williams for reporting this.
2012-08-13 23:53:18 +02:00
Bastien Guerry d1b72db961 org-agenda.el (org-diary): Fix tiny typo
* org-agenda.el (org-diary): Fix tiny typo.
2012-08-13 16:30:43 +02:00
Eric Schulte 37e19ea2d0 Revert "Don't use `org-labels'"
This reverts commit 9d4e1517b6.
2012-08-13 08:17:46 -06:00
Eric Schulte 9d4e1517b6 Don't use `org-labels'
Reworking the previous commit which attempted to remove org-labels.

* org-compat.el (org-labels): Remove.

* org-bibtex.el (org-bibtex-headline): Don't use `org-labels'.

* ob.el (org-babel-sha1-hash, org-babel-noweb-p): Ditto.
2012-08-13 07:42:17 -06:00
Bastien Guerry d59acaa632 org.el (message-in-body-p): Move declaration up to fix compiler warning
* org.el (message-in-body-p): Move declaration up to fix compiler
warning.
2012-08-13 14:54:20 +02:00
Bastien Guerry bbc1dde930 org.el (org-fill-context-prefix): Fix auto-filling in `message-mode'.
* org.el (org-fill-context-prefix): Fix auto-filling in
`message-mode'.
2012-08-13 09:56:39 +02:00
Bastien Guerry 3496df0b4d org.el: Fix bugs in `org-indent-line' and `org-fill-paragraph'
* org.el (org-fill-paragraph): Correctly fill paragraph in
message-mode.
(org-indent-line): Correctly indent according to mode when
`orgstruct++-mode' is on.
(orgstruct++-mode): Add `fill-prefix' to the variable temporarily
stored in `org-fb-vars'.
2012-08-13 09:18:11 +02:00
Bastien Guerry 396e413f6b org.el: Fix bug about filling message headers and citations
* org.el (org-fill-paragraph): Make a command.  Fix bug about
filling message headers and citations.
2012-08-13 07:15:49 +02:00
Bastien Guerry 525e96a97e Revert "Don't use `org-labels'"
This reverts commit ba16c3c6f5.
2012-08-13 06:37:57 +02:00
Bastien Guerry 09743f48d6 Fix many small typos. 2012-08-13 05:59:44 +02:00
Bastien Guerry 9a9d4e3666 Fix some warnings. 2012-08-13 00:36:15 +02:00
Bastien Guerry 7532ace049 org.el: New command `org-redisplay-inline-images'
* org.el (org-redisplay-inline-images): New command.
(org-mode-map): Bind it to C-c C-x C-M-v.

Thanks to Petro for suggesting this.
2012-08-12 23:14:13 +02:00
Bastien Guerry 16d7b71762 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-12 23:01:52 +02:00
Bastien Guerry 74e9a23c01 Fix a bug in `org-columns-get-format-and-top-level' and a compiler warning.
* org-colview.el (org-columns-get-format-and-top-level): Fix bug.
(org-columns-get-format): Fix compiler warning.
2012-08-12 23:00:55 +02:00
Achim Gratz 1e47e65e97 Makefile: add elint to compilation methods, ensure *.elc files exist after compilation
* lisp/Makefile: Add targets `slint3´ (one Emacs process for all
  sources) and `slint4´ (one Emacs instance for each source) using
  ELINTL and ELINTF to lint lisp files.  Split out compile actions
  into internal targets and implement `compile-*´ targets in terms of
  these internal targets.  Follow all targets that do not
  procude *.elc files with `dirall´ so that the *.elc files exist at
  the end of compilation.

* default.mk: Add configuration variables ELINTL and ELINTF.

* targets.mk: Add ELINTL and ELINTF to CONF_CALL.
2012-08-12 15:41:35 +02:00
Michael Brand e1d5a31786 Improve parsing of org-capture-inside-embedded-elisp-p
* org-capture.el (org-capture-inside-embedded-elisp-p): Improve parsing.
2012-08-12 12:12:04 +02:00
Ippei FURUHASHI 601e783405 org-colview.el: Add new ways of specifying the columnview format
* org-colview.el (org-columns): New argument `columns-fmt-string'.
* org-colview.el (org-columns-get-format-end-top-level): Split
into `org-columns-get-format' and `org-columns-goto-top-level'.
* lisp/org-colview.el (org-dblock-write:columnview): Add a new parameter
:format which specifies the column view format for the output of the
columnview dynamic block.

This patch allows to interactively set a column view like this:

  M-: (org-columns "%66ITEM(Task) %6Effort(Estim.){:}") RET

or to specify a column view in columnview dynamic blocks:

TINYCHANGE
2012-08-12 11:48:44 +02:00
Bastien Guerry 267e6a9d00 org-feed.el: Add declarations
* org-feed.el: Add declarations.
2012-08-12 10:40:02 +02:00
Nicolas Goaziou 31aa36ca19 org-element: Fix typo in docstring
* lisp/org-element.el (org-element-text-markup-successor): Fix typo in
  docstring.
2012-08-12 00:51:50 +02:00
Nicolas Goaziou 8fc893a036 org-element: Fix small bug
* lisp/org-element.el (org-element-at-point): Return consistent value
  when function is called on a blank line within a plain list.
* testing/lisp/test-org-element.el: Add test.
2012-08-12 00:48:09 +02:00
Bastien Guerry 82af1bb96c org-agenda.el (org-agenda-get-sexps): Use `org-get-tags-at' to allow tag inheritance
* org-agenda.el (org-agenda-get-sexps): Use `org-get-tags-at'
to allow tag inheritance.

Thanks to Simon Thum for suggesting this.
2012-08-11 19:52:56 +02:00
Bastien Guerry e5c93760c8 org-capture.el (org-capture): Fix bug introduced by commit 1737d3
* org-capture.el (org-capture): Fix bug introduced by commit
1737d3.

Thanks to Simon Thum for reporting this.
2012-08-11 19:50:20 +02:00
Bastien Guerry b422af282d org-capture.el: Minor code cleanup 2012-08-11 19:35:34 +02:00
Bastien Guerry 70dd1196d2 Massive code clean-up.
Delete trailing whitespaces.
Indent all sexps correctly.
Sentences end with double spaces.
2012-08-11 19:10:44 +02:00
Michael Brand 042db379fc Add the capture feature sexp to org feed
* org-feed.el (org-feed-format-entry): Require `org-capture'.
Expand Elisp %(...) templates.
(org-feed-default-template): Update docstring.

* org-capture.el (org-capture-expand-embedded-elisp): New
function.
(org-capture-fill-template): Use it.
(org-capture-inside-embedded-elisp-p): New function to tell if
we are within an Elisp %(...) template.
2012-08-11 18:55:12 +02:00
Bastien Guerry 6966f20af2 org-publish.el: Fix problem with `org-publish-cache-ctime-of-src' not expanding from the correct directory
* org-publish.el (org-publish-needed-p)
(org-publish-update-timestamp, org-publish-file)
(org-publish-cache-file-needs-publishing): New argument
`base-dir'.
(org-publish-cache-ctime-of-src): Use the new argument to make
sure we find the file according to :base-directory.
2012-08-11 18:50:48 +02:00
Nicolas Goaziou d856b29b3b org-element: Fix comments in paragraph separator regexp
* lisp/org-element.el (org-element-paragraph-separate): Fix comments
  in paragraph separator regexp.  Optimize it.
2012-08-11 17:38:46 +02:00
Bastien Guerry 1737d3c4ee New command `org-capture-string'
* org-capture.el (org-capture-string): New command to prompt
for the interactive text interactively.  This can also be used
in Elisp programs to use ̀org-capture' with some initial text.
(org-capture-initial): New variable to store the initial text.
(org-capture): Use `org-capture-initial'.
2012-08-11 11:17:35 +02:00
Bastien Guerry 777ee3a4f9 org.el (org-emph-re): Tiny docstring formatting fix
* org.el (org-emph-re): Tiny docstring formatting fix.

Replay commit 8fb39a, but correctly this time.
2012-08-11 10:45:16 +02:00
Bastien Guerry ba16c3c6f5 Don't use `org-labels'
* org-compat.el (org-labels): Remove.

* org-bibtex.el (org-bibtex-headline): Don't use `org-labels'.

* ob.el (org-babel-sha1-hash, org-babel-noweb-p): Ditto.
2012-08-11 10:43:56 +02:00
Bastien Guerry ae21293a2e Revert "org.el (org-emph-re): Tiny formatting fix"
This reverts commit 8fb39ad25b.

Er.  Some changed should not be here.
2012-08-11 10:39:23 +02:00
Bastien Guerry 8fb39ad25b org.el (org-emph-re): Tiny formatting fix
* org.el (org-emph-re): Tiny formatting fix.
2012-08-11 09:57:01 +02:00
Bastien Guerry c5bc43133b org.el (orgstruct-setup): Require `org-element'.
* org.el (orgstruct-setup): Require `org-element'.

This prevents an error for git users who use orgstruct-mode
(and orgstruct++-mode) and forget to make autoloads.
2012-08-11 09:15:30 +02:00
Bastien Guerry 73c1948c15 org.el (org-store-link, org-open-at-point): New link type "help"
* org.el (org-store-link, org-open-at-point): New link type
"help".
2012-08-11 09:11:55 +02:00
Bastien Guerry baaa4873c7 org-compat.el (org-flet): Remove alias
* org-compat.el (org-flet): Remove alias.
2012-08-10 17:45:16 +02:00
Bastien Guerry 6c7ac786aa ob.el: Don't use `org-flet'
* ob.el (org-babel-edit-distance, org-babel-sha1-hash)
(org-babel-get-rownames, org-babel-insert-result)
(org-babel-merge-params)
(org-babel-expand-noweb-references): Don't use `org-flet'.
Also indent some functions correctly.
2012-08-10 17:44:45 +02:00
Bastien Guerry 57104f9fb2 ob.el: Don't use `org-flet'
* ob.el (org-babel-execute-src-block)
(org-babel-join-splits-near-ch, org-babel-format-result)
(org-babel-examplize-region): Don't use `org-flet'.
(org-babel-tramp-handle-call-process-region): Fix typo.
2012-08-10 17:23:00 +02:00
Bastien Guerry 966447c454 Don't use `org-flet' in ob-awk.el and ob-sh.el
* ob-awk.el (org-babel-awk-var-to-awk): Don't use `org-flet'.

* ob-sh.el (org-babel-sh-var-to-string): Ditto.
2012-08-10 16:05:26 +02:00
Bastien Guerry 1edf05f14c ob-tangle.el: Don't use `org-flet'
* ob-tangle.el (org-babel-tangle, org-babel-spec-to-string):
Don't use `org-flet'.
2012-08-10 15:40:00 +02:00
Bastien Guerry 9156bc2d64 Various minor fixes.
* org-pcomplete.el (org-compat): Require.

* ob-tangle.el (org-babel-load-file): Don't use `org-flet'.

* org-bibtex.el (org-bibtex-write): Use let*.
2012-08-10 15:32:24 +02:00
Bastien Guerry 8562d230ff org-plot.el (org-plot/gnuplot-script): Don't use `org-flet'
* org-plot.el (org-plot/gnuplot-script): Don't use `org-flet'.
2012-08-10 15:21:52 +02:00
Bastien Guerry 1be0faa40e org-bibtex.el: Don't use `org-flet'
* org-bibtex.el (org-bibtex-headline, org-bibtex-fleshout)
(org-bibtex-read, org-bibtex-write): Don't use `org-flet'.
2012-08-10 15:17:16 +02:00
Bastien Guerry 002b700cb3 Use ̀org-looking-back' instead of `looking-back' to keep compat with XEmacs
* org-clock.el (org-clock-cancel): Use `org-looking-back'.

* org-pcomplete.el (org-thing-at-point): Ditto.

* org.el (org-timestamp-change): Ditto.
2012-08-10 15:02:45 +02:00
Bastien Guerry 090634584e org-mouse.el: Don't use `org-flet'
* org-mouse.el (org-mouse-timestamp-today)
(org-mouse-set-priority, org-mouse-popup-global-menu)
(org-mouse-context-menu): Don't use ̀org-flet'.
2012-08-10 14:57:19 +02:00
Bastien Guerry 4cc6a9db5e org.el (org-priority): Fix docstring
* org.el (org-priority): Fix docstring.
2012-08-10 14:56:36 +02:00
Bastien Guerry 0ac65cc663 org-publish.el: Small code clean-up
* org-publish.el (org-publish-write-cache-file)
(org-publish-initialize-cache)
(org-publish-cache-file-needs-publishing)
(org-publish-cache-get): Small code clean-up.
2012-08-10 12:46:01 +02:00
Bastien Guerry 640b8c4076 org-publish.el (org-publish-cache-ctime-of-src): Simplify.
* org-publish.el (org-publish-cache-ctime-of-src): Simplify.
2012-08-10 12:41:13 +02:00
Bastien Guerry 621364fc6d org-agenda.el: Add a 'tags property for agenda entries created from sexps
* org-agenda.el (org-agenda-get-sexps): Add a 'tags property
for agenda entries created from sexps.

Thanks to Simon Thum for reporting this.
2012-08-10 12:29:51 +02:00
Bastien Guerry d9ebb7c8be org-capture.el: Fix bug in placing point according to %?
* org-capture.el (org-capture-templates): Docstring clean up.
(org-capture-place-entry, org-capture-place-item)
(org-capture-place-plain-text, org-capture-place-table-line):
Ensure to always position the point according to %?.

Thanks to Gsqual for reporting this and to Nick Dokos for digging into this
issue.
2012-08-10 11:48:54 +02:00
Bastien Guerry ad67f20a39 Fix a compiler warning. 2012-08-10 11:17:02 +02:00
Bastien Guerry 24c9083bd5 org-table.el: Fix bug when converting remote table references.
* org-table.el (org-table-convert-refs-to-rc): Fix bug when
converting remote table references.

Thanks to Jose E. Marchesi who provided a preliminary patch for this.
2012-08-10 11:00:15 +02:00
Bastien Guerry 068a354747 org-agenda.el (org-agenda-switch-to): Run hooks in ̀org-agenda-after-show-hook'
* org-agenda.el (org-agenda-switch-to): Run hooks in
̀org-agenda-after-show-hook'.

Thanks to Jack Erwin for suggesting this.
2012-08-10 10:12:44 +02:00
T.F. Torrey a4e3ed9a2f org-rmail.el: Use `rmail-widen' instead of `widen'
* org-rmail.el (org-rmail-follow-link): Use `rmail-widen'
instead of `widen' and don't toggle header as `rmail-widen'
already takes care of this.

TINYCHANGE

--
T.F. Torrey
2012-08-10 09:59:16 +02:00
Bastien Guerry e85479aeb1 Don't use `org-flet' in some functions
* ob-ref.el (org-babel-ref-index-list): Use let* and rename
the variable `length' to `lgth'.

* org-plot.el (org-plot/gnuplot-to-grid-data): Don't use
̀org-flet'.

* org-exp.el (org-export-format-source-code-or-example):
Ditto.

* org-exp-blocks.el (org-export-blocks-preprocess): Ditto.

* ob.el (org-babel-view-src-block-info)
(org-babel-execute-src-block, org-babel-edit-distance)
(org-babel-switch-to-session-with-code)
(org-babel-balanced-split, org-babel-insert-result): Ditto.

* ob-ref.el (org-babel-ref-index-list): Ditto.

* ob-python.el (org-babel-python-evaluate-session): Ditto.

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

* ob-gnuplot.el (org-babel-expand-body:gnuplot): Ditto.

* ob-exp.el (org-babel-exp-do-export): Ditto.
2012-08-09 21:06:33 +02:00
Achim Gratz 3e63c3e97a Makefile: allow for different compilation methods
* targets.mk: Remove targets compile-source and compile-single,
  obsoleted by new configuration option.  Remove repetitive code in
  clean targets by using pattern substitution.  Avoid superfluous
  invocations of find by using multiple path arguments.

* Makefile: Remove compile-source and compile-single target
  documentation.

* default.mk: Add new option _COMPILE_ to select compilation method.
  Set default value to keep current behaviour.

* lisp/Makefile: Use new $(_COMPILE_) to dispatch compilation target.
  Implement private targets compile-dirall (default), compile-single,
  compile-slint1 and compile-slint2.

The additional compilation methods catch more and/or different errors
in the sources by compiling the sources in a single Emacs process per
compilation and with different conditions of the source directory, but
take much longer to compile even in the absence of such errors.  The
default method to use can be changed (like all other options) via
local.mk or temporarily on the command line.
2012-08-09 18:25:27 +02:00
Bastien Guerry 0c77568f67 org-table.el (orgtbl-to-generic): Fix docstring.
* org-table.el (orgtbl-to-generic): Fix docstring.
2012-08-09 16:17:05 +02:00
Bastien Guerry bc19977534 org-clock.el: Let C-u M-x org-clock-out RET now prompts for a state to switch to
* org-clock.el (org-clock-in): Call `org-clock-out' with the
new argument `switch-to-state' set to nil.  Fix docstring.
(org-clock-in-last): Prompt for a todo state to switch to when
called with three universal prefix arguments.  Don't display a
message when the clock is already running.  Update docstring.
(org-clock-out): New argument `switch-to-state'.  When this
argument is non-nil, prompt for a state to switch the clocked
out task to, overriding `org-clock-out-switch-to-state'.
2012-08-09 14:52:38 +02:00
Bastien Guerry ced90464dd org.el (org-entry-get): Don't use `org-flet'
* org.el (org-entry-get): Don't use `org-flet'.
2012-08-08 15:19:24 +02:00
Bastien Guerry d70cf44e7b org.el: Fix compiler warnings. 2012-08-08 14:55:40 +02:00
Bastien Guerry 12101efc2f org.el: Fix names I forgot to change in the previous patch. 2012-08-08 14:48:35 +02:00
Nicolas Goaziou b523a3edf5 Fix tests
* lisp/org-element.el: Update code commets.
* testing/lisp/test-org-element.el: Remove tests for renamed
  navigation and manipulation fuctions.
* testing/lisp/test-org.el: Add tests for renamed navigation and
  manipulation functions.
2012-08-08 13:58:14 +02:00
Bastien Guerry ee483e98f7 Merge branch 'master' of orgmode.org:org-mode 2012-08-08 12:11:57 +02:00
Bastien Guerry 1c595f3e5d org.el: Rename `org-backward/forward-same-level' to `org-backward/forward-heading-same-level'
* org.el (org-forward-heading-same-level): Rename from
`org-forward-same-level'.
(org-backward-heading-same-level): Rename from
`org-backward-same-level'.
2012-08-08 12:11:51 +02:00
Bastien Guerry f485b0a889 Move org-element commands to org.el and rename them.
* org.el (org-forward-element): Rename from
`org-element-forward'.
(org-backward-element): Rename from `org-element-backward'.
(org-up-element): Rename from `org-element-up'.
(org-down-element): Rename from `org-element-down'.
(org-drag-element-backward): Rename from
`org-element-drag-backward'.
(org-drag-element-forward): Rename from
`org-element-drag-forward'.
(org-mark-element): Rename from `org-element-mark-element'.
(org-transpose-element): Rename from `org-element-transpose'.
(org-unindent-buffer): Rename from
`org-element-unindent-buffer'.
(org-mode-map): Update the names of a commands.
Remove useless declarations.

* org-element.el (org-element-forward, org-element-backward)
(org-element-up, org-element-down)
(org-element-drag-backward, org-element-drag-forward)
(org-element-mark-element, org-narrow-to-element)
(org-element-transpose, org-element-unindent-buffer): Move to
org.el.
2012-08-08 11:57:37 +02:00
Nicolas Goaziou 694a858506 Fix bug when marking subtree with point on an inlinetask
* lisp/org.el (org-mark-subtree): Fix bug when marking subtree with
  point on an inlinetask.  Refactor code.
* testing/lisp/test-org.el: Add test.
2012-08-08 11:50:09 +02:00
Bastien Guerry 06c8457f0c Merge branch 'master' of orgmode.org:org-mode 2012-08-08 11:36:48 +02:00
Nicolas Goaziou 0a04169769 org-element: Fix `org-element-at-point' in some corner cases
* lisp/org-element.el (org-element-item-parser,
  org-element-plain-list-parser): Make sure that the element ends at
  the beginning of a line if possible.
(org-element-at-point): Return expected element when point is at an
element's end or at its contents' end.
* testing/lisp/test-org-element.el: Add test.
* testing/lisp/test-org.el: Add test.
2012-08-08 09:56:28 +02:00
Bastien Guerry a66f44d123 org.el (org-forward-same-level): Fix typo in docstring.
* org.el (org-forward-same-level): Fix typo in docstring.
2012-08-08 09:32:13 +02:00
Christophe Junke 9dae6f04b1 Let `org-agenda-time-grid' control if the grid is displayed.
* org-agenda.el (org-agenda-list): Ensure that the
list returned by `org-agenda-add-time-grid-maybe' is appended
to `rtnall' before checking if the latter is emtpy.

In the case where rtnall is empty (no item for current day), we do not
call org-agenda-add-time-grid-maybe.  This seems bogus because that
function is already computing whether the time grid must be included,
and does so according to the user's preferences.

In particular, the `org-agenda-time-grid' variable has a
'require-timed' parameter controlling the visibility of the time grid.

So, this patch :

 - removes the premature check for rtnall being empty,
 - inconditionally calls org-agenda-add-time-grid-maybe,
 - and finally checks the emptiness of the resulting list
   before pretty printing.

TINYCHANGE
2012-08-07 23:44:08 +02:00
Bastien Guerry 179f5e484a org-agenda.el: New commands `org-agenda-next/previous-item'.
* org-agenda.el (org-agenda-mode-map): Bind
`org-agenda-show-priority' to `C-c,' instead of `P'.
(org-agenda-next-item, org-agenda-previous-item): New
commands to move by one item down/up in the agenda.
(org-agenda-mode-map): Bind `org-agenda-next-item' and
`org-agenda-previous-item' to `N' and `P' respectively.

Thanks to Eric Abrahamsen for this idea and a first patch.
2012-08-07 23:11:26 +02:00
Nicolas Goaziou d70f965486 Do not make a special case for inlinetasks when marking a subtree
* lisp/org.el (org-mark-subtree): Do not make a special case for
  inlinetasks when marking a subtree. These are handled by
  `org-element-mark-element'.
* testing/lisp/test-org.el: Add test.
2012-08-07 13:38:32 +02:00
Bastien Guerry 7bc9b2242e org-rmail.el: Fix compiler warnings. 2012-08-07 13:27:18 +02:00
Bastien Guerry 1f7263d6b1 org-rmail.el: Fix bug when storing and inserting a link.
* org-rmail.el (org-rmail-store-link, org-rmail-follow-link):
Toggle headers when necessary.

Thanks to T.F. Torrey for reporting this bug and for proposing a fix.
2012-08-07 12:09:33 +02:00
Bastien Guerry 93acc82b96 Fix yet another compiler warning.
Let's go to sleep now.
2012-08-07 02:05:10 +02:00
Bastien Guerry 01bd28be69 org-element.el (org-narrow-to-element): Autoload.
* org-element.el (org-narrow-to-element): Autoload.
2012-08-06 20:11:33 +02:00
Bastien Guerry 7efbd4222d org.el: Enhance `C-c @' and use `M-h' for `org-element-mark-element'.
* org.el (org-mode-map): Use `M-h' for
`org-element-mark-element'.
(org-mark-subtree): Allow a numeric prefix argument to move up
into the hierarchy of headlines.

* org-element.el (org-element-up, org-element-down): Autoload.
2012-08-06 20:02:54 +02:00
Bastien Guerry 1276ab3ff1 Fix compiler warnings.
* org.el: Declare functions and don't require org-element.

* org-element.el (org-element-at-point, org-element-forward)
(org-element-backward, org-element-drag-backward)
(org-element-drag-forward, org-element-mark-element)
(org-element-transpose, org-element-unindent-buffer): Autoload.
Require 'org and remove all declarations.
2012-08-06 19:13:43 +02:00
Bastien Guerry 974c69803e org-exp-blocks.el: Fix compiler warning. 2012-08-06 19:12:51 +02:00
Bastien Guerry 2a1c9a26f0 Merge branch 'master' of orgmode.org:org-mode 2012-08-06 18:01:07 +02:00
Eric Schulte e400a80429 improved handling of results that look like elisp
* lisp/ob.el (org-babel-string-read): Don't automatically evaluate
  code block results which look like elisp.
  (org-babel-import-elisp-from-file): Raise a warning message when the
  process of reading code block results raises an error.
2012-08-06 09:37:09 -06:00
Bastien Guerry 690372d948 org-exp-blocks.el: Fix compiler warning. 2012-08-06 17:08:23 +02:00
Bastien Guerry 8e4f897c49 org-element.el: Declare variables. 2012-08-06 17:06:13 +02:00
Bastien Guerry 4ea4cc848c org-element.el: Declare more functions to fix compiler warnings. 2012-08-06 16:47:58 +02:00
Bastien Guerry 256f7dc998 org-pcomplete.el: Fix compiler warning. 2012-08-06 16:42:24 +02:00
Bastien Guerry 7791d40045 Add declarations to org-element.el 2012-08-05 20:14:21 +02:00
Bastien Guerry 6cd13146c9 org.el: Use variables instead of constants for `org-outline-regexp-bol' and `org-heading-regexp'
* org.el (org-outline-regexp-bol, org-heading-regexp): Use
variables instead of constants.

This fixes compiler warnings when compiling with Emacs 23.4.
2012-08-05 20:03:39 +02:00
Bastien Guerry b7a61ed7ea org-archive.el (org-datetree-find-date-create): Declare.
* org-archive.el (org-datetree-find-date-create): Declare.

This fixes a compiler warning when compiling with Emacs 23.4.
2012-08-05 20:02:36 +02:00
Bastien Guerry 2cd4333398 Fix two compiler warnings. 2012-08-05 18:59:51 +02:00
Bastien Guerry 4f627f86d7 org.el: Fix bug in ̀org-open-at-point'.
* org.el (org-open-at-point): Only set
`clean-buffer-list-kill-buffer-names' when the feature
'midnight has been loaded.

Thanks to François Allisson for reporting this bug.
2012-08-05 11:40:47 +02:00
Bastien Guerry 216768531f org-icalendar.el: Let APPT_WARNTIME take precedence over ̀org-icalendar-alarm-time'.
* org-icalendar.el (org-print-icalendar-entries): Let
APPT_WARNTIME take precedence over ̀org-icalendar-alarm-time'.
2012-08-05 11:30:23 +02:00
Bastien Guerry de271e3751 Introduce a new special property CLOCKSUM_T for today's clocked time.
* org.el (org-special-properties): New special property
CLOCKSUM_T.
(org-entry-properties): Handle the new special property.

* org-colview.el (org-columns): Handle a new special property
CLOCKSUM_T.
(org-agenda-colview-summarize, org-agenda-colview-compute):
Ditto.

* org-clock.el (org-clock-sum-today): New function.
(org-clock-sum): New argument PROPNAME to set a custom text
property instead of :org-clock-minutes.

* org.texi (Special properties, Column attributes)
(Agenda column view): Document the new special property
CLOCKSUM_T.

Thanks to Brian Wood who asked a question wrt this.
2012-08-05 11:12:04 +02:00
Bastien Guerry 6f571de2f0 org-agenda.el: More appropriate error when there is no Org agenda.
* org-agenda.el (org-agenda-check-type): Throw a more
appropriate error message when no agenda is currently being
displayed.
2012-08-05 09:16:40 +02:00
Bastien Guerry 4ea1d6206a Merge branch 'master' of orgmode.org:org-mode 2012-08-04 23:03:45 +02:00
Bastien Guerry a27c0d0fcc org.el: Make `org-entry-get' find a property before the first headline.
* org.el (org-get-property-block): Find blocks before the
first headline.
(org-entry-properties): Minor code cleanup.
(org-entry-get, org-entry-get-with-inheritance): Get property
before the first headline.
2012-08-04 23:02:03 +02:00
Achim Gratz b9916f2e2b Makefile: enable one-process-per-source compilations again
* default.mk: Re-introduce ELC for single file compilation.

* targets.mk: New targets compile-single and compile-single-source
  that get handed off to lisp/Makefile.

* lisp/Makefile: Implement pattern rule using $(ELC).  Implement
  target compile-single that uses a separate Emacs process for each
  target by invoking the pattern rule.  Implement target
  compile-single-source that additionally removes the compiled file
  directly after it has been produced, so compilation will always use
  source files only, never byte-compiled files.

* Makefile: Document new targets.

These new targets are meant to check for problems with
interdependencies in Org.
2012-08-04 15:59:08 +02:00
Nicolas Goaziou 9d045b21bb org-element: Consider first "+" as a comment when parsing an ill-defined keyword
* lisp/org-element.el (org-element-comment-parser): Consider first "+"
  as a comment when parsing an ill-defined keyword.
2012-08-04 10:19:27 +02:00
Bastien Guerry 71c957d903 org-mobile.el: Fix tags gathering again.
Thanks to James Harkins for the patch.
2012-08-04 10:22:20 +02:00
Eric Schulte 1952afa6ed more efficient org-babel-with-temp-filebuffer
* lisp/ob-tangle.el (org-babel-with-temp-filebuffer): Don't execute
  macro argument multiple times.
2012-08-03 13:34:10 -06:00
Bastien Guerry 62bf9cace0 org-mobile.el (org-mobile-create-index-file): Use `files-alist'.
* org-mobile.el (org-mobile-create-index-file): Use `files-alist'.
2012-08-03 20:05:04 +02:00
Abdó Roig-Maranges dd49e0b225 Option to chose directory for latex preview images
* org.el (org-latex-preview-ltxpng-directory): New option.
  (org-preview-latex-fragment): Store LaTeX preview images in
  `org-latex-preview-ltxpng-directory'.

Added an option `org-latex-preview-ltxpng-directory' with a path
where the preview images will be stored.  The default does not
change (small little ltxpng scattered all over the place) but now
the user can chose an absolute path and put all the images on a
single place.

TINYCHANGE
2012-08-03 19:53:43 +02:00
Bastien Guerry 96551f3dd8 Delete `org-make-link' and replace previous occurrences by `concat'.
* org.el (org-make-link): Delete.
(org-store-link, org-insert-link)
(org-file-complete-link): Don't use `org-make-link'.

* org-wl.el (org-wl-store-link-folder)
(org-wl-store-link-message): Ditto.

* org-vm.el (org-vm-store-link): Ditto.

* org-rmail.el (org-rmail-store-link): Ditto.

* org-mhe.el (org-mhe-store-link): Ditto.

* org-mew.el (org-mew-store-link): Ditto.

* org-irc.el (org-irc-erc-store-link): Ditto.

* org-info.el (org-info-store-link): Ditto.

* org-id.el (org-id-store-link): Ditto.

* org-gnus.el (org-gnus-group-link, org-gnus-article-link):
Ditto.

* org-eshell.el (org-eshell-store-link): Ditto.

* org-bbdb.el (org-bbdb-store-link): Ditto.
2012-08-03 19:03:21 +02:00
Bastien Guerry 341042a09e org.el: New option `org-url-hexify-p'.
* org.el (org-url-hexify-p): New option.  When non-nil (the
default), hexify URLs when creating a link.

Thanks to Gustav Wikström who suggested this.
2012-08-03 18:51:43 +02:00
Bastien Guerry 1ac2552273 org.el (org-insert-link): Make sure point is at the beginning of the buffer.
* org.el (org-insert-link): Make sure point is at the
beginning of the buffer.
2012-08-03 16:23:57 +02:00
Bastien Guerry 8fca59f71f org.el: Allow opening multiple shell links.
* org.el (clean-buffer-list-kill-buffer-names): Declare.
(org-open-at-point): Allow opening multiple shell links by
creating a new output buffer for each shell process.  The new
buffer is added to `clean-buffer-list-kill-buffer-names'.

Thanks to Tobias Naehring for this idea.
2012-08-03 15:32:01 +02:00
Bastien Guerry 6c2d37debf org-mobile.el: Fix the creation of the list of available tags.
* org-mobile.el (org-mobile-create-index-file): Use
`org-global-tags-completion-table' instead of
`org-tag-alist-for-agenda' to get the tags for the index file.

Thanks to James Harkins who helped figuring out the problem here.
2012-08-03 14:30:18 +02:00
Bastien Guerry bf36319582 org.el (org-global-tags-completion-table): Fix typo in docstring.
* org.el (org-global-tags-completion-table): Fix typo in docstring.
2012-08-03 14:21:59 +02:00
Bastien Guerry 1e34c5d34f org.el: Fontify links to current buffer when inserting a link.
* org.el (org-link-to-org-use-id): use `org-capture' instead
of `org-remember' in the docstring.
(org-link-fontify-links-to-this-file): New function to fontify
links to the current buffer in `org-stored-links'.
(org-store-link): Small code simplification.
(org-link-prettify): Enclose literal links into <...> instead
of [[...]].
(org-insert-link): Use `org-link-fontify-links-to-this-file'.
Also allow completion over links' descriptions, as well as
links destinations.  When the user uses the description for
completion, don't prompt again for a description.

Thanks to Yagnesh Raghava Yakkala who suggested this.
2012-08-03 14:08:20 +02:00
Bastien Guerry 7fdd49dd33 org-capture.el: Fix docstring by adding Gnus to the list of mail clients.
* org-capture.el (org-capture-templates): Fix docstring by
adding Gnus to the list of mail clients.

Thanks to Tassilo Horn for spotting this.
2012-08-03 14:01:19 +02:00
Bastien Guerry 3977d4b373 org.el (org-log-repeat): Enhance docstring.
* org.el (org-log-repeat): Enhance docstring.
2012-08-03 10:09:11 +02:00
Nicolas Goaziou ecba5542e6 org-element: List interpretation doesn't depend on its structure
* lisp/org-element.el (org-element-item-interpreter): Simplify bullet
  creation.
(org-element-plain-list-interpreter): Fix wrong bullets, if needed.

This change allows to intrepret plain lists without providing list's
structure, which can be a bit hairy.  For example, the following
snippet now suffices to create a list programmatically:

  (org-element-interpret-data
   '(plain-list nil
                (item (:bullet "-") (paragraph nil "a"))
                (item (:bullet "-") (paragraph nil "b"))))
2012-08-02 21:56:39 +02:00
Nicolas Goaziou eb2eacf91d org-element: Fix parsing when a keyword follows the commented line
* lisp/org-element.el (org-element-comment-parser): Fix parsing when
  a keyword follows the commented line.
* testing/lisp/test-org-element.el: Add test.
2012-08-02 19:47:14 +02:00
Suhail Shergill 28582bfa0f org-html.el: Make footnotes unique to an entry
* lisp/org-html.el (org-export-as-html): If possible, use the
  :CUSTOM_ID: property to assign unique ids to footnotes.

TINYCHANGE
2012-08-02 18:22:06 +02:00
Bastien Guerry ee1d70172d org.el: Don't bind C-<up> and C-<down> to `org-element-backward/forward'.
* org.el (org-mode-map): Don't bind C-<up> and C-<down> to
`org-element-backward/forward' as these functions stops when
there is no element of the same type before/after point.  It
is useful to navigate with `forward/backward-paragraph' with
no stop in most cases.
2012-08-02 18:18:35 +02:00
Bastien Guerry 21ec0159b8 org-capture.el: New template %l to insert the literal link.
* org-capture.el (org-capture-templates): New template %l to
insert the literal link pointing at the current buffer.

* org.texi (Template expansion): Document the new %l template.

Thanks to Eric Abrahamsen for this idea.
2012-08-02 17:06:22 +02:00
Bastien Guerry 2201d838a4 Merge branch 'master' of orgmode.org:org-mode 2012-08-02 11:59:34 +02:00
Bastien Guerry aa490ffa04 Small doc fix.
* org.texi (Fast access to TODO states): Fix documentation
about allowed characters for fast todo selection.

* org.el (org-todo-keywords): Ditto.

This fixes this wrong change here:
http://orgmode.org/w/?p=org-mode.git;a=commit;h=b6cb72
2012-08-02 11:59:27 +02:00
Nicolas Goaziou 198b079a64 Auto-fill first paragraph in footnote definitions
* lisp/org.el (org-fill-context-prefix): Auto-fill first paragraph in
  footnote definitions.
2012-08-02 11:25:07 +02:00
Eric Schulte 96d4c5ef0a fix org-check-version undefined error when compiled
Prior to this change compiling org-mode and then running Org-mode
functions from a batch Emacs would throw the following error.

  Symbol's function definition is void: org-check-version

Moving the require of org-compat before the use of this function in
org.el fixes this problem.

* lisp/org.el (org-compat): Require org-compat before we first use one
  of its functions (a macro actually).
2012-08-01 09:53:19 -06:00
Bastien Guerry 6cf637fd1d org.el: Prepare `org-fill-paragraph' for `message-mode'.
* org.el (org-fill-paragraph): Falls back on
`message-fill-paragraph' if required in `message-mode'.
2012-08-01 17:51:55 +02:00
Bastien Guerry da8215bc06 org-pcomplete.el: Allow completion over #+OPTIONS, #+TITLE, #+AUTHOR, #+EMAIL and #+DATE.
* org-pcomplete.el (pcomplete/org-mode/file-option/x): New macro.
(pcomplete/org-mode/file-option/options)
(pcomplete/org-mode/file-option/title)
(pcomplete/org-mode/file-option/author)
(pcomplete/org-mode/file-option/email)
(pcomplete/org-mode/file-option/date): Use the new macro to
offer completion over default values for #+OPTIONS, #+TITLE,
#+AUTHOR, #+EMAIL and #+DATE.
2012-08-01 17:19:13 +02:00
Bastien Guerry b771d4b05b org-agenda.el: Bugfix for `org-agenda-write'.
* org-agenda.el (org-agenda-write): Fix bug when writing
agenda to an external file while `org-agenda-sticky' is
non-nil.
2012-08-01 16:32:36 +02:00
Bastien Guerry a88dae9236 Fix compilation warning. 2012-08-01 16:20:22 +02:00
Bastien Guerry a865abb5fe Let's a :APPT_WARNTIME: property override `appt-message-warning-time' in `org-agenda-to-appt'.
* org.el (org-speed-commands-default): New speedy command to
quickly add the :APPT_WARNTIME: property.

* org-agenda.el (org-agenda-to-appt): Use the :APPT_WARNTIME:
property to override `appt-message-warning-time' when adding
an appointment from an entry.

* org.texi (Weekly/daily agenda): Mention APPT_WARNTIME and
its use in `org-agenda-to-appt'.

This feature has been suggested, along with preliminary patches,
by Ivan Kanis.  Thanks!
2012-08-01 16:05:47 +02:00
Bastien Guerry 7024560981 org.el: `org-self-insert-cluster-for-undo' now defaults to nil.
* org.el (org-version): Improve docstring.
(org-self-insert-cluster-for-undo): The default value should
be nil for Emacs >=24.1.  See bug#11774.

See http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11774 for a
discussion about this.
2012-08-01 15:32:15 +02:00
Bastien Guerry 4508dc55e5 org.el (org-fontify-meta-lines-and-blocks-1): Fix previous commit.
* org.el (org-fontify-meta-lines-and-blocks-1): Fix previous
commit.
2012-08-01 14:15:16 +02:00
Nicolas Goaziou a8e00ff0dc Inlined comment syntax is reduced to "#"
* lisp/org.el (org-mode): Define new comment syntax.
(org-fontify-meta-lines-and-blocks-1, org-strip-protective-commas,
org-fill-context-prefix, org-insert-comment,
org-comment-or-uncomment-region): Use new comment syntax.
* lisp/org-element.el (org-element-comment-parser,
  org-element-comment-interpreter, org-element--current-element): Use
  new comment syntax.
* testing/lisp/test-org-element.el: Update tests.
* testing/lisp/test-org.el: Update tests.
2012-08-01 10:47:47 +02:00
Nicolas Goaziou 783fd91e66 When at an item or a footnote definition, fill first paragraph instead
* lisp/org.el (org-fill-paragraph): When at an item or a footnote
  definition, fill first paragraph instead.
* testing/lisp/test-org.el:
2012-07-31 20:49:11 +02:00
Bastien Guerry 64a30f6ecb More flyspell enhancements.
* org.el (org-options-keywords): New constant.
(org-additional-option-like-keywords): Remove duplicates with
keywords in the new constant.
(org-additional-option-like-keywords-for-flyspell): Use the
new constant.
(org-mode-flyspell-verify): Exclude keywords from the new
constant.

* org-pcomplete.el (pcomplete/org-mode/file-option): Use
`org-options-keywords'.
2012-07-31 18:30:54 +02:00
Bastien Guerry 427fee0e4a Fix bug.
* org.el (org-toggle-heading): Bugfix: use
`org-element-mark-element' instead of `org-mark-list'.
2012-07-31 17:51:13 +02:00
Bastien Guerry cbb7742d3b org-list.el (org-mark-list): Delete.
* org-list.el (org-mark-list): Delete.
2012-07-31 17:15:07 +02:00
Eric Schulte 2817f68c17 anonymous function instead of using flet
* lisp/ob-comint.el (org-babel-comint-with-output): Don't name the
  filter function, but rather pass through the anonymous lambda
  directly.
2012-07-31 08:14:12 -06:00
Bastien Guerry 5b9cbe9291 Merge branch 'master' of orgmode.org:org-mode 2012-07-31 16:14:33 +02:00
Bastien Guerry eb5631359a Update a few keybindings in org.el and fix a problem in org-element.el.
* org.el: Update a few keybindings.

Use [(control down)] and "\M-}" for `org-element-forward'.
Use [(control up)] and "\M-{ `org-element-backward'.
Use "\C-c\C-^" for `org-element-up'.
Use "\C-c\C-_" for `org-element-down'.
Use "\C-c\C-@" for `org-element-mark-element'.

* org-element.el (org-element-down): Throw an error when the
element has no content.
2012-07-31 16:11:45 +02:00
Nicolas Goaziou fcca4ab8e4 Fix filling when point is at the very end of a paragraph
* lisp/org.el (org-fill-paragraph): Fix filling when point is at the
  very end of a paragraph.
* testing/lisp/test-org.el: Add test.
2012-07-31 15:42:30 +02:00
Bastien Guerry e3f30e12d2 Add `orgtbl-to-table.el' and `orgtbl-to-unicode'.
* org-table.el (orgtbl-radio-table-templates): Add a template
for org-mode.
(orgtbl-to-orgtbl): Complete and align the table created with
orgtbl-to-orgtbl, in case the user use the function for radio
tables.
(orgtbl-to-table.el): New function to export a table to
another one using the table.el format.
(orgtbl-to-unicode): New function to export a table using
unicode characters.
2012-07-31 15:40:05 +02:00
Bastien Guerry 64de70e1be Merge branch 'master' of orgmode.org:org-mode 2012-07-31 15:26:19 +02:00
Nicolas Goaziou 4d00c5bf4d Complete handling of comment syntax
* lisp/org.el (org-mode): Set comments related variables.
(org-insert-comment, org-comment-or-uncomment-region): New functions.
* testing/lisp/test-org.el: Add test.
2012-07-31 13:55:44 +02:00
Bastien Guerry 86499cb9a8 org-exp.el (org-export-language-setup): Use "Sommaire" for the translation of "Table of contents".
* org-exp.el (org-export-language-setup): Use "Sommaire"
for the french translation of "Table of contents", to avoid a
possible bug when exporting to ODT.
2012-07-31 12:30:30 +02:00
Eric Schulte 0202adb1c0 Merge branch 'master' of orgmode.org:org-mode 2012-07-30 09:37:08 -06:00
Nicolas Goaziou 5cb9beea9b Add tests about filling and auto-filling
* lisp/org.el (org-fill-context-prefix): Small refactoring.
(org-fill-paragraph): Add code comments.
* testing/lisp/test-org.el: Add tests
2012-07-30 15:25:13 +02:00
Bastien Guerry 4c2c6dba7b Enhance flyspelling.
* org.el (org-additional-option-like-keywords): Add keywords.
(org-additional-option-like-keywords-for-flyspell): New
constant to use with flyspell.
(org-mode-flyspell-verify): Use the dedicated constant and
don't check `org-startup-options'.

Thanks to Bjarte Johansen for bringing this up.
2012-07-30 13:02:48 +02:00
Bastien Guerry 9f66ab1d84 Fix bug when using `org-store-agenda-views' with `org-agenda-sticky' on.
* org-agenda.el (org-batch-store-agenda-views): Use the sticky
agenda buffer name, if required.
(org-agenda-write): New parameter `agenda-bufname' to allow
setting the agenda buffer name.

Thanks to François Allisson for reporting this bug.
2012-07-30 12:19:17 +02:00
Bastien Guerry 8eb584331a Add punctuation at the end of the first line of docstrings. Code cleanup. 2012-07-30 10:08:15 +02:00