Commit Graph

570 Commits

Author SHA1 Message Date
Nicolas Goaziou a2f56264c9 Remove unnecessary linking to export framework
* lisp/org-clock.el (org-clocktable-defaults,
  org-clocktable-write-default): Avoid requiring the whole export
  framework just to check one variable.
* lisp/org-footnote.el (org-footnote-section): Update
  docstring.
(org-footnote-normalize): Remove all export related part from the
  function.
* lisp/org-inlinetask.el (org-inlinetask-export,
  org-inlinetask-export-templates): Removed variables.
(org-inlinetask-export-handler): Removed function.
* lisp/org-plot.el: Remove dependency on `org-exp' library.
* lisp/org.el (org-additional-option-like-keywords): Remove variable.
(org-get-export-keywords): New function.
(org-options-keywords): Update default list of keywords.
(org-remove-flyspell-overlays-in): Apply changes to keywords
compilation.
(org-highlight-latex-fragments-and-specials)
org-latex-and-specials-regexp,
org-export-html-special-string-regexps): Remove variables.
(org-compute-latex-and-specials-regexp,
org-do-latex-and-special-faces, org-remove-file-link-modifiers):
Remove functions.
(org-set-regexps-and-options, org-set-font-lock-defaults): Apply all
removals.
(org-use-sub-superscripts): Fix docstring.  Remove unused group.
(org-match-sexp-depth): Make it a defconst instead of a defcustom in
order to remove `org-export-translation' group completely.

The new export framework shouldn't be as much interleaved with Org
core as with the previous one.  For example, export options, which are
back-end dependent, shouldn't interfere with the display of the
buffer.
2013-02-06 23:06:31 +01:00
Bastien Guerry a2febd2101 Merge branch 'maint' 2013-01-31 14:18:24 +01:00
Bastien Guerry 4259ea9fe5 org-clock.el (org-clock-sum): Fix indentation 2013-01-31 14:18:14 +01:00
Bastien Guerry 394398afab Merge branch 'maint' 2013-01-31 14:17:13 +01:00
Francesco Pizzolante 9cb3d3e7f8 org-clock.el (org-clock-sum): Protect with `org-unmodified'
* org-clock.el (org-clock-sum): Protect with `org-unmodified'.

TINYCHANGE
2013-01-31 14:17:01 +01:00
Bastien Guerry dddd9fb4af Merge branch 'maint' 2013-01-23 14:49:02 +01:00
Bastien Guerry 345cfbec25 org-clock.el (org-clock-in): Fix bug when fetching the effort value
* org-clock.el (org-clock-in): Fix bug when fetching the effort
value.

Thanks to Vasil S. Diadov for reporting this bug and proposing a patch.
2013-01-23 14:48:52 +01:00
Bastien Guerry 7369cada30 Merge branch 'maint' 2013-01-13 11:17:56 +01:00
Bastien Guerry 04eb4b08c3 Revert "Compatibility: Use org-define-obsolete-{function,variable}-alias"
This reverts commit 305f29776f.
2013-01-13 09:19:24 +01:00
Yasushi SHOJI 0499f0a939 org-clock.el: New option `org-clock-x11idle-program-name'
* org-clock.el (org-clock-x11idle-program-name): New option.
(org-x11idle-exists-p, org-x11-idle-seconds): Use it.

* org.texi (Resolving idle time): Document
`org-clock-x11idle-program-name'.

Debian and other OSes already have a program called 'xprintidle',
which does the same thing as x11idle. It also handles the DPMS bug[1]
some version of X servers have.

In order to use an alternative, introduce a customizable variable
'org-clock-x11idle-program-name' to hold the actual command name.

[1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=502226
2013-01-11 23:16:45 +01:00
Nicolas Richard f82004840a * org-id.el (org-id-locations-file):
* org-clock.el (org-clock-persist-file): Fix hardcoded
reference to "~/.emacs.d".

* contrib/lisp/org-track.el (org-track-directory): Fix hardcoded
reference to "~/.emacs.d".
2013-01-09 17:59:17 +01:00
Bastien Guerry 5fc740a230 Merge branch 'maint' 2013-01-08 15:04:40 +01:00
Bastien Guerry 72bc144c15 Update Copyright lines to match Emacs format. 2013-01-08 15:04:32 +01:00
Bastien Guerry 68c1ad99ea New option `org-time-clocksum-use-effort-durations'
* org.el (org-time-clocksum-format): Add a version tag and add
to the 'org-clock group.
(org-time-clocksum-use-fractional): Ditto.
(org-time-clocksum-use-effort-durations): New option to allow
using `org-effort-durations' when computing clocksum durations.
(org-minutes-to-clocksum-string): Use the new option.

* org-clock.el (org-clocktable-write-default): Let-bind
`org-time-clocksum-use-effort-durations' to a new clocktable
parameter ":effort-durations".

Thanks to Sébastien Vauban for pointing the inconsistency.
2013-01-07 21:44:00 +01:00
Bastien Guerry b54d6f5965 Merge branch 'maint'
Conflicts:
	lisp/org-agenda.el
	lisp/org.el
	testing/lisp/test-org-element.el
2013-01-07 16:19:37 +01:00
Bastien Guerry e4df4e9ffd org-clock.el: Fix last commit. 2013-01-07 12:52:34 +01:00
Bastien Guerry 6cd243468b Speed up setting/getting the APPT_WARNTIME property.
* org.el (org-refresh-properties): Rename from
`org-refresh-effort-properties' and use two new parameters.
(org-agenda-prepare-buffers): Use `org-refresh-properties'.
Also refresh the 'org-appt-warntime text property.

* org-clock.el (org-clock-in): Use the renamed defun.

* org-icalendar.el (org-icalendar-print-entries): Refresh the
'org-appt-warntime property.
(org-icalendar-print-entries): Do not use `org-entry-get' to
get the "APPT_WARNTIME" property value.

* org-agenda.el (org-agenda-get-timestamps)
(org-agenda-get-sexps, org-agenda-get-deadlines)
(org-agenda-get-scheduled): Ditto.
2013-01-07 12:50:49 +01:00
Bastien Guerry c4d4bf3833 New defun `org-refresh-effort-properties'
* org-agenda.el (org-agenda-format-item): Do not use
org-get-effort to get the effort text property.
(org-agenda-get-sexps): Use `org-back-to-heading' when setting
the tags.

* org-clock.el (org-clock-in): Refresh effort properties.

* org.el (org-refresh-effort-properties): New defun.
(org-get-effort): Delete.
(org-set-effort): Set the 'org-effort text property.
(org-property-next-allowed-value): Ditto.
(org-agenda-prepare-buffers): Refresh effort properties.
2013-01-07 12:33:24 +01:00
Achim Gratz 19460418a0 Merge branch 'maint' 2013-01-06 18:33:16 +01:00
Achim Gratz 305f29776f Compatibility: Use org-define-obsolete-{function,variable}-alias
* lisp/org-compat.el (org-define-obsolete-function-alias,
  org-define-obsolete-variable-alias): Introduce new compatibility
  macros to obsolete functions and variables.

* lisp/org-agenda.el, lisp/org-clock.el, lisp/org-id.el,
  lisp/org-lparse.el, lisp/org-protocol.el lisp/org.el: Use
  `org-define-obsolete-{function,variable}-alias´instead of
  `define-obsolate{function,variable}-alias´.
2013-01-06 18:29:05 +01:00
Bastien Guerry 60b23bdeac Merge branch 'maint'
Conflicts:
	contrib/lisp/htmlize.el
	etc/schema/od-manifest-schema-v1.2-os.rnc
	etc/schema/od-schema-v1.2-os.rnc
	lisp/org-exp-blocks.el
2013-01-01 16:06:17 +01:00
Bastien Guerry 98cd4687a2 Update copyright years.
Happy new year!
2013-01-01 16:04:24 +01:00
Bastien Guerry b5f93f8fe3 New option `org-clock-rounding-minutes'
* org-clock.el (org-clock-rounding-minutes): New option to
round the time by N minutes in the past when clocking in or out.
(org-clock-in, org-clock-in-last, org-clock-out): Use the new
option.

* org.el (org-current-time): New optional parameter
`rounding-minutes' to override the use of
`org-time-stamp-rounding-minutes' for rounding.

Thanks to Kevin Buchs for a preliminary patch for this feature.
2012-12-29 18:45:07 +01:00
Bastien Guerry 3b994e78fb org-clock.el (org-clock-special-range): Small docstring fix
* org-clock.el (org-clock-special-range): Small docstring fix.
2012-12-29 12:35:51 +01:00
Bastien Guerry 0bca49801e org-clock.el: Implement a new parameter :wstart to define the week start day
* org-clock.el (org-clock-special-range): New parameter
'weekstart to define the week start day.
(org-clock-special-range, org-dblock-write:clocktable)
(org-dblock-write:clocktable, )
(org-clocktable-write-default, org-clocktable-steps)
(org-clock-get-table-data): Use the new parameter.
(org-clocktable-defaults): Set monday as the starting day of
the week by setting :wstart to 1.

* org.texi (The clock table): Document :wstart as a way to set
the starting day of the week.

Thanks to Raghavendra D Prabhu for suggesting this feature.
2012-12-29 12:35:18 +01:00
Bastien Guerry 0276cf0975 Merge branch 'maint' 2012-12-28 18:37:53 +01:00
Bastien Guerry 5c4d3cbcbf org-clock.el (org-clock-persist): Docstring fix: document the 'history value
* org-clock.el (org-clock-persist): Docstring fix: document
the 'history value.

Thanks to Ivan Andrus for reporting this.
2012-12-28 18:37:07 +01:00
Bastien Guerry 953b920c9b Merge branch 'maint' 2012-12-23 17:31:57 +01:00
Bastien Guerry c2e662cf79 Revert "Save match data in `org-delete-backward-char' and `org-delete-char'"
This reverts commit c800836d7c.
2012-12-23 17:26:45 +01:00
Bastien Guerry 9f1f0535be Merge branch 'maint' 2012-12-23 17:20:51 +01:00
Bastien Guerry c800836d7c Save match data in `org-delete-backward-char' and `org-delete-char'
* org.el (org-delete-backward-char, org-delete-char): Save
match data (`delete-backward-char' and `delete-char' don't.)
(org-enable-table-editor, org-insert-heading)
(org-remove-timestamp-with-keyword, org-self-insert-command):
Use `delete-backward-char' instead of `backward-delete-char'.

* org-table.el (org-table-fedit-lisp-indent)
(orgtbl-self-insert-command): Ditto.

* org-latex.el (org-export-latex-subcontent): Ditto.

* org-clock.el (org-clocktable-write-default): Ditto.

* org-ascii.el (org-export-ascii-preprocess): Ditto.

Thanks to Vegard Vesterheim for raising this issue and proposing a patch,
and to Carsten for pointing at the root of the problem.
2012-12-23 12:30:40 +01:00
Bastien Guerry 1af0b39c01 Allow C-S-<up/down> to sync update clock timestamps by several units.
* org-clock.el (org-clock-timestamps-up)
(org-clock-timestamps-down, org-clock-timestamps-change): Add
an optional argument N to change timestamps by several units.

* org.el (org-shiftcontrolup, org-shiftcontroldown): Ditto.

Thanks to Rainer Stengele for this idea.
2012-12-18 12:16:20 +01:00
Bastien Guerry 5508053d63 Merge branch 'maint' 2012-12-11 18:14:00 +01:00
Bastien Guerry 0c68a27ac9 org-clock.el (org-clock-out): Use `user-error'.
* org-clock.el (org-clock-out): Use `user-error' when the user
tries to clock out while there is no running clock.
2012-12-11 18:11:24 +01:00
Ivan Vilata i Balaguer 513507ee74 Allow relative times in clocktable tstart and tend options
* lisp/org-clock.el (org-clock-get-table-data): Pass tstart and tend
time strings through `org-matcher-time' to allow relative times besides
absolute ones, convert result to encoded time.
* doc/org.texi (The clock table): Document acceptance of relative times
in tstart and tend, link to syntax description and provide example.

Inspired in the original relative times proposal by Ilya Shlyakhter,
this is less invasive and it doesn't modify core functions, thus it
avoids the original's infinite recursion when hitting normal dates in
other locations.

TINYCHANGE
2012-11-30 16:07:13 +01:00
Toby S. Cubitt a00a7b2918 Allow more flexible customization of clocksum format
* lisp/org.el (org-time-clocksum-format, org-time-clocksum-fractional-format):
in addition to a single format string, the clocksum formats can now be
plists specifying separate formats for different time units.

* lisp/org.el (org-minutes-to-clocksum-string): new function to
replace org-minutes-to-hh:mm-string, which converts a number of
minutes to a string according to the customization options.

* lisp/org-colview.el (org-columns-number-to-string): use new
org-minutes-to-clocksum-string function to format clocksum durations.

* lisp/org-clock.el: always call new org-minutes-to-clocksum-string
function when formatting time durations, instead of calling
org-minutes-to-hh:mm-string or passing org-time-clocksum-format
directly to format.
2012-11-17 15:39:07 +01:00
Bastien Guerry 8866f86624 Merge branch 'maint' 2012-10-26 15:12:02 +02:00
Myles English db8e06147a Clocking: Move to task before calling org-clock-in-prepare-hook
* lisp/org-clock.el (org-clock-in): Moved the call to
org-clock-in-prepare-hook until the task's properties
can be accessed.

The problem was when using a function to add an effort
property via the hook, it would not recognise an existing
effort property when called with the prefix (C-u C-c C-x C-i)
with the point at a place other than at the task.

TINYCHANGE
2012-10-26 14:47:23 +02:00
Bastien Guerry 886e4f56e5 Merge branch 'maint' 2012-10-24 11:21:48 +02:00
Bastien Guerry facb889b19 Use "mode-line" instead of "modeline".
* org-clock.el (org-clock-modeline-total): Make obsolete.
(org-clock-mode-line-total): Rename from
`org-clock-modeline-total'.
(org-clock-get-sum-start): Fix references to
`org-clock-modeline-total'.

* org-faces.el (org-agenda-filter-tags)
(org-agenda-filter-category, mode-line): Use the 'mode-line
face instead of the obsolete 'modeline.

Thanks to Brendan Halpin for reporting this.
2012-10-24 11:21:44 +02:00
Sebastien Vauban 0408270ad2 Put the clocktable summary line as a CAPTION
* org-clock.el (org-clocktable-write-default): Insert the summary as a
  standard #+CAPTION keyword for the (clock) table.
2012-10-04 14:13:39 +02:00
Bastien Guerry 4f0b3bfe0c Merge branch 'maint' 2012-10-02 13:07:09 +02:00
Bastien Guerry 30f1a62878 Update autoloads.
* org.el: Don't dynamically autoload already autoloaded
functions.
(org-clock-update-time-maybe): Move to org-clock.el.

* org-exp.el (org-insert-export-options-template): Remove
autoload cookie.

* org-clock.el (org-resolve-clocks, org-clock-in)
(org-clock-out, org-clock-cancel, org-clock-goto)
(org-clock-sum, org-clock-display, org-clock-report)
(org-dblock-write:clocktable): Add autoload cookie.
(org-clock-update-time-maybe): Moved from org.el.

* org-beamer.el (org-beamer-sectioning, org-beamer-mode): Ditto.

* org-ascii.el (org-export-ascii-preprocess): Ditto.

* org-archive.el (org-archive-subtree)
(org-archive-to-archive-sibling, org-toggle-archive-tag): Add
autoload cookie.

* org-colview.el (org-columns, org-dblock-write:columnview)
(org-insert-columns-dblock, org-agenda-columns): Ditto.

* org-table.el (org-table-create-with-table.el)
(org-table-create-or-convert-from-region, org-table-create)
(org-table-convert-region, org-table-import)
(org-table-export, org-table-align)
(org-table-justify-field-maybe, org-table-next-field)
(org-table-previous-field, org-table-next-row)
(org-table-copy-down, org-table-field-info)
(org-table-current-dline, org-table-goto-column)
(org-table-insert-column, org-table-delete-column)
(org-table-move-column-right, org-table-move-column-left)
(org-table-move-column, org-table-move-row-down)
(org-table-move-row-up, org-table-move-row)
(org-table-insert-row, org-table-insert-hline)
(org-table-hline-and-move, org-table-kill-row)
(org-table-sort-lines, org-table-cut-region)
(org-table-copy-region, org-table-paste-rectangle)
(org-table-convert, org-table-wrap-region)
(org-table-edit-field, org-table-sum)
(org-table-get-stored-formulas)
(org-table-maybe-eval-formula)
(org-table-rotate-recalc-marks)
(org-table-maybe-recalculate-line, org-table-eval-formula)
(org-table-recalculate, org-table-iterate)
(org-table-edit-formulas)
(org-table-toggle-coordinate-overlays)
(org-table-toggle-formula-debugger, orgtbl-to-generic)
(orgtbl-to-tsv, orgtbl-to-csv, orgtbl-to-latex)
(orgtbl-to-html, orgtbl-to-texinfo, orgtbl-to-orgtbl): Ditto.
2012-10-02 10:52:17 +02:00
Bastien Guerry 5c762bbdc6 Remove some autoloads and clean up code.
* org.el (turn-on-orgtbl): Moved here from org-table.el.
(org-clock-persistence-insinuate): Moved here from org-clock.el.
(org-update-all-dblocks, org-map-entries)
(org-require-autoloaded-modules, org-forward-element)
(org-backward-element, org-up-element)
(org-element-greater-elements, org-drag-element-backward)
(org-drag-element-forward, org-mark-element)
(org-narrow-to-element, org-transpose-element)
(org-unindent-buffer): Don't autoload.

* org-clock.el (org-clock-get-clocktable): Rename from
`org-get-clocktable'.
(org-clock-persistence-insinuate): Move to org.el.

* org-capture.el: Do no set `generated-autoload-file' locally.
Minor code clean up.

* org-agenda.el (org-agenda-list): Use
`org-clock-get-clocktable'.  Do no set
`generated-autoload-file' locally.

* org-table.el (org-table-iterate-buffer-tables): Minor
reformatting.
(turn-on-orgtbl): Move to org.el.

* org-html.el (org-export-htmlize-generate-css): Don't autoload.

* org-timer.el (org-timer-pause-or-continue, org-timer-stop):
Ditto.

* ob-tangle.el (org-babel-tangle-lang-exts): Ditto.

* ob-lob.el (org-babel-lob-ingest): Ditto.

* org-id.el (org-id-copy)
(org-id-get-with-outline-path-completion)
(org-id-get-with-outline-drilling): Ditto.

* org-lparse.el (org-lparse-and-open, org-lparse-batch)
(org-lparse-to-buffer, org-replace-region-by)
(org-lparse-region): Ditto.

* org-mobile.el (org-mobile-create-sumo-agenda): Ditto.
2012-10-02 10:03:15 +02:00
Bastien Guerry e4c31cf98b Use generated-autoload-file: "org-loaddefs.el" as a local variable. 2012-10-02 08:50:46 +02:00
Bastien Guerry fe7f964b49 Merge branch 'maint' 2012-09-28 17:47:53 +02:00
Bastien Guerry 222eae4033 Fix error messages: don't use a dot at the end 2012-09-28 17:47:48 +02:00
Bastien Guerry 91a7e272b3 org-clock.el: Minor enhancements
* org-clock.el (org-clock-sound): Enhance docstring.
(org-notify): Use the parameter `play-sound' as argument for
`org-clock-play-sound'.
(org-clock-play-sound): New optional argument `clock-sound' to
override `org-clock-sound'.
2012-09-26 15:52:21 +02:00
Bastien Guerry 99453a16f5 Merge branch 'maint' 2012-09-21 16:31:55 +02:00
Levin Du 996a49dd44 org-clock.el (org-clock-in): Fix bug in setting the clock heading
* org-clock.el (org-clock-in): Fix bug in setting the clock
heading.

TINYCHANGE
2012-09-21 15:42:38 +02:00