Commit Graph

3170 Commits

Author SHA1 Message Date
Bastien Guerry 13b5123da1 Merge branch 'maint'
Conflicts:
	contrib/lisp/ox-koma-letter.el
2014-02-05 16:16:36 +01:00
Bastien Guerry a6f81047a4 org.el (org-file-contents): Return an empty string instead of the message
* org.el (org-file-contents): Return an empty string instead
of the message.
2014-02-05 16:15:55 +01:00
Florian Beck 01e8103f8f Font-lock: allow hiding of brackets surrounding macros
* lisp/org.el (org-hide-macro-markers): new option
  (org-fontify-macros): new function
  (org-set-font-lock-defaults): call `org-fontify-macros'

* doc/org.texi: Document user option `org-hide-macro-markers'

TINYCHANGE
2014-02-05 11:13:39 +01:00
Bastien Guerry aa19233d80 Merge branch 'maint' 2014-02-05 10:57:01 +01:00
Bastien Guerry a08bff4138 org.el (org-open-at-point): Fix bug when opening a plain link followed by a bracket link
* org.el (org-open-at-point): Fix bug when opening a plain
link followed by a bracket link.

Thanks to John Kitchin for reporting this.
2014-02-05 10:56:50 +01:00
Nicolas Richard 5f0ca0ee92 Renaming of ob-sh to ob-shell: various fixes
* lisp/org.el (org-babel-load-languages):
* testing/org-test.el:
* testing/README: change 'sh' to 'shell'

* testing/lisp/test-ob-sh.el: re-rename test file (fixes 80754a8)
2014-02-02 00:08:56 -07:00
Bastien Guerry 4df24f5fc8 Merge branch 'maint' 2014-02-01 01:09:00 +01:00
Bastien Guerry ccc4f6b96e Fix d035a9af6
Thanks to Nicolas for providing the correct fix.
2014-02-01 01:08:42 +01:00
Bastien Guerry c89827dc37 Revert "org.el (org-ctrl-c-ctrl-c): Bugfix"
This reverts commit d035a9af6c.

See http://article.gmane.org/gmane.emacs.orgmode/81752
2014-02-01 01:06:25 +01:00
Bastien Guerry bdeac998c8 Merge branch 'maint' 2014-01-31 15:53:54 +01:00
Bastien Guerry d035a9af6c org.el (org-ctrl-c-ctrl-c): Bugfix
* org.el (org-ctrl-c-ctrl-c): Fix behavior when hitting C-c
C-c on LaTeX formulas in tables.
2014-01-31 15:53:42 +01:00
Bastien Guerry 21ce3296b7 Merge branch 'maint' 2014-01-31 10:39:06 +01:00
Bastien Guerry 7ddebe5c7b Revert "org.el (org-map-entries): Use `save-window-excursion'"
This reverts commit 3ec38f5c06.
2014-01-31 10:38:50 +01:00
Bastien Guerry 4068a829a1 org.el: Fix compiler warnings 2014-01-31 09:45:25 +01:00
Bastien Guerry 99a23ba436 Merge branch 'maint' 2014-01-30 12:43:02 +01:00
Bastien Guerry 53c664c4ec org.el (org-refile--get-location): New internal function
* org.el (org-refile--get-location): New internal function
using a wider set of possible refile locations.
(org-refile-get-location): Use it.
2014-01-30 12:42:13 +01:00
Bastien Guerry 98de33a9ac Merge branch 'maint' 2014-01-30 12:21:51 +01:00
Bastien Guerry f3ed0f7c6c org.el (org-refile): Fix bug when refiling the last subtree
* org.el (org-refile): Fix bug when refiling the last subtree
of the buffer: don't leave out the last character.
2014-01-30 12:21:39 +01:00
Bastien Guerry cf2c7e9f18 Merge branch 'maint' 2014-01-30 11:59:57 +01:00
Bastien Guerry 3c71ab34dd org.el (org-sort-entries): Restore the point location when there is nothing to sort
* org.el (org-sort-entries): Restore the point location when
there is nothing to sort.
2014-01-30 11:59:25 +01:00
Bastien Guerry 72ad5257fc Merge branch 'maint' 2014-01-29 14:58:14 +01:00
Benjamin Drieu 33a0a198e3 org.el (org-store-link): Fix selection of the function to store the link
* org.el (org-store-link): Fix selection of the function to
store the link.
2014-01-29 14:57:45 +01:00
Bastien Guerry 524242fc4d Fix 80fc5ad again 2014-01-29 10:31:37 +01:00
Bastien Guerry 9f6c5897b3 Merge branch 'master' of orgmode.org:org-mode 2014-01-29 10:18:22 +01:00
Bastien Guerry 2c7ffbe4b2 Fix 80fc5ad
Thanks to Yasushi SHOJI for reporting this.
2014-01-29 09:19:08 +01:00
Nicolas Goaziou 6a00c96541 Remove left over references to QUOTE blocks
* lisp/org.el (org-quote-string): Remove variable.
(org-enable-fixed-width-editor, org-context): Update docstring.
(org-toggle-fixed-width-section): Remove function and binding.
(org-set-font-lock-defaults): Remove reference to `org-quote-string'.

* lisp/org-element.el (org-element-headline-parser,
  org-element-headline-interpreter): Remove references to
  `org-quote-string'.

* testing/lisp/test-org-element.el (test-org-element/headline-quote-keyword):
  Remove test.
(test-org-element/headline-interpreter): Remove a test.
2014-01-28 21:36:54 +01:00
Bastien Guerry 92c696cf8d Revert "Improve message when file to include is missing"
This reverts commit 8ad7b3888f.
2014-01-24 12:19:25 +01:00
Bastien Guerry da8daf50a7 Merge branch 'maint' 2014-01-24 12:17:21 +01:00
Bastien Guerry e8bfc5336c Fix 77458b 2014-01-24 12:17:08 +01:00
Sebastien Vauban 8ad7b3888f Improve message when file to include is missing
* org.el (org-file-contents): Improve message when linked file does not exist.
2014-01-24 12:15:08 +01:00
Bastien Guerry ac7fb4dd79 org.el (org-priority): Don't use `org-preserve-lc'
* org.el (org-priority): Don't use `org-preserve-lc' as it is
not necessary here.
2014-01-20 22:40:37 +01:00
Bastien Guerry 80fc5adb58 org.el (org-provide-todo-statistics): Allow to set to a list of two lists, for TODO and DONE keywords
* org.el (org-provide-todo-statistics): Allow to set to a list
of two lists, one with TODO keywords, the other one with DONE
keywords.
(org-update-parent-todo-statistics): Correctly handle
`org-provide-todo-statistics' when it is set as a list of two
lists, for TODO and DONE keywords.

Thanks to Fletcher Charest for reporting this and requesting
this feature.
2014-01-20 16:06:19 +01:00
Bastien Guerry ea0d35674f org.el: New command org-insert-last-stored-link bound to `C-c M-l'
* org.el (org-insert-all-links): New parameters `pre' and
`post' to specify a string to preprend and append.
(org-insert-last-stored-link): New command.
(org-mode-map): Bind the new command to `C-c M-l'.

Thanks to Sébastien Vauban for requesting this and to Nick
Dokos for testing and fixing the patch.
2014-01-20 15:37:25 +01:00
Sylvain Chouleur 5a2d47e1ba Fix `org-outline-overlay-data' marker insertion-type
* org.el (org-outline-overlay-data): Set the insertion-type of end
bound marker of the function to t (means marker advances when you
insert text at it)

This is to conserve outline visibility property when changes are made
at the end bound of the data.
For example: try `org-babel-execute-subtree' on a folded outline:
The new result will be shown after the folded part of the outline
whereas the outline body should not be visible.

TINYCHANGE
2014-01-19 22:00:02 +01:00
Nicolas Goaziou 5f04b3815f Fix ae0f1c56a7
* lisp/org.el (org-toggle-item): Fix ae0f1c56a7.
2014-01-19 18:15:56 +01:00
Bastien Guerry 848d1926ec Merge branch 'maint' 2014-01-19 16:45:37 +01:00
Bastien Guerry 25e4e5b6f0 org.el (org-format-latex-options): Fix docstring
* org.el (org-format-latex-options): Fix docstring.

Thanks to Mirko Vukovic for reporting this.
2014-01-19 16:44:21 +01:00
Bastien Guerry 81dad90342 Merge branch 'maint' 2014-01-16 12:07:37 +01:00
Bastien Guerry d16477913d Fix ff902c 2014-01-16 12:07:27 +01:00
Bastien Guerry c7408a2bd7 Merge branch 'maint' 2014-01-16 01:19:49 +01:00
Nicolas Goaziou d4b653656e org.el (org-mode-restart): Fix turning off `org-indent-mode' when necessary
* org.el (org-mode-restart): Fix turning off `org-indent-mode'
when necessary.
2014-01-16 01:18:30 +01:00
Bastien Guerry a4a2935c3f org.el (customize-package-emacs-version-alist): Fix Org version for Emacs 24.4
* org.el (customize-package-emacs-version-alist): Fix Org
version for Emacs 24.4.
2014-01-16 01:13:15 +01:00
Bastien Guerry 73a6aba4b7 org.el (customize-package-emacs-version-alist): Fix Org version for Emacs 24.4
* org.el (customize-package-emacs-version-alist): Fix Org
version for Emacs 24.4.
2014-01-16 01:12:51 +01:00
Bastien Guerry c31782d903 org.el (org-src-fontify-natively): Default to `t'
* org.el (org-src-fontify-natively): Default to `t'.

Thanks to Sébastien Vauban for pushing this.
2014-01-16 01:11:33 +01:00
Bastien Guerry a5a7231304 Merge branch 'maint' 2014-01-16 00:55:46 +01:00
Bastien Guerry ff902c4429 Remove spurious defvar
Thanks to Nicolas Goaziou for reporting this.
2014-01-16 00:52:46 +01:00
Bastien Guerry 27ab61acd0 Fix 4a9820 2014-01-16 00:35:12 +01:00
Bastien Guerry 8898c380ab Merge branch 'maint'
Conflicts:
	lisp/org.el
2014-01-15 09:22:59 +01:00
Bastien Guerry 0a8fe04a9d Merge branch 'maint' of orgmode.org:org-mode into maint 2014-01-15 09:21:59 +01:00
Bastien Guerry 947c3f5c2a Fix 035087777 2014-01-15 09:21:44 +01:00
Bastien Guerry d9797ca17e Revert "org.el (org-store-link): When a link has been stored, always returns it"
This reverts commit 035087777d.
2014-01-15 09:19:30 +01:00
Carsten Dominik 723306d6e7 Fix mode reset 2014-01-14 20:45:54 +01:00
Bastien Guerry 5cd6b30182 Merge branch 'maint' 2014-01-14 12:39:01 +01:00
Bastien Guerry 4a9820067a Fix bug when demoting invisible headlines
* org.el (org-demote): Ignore invisible text when aligning
tags.
(org-set-tags): When JUST-ALIGN is 'ignore-column, ignore
invisible text when restoring the cursor to the correct
column.

This fixes a bug about demoting hidden headlines.
If org-move-to-column temporarily ignore visibility
specs, this will prevent org-demote to work correctly
in hidden regions.

Thanks to Susan Cragin for reporting this bug.
2014-01-14 12:38:50 +01:00
Nicolas Goaziou ae0f1c56a7 Small refactoring
* lisp/org.el (org-toggle-item): Do not call `org-list-struct' twice
  and fix checkboxes after modifying one of them.

This patch is relative to 213c2a6aa0.
2014-01-13 17:58:16 +01:00
Bastien Guerry 6ea3dee45d org.el (org-edit-special): Use `find-file-other-window'
* org.el (org-edit-special): Use `find-file-other-window' when
visiting included files.
2014-01-13 01:11:53 +01:00
Bastien Guerry 213c2a6aa0 org.el (org-toggle-item): Handle TODO and DONE keywords
* org.el (org-toggle-item): When an entry has a TODO or a DONE
keyword, add an empty or a checked checkbox.
2014-01-13 00:02:42 +01:00
Bastien Guerry 90884b9748 Merge branch 'master' of orgmode.org:org-mode 2014-01-12 10:03:38 +01:00
Bastien Guerry 72b8a86d9c Merge branch 'maint' 2014-01-12 10:03:17 +01:00
Bastien Guerry 035087777d org.el (org-store-link): When a link has been stored, always returns it
* org.el (org-store-link): When a link has been stored, always
returns it.

(Storing links from the agenda are broken otherwise.)
2014-01-12 09:56:41 +01:00
Nicolas Goaziou cad81696b8 Change no brace sub/superscript syntax
* lisp/org.el (org-match-substring-regexp): Simplify syntax when not
using braces.  Also make the variable a defconst.
(org-match-substring-with-braces-regexp): Make the variable a defconst
and remove a useless group in regexp.
* lisp/org-element.el (org-element-subscript-parser,
  org-element-superscript-parser): Adapt to group changes.
2014-01-11 23:54:22 +01:00
Bastien Guerry 525304cbda Merge branch 'maint' 2014-01-11 01:35:18 +01:00
Bastien Guerry 21472107fa org.el (org-ellipsis): Small docstring enhancement
* org.el (org-ellipsis): Small docstring enhancement.
2014-01-11 01:34:44 +01:00
Nicolas Goaziou f5380d1221 Merge branch 'maint' 2014-01-10 11:25:15 +01:00
Nicolas Goaziou 8720c49807 Speed improvement
* lisp/org.el (org-get-previous-line-level): Do not call
  `org-current-level' twice unless necessary.  Also, avoid using
  `line-number-at-pos' when the information needed is to know if point
  is in the first line of the visible part of the buffer.
2014-01-10 11:22:49 +01:00
Bastien Guerry ccbe3965b1 Merge branch 'maint' 2014-01-07 13:26:12 +01:00
Bastien Guerry 152712a7c8 Backport change from Chong on 2013-12-23 2014-01-07 13:25:30 +01:00
Bastien Guerry e4a013fcf3 Merge branch 'maint' 2014-01-05 14:21:51 +01:00
Bastien Guerry 66fd521264 org.el (org-set-tags): Ignore invisible text when restoring cursor position
* org.el (org-set-tags): Ignore invisible text when restoring
cursor position.
2014-01-05 14:21:38 +01:00
Bastien Guerry 3737676632 Update copyright year for files changed since 2013 2014-01-05 06:35:21 +01:00
Bastien Guerry 0beda99171 Revert "Update copyright years."
This reverts commit 21105594fc.
2014-01-05 06:28:07 +01:00
Bastien Guerry 096ff7e078 Merge branch 'maint'
Conflicts:
	contrib/lisp/org-favtable.el
2014-01-04 18:58:12 +01:00
Bastien Guerry 21105594fc Update copyright years. 2014-01-04 18:56:11 +01:00
Bastien Guerry d09088ca17 Merge branch 'maint' 2014-01-04 15:05:13 +01:00
Bastien Guerry 45b0d23b0c Fix creation of parent nodes when refiling.
* org.el (org-refile-get-location): Check for a refile
position when the position is not nil, otherwise allow to
create the parent node if the user requests it.

Thanks to Li Zhuo for reporting this bug and for providing
a preliminary patch.
2014-01-04 15:05:01 +01:00
Bastien Guerry c36ab62b11 Merge branch 'maint' 2014-01-04 14:53:10 +01:00
Bastien Guerry 857cf28a90 org.el (org-refile-allow-creating-parent-nodes): Fix typo in docstring
* org.el (org-refile-allow-creating-parent-nodes): Fix typo in
docstring.
2014-01-04 14:53:00 +01:00
Bastien Guerry 31c5e3dc8c Merge branch 'maint' 2014-01-04 14:49:07 +01:00
Bastien Guerry 597a7e65f0 org.el (org-entry-get): Minor docstring enhancement
* org.el (org-entry-get): Minor docstring enhancement.
2014-01-04 14:48:39 +01:00
Bastien Guerry 02078833e0 Merge branch 'maint' 2014-01-04 12:23:27 +01:00
Bastien Guerry 44acd00049 org.el (org-set-startup-visibility): Bugfix
* org.el (org-set-startup-visibility): Bugfix.

See http://article.gmane.org/gmane.emacs.orgmode/79905
2014-01-04 12:22:50 +01:00
Bastien Guerry 914f3f88a7 Merge branch 'maint' 2014-01-03 17:38:19 +01:00
Bastien Guerry bee871762c org.el (org-shiftcontrolup, org-shiftcontroldown): Ignore `org-support-shift-select' when point is on a clock log
* org.el (org-shiftcontrolup, org-shiftcontroldown): When
`org-support-shift-select' is not `nil', let-bind it to nil
if point is on a clock log.  Otherwise throw an error.
2014-01-03 17:38:02 +01:00
Bastien Guerry f531d06f80 Merge branch 'maint' 2014-01-03 11:16:30 +01:00
Bastien Guerry f21150f185 org.el (org-do-emphasis-faces): Fix false positives handling
* org.el (org-do-emphasis-faces): Handle false positives by
restarting the re-search one char after the beginning of the
match, not one char before its ending.

Before this fix, consider this buffer

** Headline
  - *Bold* non-bold
  - *Bold* non-bold

The first false positive is "** Headline\n  - *Bold*"

Starting the search again from the last "*" will skip
the "*Bold*" string.  Starting again at "* Headline" will
find it.
2014-01-03 11:16:14 +01:00
Bastien Guerry af97893516 Merge branch 'maint' 2014-01-03 10:07:31 +01:00
Bastien Guerry 9758f203fb org.el (org-entry-put): Check that the value provided is a string
* org.el (org-entry-put): Check that the value provided is a
string.  If it is nil, convert it to the empty string.
2014-01-03 10:07:09 +01:00
Bastien Guerry c8bb89faca Merge branch 'maint' 2013-12-30 10:32:24 +01:00
Bastien Guerry 8bb519d934 Fix defcustoms: don't quote const values.
* ob-latex.el (org-babel-latex-htlatex-packages): Use repeat
instead of list as the defcustom type.

* ox.el (org-export-with-creator):
* org.el (org-loop-over-headlines-in-active-region)
(org-mouse-1-follows-link, org-provide-todo-statistics):
* org-agenda.el (org-agenda-custom-commands-local-options)
(org-agenda-start-with-log-mode)
(org-agenda-show-inherited-tags): Don't quote const values.

Thanks to Glenn Morris for reporting this.
2013-12-30 10:30:44 +01:00
Eric Schulte be70c688b2 fix typo
* lisp/org.el (org-babel-load-languages): Forgot to capitalize "j".
2013-12-20 10:11:29 -07:00
Eric Schulte 44f6bde0cf add J to babel languages
* lisp/org.el (org-babel-load-languages): Add J to babel languages.
2013-12-20 10:05:10 -07:00
Aaron Ecay 5b9e79c8b8 org.el: use a shy regex for fontifying macros
* lisp/org.el (org-set-font-lock-defaults): use a shy regex for
identifying macros to fontify

Before this change, the xxx in the following text would be erroneously
fontified with the macro face:

{{{macro1()}}} xxx {{{macro2()}}}
2013-12-15 23:31:47 -05:00
Bastien Guerry 0eb020a377 Merge branch 'maint' 2013-12-07 08:17:46 +01:00
Bastien Guerry 7fe99af695 Fix bug when using both electric-pair-mode and delete-selection-mode
* org.el (org-self-insert-command)
(orgtbl-self-insert-command): Change the value of the
`delete-selection' property to allow other commands like
`electric-pair-will-use-region' to be run before deletion.

Thanks to Harald Hanche-Olsen for reporting this.
2013-12-07 08:17:33 +01:00
Nicolas Goaziou 37eb0df867 Move `org-comment-dwim' in an appropriate section
* lisp/org.el (org-comment-dwim): Move function into "comment" related
  part of the library.
2013-12-06 16:37:57 +01:00
Bastien Guerry 487c74580c Fix bug when commenting source code.
* org.el (org-babel-do-in-edit-buffer): Declare.
(org-babel-load-file, org-insert-comment)
(org-comment-or-uncomment-region): Don't require 'ob-core.
(org-mode-map): Remap `comment-dwim' to `org-comment-dwim'.
(org-comment-dwim): New command.

* ob-core.el (org-babel-do-in-edit-buffer): Make an autoload.

See http://lists.gnu.org/archive/html/emacs-devel/2013-12/msg00154.html
for a discussion about this bug.
2013-12-06 10:45:35 +01:00
Nicolas Goaziou 3a317abc23 Merge branch 'maint' 2013-12-03 21:50:45 +01:00
Nicolas Goaziou af6f14d907 Fix C-c C-c behaviour on some objects
* lisp/org.el (org-ctrl-c-ctrl-c): When point is on an unsupported
  object, look for something to do at a higher level instead of
  bailing out.

For example, C-c C-c should toggle checkbox in the following example
even though X point is technically on a subscript.

  - [ ] a_Xb
2013-12-03 21:41:48 +01:00
Bastien Guerry c811bb0ea5 org.el (org-cycle-hide-drawers): Fix bug about re-searching at the wrong side of point
* org.el (org-cycle-hide-drawers): Fix bug about re-searching
at the wrong side of point.

The bug was introduced by this commit:
http://orgmode.org/cgit.cgi/org-mode.git/commit/?id=e8bafd

And reported here:
http://article.gmane.org/gmane.emacs.orgmode/79282
2013-11-28 06:27:57 +01:00
Achim Gratz e655e664bf org: check for derived-mode-p instead of "org-mode" exactly
* lisp/org.el (org-mode-restart): Check for derived-mode-p instead of
  "org-mode" exactly.  This covers a situation normal-mode already
  instantiates a derived mode (e.g. via file local variables).
2013-11-27 20:52:03 +01:00