Commit Graph

3378 Commits

Author SHA1 Message Date
Nicolas Goaziou aaa70b90ef Fix failing tests
* lisp/org.el (org--align-node-property): Fix failing tests.
2014-09-02 12:45:07 +02:00
Nicolas Goaziou f51a72c95c Merge branch 'maint'
Conflicts:
	lisp/org.el
2014-09-02 12:34:47 +02:00
Nicolas Goaziou 2de0c1c3da Fix 37bf05
* lisp/org.el (org-re-property): Fix regexp.  Improve docstring.
* testing/lisp/test-org-element.el (test-org-element/node-property):
  Update test.

Thanks to Daimrod for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/90383
2014-09-02 12:33:35 +02:00
Nicolas Goaziou 539eac9211 org-element: Recognize planning info only right after a headline
* lisp/org.el (org-planning-line-re): New variable.  Renamed from
  `org-planning-or-clock-line-re'.

* lisp/org-element.el (org-element-paragraph-separate,
  org-element-headline-parser, org-element-inlinetask-parser, ,
  org-element--current-element): Use new variable.
(org-element-planning-parser): Check previous line before parsing
planning info.  When right after a headline, fallback to paragraph
parsing.

* testing/lisp/test-org-element.el (test-org-element/planning-parser):
  Add a test.  Update others.
(test-org-element/timestamp): Remove a test.
* testing/lisp/test-ox.el (test-org-export/handle-options): Update
  test.
2014-08-31 15:39:35 +02:00
Nicolas Goaziou 288ffa15f5 Fix failing tests
* lisp/org.el (org--align-node-property): Properly align properties
  with empty values.
2014-08-31 11:43:38 +02:00
Nicolas Goaziou d2643be6d8 Merge branch 'maint'
Conflicts:
	lisp/org-element.el
2014-08-31 11:43:27 +02:00
Nicolas Goaziou 37bf0576f2 org-element: Make properties parsing more robust
* lisp/org-element.el (org-element-property-drawer-parser,
  org-element-node-property-parser): Ignore lines that are not node
  properties.
(org-element-node-property-interpreter): Allow nil properties.

* lisp/org.el (org-re-property): Fix regexp to match properties with
  empty values.

* testing/lisp/test-org-element.el (test-org-element/node-property):
  Add tests.

Thanks to Eike for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/90293
2014-08-31 11:10:56 +02:00
Thierry Banel 851b779d1a org-table: Add ascii plotting in tables
* org-table.el (orgtbl-ascii-plot): Top-level function.
(orgtbl-ascii-draw), (orgtbl-uc-draw-grid), (orgtbl-uc-draw-cont):
Functions which go in table formulas for drawing bars.
* org.el: key binding and menu binding

Thanks to Michael Brand and Nicolas Goaziou for feedback and
enhancements.
2014-08-29 10:00:35 +02:00
Konubinix ef5ec3d536 Use `org-clock-string' whenever possible
* lisp/org-clock.el (org-find-open-clocks):
* lisp/org.el (org-clone-subtree-with-time-shift,
 org-insert-property-drawer, org-at-clock-log-p): Use
 `org-clock-string' whenever possible instead of hardcoded "CLOCK".
(org-clock-line-re): New variable.
2014-08-27 10:10:24 +02:00
Nicolas Goaziou 2593b4d878 org-element: Add :post-affiliated property to all elements
* lisp/org-element.el (org-element-headline-parser,
  org-element-inlinetask-parser, org-element-item-parser,
  org-element-section-parser, org-element-clock-parser,
  org-element-node-property-parser, org-element-planning-parser,
  org-element-table-row-parser): Add dummy :post-affiliated property.

* lisp/org.el (org--get-expected-indentation, org-indent-line,
  org-indent-region, org-adaptive-fill-function,
  org-toggle-fixed-width, org-forward-paragraph,
  org-backward-paragraph, org-mode-flyspell-verify): Remove nullity
  checks for :post-affiliated.

Even though these elements cannot have affiliated keywords, beginning
of element is a logical default value.  It makes checking the nullity
of the unnecessary.
2014-08-26 16:05:19 +02:00
Nicolas Goaziou 6987059a20 Merge branch 'maint' 2014-08-25 15:34:14 +02:00
Nicolas Goaziou 409913b253 Fix `org-promote' error
* lisp/org.el (org-called-with-limited-levels): Initialize variable.

http://permalink.gmane.org/gmane.emacs.orgmode/90119
2014-08-25 15:32:35 +02:00
Aaron Ecay d582b3b563 fix docstring typo
* lisp/org.el (org-insert-heading): Fix docstring typo.
2014-08-16 00:45:39 -04:00
Nicolas Goaziou ca46777144 Silence byte-compiler 2014-08-11 15:35:33 +02:00
Eric Schulte 385746d69c add support for forth code blocks
Currently only session code block evaluation is supported, however
  this is a reasonable default for forth.

* lisp/org.el (org-babel-load-languages): Add "Forth" to the list of
  loadable languages.

* list/ob-forth.el: New file.
2014-08-09 19:00:02 -04:00
Federico Beffa b3fbd31f17 org.el: Add function to indent environment inserted by cdlatex-enviroment
* lisp/org.el (org-cdlatex-environment-indent): New function.

New function is bound to "\C-c{" in `org-cdlatex-mode-map' to add
a LaTeX environment and indent it.

TINYCHANGE
2014-08-09 09:50:53 +02:00
Joe Corneli 3ea1ce2e85 Fix bug associated with setting image size via ATTR.
* lisp/org.el (org-display-inline-images): This change is necessary to
  make ATTR work.  Removed unnecessary save-match-data forms.
2014-08-07 15:02:42 +02:00
Nicolas Goaziou 381ad4b33a Small refactoring
* lisp/org.el (org-fill-paragraph): Avoid calling
  `fill-region-as-paragraph' if BEG is equal to END.
2014-08-03 09:57:37 +02:00
Nicolas Goaziou d649b792c0 Small refactoring
* lisp/org.el (org-fill-paragraph): Small refactoring.
2014-08-02 23:16:05 +02:00
Nicolas Goaziou cbb82d0c6e Speed up paragraph filling
* lisp/org.el (org-fill-paragraph): Do not parse objects in whole
  paragraph if none looks like a line break.
2014-08-02 22:49:24 +02:00
Bastien Guerry 296d82a383 New alias `org-toggle-latex-fragment' for `org-preview-latex-fragment'
* org.el (org-ellipsis, org-remove-highlights-with-change):
Enhance docstring.
(org-preview-latex-fragment): Make obsolete.  Alias to the new
name `org-toggle-latex-fragment'.
(org-mode, org-mode-map): Use `org-toggle-latex-fragment'.
2014-08-01 13:52:32 +02:00
Nicolas Goaziou cdb85242d6 Fix block hiding
* lisp/org.el (org-hide-block-toggle): Correctly find boundaries of
  the block at point.  Fix `off' argument behavior.  Allow to hide
  a block when at any affiliated keyword.

* testing/lisp/test-org.el (test-org/hide-block-toggle): New test.

Thanks to Andrea Rossetti for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/89324
2014-08-01 10:50:36 +02:00
Bastien Guerry 3b6f386795 Merge branch 'maint' 2014-07-29 23:28:34 +02:00
Achim Gratz 60bfafcb0c org.el (org-refresh-category-properties): Enhance regexp
* org.el (org-refresh-category-properties): Enhance regexp.
2014-07-29 23:28:08 +02:00
Matt Lundin dc4942442c Fix docstring of org-agenda-inhibit-startup
* lisp/org.el: org-agenda-inhibit-startup: fix docstring to reflect
  default value
2014-07-29 23:19:10 +02:00
Bastien Guerry 8d8dfacfc6 Fix code typo in 3af4949a 2014-07-29 16:56:44 +02:00
Bastien Guerry 06aa1b615c org.el (org-yank): Small docstring enhancement
* org.el (org-yank): Small docstring enhancement.
2014-07-29 15:35:39 +02:00
Malcolm Purvis 3af4949a07 org.el (org-refresh-category-properties): Regexp enhancement
* org.el (org-refresh-category-properties): Regexp enhancement.

TINYCHANGE
2014-07-29 15:22:54 +02:00
Bastien Guerry f8b42e8ebe Don't use an overlay for src blocks backgrounds
* org-faces.el (org-block-background): Delete.

* org.el (org-fontify-meta-lines-and-blocks-1): Don't use an
overlay for the block background.
(org-in-src-block-p): Check against the `src-block' text
property, not against an overlay.

The overlay was introduced here:
http://orgmode.org/cgit.cgi/org-mode.git/commit/?id=27d98d879
and fixed here
http://orgmode.org/cgit.cgi/org-mode.git/commit/?id=69811ff44

But (1) it makes fontification slowler, (2) it makes
`org-in-src-block-p' slower and it prevents correct ps-printing
of Org buffers.

If we want to use a different background color, we need another
solution than using overlays.
2014-07-28 18:54:00 +02:00
Bastien Guerry e8b51c0ce5 org.el (org-self-insert-command): Use `yas-expand'
* org.el (org-self-insert-command): Use `yas-expand' as
yas/expand is obsolete since Yasnippet 0.8.

Thanks to Craig Tanis for reporting this.
2014-07-28 17:28:54 +02:00
Bastien Guerry 2cd70ef915 org.el (org-set-font-lock-defaults): Highlight COMMENT
* org.el (org-set-font-lock-defaults): Highlight COMMENT in
headlines with `org-special-keyword'.
2014-07-28 16:03:05 +02:00
Bastien Guerry 31c7e3f065 org.el (org-comment-dwim): Fix docstring location
* org.el (org-comment-dwim): Fix docstring location.
2014-07-28 16:00:23 +02:00
Bastien Guerry 8b7b2f6600 org.el (org-open-at-point): Also open links in comment blocks
* org.el (org-open-at-point): Also open links in comment blocks.
2014-07-28 15:40:49 +02:00
Bastien Guerry 9139521186 Complete commit 9e006d11
* org.el (org-preview-latex-fragment): Remove LaTeX fragments
overlays when they are displayed.  Fix message.
2014-07-28 01:24:56 +02:00
Bastien Guerry 96323cf2aa Merge branch 'maint' 2014-07-28 01:03:03 +02:00
Bastien Guerry d8a0ee7aad org.el (org-paste-subtree): Fix match subexpression
* org.el (org-paste-subtree): Fix match subexpression.

Thanks to Anders Johansson for reporting this.
2014-07-28 01:02:50 +02:00
Bastien Guerry aef3b6c3f9 org-refile: Don't copy the refiled subtree to the clipboard
* org.el (org-paste-subtree): New parameter `remove', to
remove the pasted subtree from the `kill-ring'.
(org-refile): Use the new parameter of `org-paste-subtree'.

Thanks to Samuel Wales for suggesting this.
2014-07-28 00:49:01 +02:00
Bastien Guerry 9e006d1128 org.el (org-ctrl-c-ctrl-c): Don't remove LaTeX fragments overlays
* org.el (org-ctrl-c-ctrl-c): Don't remove LaTeX fragments overlays.
2014-07-27 19:44:40 +02:00
Bastien Guerry 3aef08ddeb org.el (org-activate-plain-links): Don't activate :elisp: and 🐚 tags
* org.el (org-activate-plain-links): Don't activate :elisp:
and 🐚 tags as links.  Enhance the docstring.
(org-activate-angle-links, org-activate-footnote-links)
(org-activate-bracket-links, org-activate-dates)
(org-activate-target-links): Minor docstrings enhancement.

Thanks to Andrea Rossetti for reporting this.
2014-07-27 15:58:13 +02:00
Eric Schulte fdc673dac0 remove extra escape org-emphasis-regexp-components
specifically in the second 'post' element

* lisp/org.el (org-emphasis-regexp-components): Remove extra escape
  org-emphasis-regexp-components, specifically in the second 'post'
  element.
2014-07-03 07:59:15 -04:00
Nicolas Goaziou c9eaea360a Fix `org-drag-element-backward'
* lisp/org.el (org-drag-element-backward): Correcly drag elements in
  a drawer or a block.
* testing/lisp/test-org.el (test-org/drag-element-backward): Add test.
2014-06-25 10:49:52 +02:00
Eric Schulte 518b60aa42 allow square brackets in emphasis post-match
* lisp/org.el (org-emphasis-regexp-components): Allow square brackets
  in the emphasis post match.
2014-06-23 17:47:03 -04:00
Matt Lundin 4a4dbe16d8 Fix speedkeys to move subtrees up and down
* lisp/org.el (org-speed-commands-default): Bind "U" and "D" to
`org-metaup' and `org-metadown'.

Org speed keys were not updated to reflect the recent changes to
org-shiftmetaup and org-shiftmetadown.  As a result the default
bindings for speedkeys "U" and "D" were destructive, since they moved
only single lines.  Binding them to org-metaup and org-metadown fixes
the problem.

Thanks to Marco Wahl for reporting the problem:
http://permalink.gmane.org/gmane.emacs.orgmode/87873
2014-06-23 16:55:21 +02:00
Achim Gratz 22410544c7 org: correct package-version for org-structure-template-alist
* lisp/org.el (org-structure-template-alist): Package version should
  be a symbol name, not a string.

Fixes ce41c076c0.
2014-06-22 10:26:43 +02:00
Aaron Ecay ce41c076c0 org.el: insert missing quote 2014-06-21 23:32:18 -04:00
Aaron Ecay 94939bd473 org-mtags: remove
* contrib/lisp/org-mtags.el: Delete file.
* lisp/org.el (org-structure-template-alist): Remove <foo>-style tags.
(org-complete-expand-structure-template): Don't handle <foo>-style tags.
2014-06-21 20:48:46 -04:00
Bastien Guerry ce2359eb80 Merge branch 'maint'
Conflicts:
	lisp/org.el
2014-06-20 08:44:06 +02:00
Bastien Guerry 4b0557bdd8 org.el: Delete `org-fix-ellipsis-at-bol'
* org.el (org-fix-ellipsis-at-bol): Delete.
(org-mode, org-show-context, org-isearch-end): Don't use
`org-fix-ellipsis-at-bol'.
2014-06-20 08:41:34 +02:00
Bastien Guerry b414844daa Merge branch 'maint' 2014-06-15 10:49:36 +02:00
Bastien Guerry 88036251eb org.el (org-fontify-meta-lines-and-blocks-1): Fix handling of `org-hidden-keywords'
* org.el (org-fontify-meta-lines-and-blocks-1): Fix handling
of `org-hidden-keywords'.

Thanks to Leu Zhe for reporting this.
2014-06-15 10:49:01 +02:00