Commit Graph

3766 Commits

Author SHA1 Message Date
Philip 453492ca95 org.el: Fix recursive regexp backtracking
* org.el (org-link-search): Avoid recursive regexp backtracking behavior
when following search links.

<http://article.gmane.org/gmane.emacs.orgmode/100010>

TINYCHANGE
2015-08-14 22:33:08 +02:00
Nicolas Goaziou 67fe03bcd7 Remove `org-list-empty-line-terminates-plain-lists'
* lisp/org-list.el (org-list-empty-line-terminates-plain-lists): Remove
  variable.
(org-list-end-re):
(org-list-separating-blank-lines-number):
* lisp/org.el (org-blank-before-new-entry): Adapt to change above.

* testing/lisp/test-org-element.el (test-org-element/at-point):
* testing/lisp/test-org-list.el (test-org-list/move-item-down):
(test-org-list/move-item-up):
(test-org-list/insert-item): Update tests.

This variable is not useful: plain lists can always be terminated with
two blank lines.
2015-08-14 16:34:37 +02:00
Rasmus 97d43ff681 org.el: Update Version and Package-Requires header 2015-08-14 02:05:30 +02:00
Rasmus cadb9f3603 Merge branch 'maint' 2015-08-14 02:04:49 +02:00
Nicolas Goaziou f6be2b5aa3 Merge branch 'maint' 2015-08-14 02:04:13 +02:00
Rasmus 182552ee75 org.el: Add version header
* org.el: Add version header.
* README_maintainer: Mention Version header.
2015-08-14 02:03:54 +02:00
Matt Lundin a3eeddefce Fix completion when selecting more than one tag
* lisp/org.el (org-fast-tag-selection): Make sure to set local variable
  buffer-tags to actual buffer-tags before pushing selected tag to the
  list; otherwise, the subsequent completion list will be limited to the
  one selected tag.
2015-08-14 01:58:49 +02:00
Nicolas Goaziou 2f2f266c24 Merge branch 'maint' 2015-08-13 22:33:29 +02:00
Nicolas Goaziou db314d8ad0 Fix table detection in non-Org buffers
* lisp/org.el (org-at-table-p): Allow local tables without full valid
  syntax when current buffer is not in Org mode.

Reported-by: Benjamin Slade <slade@jnanam.net>
<http://permalink.gmane.org/gmane.emacs.orgmode/99982>
2015-08-13 22:31:36 +02:00
Nicolas Goaziou 4bb5306f2d Merge branch 'maint' 2015-08-13 02:44:02 +02:00
Nicolas Goaziou 4dc79cbe9d Fix splitting headlines with RET
* lisp/org.el (org-return): Make sure to keep headline from being
  invalidated by restricting positions where it can be split.

* testing/lisp/test-org.el (test-org/return): Add test.
2015-08-13 02:42:08 +02:00
Alexey Lebedeff 997a9a45d9 Make `org-return' follow links in headings again
* org.el (org-return): Check for links first when
  `org-return-follows-link' is non-nil, before inserting any newlines.

* testing/lisp/test-org.el (test-org/return): Add test.

This patch restores order in which `org-return' perform actions (which
was changed in a7e62499f2).

TINYCHANGE
2015-08-13 02:25:17 +02:00
Nicolas Goaziou 3add787abd Merge branch 'maint' 2015-08-11 19:12:49 +02:00
Nicolas Goaziou 6116c72975 Fix column view sums
* lisp/org.el (org-entry-properties): Remove need for `org-summaries'
  property.

* lisp/org-colview.el (org-columns--value): New function.
(org-columns):
(org-agenda-columns): Use new functions.

Reported-by: Johan Sandblom <js@ndblom.se>
<http://permalink.gmane.org/gmane.emacs.orgmode/99865>
2015-08-11 19:12:17 +02:00
Nicolas Goaziou e658b07c8a Merge branch 'maint' 2015-08-10 22:36:02 +02:00
Nicolas Goaziou aa98f7c79a Edit proper timestamp when on a time range
* lisp/org.el (org-time-stamp): Offer appropriate default value
  depending on position of point in a time range.

Reported-by: Christoph LANGE <math.semantic.web@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/99783>
2015-08-10 22:32:24 +02:00
Nicolas Goaziou a472043b74 Fix ambiguous docstrings
* lisp/org.el (org-at-date-range-p):
(org-at-timestamp-p): Make match data explicit when returning a non-nil
value.
2015-08-10 22:31:31 +02:00
Kyle Meyer caf762e9bc Merge branch 'maint' 2015-08-10 12:19:59 -04:00
Kyle Meyer 44c8cd7136 org-map-entries: Fix org-agenda-prepare-buffers call
* lisp/org.el (org-map-entries): Check that buffer-file-name is non-nil
  before passing to org-agenda-prepare-buffers.

Like 11e8749, this surfaced as an error when 05efa7a ("Backport commit
3a5f751 from Emacs master branch", 2015-08-08) replaced a
'(while (setq VAR (pop LIST)) BODY)' with '(dolist (VAR LIST) BODY)',
resulting in the body being executed when '(nil)' was passed to
org-agenda-prepare-buffers.

Reported-by: Robert Klein <roklein@roklein.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/99779>
2015-08-10 12:19:13 -04:00
Nicolas Goaziou b911f17fc3 Merge branch 'maint' 2015-08-10 13:58:40 +02:00
Nicolas Goaziou 07a2d3d6f5 Fix agenda wrt commented headlines
* lisp/org.el (org-agenda-prepare-buffers): Ignore commented headlines
  deeper than level 1.

Reported-by: Samuel Wales <samologist@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/99529>
2015-08-10 13:54:19 +02:00
Nicolas Goaziou 898cfbcac0 Implement faster `show-children' function
* lisp/org.el (org-show-children): New function.
(org-cycle-internal-local):
(org-set-visibility-according-to-property):
(org-content):
(org-move-subtree-down):
(orgstruct-setup):
(org-show-set-visibility):
* contrib/lisp/org-toc.el (org-toc-cycle-subtree):
(org-toc-restore-config):
* lisp/org-agenda.el (org-agenda-show-1):
* lisp/org-feed.el (org-feed-update): Use new function.

* etc/ORG-NEWS: Document new function.

Suggested-by: Samuel Wales <samologist@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/99616>
2015-08-10 13:37:29 +02:00
Nicolas Goaziou 7204ba0e46 Fix infloop due to wrong angle link regexp
* lisp/org.el (org-make-link-regexps): Fix infloop.

Reported-by: Gregor Zattler <telegraph@gmx.net>
<http://permalink.gmane.org/gmane.emacs.orgmode/99779>
2015-08-10 10:04:09 +02:00
Kyle Meyer f6aa5341cb org-cycle-agenda-files: Fix agenda file check
* lisp/org.el (org-cycle-agenda-files): Raise error if there are no
  agenda files, as intended.  Simplify code.
2015-08-09 21:39:18 -04:00
Kyle Meyer 04aea5ea6f org-local-logging: Replace let* with let
* lisp/org.el (org-local-logging): Replace let* with let.
2015-08-09 21:39:18 -04:00
Kyle Meyer 906034b1a1 Partially revert last backport
* lisp/org.el (org-assign-fast-keys, org-make-tags-matcher)
(org-cycle-agenda-files): Revert dolist change because code in body
expects the list to be modified by pop each iteration.
(org-fast-todo-selection, org-fast-tag-selection): Revert dolist change
because code in body expects the list to be modified by pop each
iteration and because the variable name is used outside of the dolist
body.
2015-08-09 21:28:27 -04:00
Stefan Monnier ef96370304 Backport commit 3a5f751 from Emacs master branch
* lisp/org.el (org-goto-map, org-assign-fast-keys)
(org-contextualize-keys, org-contextualize-validate-key)
(org-notes-order-reversed-p, org-local-logging, org-map-entries)
(org-find-olp, org-find-exact-heading-in-directory)
(org-cycle-agenda-files, org-release-buffers, org-fill-template)
(org-agenda-prepare-buffers, org-occur-in-agenda-files)
(org-replace-escapes): Use dolist.
(org-mode): Optimize away XEmacs-only code.
(org-refile-get-targets): Remove unused var `f'.
(org-fast-todo-selection): Remove unused var `e'.
(org-make-tags-matcher): Use dolist.  Remove unused var `term'.
(org-fast-tag-selection): Use dolist.  Remove unused var `e'.
(org-format-latex): Use dolist.  Remove unused var `e'.
(org-backward-sentence, org-forward-sentence, org-meta-return)
(org-kill-line): Mark arg as unused.
(org-submit-bug-report): Silence compiler warning.
(org-occur-in-agenda-files): Don't use add-to-list on local vars.
(org-get-cursor-date): Remove unused var `tm'.
(org-comment-or-uncomment-region): Use standard name `_'.
(reftex-docstruct-symbol, reftex-cite-format): Declare to
silence byte-compiler.
(org-reftex-citation): Add `org--' prefix to dynamically scoped
`rds' var.

org.el: Fix up some lexical scoping warnings, and use dolist
3a5f75193ed10ee5fb458e9879340947f31d5e12
Stefan Monnier
Sat Aug 8 19:41:57 2015 -0400
2015-08-09 21:28:06 -04:00
Nicolas Goaziou 3b20eed34a Open timestamps also on CLOCK lines
* lisp/org.el (org-open-at-point): CLOCK are a valid location for
  timestamps.

Reported-by: Christoph LANGE <math.semantic.web@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/99754>
2015-08-10 00:18:16 +02:00
Nicolas Goaziou c9ac8f6956 Fix false positives in TODO keywords
* lisp/org.el (org-entry-properties): Make sure case is meaningful when
  matching a TODO keyword.
* testing/lisp/test-org.el (test-org/entry-properties): Add test.

Reported-by: Samuel Wales <samologist@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/99756>
2015-08-09 23:56:57 +02:00
Nicolas Goaziou 570b1935e7 org-agenda: Do not block non-TODO entries
* lisp/org-agenda.el (org-agenda-dim-blocked-tasks): Do not check if an
  entry can be blocked when it doesn't have any TODO keyword.

* lisp/org.el (org-entry-blocked-p): Make sure entry is really an open
  task before even considering it as a blocked task.  Small refactoring.

* testing/lisp/test-org.el (test-org/entry-properties): Update tests.
(test-org/entry-blocked-p): New test.

Reported-by: Bingo UV <right.ho@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/99544>
2015-08-06 17:56:40 +02:00
Nicolas Goaziou b1d3a904f1 Tiny fix
* lisp/org.el (org-get-tag-face): Tiny fix.
2015-08-06 15:41:16 +02:00
Nicolas Goaziou 3a632fa201 Fontify priorities, tags and TODO in colview
* lisp/org.el (org-get-priority-face): New function.
(org-font-lock-add-priority-faces): Use new function.

* lisp/org-colview.el (org-columns-new-overlay): Preserve face from
  string to display.
(org-columns-display-here): Apply usual face on TODO keywords, tags and
priorities in the columns overlay.
2015-08-06 15:35:44 +02:00
Nicolas Goaziou 4f3b3ce3d9 Fix a docstring
* lisp/org.el (org-get-tag-face): Fix docstring.  Small refactoring.
2015-08-06 14:57:23 +02:00
Paul Eggert ff92583e42 Backport commit eb0f65b from Emacs master branch
Don't overflow if computing approximate percentage
eb0f65b4fbbea60100b53cb40a1d7138d47ad0d2
Paul Eggert
Fri Jul 31 10:13:38 2015 -0700

* lisp/org-list.el (org-update-checkbox-count):
* lisp/org.el (org-table-map-tables)
(org-update-parent-todo-statistics):
Prefer (floor (* 100.0 NUMERATOR) DENOMINATOR) when calculating
progress-report percentages and the like.  This avoids problems
if (* 100 NUMERATOR) would overflow.
* lisp/org-colview.el (org-nofm-to-completion):
Prefer (round (* 100.0 NUMERATOR) DENOMINATOR) to a
more-complicated and less-accurate approximation.
2015-08-04 22:58:47 -04:00
Bastien 0d0d0ad56e Merge branch 'backport-master'
Conflicts:
	lisp/org-table.el
2015-08-05 01:01:46 +02:00
Mitchel Humpherys 99425a46dd contrib: rip out org-jira
Its changelog says it's abandoned, it doesn't really do anything, and it
clashes with [1].  Rip it out.

[1] https://github.com/baohaojun/org-jira
2015-08-05 00:46:43 +02:00
Bastien f246576081 org.el (org-split-string): Tiny refactoring
* org.el (org-split-string): Tiny refactoring.

Thanks to Marcin Borkowski for raising this.
2015-08-04 23:29:37 +02:00
Bastien 9111c21a75 org.el (org-latex-to-mathml-convert-command): Tiny docstring fix
* org.el (org-latex-to-mathml-convert-command): Tiny docstring fix.
2015-08-04 21:32:30 +02:00
Nicolas Goaziou f63d76872c Fix links with newline characters
* lisp/org-element.el (org-element-link-parser): Correctly parse links
  with newline characters.

* lisp/org.el (org-make-link-regexps): Allow newline characters within
  angle links.
(org-activate-angle-links): Support multiline angle links.

* testing/lisp/test-org-element.el (test-org-element/link-parser):
  Update tests.

As a rule of thumb, any newline character and all surrounding
whitespaces are treated as a single space in a bracket link.  They are
removed in angle links.
2015-08-04 16:40:25 +02:00
Nicolas Goaziou 02532389f4 Fix priority for fuzzy searches
* lisp/org.el (org-link-search): If fuzzy search is not starred, prefer
  targets and named elements over headlines.
2015-08-04 14:41:51 +02:00
Nicolas Goaziou 776449fd7d Prevent duplicating calls to `org-link-search'
* lisp/org.el (org-open-at-point): Do not call twice `org-link-search'
  when destination is not accessible within the current narrowed part of
  the buffer.
2015-08-04 14:32:55 +02:00
Nicolas Goaziou b4d85b47a9 Remove spurious argument to `org-link-search'
* lisp/org.el (org-link-search): Remove TYPE argument, used to force
  `org-occur' or `org-do-occur' on fuzzy search.  Instead, enclose string
  within forward slashes.

* lisp/org-macro.el (org-macro-initialize-templates):
* lisp/ob-exp.el (org-link-search): Apply signature change.
2015-08-04 14:10:44 +02:00
Nicolas Goaziou 271ecd090a Small refactoring
* lisp/org.el (org-set-tags): Small refactoring.
2015-08-04 11:01:33 +02:00
Nicolas Goaziou a3b2b7473e Repair radio target search
* lisp/org.el (org-open-at-point): Find radio targets again.
(org-search-radio-target): New function.

* testing/lisp/test-org.el (test-org/open-at-point/radio-target): New
  test.
2015-08-03 02:59:13 +02:00
Nicolas Goaziou e50033d494 Prevent fuzzy links from matching themselves
* lisp/org.el (org-open-at-point):
(org-link-search): Prevent fuzzy links from matching themselves.
2015-08-03 02:20:06 +02:00
Nicolas Goaziou cfe5bc97f8 Fix link search
* lisp/org.el (org-open-link-marker): Remove variable.
(org-open-at-point): Apply removal.
(org-link-search): Sanitize function.  Fix issue with internal link
encoding.
(org-search-not-self): Remove function.

* lisp/ox.el (org-export--inclusion-absolute-lines): Ensure INCLUDE
  keywords with locations can find named elements and targets.

* testing/lisp/test-org.el (test-org/return):
(test-org/coderef):
(test-org/custom-id): Update tests.
(test-org/fuzzy-links): Add tests.

Reported-by: Ivanov Dmitry <usr345@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/99340>
2015-08-03 01:06:32 +02:00
Nicolas Goaziou 57883f7957 Fix org-at-TBLFM-p
* lisp/org.el (org-at-TBLFM-p): Make sure match is case-insensitive.
  Improve speed in the general case.
2015-08-02 17:56:12 +02:00
Oleh Krehel 00142f4edf lisp/org.el (org-set-tags): Simplify further
* lisp/org.el (org-set-tags): Use let* for c0 p0 c1 rpl di tc;
Restructure so that no check on c0 is needed; Don't return a useless
tags var from cond; Change and into an equivalent when.
2015-07-28 15:16:49 +02:00
Oleh Krehel ceae5d651b lisp/org.el (org-set-tags): Simplify the code
* lisp/org.el (org-set-tags): Prefer let* to multi-variable setq,
move c0 p0 c1 rpl di tc variables to a narrower let scope.
2015-07-28 15:06:25 +02:00
Kyle Meyer 6f9184a294 Merge branch 'maint' into backport-master 2015-07-26 23:56:50 -04:00
Paul Eggert fa1a61c2ef Backport commit 85aa6ed from Emacs master branch
Use \r rather than ^M in string literals
85aa6ede9fe1b8165a99a4046dd8262ec93a02d5
Paul Eggert
Sat May 30 09:44:38 2015 -0700
2015-07-26 23:29:32 -04:00
Paul Eggert 6b04312e85 Backport commit 96794d2 from Emacs master branch
Don't quote nil and t in doc strings
96794d2f97cd064e4c2bf4f71459b42558cc8c79
Paul Eggert
Thu May 21 10:06:44 2015 -0700
2015-07-26 23:29:31 -04:00
Paul Eggert 9dcbe163cc Backport commit 9d35bb8 from Emacs master branch
* lisp/org-compat.el (org-number-sequence):
* lisp/org.el (org-remove-highlights-with-change)
(org-structure-template-alist):
* lisp/ox-html.el (org-html-link-org-files-as-html):
Fix minor quoting problems in doc strings, e.g., missing quote,
``x'' where `x' was meant, etc.

Fix minor quoting problems in doc strings
9d35bb8d6518bb913ab08bace2af08963c003177
Paul Eggert
Tue May 19 15:01:16 2015 -0700
2015-07-26 23:29:31 -04:00
Stefan Monnier c6164293fc Backport commit c9a75a4 from Emacs master branch
* lisp/org.el (org-insert-heading, org-sort-entries):
* lisp/org-mouse.el (org-mouse-end-headline)
(org-mouse-context-menu):
* lisp/org-clock.el (org-clock-cancel):
Add explicit second arg to looking-back.

Fix byte-compiler warnings about looking-back.
c9a75a4030a556d700fd95222ec0bf4c1a9f67b5
Stefan Monnier
Mon Apr 20 21:55:00 2015 -0400
2015-07-26 23:29:31 -04:00
Kyle Meyer c115c7b4e8 org-compat: Use different font-lock-ensure alias
* lisp/org-compat.el (org-font-lock-ensure): Remove in favor of
  font-lock-ensure alias from dcbaebc.

Instead of org-font-lock-ensure alias introduced in dcbaebc ("Backport
commit 6711a21 from Emacs master branch", 2014-05-28), use
font-lock-ensure alias added in e6883dd ("org-compat: Provide
compatibility definition for font-lock-ensure", 2014-06-01).
2015-07-26 23:29:14 -04:00
Stefan Monnier d81e6b52b7 Backport commit 6711a21 from Emacs master branch
* lisp/org-compat.el (org-font-lock-ensure): New function.
* lisp/ox-odt.el (org-odt-do-format-code):
* lisp/ox-html.el (org-html-fontify-code):
* lisp/org.el (org-fontify-like-in-org-mode):
* lisp/org-src.el (org-src-font-lock-fontify-block):
* lisp/org-clock.el (org-clock-get-clocktable): Use it.
* lisp/ox-org.el (org-org-publish-to-org):
Use it. Avoid using find-file from Elisp.

6711a21f1125c0047c56eb266eb374c1ec90a967
Stefan Monnier
Wed May 28 23:45:29 2014 -0400
2015-07-26 23:28:25 -04:00
Paul Eggert 81272053cd Backport commit 3de474e from Emacs master branch
Spelling fixes
3de474e4ac7418d06b9f37489f939a16d9bde1c2
Paul Eggert
Sat Dec 13 23:41:33 2014 -0800
2015-07-26 23:28:25 -04:00
Paul Eggert bfbc2bb304 Backport commit cc857dd from Emacs master branch
Fix misspellings like "an unibyte buffer"
cc857dd0db0fad257747134bdbd8318a21d12cab
Paul Eggert
Tue Dec 9 16:27:23 2014 -0800
2015-07-26 23:28:24 -04:00
Kyle Meyer 5a01b116a4 Pass current-time as optional arg for tests
* lisp/org.el (org-read-date-analyze):
* lisp/org-timer.el (org-timer-seconds): Explicitly pass current-time as
  optional time argument and explain reason in comment.

This reverts some changes from 91ab6c4 ("Backport commit 123ddec from
Emacs master branch", 2014-10-28).
2015-07-26 23:28:09 -04:00
Paul Eggert 217ad4aafb Backport commit 123ddec from Emacs master branch
* doc/org.texi (Dynamic blocks):
* lisp/org-archive.el (org-archive-subtree)
(org-archive-to-archive-sibling):
* lisp/org-clock.el (org-resolve-clocks, org-clock-get-sum-start)
(org-clock-special-range):
* lisp/org-timer.el (org-timer-seconds):
* lisp/org.el (org-read-date-analyze, org-get-cursor-date):
* lisp/ox-html.el (org-html-format-spec):
* lisp/ox-icalendar.el (org-icalendar--vtodo):
Omit unnecessary call to current-time.
* lisp/org.el (org-get-cursor-date):
Don't call current-time twice to get the current time stamp,
as this can lead to inconsistent results.
* lisp/org-compat.el (org-float-time):
Simplify to an alias because time-to-seconds now behaves like float-time
with respect to nil arg.
* lisp/org-clock.el (org-clock-get-table-data): Omit unnecessary, lossy
conversion from floating point to Emacs time and back.
(org-resolve-clocks): Prefer two-argument floor.

Simplify use of current-time and friends.
123ddec7f807f4bd7400bbbe08219afb02269c00
Paul Eggert
Tue Oct 28 18:42:51 2014 -0700
2015-07-26 23:25:11 -04:00
Nicolas Goaziou 6e1d7bc8fe Fix `org-beginning-of-line'
* lisp/org.el (org-beginning-of-line): Prevent an error when buffer
  contains only a single star.

* testing/lisp/test-org.el (test-org/beginning-of-line): Add tests.
2015-07-22 09:39:07 +02:00
Nicolas Goaziou 985420eceb Speed improvement for `org-goto'
* lisp/org.el (org-goto-local-search-headings): Do not rely on
  `org-context' just to check if point is on a headline but not on its
  tags.

Reported-by: Gregor Zattler <telegraph@gmx.net> <w>
<http://permalink.gmane.org/gmane.emacs.orgmode/99111>
2015-07-20 11:40:44 +02:00
Kyle Meyer ed6349d28c org-closest-date: Don't accept canceled repeater
* lisp/org.el (org-time-string-to-absolute): Don't pass a canceled
  repeater to org-closest-date.
  (org-closest-date): Raise an error when passed a canceled repeater.

Prevent arith-error from occurring when a canceled repeater is passed to
org-closest-date.
2015-07-16 11:44:02 +02:00
Rasmus 788d15e469 org.el: Remove wasysym LaTeX dependency 2015-07-13 11:36:25 +02:00
Rasmus 10b424dd63 org.el: Remove marvosym LaTeX dependency
* org.el (org-latex-default-packages-alist): Remove marvosym.
* org-entities.el (org-entities): \EUR is now replaced with
  \texteuro.  Remove EURdig, EURhv, EURcr, EURtm.
2015-07-13 11:36:25 +02:00
Rasmus 384bc2d200 org.el: Remove default LaTeX tolerance
* org.el (org-latex-default-packages-alist): Remove fixed tolerance.
2015-07-13 11:36:25 +02:00
Nicolas Goaziou 747fefe2b0 Update keywords for defcustom `org-latex-default-packages-alist'
* lisp/org.el (org-latex-default-packages-alist): Update keywords to
  reflect changes to default value in
  5e03133c47.
2015-07-03 21:20:53 +02:00
Nicolas Goaziou 188bae903f Fix property inheritance with extended values
* lisp/org.el (org-property--local-values): New function.
(org-entry-get): Use new function.  Ignore global values when there is
no inheritance.
(org-entry-get-with-inheritance): Fix extended values, which do not
stop anymore inheritance search.

* testing/lisp/test-org.el (test-org/entry-get): Add tests.
2015-07-03 15:34:47 +02:00
Rasmus 5e03133c47 Remove float from org-latex-default-packages-alist 2015-07-03 13:42:21 +01:00
Nicolas Goaziou 304f84530b Use inactive timestamps when re-scheduling or re-deadlining
* lisp/org.el (org-log-note-headings): Improve docstring.
(org-store-log-note): When re-scheduling or re-deadlining, convert old
or new timestamp to an inactive one so as to not clutter the agenda.

Reported-by:  Karl Voit <devnull@Karl-Voit.at>
<http://permalink.gmane.org/gmane.emacs.orgmode/93498>
2015-06-29 22:19:38 +02:00
Nicolas Goaziou 1cc8cdc49e Be more strict when matching an Org table
* lisp/org.el (org-at-table-p): Do not allow "+" character at the
  beginning of a table row.
2015-06-28 23:32:38 +02:00
Nicolas Goaziou 157591db7c Fix `org-decrease-number-at-point'
* lisp/org.el (org-decrease-number-at-point): Handle the case when INC
  is nil.
2015-06-28 21:09:59 +02:00
Nicolas Goaziou f03d96572e Silence byte-compiler 2015-06-28 16:50:08 +02:00
Nicolas Goaziou 03eb88661b Use parser for `org-at-table-p' and al.
* lisp/org-table.el (org-table-begin):
(org-table-end): Refactor using parser.

* lisp/org.el (org-at-table-p):
(org-at-table.el-p): Refactor using parser.

(org-meta-return): Use `org-at-table-p'.

(org-at-table-hline-p):
(org-table-recognize-table.el): Small refactoring.
2015-06-28 14:51:31 +02:00
Kyle Meyer 5f3d8037a5 org-add-planning-info: Improve deletion handling
* lisp/org.el (org-add-planning-info): Reset point before each
  planning entry search.  Clean up extra spaces.

* testing/lisp/test-org.el (test-org/add-planning-info): Add tests.

- Reposition save-excursion call to reset point every dolist
  iteration.  Otherwise, the order of the entries to be removed
  matters, and a call like

      (org-add-planning-info nil nil 'scheduled 'deadline)

  on

      DEADLINE: <2015-06-26 Fri> SCHEDULED: <2015-06-26 Fri>

  will fail to remove the deadline entry.

- Delete leading white space even when at the beginning of the line so
  that, when org-adapt-indentation is nil, a space is not inserted
  when removing the leading planning info entry.

  This prevents headings with repeating entries like

      SCHEDULED: <2015-06-26 Fri +1w>

  from being closed and recycled with an extra space in front of
  SCHEDULED.

- Add leading white space to the planning info entry regexp to prevent
  leftover white space when removing entries other than the first
  entry.
2015-06-28 09:03:46 +02:00
Kyle Meyer 329683861c org-clone-subtree-with-time-shift: Accept 0 clones
* lisp/org.el (org-clone-subtree-with-time-shift): Allow argument
  specifying number of clones to be 0.

* testing/lisp/test-org.el (test-org/clone-with-time-shift): Add
  tests.

This makes it possible to clone a subtree with a repeating timestamp
so that the repeater is removed from the original subtree and a single
shifted, repeating clone is created.  If the original subtree does not
have a repeating timestamp, no clones will be made.
2015-06-22 21:49:52 +02:00
Nicolas Goaziou 739853d128 Tiny speed-up for `org-entry-properties'
* lisp/org.el (org-entry-properties): Tiny speed-up.
* testing/lisp/test-org.el (test-org/entry-properties): Add test.
2015-06-22 10:01:51 +02:00
Nicolas Goaziou 2c27e85f11 Sanitize link encoding
* lisp/org.el (org-store-link): Improve docstring.
(org-make-link-string): Escape internal links only when absolutely
necessary.
(org-link-escape-chars): Add percent character.
(org-link-escape-chars-browser): Make space character more visible.
(org-link-escape): Refactor code.
(org-display-inline-images): Properly unescape path before creating
the link.
(org-extract-attributes): Remove function.

* lisp/ox.el (org-export-resolve-fuzzy-link): Decode path before
  resolving link.

* testing/lisp/test-ox.el (test-org-export/resolve-fuzzy-link): Add
  test.
2015-06-16 23:24:38 +02:00
Nicolas Goaziou aea374680c Small refactoring
* lisp/org.el (org-link-unescape): Refactor code.
2015-06-16 16:53:46 +02:00
Nicolas Goaziou 50ba0a5ed6 Fix 1a73641770
* lisp/org.el (org-icompleting-read): Let `completing-read' or
  equivalent sort out type of completion.
(org-olpath-completing-read): Revert partially
1a73641770.
2015-06-07 00:38:58 +02:00
Nicolas Goaziou 9fd317b1b0 Fix logging in indirect buffers
* lisp/org.el (org-store-log-note): Ensure insertion point is
  available in the narrowed part of the current buffer.

Reported-by: Mark Edgington <edgimar@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/98152>
2015-06-06 09:08:46 +02:00
Nicolas Goaziou b42642f244 Ensure special properties ignore inheritance
* lisp/org.el (org-entry-get): Ensure special properties ignore user's
  inheritance rules.
2015-06-02 16:34:33 +02:00
Nicolas Goaziou 7b333c7249 Fix typo
* lisp/org.el (org-check-before-date):
(org-check-after-date):
(org-check-dates-range): Fix typo.

Reported-by: Michael Strey <mstrey@strey.biz>
<http://permalink.gmane.org/gmane.emacs.orgmode/98094>
2015-06-02 15:39:50 +02:00
Nicolas Goaziou 1a73641770 Fix `org-olpath-completing-read'
* lisp/org.el (org-olpath-completing-read): Feed
  `org-icompleting-read' with COLLECTION argument too.
2015-06-01 18:20:46 +02:00
Nicolas Goaziou 458bde5243 Revert "Silence byte-compiler"
This reverts commit 722b5e724e.
2015-06-01 09:32:32 +02:00
Nicolas Goaziou 722b5e724e Silence byte-compiler
* lisp/org.el (format-spec): Silence byte-compiler when using "make
  single".
2015-06-01 09:24:42 +02:00
Nicolas Goaziou 31f8911495 Tiny fix
* lisp/org.el (org-create-formula-image): Atoms shouldn't be quoted
  when used as `case' keys.
2015-06-01 09:21:47 +02:00
Nicolas Goaziou 9e1591cbd0 Fix storing link in edit buffer
* lisp/org.el (org-store-link): When creating a link from an edit
  buffer, re-use label on current line, if any.  Give up if call is
  non-interactive, as it would otherwise ask for user's input.

Reported-by: Samuel Wales <samologist@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/97902>
2015-05-31 01:54:49 +02:00
Nicolas Goaziou a0c1e490b3 Silence byte-compiler
* lisp/org-footnote.el:
* lisp/org-list.el:
* lisp/org-macro.el:
* lisp/org-src.el:
* lisp/org.el: Silence byte-compiler.
2015-05-30 14:28:35 +02:00
Nicolas Goaziou d00dcd09ca org: Fix typo
* lisp/org.el (org-not-done-heading-regexp): Fix a typo and make
  variable buffer-local, as expected.

Reported-by: Alexander Borkowski <alex-b@opus-b.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/97996>
2015-05-30 00:06:54 +02:00
Rasmus 4b2536d750 org.el: Add documentation for grffile
* org.el (org-latex-default-packages-alist): Add documentation for
  grffile.
2015-05-29 12:43:52 +02:00
Rasmus 56c5382684 org.el: Add grffile to default latex packages
* org.el (org-latex-default-packages-alist): Add grffile for files
  with spaces and periods.

Reported-by: Vaidheeswaran C <vaidheeswaran.chinnaraju@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/97846>
2015-05-29 11:54:46 +02:00
Nicolas Goaziou a714c3a118 Fix visibility with `org-cycle-separator-lines' at -1
* lisp/org.el (org-cycle-show-empty-lines): Fix visibility cycling
  with `org-cycle-separator-lines' set to -1.

Reported-by: Michael Crouch <creidieki@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/97879>
2015-05-26 16:29:08 +02:00
Rasmus 8ddb844d27 org.el: Fix bug in af6fdf3071
* org.el (org-return): Fix bug when headline title is empty.
2015-05-21 00:45:24 +02:00
Rasmus 248266e560 org.el: New function org-delete-indentation
* org.el (org-delete-indentation): New function.
  (org-mode-map): Bind org-delete-indentation to M-^.
* test-org.el (test-org-delete-indentation): Test org-delete-indentation.
* ORG-NEWS: Add entry on org-delete-indentation.
2015-05-21 00:28:41 +02:00
Rasmus af6fdf3071 org.el: RET breaks headline text
* org.el (org-return): RET breaks headline text.
* test-org.el (test-org/return): Test org-return on headline text.
* ORG-NEWS: Add entry on new org-return behavior.
2015-05-21 00:21:34 +02:00
Marco Wahl 6ba251d473 Fix two typos
* lisp/org.el: Fix in documentation of variable
  org-outline-path-complete-in-steps.
2015-05-20 11:16:14 +02:00
Nicolas Goaziou de8302c65a Fix `org-next-block'
* lisp/org.el (org-next-block): Preserve match data, as specified in
  the docstring.

Reported-by: Andreas Leha <andreas.leha@med.uni-goettingen.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/97707>
2015-05-19 23:12:17 +02:00
Nicolas Goaziou 0e7062678e Improve docstrings
* lisp/org.el (org-metaleft):
(org-metaright): Improve docstrings.

Suggested-by: Alain Cochard <Alain.Cochard@unistra.fr>
<http://permalink.gmane.org/gmane.emacs.orgmode/97509>
2015-05-13 12:35:24 +02:00
Titus von der Malsburg 6779f8f424 Fix detection of latex fragments
* org-element.el (org-element-latex-fragment-parser):
* org.el (org-latex-regexps): Fix the detection of latex
  fragments.  Uses syntax tables to detect whitespaces and punctuation
  marks following the final $ sign.

In order to qualify as a math delimiter, the final $ sign of a LaTeX
fragment has to be followed by a whitespace or punctuation mark but the
regexp used in the previous code matched only a small number of
punctuation marks and therefore missed some latex fragments.
2015-05-09 09:36:53 +02:00
Nicolas Goaziou b27e630bab org-capture: Fix "org-find-olp: Wrong type argument: stringp, nil"
* lisp/org-capture.el (org-capture-expand-file): Empyt string defaults
  to `org-default-notes-file'.
* lisp/org.el (org-default-notes-file): Do not fallback on
`remember-data-file' since "org-capture.el" is not based off
"remember.el" anymore.

Reported-by: Florian Lindner <mailinglists@xgm.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/97448>
2015-05-08 11:32:35 +02:00
Nicolas Goaziou 6ac8db9dba Fix TBLFM line handling
* lisp/org-table.el (org-table-TBLFM-begin-regexp): Take into
  consideration that table lines are not required to end with "|".
(org-table-calc-current-TBLFM): Properly clean markers at the end of
the process.
(org-table-TBLFM-begin): Small refactoring.
* lisp/org.el (org-at-TBLFM-p): Prevent false positives.

Suggested-by: Oleg Sivokon <olegsivokon@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/97461>
2015-05-08 10:46:07 +02:00
Nicolas Goaziou 4980a9dbb8 Fix indentation in empty items
* lisp/org.el (org--get-expected-indentation): Fix indentation on
  in empty items.
* testing/lisp/test-org.el (test-org/indent-line): Add test.

Reported-by: Leo Ufimtsev <lufimtse@redhat.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/97454>
2015-05-08 10:08:11 +02:00
Nicolas Goaziou 0b7721322a Fix `org-next-block'
* lisp/org.el (org-next-block): Use Element API.

* testing/lisp/test-org.el (test-org/next-block):
(test-org/previous-block): New tests.
2015-05-01 14:03:26 +02:00
Luke Amdor 14f5b13218 org.el: Fix use of org-open-at-point with shell and midnight cleaning
* lisp/org.el (org-open-at-point): Make sure org shell output buffer
  is a string of buffer name before appending to
  `clean-buffer-list-kill-buffer-names' for cleaning later.

TINYCHANGE
2015-04-29 23:37:18 +02:00
Konubinix 6f0cf14383 Fix `org-refresh-category-properties'
* lisp/org.el (org-refresh-category-properties): Prevent the `put-text-property'
  to change the point in order to take into account the CATEGORY
  property in subtrees also.

* testing/lisp/test-org.el (test-org/entry-properties): Add test.
2015-04-28 09:40:03 +02:00
Nicolas Goaziou ca2b398396 org-src: Allow editing footnote definitions
* lisp/org-src.el (org-src--element-contents-area): Make a special
  case for footnote definitions.
(org-edit-footnote-reference): New function.
* lisp/org.el (org-edit-special): Use new function.
2015-04-26 11:44:35 +02:00
Charles Berry c1f515840d org-cycle: Cycle visibility when point is at the end of a folded headline
* lisp/org.el: (org-cycle): Ignore invisible newlines and cycle
  visibility when point is visibly on a headline.

Requested by: Nikolaus Rath <Nikolaus@rath.org>
<http://permalink.gmane.org/gmane.emacs.orgmode/97125>
2015-04-25 11:23:59 -07:00
Kyle Meyer 63a3153842 org.el: Remove org-timer-cancel-timer binding
* lisp/org.el (org-mode-map): Remove binding for deleted command
  org-timer-cancel-timer.

The command org-timer-cancel-timer was removed in 173b0cb6d6.
2015-04-24 21:43:07 +02:00
Rasmus 2bdc661fde org.el: Handle nil org-latex-to-mathml-jar-file
* org.el (org-create-math-formula): Handle nil
  org-latex-to-mathml-jar-file.
2015-04-23 12:39:52 +02:00
Nicolas Goaziou ce4e647c21 Tiny refactoring
* lisp/org.el (org-iread-file-name): Refactor.

`read-file-name' already applies `read-file-name-function' when
available.
2015-04-22 14:30:59 +02:00
Nicolas Goaziou e040ad58a1 Rename `org-export--registered-backends'
* lisp/ox.el (org-export-registered-backends): Renamed from
  `org-export--registered-backends'.
(org-export-get-backend):
(org-export-register-backend):
(org-export-insert-default-template):
(org-export--dispatch-ui):

* lisp/org.el (org-export-registered-backends):
(org-export-backends):
(org-get-export-keywords):

* lisp/org-pcomplete.el (pcomplete/org-mode/file-option/options):

* testing/lisp/test-ox.el (test-org-export/define-backend):
(test-org-export/define-derived-backend):
(test-org-export/derived-backend-p):
(test-org-export/get-all-transcoders):
(test-org-export/get-all-options):
(test-org-export/get-all-filters):
(test-org-export/with-backend): Apply renaming.

Since the variable is copiously used outside of "ox.el", there's no
reason to mark it as internal.
2015-04-22 10:27:24 +02:00
Nicolas Goaziou 9290395405 Silence byte-compiler
* lisp/ob-shell.el (org-babel-sh-evaluate):
* lisp/org-clock.el (org-x11idle-exists-p): Do not use last
  `call-process-shell-command' arg.

* lisp/org-mouse.el (org-mouse-show-context-menu): Ignore
  `redisplay-dont-pause'.

* lisp/org.el (org-icompleting-read): Fix typo.  Small refactoring.
2015-04-22 09:51:52 +02:00
Rasmus 797023b84c org.el: Fix 7ec8ced
* org.el (org-icompleting-read): Correct bug introduced previously.
2015-04-20 14:18:34 +02:00
Rasmus d8494b5668 org.el: Respect read-file-name-function
* org (org-iread-file-name): Respect read-file-name-function.
2015-04-16 19:41:26 +02:00
Rasmus b80ed6124f org.el: Refactor org-file-complete-link
* org.el (org-file-complete-link): Refactor.
2015-04-16 19:41:13 +02:00
Rasmus 7ec8ced5d6 org.el: Small refactor
* org.el (org-icompleting-read): Support completing-read-default.
2015-04-16 17:28:10 +02:00
Oleh Krehel acf7f47ecd Use `completing-read-function' for completion
lisp/org.el (org-icompleting-read): When `completing-read-function' is
the default one, use `ido', otherwise, use `completing-read-function'.
2015-04-16 16:22:11 +02:00
Nicolas Goaziou 9debffbe0f Fix wrong type error with %l in `org-agenda-prefix-format'
* lisp/org.el (org-scan-tags): Fix type.

Reported-by: Dominik Schrempf <dominik.schrempf@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/96823>
2015-04-11 00:15:04 +02:00
Nicolas Goaziou edeb7fd8e1 Fix visibility issue when inserting a heading
* lisp/org.el (org-insert-heading): Fix visibility issue.  Remove
  unused binding.

Reported-by: Daniel E. Doherty <ded-law@ddoherty.net>
<http://permalink.gmane.org/gmane.emacs.orgmode/96732>
2015-04-07 01:39:10 +02:00
Nicolas Goaziou 033847070e Fix b4f9ee4eba
* lisp/org.el (org-at-property-p): Fix typo.
2015-04-07 01:36:29 +02:00
Nicolas Goaziou b4f9ee4eba Fix `org-at-property-p'
* lisp/org.el (org-at-property-p): Return nil when at the beginning of
  the properties drawer.
2015-04-07 00:08:31 +02:00
Nicolas Goaziou 94c7619579 Small refactoring
* lisp/org.el (org-read-property-name): Small refactoring.
2015-04-07 00:02:54 +02:00
Nicolas Goaziou e69c4e7a1b `org-open-at-point' follows links in keywords
* lisp/org.el (org-open-at-point): Follow links in keywords.

* testing/lisp/test-org.el (test-org/open-at-point-in-keyword): New test.
2015-04-05 14:17:58 +02:00
Nicolas Goaziou 707d52cff7 Fix diary sexp indentation
* lisp/org.el (org--get-expected-indentation): Diary sexps are to be
  indented at column 0.
* testing/lisp/test-org.el (test-org/indent-line): Add test.
2015-04-02 10:31:58 +02:00
Nicolas Goaziou ca08453cc9 Update defcustom
* lisp/org.el (org-cycle-hook): Update version and package-version.

Commit 03e81f0d24 modified default
value.
2015-04-02 00:23:57 +02:00
Nicolas Goaziou 03e81f0d24 Fix cycling ARCHIVE trees with inline tasks loaded
* lisp/org-inlinetask.el (org-inlinetask-hide-tasks): New function.
* lisp/org.el (org-cycle-hide-inline-tasks): Remove function.
(org-cycle-hook): Apply removal.

Reported-by: "Francesco Pizzolante" <fpz-djc/iPCCuDYQheJpep6IedvLeJWuRmrY@public.gmane.org>
<http://permalink.gmane.org/gmane.emacs.orgmode/89563>
2015-04-02 00:06:49 +02:00
Nicolas Goaziou 22bf1b8ae3 Fix 80bccca4e2
* lisp/org.el (org-refresh-category-properties): Extract default
  category before entering `with-silent-modifications', as
  `buffer-file-name' is then bound to nil.

Reported-by: John Hendy <jw.hendy@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/96620>
2015-04-01 22:41:41 +02:00
Nicolas Goaziou 33e2e375df Small optimization
* lisp/org.el (org-find-property): Small optimization.

Since VALUE is included in the regexp, it doesn't need to be found
again with `org-entry-get'.  However, we still need to make sure match
really is a node property.
2015-03-31 16:34:51 +02:00
Nicolas Goaziou 80bccca4e2 Fix `org-refresh-category-properties'
* lisp/org.el (org-refresh-category-properties): Ignore false
  positives when setting category.  Also, deprecate old CATEGORY
  keyword behaviour: new keywords override old ones.
2015-03-31 16:22:10 +02:00
Nicolas Goaziou c1a744659d Fix "Before first headline" error in `org-refresh-property'
* lisp/org.el (org-refresh-property): Ignore function when before
first headline or inlinetask.  Small refactoring.

Reported-by: Nick Dokos <ndokos@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/96552>
2015-03-31 15:57:54 +02:00
Florian Beck 7a717f8f04 Allow searching for specific property value
* lisp/org.el (org-re-property): New optional argument.
(org-find-property): Use it.

See <http://permalink.gmane.org/gmane.emacs.orgmode/96316>.

TINYCHANGE
2015-03-31 11:57:43 +02:00
Rasmus 70d828af3a org.el: Fix org-copy-subtree at inlinetask
* org.el (org-copy-subtree): Include the end of an inlinetasks.

Previously, the end of an inlinetask would be left in the buffer.
2015-03-29 15:30:43 +02:00
Nicolas Goaziou 98ec17e204 Fix `org-backward-sentence' and `org-forward-sentence'
* lisp/org.el (org-backward-sentence):
(org-forward-sentence): Properly move at the boundaries of an element.

* testing/lisp/test-org.el (test-org/forward-sentence):
(test-org/backward-sentence): New tests.

Reported-by: Rasmus <rasmus@gmx.us>
<http://permalink.gmane.org/gmane.emacs.orgmode/96377>
2015-03-29 14:14:32 +02:00
Nicolas Goaziou 2e9a1d9c84 Fix code comment
* lisp/org.el (org-fontify-entities): Fix comment.
2015-03-27 18:14:59 +01:00
Nicolas Goaziou 22f732c255 Fuzzy links to headlines ignore COMMENT keywords
* lisp/org.el (org-link-search): Ignore COMMENT keyword.
* testing/lisp/test-org.el (test-org/fuzzy-links): Add test.

Reported-by: Martin Carlé <mc@aiguphonie.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/96413>
2015-03-26 21:05:27 +01:00
Nicolas Goaziou d4785381ec Change "\..." entities into "\_ "
* lisp/org-element.el (org-element--set-regexps):
(org-element-entity-parser): Update regexps.

* lisp/org-entities.el (org-entities): Modify syntax for space
  entities.

* lisp/org.el (org-fontify-entities): Update comment.

* lisp/org-clock.el (org-clocktable-indent-string): Apply syntax
  change.

* etc/ORG-NEWS (title): Update announce.

Use a less verbose syntax, which cannot interfere with file paths.
2015-03-22 21:45:00 +01:00
Nicolas Goaziou 22f942b481 Implement new entity family "\...."
* lisp/org-element.el (org-element--set-regexps):
(org-element-entity-parser): Update regexps for entities.

* lisp/org-entities.el (org-entities): Add new entities.

* lisp/org.el (org-fontify-entities): Add comment.

* etc/ORG-NEWS (title): Introduce new entities.

"\..." are used to insert an arbitrary number of spaces in various
back-ends.  In particular, this family can be used to introduce
leading spaces within table cells.

Also, unlike to other entities, these can be used mid-word, e.g.,

  wo\....rd

Curly brackets can still be added before a dot, e.g.,

  This is the end\...{}.
2015-03-22 09:55:20 +01:00
Gustav Wikström 8562bd09ec org: Nesting grouptags
* lisp/org.el (org-tags-expand): Nesting grouptags.

  Allowing subtags to be defined as groups themselves.

  : #+TAGS: [ Group : SubOne(1) SubTwo ]
  : #+TAGS: [ SubOne : SubOne1 SubOne2 ]
  : #+TAGS: [ SubTwo : SubTwo1 SubTwo2 ]

  Should be seen as a tree of tags:
  - Group
    - SubOne
      - SubOne1
      - SubOne2
    - SubTwo
      - SubTwo1
      - SubTwo2

  Searching for "Group" should return all tags defined above.
2015-03-16 22:27:38 +01:00
Gustav Wikström ee45258cfe org: Grouptags not unique and can contain regexp
* lisp/org.el (org-tags-expand): Grouptags can have regular expressions as
  "sub-tags".

  The regular expressions in the group must be marked up within { }.
  Example use:

  : #+TAGS: [ Project : {P@.+} ]

  Searching for the tag Project will now list all tags also including
  regular expression matches for P@.+.  Good for example if tags for a
  certain project is tagged with a common project-identifier,
  i.e. P@2014_OrgTags.

* lisp/org.el (org-tag-alist) : New symbols for grouptags when the
  tags in the group don't have to be distinct on a heading.

  Grouptags had to previously be defined with { }.  This syntax is
  already used for exclusive tags and Grouptags need their own,
  non-exclusive syntax.  This behaviour is achieved with [ ].  Note: {
  } can still be used also for Grouptags but then only one of the
  given tags can be used on the headline at the same time.  Example:

  [ group : sub1 sub2 ]

  Grouptags also are not filtered when setting up tags.  This means
  they can exist multiple times in org-tag-alist list.  It will be
  usable if nesting of grouptags is ever to become reality.

  There is a slightly annoying side-effect when setting tags in that a
  tag which is both a part of a grouptag and a grouptag of it's own
  will get multiple key-choices in the selection-UI.

* lisp/org.el (org--setup-process-tags): Adaption for the added syntax
  for non-distinct grouptags.

* lisp/org.el (org-fast-tag-selection): Add support for the added,
  non-unique, grouptag-syntax.  Minor (if ...) to (when ...) refactor.
2015-03-16 22:27:26 +01:00
Nicolas Goaziou 7b450bc7bb Fix `org-delete-property-globally'
* lisp/org.el (org-delete-property-globally): Ignore false positive.
2015-03-15 16:53:58 +01:00
Nicolas Goaziou 84d6ff4ec1 Fix `org-entry-delete' with accumulated properties
* lisp/org.el (org-entry-delete): Remove all occurrences of
  accumulated properties, too.  Return a non-nil value when some
  property was removed.

* testing/lisp/test-org.el (test-org/entry-delete): Add test.
2015-03-15 16:53:42 +01:00
Nicolas Goaziou 8cdb2eef0f Fix `org-find-entry-with-id'
* lisp/org.el (org-find-entry-with-id): Ignore false positive ID
  properties when looking for a specific ID.
2015-03-15 15:49:05 +01:00
Nicolas Goaziou 269b680900 Fix CUSTOM_ID search
* lisp/org.el (org-link-search): Avoid false positives when searching
  CUSTOM_ID property.

* testing/lisp/test-org.el (test-org/custom-id): Add test.
2015-03-15 15:49:05 +01:00
Nicolas Goaziou 7072dba04d Implement `org-find-property'
* lisp/org.el (org-find-property): New function.
* testing/lisp/test-org.el (test-org/find-property): New test.
2015-03-15 15:49:05 +01:00
Rasmus cf4145db02 org.el: Declare org-element-update-syntax
* org.el: Declare org-element-update-syntax.  Required by org-add-link-type.
2015-03-14 00:39:54 +01:00
Nicolas Goaziou 1de825df31 Fix CATEGORY property
* doc/org.texi (Special properties): Remove "CATEGORY"

* lisp/org.el (org-special-properties): Remove "CATEGORY".
(org-property-get-allowed-values): Ignore "CATEGORY".
(org-entry-get): Make sure to get CATEGORY value using
`org-entry-properties'.

* testing/lisp/test-org.el (test-org/entry-put): Add test.

"CATEGORY" is not a special property as it can also be set using
a properties drawer.
2015-03-11 17:12:49 +01:00
Nicolas Goaziou 375c831418 Tiny refactoring
* lisp/org.el (org-timestamp--to-internal-time): New function.
(org-timestamp-format): Use new function.
(org-timestamp-split-range): Fix docstring.
2015-03-08 18:34:09 +01:00
Nicolas Goaziou 9e3c3ec0b3 Fix LaTeX fragment display from remote documents
* lisp/org.el (org-toggle-latex-fragment): Fix display from remote
  documents by creating images in temporary directory.

Reported-by: Dustin Paluch <dustinpaluch@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/95712>
2015-03-07 10:01:27 +01:00
Nicolas Goaziou 1362c2d22b Change `org-toggle-latex-fragment' behaviour
* lisp/org.el (org-remove-latex-fragment-image-overlays): Allow to
  limit overlay removal through optional arguments.  Define a new
  return value.
(org-toggle-latex-fragment): Change behaviour.  Update docstring
accordingly.
(org-format-latex): Update docstring.  Remove overlay when LaTeX
fragment is deleted.

* etc/ORG-NEWS: Signal change.

The new behaviour is the following:

  - With a double prefix argument or with a single prefix argument
    when point is before the first headline, toggle overlays in the
    whole buffer;

  - With a single prefix argument, toggle overlays in the current
    subtree;

  - On latex code, toggle overlay at point;

  - Otherwise, toggle overlays in the current section.

Suggested-by: <kuangdash@163.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/95492>
2015-03-06 11:15:33 +01:00