Commit Graph

10408 Commits

Author SHA1 Message Date
Bastien Guerry dd17e9d299 org.el (org-todo): When changing from one state to the same state, throw a more accurate message
* org.el (org-todo): When changing from one state to the same
state, throw a more accurate message.
2014-05-31 14:31:46 +02:00
Bastien Guerry 66db8836b5 org-table.el (org-table-copy-down): Fix bug
* org-table.el (org-table-copy-down): When the text above does
not contain a number, fall back on incrementing by one.
2014-05-31 10:47:55 +02:00
Bastien Guerry 9f5e698679 org-agenda.el (org-agenda-goto): Go to the beginning of the true heading of the entry at point
* org-agenda.el (org-agenda-goto): Go to the beginning of the
true heading of the entry at point.  Update docstring.
2014-05-30 19:28:04 +02:00
Bastien Guerry 8738f173e5 org-footnote.el: Allow to inline external footnotes
* org-footnote.el (org-footnote-new): When point is at a
position where no footnote can be inserted, offer the menu
from `org-footnote-action' instead.
(org-footnote-inline-footnotes): New command.
(org-footnote-action): Make the new command accessible through
the menu.

Thanks to Leonard Randall for the suggestion.
2014-05-30 14:54:11 +02:00
Bastien Guerry a060fb0a08 Merge branch 'maint' 2014-05-30 14:02:46 +02:00
Bastien Guerry c53aeda585 org-agenda.el (org-agenda-insert-diary-make-new-entry): Fix docstring
* org-agenda.el (org-agenda-insert-diary-make-new-entry): Fix
docstring.

Thanks to Nikolai Weibull for reporting this.
2014-05-30 13:58:50 +02:00
Bastien Guerry 63ce68af06 org.el: Don't quote lambdas and known functions. Fix indentation.
* org.el (org-confirm-shell-link-function)
(org-todo-keywords, org-time-stamp-rounding-minutes)
(org-file-contents, org-update-radio-target-regexp)
(org-hide-block-toggle-all, org-hide-block-all)
(org-open-at-point, org-sparse-tree, org-timestamp-change)
(org-create-formula-image, org-insert-comment)
(org-comment-or-uncomment-region, org-comment-dwim): Don't
quote lambdas and known functions.
2014-05-30 08:52:19 +02:00
Bastien Guerry f86d99a292 Merge branch 'maint' 2014-05-30 08:47:26 +02:00
Bastien Guerry 822dcfc881 org.el: Fix bug when setting properties with a null value
* org.el (org-re-property): New parameter `allow-null' to
match property with a null value.
(org-entry-put): Correctly update a property with a null
value.

Thanks to Andrea Rossetti for reporting this and suggesting a fix.
2014-05-30 08:46:39 +02:00
Bastien Guerry 554c9e3228 org.el (org-refresh-effort-properties): New function
* org.el (org-refresh-effort-properties): New function.
(org-agenda-prepare-buffers, org-mode): Use it.
2014-05-29 23:46:11 +02:00
Bastien Guerry f36b19eef6 org.el: Send a warning when org-loaddefs.el could not be found
* org.el: Send a warning when org-loaddefs.el could not be
found in the directory where this org.el file is loaded from.

* ox-org.el (org-org-publish-to-org):
* ox-odt.el (org-odt-do-format-code):
* ox-html.el (org-html-fontify-code):
* org.el (org-fontify-like-in-org-mode):
* org-src.el (org-src-font-lock-fontify-block):
* org-clock.el (org-clock-get-clocktable): Use
`font-lock-ensure' instead of `font-lock-fontify-buffer'.

* org.el (org-outline-level, org-copy-subtree)
(org-sort-entries, orgstruct-setup, org-show-context)
(org-create-formula-image-with-dvipng)
(org-create-formula-image-with-imagemagick)
(org-goto-sibling, org-goto-first-child, org-show-entry): Use
`ignore-errors' instead of (condition-case nil ... (error nil)).

People trying to load org.el when org-loaddefs.el is not available
has been a major cause of trouble when installing Org.  The warning
tells them what they need to do.
2014-05-29 22:08:43 +02:00
Bastien Guerry db9d63d313 Merge branch 'maint' 2014-05-29 21:21:11 +02:00
Bastien Guerry 34c2365081 ox-md.el (org-md-headline): Add anchors when exporting with a table of contents
* ox-md.el (org-md-headline): When exporting with a HTML table
of contents, add HTML anchors to Markdown headlines.

Thanks to Marko Dimjašević for reporting this.
2014-05-29 21:20:55 +02:00
Bastien Guerry 029b393032 Merge branch 'maint' 2014-05-29 19:49:07 +02:00
Bastien Guerry d8034c3b19 org.el (org-insert-heading): Don't insert an item when called with two universal prefix arguments
* org.el (org-insert-heading): Don't insert an item when
called with two universal prefix arguments.
2014-05-29 19:48:47 +02:00
Bastien Guerry b978abb485 org.el (org-shiftmetaup, org-shiftmetadown): Update behavior
* org.el (org-shiftmetaup, org-shiftmetadown): Don't move the
subtree or list item at point up or down, as this feature is
already accessible through `org-metaup' and `org-metadown'.
Update the docstrings to reflect the new behavior.
2014-05-29 19:25:08 +02:00
Bastien Guerry 8772a2eb49 Merge branch 'maint' 2014-05-29 09:57:34 +02:00
Bastien Guerry ee9053ee04 org-agenda.el (org-agenda-finalize): Remove duplicate check for 'org-hd-marker
* org-agenda.el (org-agenda-finalize): Remove duplicate check
for 'org-hd-marker.
2014-05-29 09:57:19 +02:00
Bastien Guerry ab857a3b80 Fix aa86e4bc again 2014-05-28 21:20:29 +02:00
Bastien Guerry 9022b4c5e1 Fix aa86e4bc
Thanks to Achim Gratz for pointing this.
2014-05-28 21:15:44 +02:00
Achim Gratz 5bf928bae7 Merge branch 'maint'
Conflicts:
	lisp/ob-core.el
	lisp/org.el
	lisp/ox.el
2014-05-28 16:23:08 +02:00
Achim Gratz 3d973cdc6e org: add forward declarations
* lisp/org.el: Add forward declarations for a number of functions that
  the compiler otherwise warns about as potentially undefined at
  runtime.
2014-05-28 15:18:24 +02:00
Nicolas Goaziou 92197690ed ox-latex: Fix again 7a956c3880
* lisp/ox-latex.el (latex): Update property name.
* doc/org.texi (Publishing options): Update documentation.
2014-05-28 15:12:42 +02:00
Nicolas Goaziou ba2a5ba9f6 ox-latex: Fix 7a956c3880
* lisp/ox-latex.el (latex): Change property name.  It fixes
  7a956c3880.
(org-latex-template): Use new property.

* doc/org.texi (Publishing options): Update documentation.  Also fix
  typo.
2014-05-28 15:06:31 +02:00
Nicolas Goaziou 7a956c3880 Associate all defcustoms to options in back-end definitions
* lisp/ox-ascii.el:
* lisp/ox-beamer.el:
* lisp/ox-html.el:
* lisp/ox-latex.el:
* lisp/ox-man.el:
* lisp/ox-md.el:
* lisp/ox-odt.el:
* lisp/ox-org.el:
* lisp/ox-texinfo.el: All defcustoms are defined as options in the
  back-end.
* lisp/ox-icalendar.el (icalendar): Ditto.  Also rename :with-vtodo
  property to :icalendar-include-todo.

* doc/org.texi (Publishing options): Update back-end specific
  properties.  Remove @vindex entries so as not to clobber variables
  index.

This change allows to change default value for any defcustom on the
fly when publishing.  It also normalizes how to choose and name what
variables to define as back-end options.
2014-05-28 14:53:29 +02:00
Achim Gratz 790f5b4d3a ob-core, ob-exp, ob-haskell, ob-python: declarations for org-src-preserve-indentations
* lisp/ob-core.el: Add comment to forward declaration of
  'org-src-preserve-indentations'.
* lisp/ob-exp.el: Require org-src to import
  'org-src-preserve-indentations'.
* lisp/ob-haskell.el, lisp/ob-python.el: Remove superfluous forward
  declaration of 'org-src-preserve-indentations', since it gets
  imported by other requires.
2014-05-28 14:52:14 +02:00
Achim Gratz 61b8091596 ob-core:forward declare org-every
* lisp/ob-core.el (org-every): Forward declare 'org-every'.
2014-05-28 14:47:23 +02:00
Achim Gratz 310b9dd2b6 ob-C: lexical-let requires cl at compilation time
* lisp/ob-C.el: Require cl during compilation so that lexical-let is
  known.
2014-05-28 14:40:52 +02:00
Achim Gratz 3a736c51bc org-entities: forward declaration of org-toggle-pretty-entities and org-pretty-entities
* lisp/org-entities.el: Remove superfluous require of org-macs.
  Forward declare 'org-toggle-pretty-entities' and
  'org-pretty-entities'.
2014-05-28 14:16:21 +02:00
Achim Gratz 6c1b41bd68 org, ox: move defsubst before first use
* lisp/ox.el (org-export-get-parent): Move definition of
  'org-export-get-parent' before first use.  Leave comment at original
  place of definition.

* lisp/org.el (org-uniquify): Move definition of 'org-uniquify' before
  first use.  Leave comment at original place of definition.
2014-05-28 13:44:53 +02:00
Bastien Guerry aa86e4bc9f org-agenda.el: Implement new effort filter
* org-agenda.el (org-agenda-custom-commands-local-options):
Add `org-agenda-effort-filter-preset'.
(org-agenda-filter-effort-default-operator): Delete.
(org-agenda-local-vars): Add `org-agenda-effort-filter'.
(org-agenda-mode-map): Use "_" to filter by effort.
(org-agenda-effort-filter, org-agenda-effort-filter-preset):
New variables.
(org-agenda-prepare-window, org-agenda-prepare)
(org-agenda-finalize, org-agenda-redo)
(org-agenda-filter-remove-all, org-agenda-filter-apply)
(org-agenda-set-mode-name, org-agenda-reapply-filters): Handle
effort filter.
(org-agenda-finalize-entries): Use
`org-sort-agenda-noeffort-is-high'.
(org-agenda-limit-entries): Get the property from the correct
location.
(org-agenda-limit-interactively): Throw a user error on wrong
input.
(org-agenda-filter-by-effort): New command.
(org-agenda-filter-by-tag): Don't filter by effort.
(org-agenda-filter-make-matcher): Handle effort filter.
(org-agenda-compare-effort): Don't handle the "?" operator.
(org-agenda-filter-show-all-effort): New command.

Note: This calls for some refactoring in the filter area.
2014-05-28 12:26:54 +02:00
Bastien Guerry 7dceecbb30 Small refactoring and fix a bug in `org-timer-set-timer'
* org.el (org-refresh-property): New function.
(org-refresh-properties, org-set-effort)
(org-property-next-allowed-value): Use it.

* org-timer.el (org-timer-set-timer): Get the correct number
of minutes from text properties, both in an `org-mode' and
`org-agenda-mode' buffer.
2014-05-28 10:47:05 +02:00
Bastien Guerry 500252abf3 org.el (org-open-link-in-comment-or-property): Refactor into `org-open-at-point'
* org.el (org-open-link-in-comment-or-property): Delete.
(org-open-at-point): Handle links in comments and property
drawers.  Update docstring.
2014-05-28 10:21:11 +02:00
Bastien Guerry 5fbdbb2bd5 org-agenda.el (org-agenda-limit-interactively): Enhance
* org-agenda.el (org-agenda-finalize-entries): Remove spurious
variable in the (let ...) construct.
(org-agenda-limit-interactively): Allow to remove the
limitation by passing a universal prefix argument.  Enhance
the prompt.
2014-05-27 16:51:33 +02:00
Bastien Guerry c9ecc225ac org-clock.el (org-clock-display): Allow non-interactive use by making arg optional
* org-clock.el (org-clock-display): Allow non-interactive use
by making arg optional.

Thanks to Noah Slater for pointing this.
2014-05-27 09:45:54 +02:00
Nicolas Goaziou 0e303ab577 Small fix
* lisp/org.el (org-open-at-point): Use parser instead of
  `org-at-comment-p' and `org-at-property-p', which are not accurate.
2014-05-26 18:17:35 +02:00
Nicolas Goaziou f574744aee Tiny refactoring
* lisp/org.el (org-at-property-p): Tiny refactoring.  Improve docstring.
2014-05-26 18:17:30 +02:00
Bastien Guerry b11570c2f1 Fix regression: allow to open a link in a comment or a property line
* org.el (org-open-link-in-comment-or-property): New function.
(org-open-at-point): Use it.

See http://thread.gmane.org/gmane.emacs.orgmode/84300/focus=84300 for
the follow-up of a discussion on whether links should be supported in
comments and properties.
2014-05-26 17:42:58 +02:00
Bastien Guerry f768629404 Simplify comments matching functions
* org.el (org-fontify-entities): Use `org-at-comment-p'.
(org-in-commented-line): Delete.
(org-in-indented-comment-line): Delete.
(org-at-comment-p): Also match indented comments and save
match data.

* org-footnote.el (org-footnote-in-valid-context-p): Use
`org-at-comment-p'.
2014-05-26 17:33:24 +02:00
Bastien Guerry 956c00cce3 org.el (org-link-escape): Don't escape characters in internal links
* org.el (org-link-escape): Don't escape characters in
internal links.

Thanks to Alan Schmitt for raising this issue.
2014-05-26 16:06:10 +02:00
Bastien Guerry 687a65de70 Fix typo in previous commit 2014-05-26 15:44:53 +02:00
Bastien Guerry b622300c0c Merge branch 'maint'
Conflicts:
	lisp/org-agenda.el
2014-05-26 15:32:13 +02:00
Bastien Guerry cbce904187 org-agenda.el: Fix bug wrt `org-agenda-persistent-filter'
* org-agenda.el (org-agenda-prepare-window): New parameter
`filter-alist' to set the filters correctly when
`org-agenda-persistent-filter' is on.
(org-agenda-prepare): Use the new parameter for
`org-agenda-prepare-window'.

Thanks to Thomas Morgan for reporting this.
2014-05-26 15:29:02 +02:00
Bastien Guerry 319b09a1c4 Merge branch 'maint' 2014-05-26 14:56:38 +02:00
Bastien Guerry 54ab137689 Fix bug when update timestamps on filtered agenda entries
* org-compat.el (org-in-invisibility-spec-p): Tiny code
cleanup.
(org-move-to-column): Only remove '(org-filtered) from
`buffer-invisibility-spec'.

* org-agenda.el (org-agenda-mode): Add buffer invisibility
specs.
(org-agenda-filter-hide-line, org-agenda-remove-filter): Set
the 'invisible text property to 'org-filtered.
(org-agenda-show-new-time): Add the default face to avoid the
foreground of the last character on the line to leak into the
timestamp notification.

Thanks to Thomas Morgan for reporting this.
2014-05-26 14:55:50 +02:00
Bastien Guerry 8d0da67ea0 Merge branch 'maint' 2014-05-26 07:36:06 +02:00
Bastien Guerry 061904b58e org-agenda.el (org-get-time-of-day): Don't return time string from within links
* org-agenda.el (org-get-time-of-day): Don't return time
string from within links.

Thanks to Thomas Morgan for reporting this.
2014-05-26 07:35:24 +02:00
Bastien Guerry 77ffc73a4a Merge branch 'master' of orgmode.org:org-mode 2014-05-26 07:26:09 +02:00
Bastien Guerry 2affa4d333 org.el (org-sort-entries): Improve TODO entries sorting
* org.el (org-sort-entries): When sorting by TODO keywords,
put TODO entries first, then entries without a TODO keyword,
then DONE entries.

Thanks to Eric Abrahamsen for triggering this.
2014-05-26 07:10:16 +02:00
Nicolas Goaziou fdb40fbe01 org-agenda: Tiny fix
* lisp/org-agenda.el (org-agenda-format-item): Check if string isn't
  empty before searching for text properties.
2014-05-25 23:33:17 +02:00