Commit graph

6970 commits

Author SHA1 Message Date
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