Commit Graph

3263 Commits

Author SHA1 Message Date
Bastien Guerry 736bc7b904 org.el (org-overview): Don't call `recenter'
* org.el (org-overview): Don't call `recenter'.

Thanks to Nicolas Richard for suggesting this.
2014-05-15 11:11:43 +02:00
Nicolas Goaziou 7515066d94 Rewrite `org-indent-drawer' and `org-indent-block'
* lisp/org.el (org-indent-block, org-indent-drawer): Rewrite functions.
2014-05-07 17:39:52 +02:00
Nicolas Goaziou fe129fb352 Rewrite `org-indent-region'
* lisp/org.el (org-indent-region): Update function according to recent
  `org-indent-line' change.  Optimize it.

* testing/lisp/test-org.el (test-org/indent-region): New test.
2014-05-07 17:39:52 +02:00
Nicolas Goaziou 51ffcd02dd Rewrite `org-indent-line'
* lisp/org.el (org--get-expected-indentation,
  org--align-node-property): New functions.
(org-indent-line): Use new function.  Also merge functionalities with
`org-src-native-tab-command-maybe'.

* lisp/org-src.el (org-src-native-tab-command-maybe): Remove function.

* testing/lisp/test-org.el (test-org/indent-line): New test.
2014-05-07 17:39:52 +02:00
Kyle Meyer d3f210676c org-find-exact-heading-in-directory: Use full path
* lisp/org.el (org-find-exact-heading-in-directory): Use full path for
files.

When the path is not included, `org-find-exact-heading-in-directory'
will fail when the current value of `default-directory' is different
from the argument DIR.

TINYCHANGE
2014-05-06 11:31:18 +02:00
Bastien Guerry 60502a0217 Merge branch 'maint' 2014-04-30 10:44:20 +02:00
Bastien Guerry 0ca4092d72 Fix commit fdb4b54e 2014-04-30 10:43:40 +02:00
Nicolas Goaziou 86a129c597 Fix `org-flag-drawer'
* lisp/org.el (org-flag-drawer): Do not flag drawer when point is on
  an empty line after it.  When hiding the drawer away, make sure
  point always stays in a visible part of the buffer.

* testing/lisp/test-org.el (test-org/flag-drawer): Add tests.
2014-04-28 19:41:08 +02:00
Bastien Guerry c6d698a5ec Merge branch 'maint' 2014-04-25 09:28:43 +02:00
Bastien Guerry fc37d1020a Fix bug introduced in commit fdb4b54e
Thanks to Leonard Randall for reporting it.
2014-04-25 09:27:12 +02:00
Bastien Guerry 1fd54bf8e0 Fix typos
* org.el (org-get-agenda-file-buffer): Fix docstring.

* ox-icalendar.el (org-icalendar-use-deadline): Fix typo in docstring.
2014-04-23 10:06:43 +02:00
Aaron Ecay ef5900641c org.el: use `user-error' instead of `error'.
* lisp/org.el (org-next-block, org-reftex-citation)
(org-create-math-formula, org-check-agenda-file)
(org-occur-next-match, org-auto-repeat-maybe)
(org-offer-links-in-entry, org-open-at-point)
(org-clone-subtree-with-time-shift):
Use `user-error' instead of `error'.
2014-04-22 15:29:38 -04:00
Bastien Guerry 38ffaf061e Merge branch 'maint'
Conflicts:
	lisp/org.el
2014-04-22 11:18:58 +02:00
Bastien Guerry fdb4b54e92 org.el (org-insert-heading): Fix behavior
* org.el (org-insert-heading): Fix behavior when point is at
the beginning of a heading or a list item.  Enhance docstring.

Thanks to York Zhao for reporting this.
2014-04-22 11:18:12 +02:00
Bastien Guerry 28b038e470 Merge branch 'maint' 2014-04-22 08:03:59 +02:00
Bastien Guerry 162f8867c9 org.el (org-mode): Use `org-*-element' functions again
* org.el (org-mode): Use `org-*-element' functions for C-M-a
and C-M-e but fix C-M-e.
2014-04-22 08:03:44 +02:00
Bastien Guerry 9ca840a501 Revert "org.el (org-mode): Use `org-back-to-heading' and `org-end-of-subtree' for C-M-a and C-M-e"
This reverts commit 47e456d8a6.
2014-04-22 08:02:05 +02:00
Bastien Guerry 9a4cc3a21e Merge branch 'maint' 2014-04-21 19:25:44 +02:00
Bastien Guerry 47e456d8a6 org.el (org-mode): Use `org-back-to-heading' and `org-end-of-subtree' for C-M-a and C-M-e
* org.el (org-mode): Use `org-back-to-heading' and
`org-end-of-subtree' for C-M-a and C-M-e.

This partially reverts commit 76fa97922.

Thanks to Leo Liu for reporting this.
2014-04-21 19:25:27 +02:00
Nicolas Goaziou 99af267738 Merge branch 'maint' 2014-04-21 09:25:22 +02:00
Nicolas Goaziou f9c93aaa49 Tiny fix
* lisp/org.el (org-sparse-tree): Tiny fix.
2014-04-21 09:24:58 +02:00
Nicolas Goaziou 881459c6bc Merge branch 'maint' 2014-04-21 09:22:54 +02:00
Nicolas Goaziou 2434d3e248 Fix code typo
* lisp/org.el (org-sparse-tree): Fix code typo.  Small refactoring.

Thanks to Brady Trainor for spotting it.
http://permalink.gmane.org/gmane.emacs.orgmode/85320
2014-04-21 09:19:37 +02:00
Bastien Guerry 198140aa68 org.el: New alias: `org-highlight-links' -> `org-activate-links'
* org.el (org-highlight-links): Rename from
`org-activate-links'.  Update docstring.
(org-update-radio-target-regexp, org-set-font-lock-defaults):
Use `org-highlight-links'.
2014-04-20 12:12:21 +02:00
Bastien Guerry 5e60677cf8 Merge branch 'maint' 2014-04-20 09:31:36 +02:00
Bastien Guerry d9312231e9 org.el (org-check-before-invisible-edit): Show the subtree
* org.el (org-check-before-invisible-edit): Don't just cycle,
show the subtree, as cycling may leave the current heading
folded.

Thanks to Paul Stansell for reporting this.
2014-04-20 09:31:28 +02:00
Bastien Guerry abd8e52dc0 Merge branch 'maint' 2014-04-20 08:44:33 +02:00
Bastien Guerry 5d0e668cc6 org.el (org-contextualize-validate-key): Fix wrong test
* org.el (org-contextualize-validate-key): Fix wrong test.

Thanks to Eric Abrahamsen for reporting the problem and the fix:
http://article.gmane.org/gmane.emacs.orgmode/85276
2014-04-20 08:44:07 +02:00
Bastien Guerry c9ce0cad11 Merge branch 'maint'
Conflicts:
	lisp/org.el
2014-04-20 08:01:14 +02:00
Bastien Guerry 9272ef3e17 Revert "org.el (org-refile): Allow org-refile goto from everywhere"
This reverts commit faa1703b8f.
2014-04-20 08:00:19 +02:00
Nicolas Goaziou 6eb940a8dc Fix cache update when radio targets are being refreshed
* lisp/org-element.el (org-element-cache-refresh): New function.
* lisp/org.el (org-update-radio-target-regexp): Make it standalone.
  Also refresh fontification only when necessary.
(org-all-targets, org-make-target-link-regexp): Remove functions.

* testing/lisp/test-org.el (test-org/update-radio-target-regexp): New
  test
(test-org/all-targets): Remove test.

We need to manually reset cache on radio links as re-fontification
doesn't trigger a buffer change, and, as a consequence, a cache reset.
2014-04-19 18:36:58 +02:00
Bastien Guerry 4ea6c690fd Minor updates on org-trim, org-babel-chomp and org-babel-trim
* org.el (org-trim): Make a defsubst, use `replace-regexp-in-string'.

* ob-core.el (org-babel-chomp, org-babel-trim): Fix docstrings.
2014-04-19 14:43:28 +02:00
Bastien Guerry 9e4113994c Revert "Alias `org-babel-trim' and `org-babel-chomp' to `org-trim' and `org-trim-trailing'."
This reverts commit 7925d42d43.
2014-04-19 14:36:00 +02:00
Bastien Guerry 7925d42d43 Alias `org-babel-trim' and `org-babel-chomp' to `org-trim' and `org-trim-trailing'.
* org.el (org-trim): Rewrite and make a defsubst.

* org-bibtex.el (org-bibtex-get): Use `org-trim' instead of
`org-babel-trim'.

* ob-core.el (org-babel-trim): Delete and alias to `org-trim'.
(org-babel-chomp): Delete and alias to `org-trim-trailing'.
(org-trim-trailing): New defsubst.
(org-babel-examplize-region): Fix version.
2014-04-18 15:11:42 +02:00
Bastien Guerry 5807bfbed2 org.el (org-do-emphasis-faces): Fix docstring
* org.el (org-do-emphasis-faces): Fix docstring.
2014-04-18 13:56:41 +02:00
Nicolas Goaziou b9f2e17f07 Better handling for "mailto" links
* lisp/org.el (org-link-mailto-program): Remove variable.
(org-open-at-point): Delegate "mailto" links handling to `browse-url'
and `browse-url-mailto-function'.

This patch allows to use regular URI syntax and deprecates old Org
specific syntax: mailto:user@domain::Title.

http://permalink.gmane.org/gmane.emacs.orgmode/85007
2014-04-17 21:44:50 +02:00
Bastien Guerry e247cfe1e3 Complete previous patch 2014-04-17 16:20:48 +02:00
Bastien Guerry 6cdaf171db org.el (org-insert-heading): Minor docstring enhancement
* org.el (org-insert-heading): Minor docstring enhancement.
2014-04-17 16:15:48 +02:00
Bastien Guerry cd823dc3f7 Fix commit 5ec31814 2014-04-17 13:19:15 +02:00
Bastien Guerry 1a27bed477 Merge branch 'maint' 2014-04-17 12:52:04 +02:00
Bastien Guerry a937366e8a org.el (org-sort-entries): Fix the number of blank lines to keep for the last entry to sort
* org.el (org-sort-entries): Fix the number of blank lines to
keep for the last entry to sort.

Thanks to Kyle Meyer for raising this issue.
2014-04-17 12:51:49 +02:00
Nicolas Goaziou fffd055ac5 Merge branch 'maint'
Conflicts:
	lisp/org-element.el
	lisp/ox-html.el
2014-04-17 11:34:54 +02:00
Nicolas Goaziou 018a80541a Small refactoring
* lisp/org.el (org-make-link-regexps): Use `regexp-opt' instead of
  `mapconcat' and `regexp-quote'.
2014-04-17 11:30:15 +02:00
Nicolas Goaziou 1ca819e398 Revert "Make Org links compatible with URI syntax"
This reverts commit 3589f64e42.
2014-04-17 11:30:15 +02:00
Bastien Guerry 5ec31814f9 org.el (org-sort-entries): Allow to sort by clocking time
* org.el (org-sort-entries): Allow to sort by clocking time.

Thanks to Noah Slater for this idea.
2014-04-17 10:32:36 +02:00
Bastien Guerry 817619a50b Revert "org.el (org-sort-entries): Allow to sort by clocking time"
This reverts commit 1cca8f534f.
2014-04-17 10:32:23 +02:00
Bastien Guerry 1cca8f534f org.el (org-sort-entries): Allow to sort by clocking time
* org.el (org-sort-entries): Allow to sort by clocking time.

Thanks to Noah Slater for this idea.
2014-04-17 10:30:44 +02:00
Bastien Guerry 06bbbee67a Merge branch 'maint' 2014-04-17 09:18:19 +02:00
Bastien Guerry c3810f71b6 org.el (org-update-dblock): Use `save-excursion'
* org.el (org-update-dblock): Use `save-excursion' instead of
`save-window-excursion' so that blocks can edit other windows and
change the window layout.

Thanks to Martin for reporting this.
2014-04-17 09:18:08 +02:00
Bastien Guerry 11f7fe8408 Merge branch 'maint' 2014-04-17 00:35:39 +02:00