Commit Graph

886 Commits

Author SHA1 Message Date
Kyle Meyer 6bc48c5f41 Update copyright years 2016-01-09 17:12:03 -05:00
Nicolas Goaziou da10c6ace6 Fix copyright years 2016-01-07 23:39:50 +01:00
Nicolas Goaziou aab46486f7 Fix removal of shared drawers between clocks and notes
* lisp/org.el (org-log-note-marker): Remove variable.
(org-log-note-buffer): New variable.
(org-add-log-setup): Remove one argument.  Also use new variable.
(org-refile):
(org-todo):
(org-auto-repeat-maybe):
(org-deadline):
(org-schedule):
(org-add-note): Apply argument removal.
(org-store-log-note): Use new variable.  Compute the insertion's location
at the time the note is really inserted in the buffer.

* lisp/org-clock.el (org-clock-out): Apply argument removal.  Remove hack
  around shared drawers.

Reported-by: Olli P <kotkis@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/103958>
2016-01-06 15:50:50 +01:00
Nicolas Goaziou c6ec704dce org-clock: Fix missing clock history
* lisp/org-clock.el (org-clock-stored-history): New variable.
(org-clock-save):
(org-clock-load): Use new variable.

Reported-by: Matt Lundin <mdl@imapmail.org>
<http://permalink.gmane.org/gmane.emacs.orgmode/103972>
2016-01-06 15:07:47 +01:00
Nicolas Goaziou aa3917ad47 Merge branch 'maint' 2016-01-03 20:49:18 +01:00
Nicolas Goaziou 3d4c467673 org-clock: Improve docstring
* lisp/org-clock.el (org-clock-display): Point to
  `org-clock-display-default-range'.

Reported-by: David Bremner <david@tethera.net>
<http://permalink.gmane.org/gmane.emacs.orgmode/103938>
2016-01-03 20:48:14 +01:00
Jan Malakhovski 913741876e org-clock: Fix a typo
* lisp/org-clock.el (org-clock-get-table-data): Fix a typo in docstring.
2015-12-29 21:09:29 +01:00
Nicolas Goaziou 35bc1c8853 org-clock: Use lexical binding
* lisp/org-clock.el (org-clock-save-markers-for-cut-and-paste):
(org-clock-select-task):
(org-clock-out):
(org-clock-load): Use `dolist' instead of `mapc' + `lambda'.

(org-clock-insert-selection-line):
(org-resolve-clocks-if-idle):
(org-clock-find-position):
(org-clock-remove-overlays):
(org-dblock-write:clocktable):
(org-clocktable-steps):
(org-clock-get-table-data): Silence byte-compiler.
2015-12-20 23:04:48 +01:00
Aaron Ecay 07e16c2fc5 Use setq-local and defvar-local.
* lisp/org-macs.el (org-set-local): Remove.  All callers changed.
* lisp/org-clock.el:
* lisp/org-colview.el:
* lisp/org-macro.el:
* lisp/org-mouse.el:
* lisp/org-table.el:
* lisp/org.el: Use defvar-local.
* lisp/org-agenda.el:
* lisp/org-capture.el:
* lisp/org-crypt.el:
* lisp/org-ctags.el:
* lisp/org-plot.el:
* lisp/org.el:
* lisp/ox-odt.el:
* lisp/ox.el: Use setq-local instead of set + make-local-variable.

Changes in contrib:

* contrib/lisp/org-colview-xemacs.el (org-colview-xemacs-set-local): New
macro. Adjust old callers of `org-set-local'.
2015-11-05 16:47:38 +00:00
Nicolas Goaziou 541aa0f62d org-clock: Fix clocking in
* lisp/org-clock.el (org-clock-find-position): Correctly position cursor
  on the correct headline.

Reported-by: Jan Malakhovski <oxij@oxij.org>
<http://permalink.gmane.org/gmane.emacs.orgmode/102170>
2015-10-25 15:51:53 +01:00
Nicolas Goaziou f01b3fadbc org-clock: Fix clock drawer creation
* lisp/org-clock.el (org-clock-find-position): Create clock drawer when
  a drawer is missing, even though requested, but some clocks are
  already present in the entry.

Reported-by: Nikolay Kudryavtsev <nikolay.kudryavtsev@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/101973>
2015-10-18 01:39:36 +02:00
Nicolas Goaziou a36c15494e org-clock: Fix quarterly clock reports
* lisp/org-clock.el (org-clock-special-range): Properly set Q according
  to block specification.

Reported-by: "L.C. Karssen" <lennart@karssen.org>
<http://permalink.gmane.org/gmane.emacs.orgmode/101899>
2015-10-15 00:03:36 +02:00
Paul Eggert c86a10b0bc Backport commit 284c470 from Emacs master branch
Backslash cleanup in Elisp source files
284c470ef752967fcd8bae6a450dc138462b1e49
Paul Eggert
Thu Sep 17 16:09:39 2015 -0700
2015-09-21 18:38:39 -04:00
Kyle Meyer 0839dc4322 Protect remaining apostrophes in docstrings
Protect apostrophes not covered by the last backport.  Convert
expressions like '(...)  to \\='(...)  and symbols written as 'name to
`name'.  (In addition to ensuring the correct display, the latter also
improves consistency with many Org docstrings.)

If these aren't protected, Emacs 25 may display them as curved quotes in
the help buffer, depending on the value of text-quoting-style.
2015-09-21 18:38:39 -04:00
Kyle Meyer 077810e521 Modify quote-related backport
These changes are in line with the changes proposed on the mailing list,
but many of those changes weren't necessary because they had already
been reverted in the Emacs repo.

<http://permalink.gmane.org/gmane.emacs.orgmode/100896/>
2015-09-21 18:38:39 -04:00
Kyle Meyer d77a52a502 Backport quote-related commits from Emacs
These changes are the combination of the commits below (in order
applied).  Unlike other backports, these are applied in one commit
because they are closely related and because some of the later commits
reverse changes in earlier commits.  Changes to message and help quote
display for Emacs 25 seem to be here to stay.  The quote protections are
required to ensure grave accents and apostrophes are displayed as
intended in Emacs 25, and they should not affect earlier versions.

  Quoting fixes in lisp/org
  6cd2629bd1b3ce77d29ac28e29237c94a4197116
  Paul Eggert
  Mon Aug 31 00:29:40 2015 -0700

  More-conservative ‘format’ quote restyling
  fbb5531fa11d13854b274d28ccd329c9b6652cfc
  Paul Eggert
  Sun Aug 23 22:39:06 2015 -0700

  Prefer directed to neutral quotes
  875a5d0ead827d3da32ecbd30e739a29f07bbc87
  Paul Eggert
  Mon Aug 24 23:57:25 2015 -0700

  Escape ` and ' in doc
  19532d147b431a4fe34f088d6de07891c48e2c5c
  Paul Eggert
  Tue Sep 1 18:23:21 2015 -0700

  Fix some more docstring etc. quoting problems
  26bd978d87dfbf9baa115cd961a67d42b416c4bf
  Paul Eggert
  Thu Sep 3 15:32:54 2015 -0700

  Go back to grave quoting in source-code docstrings etc.
  6afef3f6ca2f3009c722b84e249903b7f807b044
  Paul Eggert
  Mon Sep 7 16:09:27 2015 -0700
2015-09-21 18:38:18 -04:00
Kyle Meyer 0cf9f17c55 Use substitute-command-keys more
* lisp/ob-core.el (org-confirm-babel-evaluate):
(org-babel-no-eval-on-ctrl-c-ctrl-c):
(org-babel-hash-at-point):
* lisp/org-agenda.el (org-agenda-log-mode-items):
(org-agenda-auto-exclude-function):
(org-search-view):
(org-todo-list):
(org-tags-view):
(org-agenda-log-mode):
(org-agenda-show-the-flagging-note):
* lisp/org-clock.el (org-clock-out-when-done):
* lisp/org-id.el (org-id-link-to-org-use-id):
* lisp/org-table.el (org-table-allow-automatic-line-recalculation):
(org-table-edit-formulas):
* lisp/org.el (org-support-shift-select):
(org-remove-highlights-with-change):
(org-refile-use-cache):
(org-use-fast-todo-selection):
(org-time-stamp-rounding-minutes):
(org-agenda-text-search-extra-files):
(org-cycle):
(org-ctrl-c-ctrl-c): Use substitute-command-keys.
2015-09-21 18:33:45 -04:00
Nicolas Goaziou 2d62c0e173 org-clock: Fix `org-clock-remove-empty-clock-drawer'
* lisp/org-clock.el (org-clock-drawer-name): New function.
(org-clock-find-position): Use new function.
(org-clock-remove-empty-clock-drawer): Remove drawer actually used for
clocks, which may be different from the one used for storing notes.
Also, consider that headlines could use different drawer names in the
same tree.
2015-09-01 10:29:33 +02:00
Tom Hinton 0500bd09e2 Fix clock in when org-clock-into-drawer is integer
* org-clock.el (org-clock-jump-to-current-clock): Fixed a bug wherein
  `org-clock-jump-to-current-clock' did not work if
  `org-clock-into-drawer' was not either a string or nil.

TINYCHANGE
2015-08-13 22:51:09 +02:00
Kyle Meyer 408f6da74d org-clock: Fix org-add-archive-files call
* lisp/org-clock.el (org-dblock-write:clocktable): Check that
  buffer-file-name is non-nil before passing to org-add-archive-files.
2015-08-10 12:19:39 -04:00
Paul Eggert ecf3a4af2c Backport remaining changes from commit 7e09ef0
Add changes from Emacs repo that should have been backported with
bb77dd2.

Update copyright year to 2015
7e09ef09a479731d01b1ca46e94ddadd73ac98e3
Paul Eggert
Thu Jan 1 14:26:41 2015 -0800
2015-08-10 02:17:19 -04:00
Kyle Meyer 11e8749102 org-clock: Fix org-agenda-prepare-buffers call
* lisp/org-clock.el (org-dblock-write:clocktable): Pass buffer to
  org-agenda-prepare-buffers when buffer is not visiting file.

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.
2015-08-09 21:39:18 -04:00
Kyle Meyer 6f9184a294 Merge branch 'maint' into backport-master 2015-07-26 23:56:50 -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 a55b5a4269 Backport commit f9acac7 from Emacs master branch
* lisp/org-clock.el (org-clock-save):
Prefer (system-name) to system-name, and avoid naming
locals 'system-name'.

system-name's returned value can vary
f9acac751d4cd22480e62cc63936b1208ca9fe48
Paul Eggert
Mon Dec 29 12:38:58 2014 -0800
2015-07-26 23:28:25 -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 c76fef6b9d org-clock: Add `untilnow' time block
* lisp/org-clock.el (org-clock-special-range): Handle `untilnow'
  range.
(org-clock--oldest-date): New variable.
(org-clock-display-default-range): Add `untilnow' as valid range.  Use
new variable.
(org-clock-display): Offer `untilnow' as a possible range.

* doc/org.texi (The clock table): Document `untilnow'

* testing/lisp/test-org-clock.el (test-org-clock-clocktable-contents-at-point): Fix test
when called interactively.
(test-org-clock/clocktable):
(test-org-clock/clocktable1): Update tests.
(test-org-clock/clocktable-until-now): New test.

* etc/ORG-NEWS (title): Document new feature.

Suggested-by: Sébastien Vauban
2015-07-04 14:31:34 +02:00
Bastien 367d48cbd8 Merge branch 'maint'
Conflicts:
	lisp/org-clock.el
2015-04-27 14:17:00 +02:00
Stefan Monnier 9ee9d69a34 org-clock.el (org-x11idle-exists-p): Be honest about which command is actually sent to the shell.
* org-clock.el (org-x11idle-exists-p): Be honest about which
command is actually sent to the shell.
2015-04-27 14:15:45 +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
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 bcaf550826 org-clock: Use new entities for clock table
* lisp/org-clock.el (org-clocktable-indent-string): Use new entities.
  Update docstring.

Fixes: bug#18870
2015-03-22 09:55:52 +01:00
Nicolas Goaziou 18685d9852 org-clock: Fix ignored integer values for `org-clock-into-drawer'
* lisp/org-clock.el (org-clock-into-drawer): Fix ignored integer
  values.

Reported-by: Rainer Stengele <rainer.stengele@online.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/95504>
2015-02-28 00:43:37 +01:00
Nicolas Goaziou a752684bf0 org-clock: Fix `org-clock-in-last' with universal argument
* lisp/org-clock.el (org-clock-in-last): `org-clock-in' expects an
  universal argument, not the return value of `org-clock-select-task'.

Reported-by: Peter Münster <pmlists@free.fr>
<http://permalink.gmane.org/gmane.emacs.orgmode/94331>
2015-01-31 12:46:50 +01:00
Marco Wahl e0879b03d0 Merge branch 'maint' 2015-01-12 13:02:20 +01:00
Marco Wahl ca21b7b86d org*.el: Fix call to calendar API
* lisp/org-clock.el: Replace occurances of
'calendar-absolute-from-iso' with 'calendar-iso-to-absolute'.

* lisp/org-agenda.el: Same as above.

* lisp/org.el: Same as above.

Some (long marked obsolete) calendar entities have been dropped from
Emacs recently.  One of those is 'calendar-absolute-from-iso'.
2015-01-12 12:35:10 +01:00
Nicolas Goaziou e990bedc51 Change default value for `org-clock-into-drawer'
* lisp/org-clock.el (org-clock-into-drawer): Update docstring.  Change
  default value.
(org-clock-jump-to-current-clock): Properly find current clock drawer,
if any.
(org-clock-find-position): Tiny fix.
(org-clock-out): Properly check if clock and log drawers are the same.
(org-clock-find-position, org-clock-out,
(org-clock-remove-empty-clock-drawer): Use new function.
2014-12-14 18:22:31 +01:00
Nicolas Goaziou 83249b668e org-clock: Fix clocking when `org-clock-into-drawer' is a number
* lisp/org-clock.el (org-clock-find-position): Check if
  `org-clock-into-drawer' is a number when inserting the first clock.

Reported-by: Rainer Stengele <rainer.stengele@online.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/93128>
2014-12-03 15:24:40 +01:00
Nicolas Goaziou 52b63aed04 org-clock: Insert clocks after meta data
* lisp/org-clock.el (org-clock-find-position): Make sure clocks, and
  possibly drawer containing them, are inserted after planning info
  and any property drawer.
2014-10-28 14:23:51 +01:00
Bastien Guerry eb973f90a9 org-clock.el (org-clock-select-task): Kill temporary buffer
* org-clock.el (org-clock-select-task): Kill temporary buffer.

Thanks to Marcin Borkowski for this idea.
2014-10-20 15:27:46 +02:00
Kyle Meyer 70e0b08e66 org-clock: Fix CLOCK_INTO_DRAWER property check
* lisp/org-clock.el (org-clock-into-drawer): Fix processing of
properties so that they can override global value.

Previously, if the 'CLOCK_INTO_DRAWER' or 'LOG_INTO_DRAWER' property was
nil, the local property setting would not override the global
variable [1]. These changes make the behavior match the docstring
description ('CLOCK_INTO_DRAWER' and 'LOG_INTO_DRAWER' properties
override `org-clock-into-drawer', with 'CLOCK_INTO_DRAWER' given
precedence).

[1] http://stackoverflow.com/questions/26405415/how-to-locally-unset-org-clock-into-drawer-t

TINYCHANGE
2014-10-17 00:09:32 +02:00
Konubinix ef5ec3d536 Use `org-clock-string' whenever possible
* lisp/org-clock.el (org-find-open-clocks):
* lisp/org.el (org-clone-subtree-with-time-shift,
 org-insert-property-drawer, org-at-clock-log-p): Use
 `org-clock-string' whenever possible instead of hardcoded "CLOCK".
(org-clock-line-re): New variable.
2014-08-27 10:10:24 +02:00
Bastien Guerry 63160e9aab org-clock.el: Various improvements
* org-clock.el (org-clock-display-default-range): New option.
(org-clock-display): Use the new option.
(org-clock-sum-custom): New parameters `range' and `propname'.
(org-clock-special-range): Allow to enter a special range
through the calendar.
2014-07-28 17:43:15 +02:00
Nicolas Goaziou ced4fa3205 Merge branch 'maint' 2014-07-25 11:05:49 +02:00
Nicolas Goaziou bacfe5b4f7 org-clock: Update syntax for indentation in clock tables
* lisp/org-clock.el (org-clocktable-indent-string): Use "\emsp"
  instead of "\__", which is not supported anymore since Org 8.0.

Thanks to Buddy Butterfly for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/88842
2014-07-25 11:02:55 +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 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
Bastien Guerry d978a9e585 org-agenda.el (org-agenda-format-item): Don't add the 'effort and 'effort-minutes text properties
* org-agenda.el (org-agenda-format-item): Don't add the
'effort and 'effort-minutes text properties as they are
already accessible through the 'txt property of agenda lines.

* org-clock.el (org-clock-in): Refresh both the 'effort and
'effort-minutes text properties.

* org-rmail.el (rmail, rmail-file-name): Silent byte-compiler.

* org.el (org-refresh-properties): Allow to set several text
properties by passing an alist to the TPROP argument.
(org-set-effort, org-property-next-allowed-value): Use 'effort
instead of 'org-effort.
(org-agenda-prepare-buffers): Update both 'effort and
'effort-minutes.
(org-mark-jump-unhide): Move up to silent the byte-compiler.
2014-05-23 16:51:55 +02:00
Bastien Guerry b5554077cb org-clock.el: New function `org-clock-sum-custom'
* org-clock.el (org-clock-sum-today): Use `headline-filter'.
Remove interactive form.
(org-clock-display): Change the meaning of prefix argument:
one prefix arg shows today's time; two prefix args show clocks
from a custom range; three prefix args show the total time in
the echo area.
(org-clock-sum-custom): New function.
(org-clock-sum): Remove interactive form.
2014-04-20 15:09:32 +02:00
Bastien Guerry 51c37c5c19 Merge branch 'maint'
Conflicts:
	lisp/org-clock.el
2014-04-18 21:33:52 +02:00
Bastien Guerry 7c5cf02e2f Fix `org-clock-put-overlay' again. 2014-04-18 21:30:12 +02:00
Bastien Guerry d52572d1bc Merge branch 'maint'
Conflicts:
	lisp/org-clock.el
2014-04-18 16:41:29 +02:00
Bastien Guerry bcbc97d902 Fix `org-clock-put-overlay' 2014-04-18 16:35:27 +02:00
Bastien Guerry 13230e3a66 org-clock.el (org-clock-put-overlay): Minor enhancements
* org-clock.el (org-clock-put-overlay): Don't use a line of
dots anymore.  Enhance display of time.

Thanks to Noah Slater for suggesting this.
2014-04-17 13:10:09 +02:00
Bastien Guerry 9448fa263b Merge branch 'maint'
Conflicts:
	lisp/org-clock.el
2014-04-17 11:42:16 +02:00
Bastien Guerry 17fb85b12c org-clock.el (org-clock-put-overlay): Fix display when `org-indent-mode' is on
* org-clock.el (org-clock-put-overlay): Fix display when
`org-indent-mode' is on.

Thanks to Christoph Groth for reporting this.
2014-04-17 11:38:53 +02:00
Bastien Guerry 8f19a42304 Minor enhancements to displaying clocks as overlays
* org-faces.el (org-clock-overlay): Use a gray background and
don't inherit the foreground.

* org-clock.el (org-clock-put-overlay): Don't add the stars.
2014-04-17 10:19:58 +02:00
Bastien Guerry 132da2db35 Let sort-by-time handle [H]H:MM strings and add a :sort parameter for clocktables
* org-clock.el (org-clocktable-write-default): New parameter
":sort" to sort a column by a sorting type.  E.g., a value of
:sort (1 . ?a) will sort the first column alphabetically.  The
sorting line is the third one, table-wise, which is usually
the first line that contains user data.

* org.texi (The clock table): Document the new :sort
parameter.

* org.el (org-do-sort): Recognize [H]H:MM strings as time
values and allow sort-by-time to process them.

* org-table.el (org-table-sort-lines): Mention that sorting by
time also recognize [H]H:MM time values.
2014-04-16 18:23:47 +02:00
Bastien Guerry bf27c6b71f Merge branch 'maint' 2014-03-24 06:29:26 +01:00
Bastien Guerry c4bca1c384 Fix 3a233aa 2014-03-24 06:29:14 +01:00
Bastien Guerry 9bb4dd6e0a Merge branch 'maint' 2014-03-20 09:45:09 +01:00
Bastien Guerry 8bab38bcba Fix 3a233aa
Thanks to Alexey Lebedeff for providing the fix.
2014-03-20 09:44:56 +01:00
Bastien Guerry 719b6ec77d Merge branch 'maint' 2014-03-19 10:49:01 +01:00
Bastien Guerry 3a233aa6d9 org-clock.el (org-clock-get-table-data): Bugfix
* org-clock.el (org-clock-get-table-data): When :link is `t'
in the clocktable parameters, bracket links in the clocktable
should only contain their description, other C-c C-o will try
to open the bracket link at point instead of the headline.

Thanks to Alexey Lebedeff for providing a preliminary patch for this.
2014-03-19 10:48:44 +01:00
Ilya Shlyakhter 9059c8fae0 When computing clock table, remove arbitrary limit on hierarchy depth.
* org-clock.el (org-clock-sum): Enlarge array of per-level clock
  totals as needed on demand.
2014-03-03 13:26:15 +01:00
Bastien Guerry f8e1745440 Merge branch 'maint'
Conflicts:
	contrib/lisp/org-favtable.el
2014-01-07 14:19:03 +01:00
Bastien Guerry 7d9a883b50 Update copyright years again.
Hint: copyright years are all updated in Emacs.
2014-01-07 14:18:17 +01:00
Bastien Guerry eb79f0e35d Merge branch 'maint' 2014-01-06 11:02:31 +01:00
Bastien Guerry 2755f8d954 Backport spelling fixes from Emacs r115885
* org-clock.el (org-clock-cancel-hook)
(org-clock-leftover-time): Fix typo in docstring.
2014-01-06 11:02:18 +01:00
Bastien Guerry c41f5075ac Merge branch 'maint'
Conflicts:
	contrib/lisp/org-favtable.el
2014-01-05 06:36:11 +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 9214000c21 Merge branch 'maint'
Conflicts:
	doc/org.texi
2013-11-17 09:17:39 +01:00
Bastien Guerry a6210cc9c2 Backport Paul's fixes from Emacs trunk (1/2)
See http://article.gmane.org/gmane.emacs.diffs/123123
2013-11-17 09:12:41 +01:00
Bastien Guerry 668ba5de0e Merge branch 'maint' 2013-11-15 06:56:10 +01:00
Bastien Guerry bf012136bd Remove org-autoload.
* org-macs.el (org-autoload): Delete.

* org-docview.el ("docview"): Fix declarations and require
doc-view directly.

* org-id.el (org-id-copy)
(org-id-get-with-outline-path-completion)
(org-id-get-with-outline-drilling, org-id-new):
* org-colview.el:
(org-colview-initial-truncate-line-value)
(org-columns-open-link, org-string-to-number):
* org-clock.el:
(org-clock-put-overlay, org-count-quarter, org-clock-loaded):
* org-archive.el (org-get-local-archive-location):
* org-agenda.el (org-agenda-todo-custom-ignore-p):
Autoload.

Those functions were autoloaded from within calls to `org-autoload'
in org.el, we now autoload them from where they live.
2013-11-15 06:55:28 +01:00
Bastien Guerry 487057fc26 Fix conflicts from previous merge 2013-11-12 21:11:23 +01:00
Bastien Guerry 71884cc039 Merge branch 'maint'
Conflicts:
	lisp/ob-C.el
	lisp/ob-clojure.el
	lisp/ob-core.el
	lisp/ob-lisp.el
	lisp/org-clock.el
2013-11-12 21:00:49 +01:00
Bastien Guerry f95641c443 Backport changes from Emacs revs 115081 and 115082
2013-11-12  Stefan Monnier  <monnier@iro.umontreal.ca>

	Address some byte-compiler warnings.
	* ob-abc.el (org-babel-expand-body:abc): Use dolist.
	(org-babel-execute:abc): Fix regexp quoting.
	* ob-calc.el (org--var-syms): Rename from `var-syms'.
	* ob-lilypond.el (ly-compile-lilyfile): Remove redundant let-binding.
	* ob-table.el (sbe): Move debug declaration.
	* org-clock.el (org--msg-extra): Rename from `msg-extra'.
	* org.el (org-version): Avoid var name starting with _.
	(org-inhibit-startup, org-called-with-limited-levels)
	(org-link-search-inhibit-query, org-time-was-given)
	(org-end-time-was-given, org-def, org-defdecode, org-with-time):
	* org-colview.el (org-agenda-overriding-columns-format):
	* org-agenda.el (org-agenda-multi, org-depend-tag-blocked)
	(org-agenda-show-log-scoped):
	* ob-python.el (py-which-bufname, python-shell-buffer-name):
	* ob-haskell.el (org-export-copy-to-kill-ring):
	* ob-exp.el (org-link-search-inhibit-query):
	* ob-R.el (ess-eval-visibly-p):
	* ob-core.el (org-src-window-setup): Declare before use.
	(org-babel-expand-noweb-references): Remove unused `blocks-in-buffer'.
	* ox-odt.el (org-odt-hfy-face-to-css):
	* org-src.el (org-src-associate-babel-session, org-src-get-lang-mode):
	* org-bibtex.el (org-bibtex-get, org-bibtex-ask, org-bibtex)
	(org-bibtex-check):
	* ob-tangle.el (org-babel-tangle, org-babel-spec-to-string)
	(org-babel-tangle-single-block, org-babel-tangle-comment-links):
	* ob-table.el (sbe):
	* ob-sqlite.el (org-babel-sqlite-expand-vars):
	* ob-sql.el (org-babel-sql-expand-vars):
	* ob-shen.el (org-babel-execute:shen):
	* ob-sh.el (org-babel-execute:sh, org-babel-sh-evaluate):
	* ob-scala.el (org-babel-scala-evaluate):
	* ob-ruby.el (org-babel-ruby-table-or-string)
	(org-babel-ruby-evaluate):
	* ob-python.el (org-babel-python-table-or-string)
	(org-babel-python-evaluate-external-process)
	(org-babel-python-evaluate-session):
	* ob-picolisp.el (org-babel-execute:picolisp):
	* ob-perl.el (org-babel-perl-evaluate):
	* ob-maxima.el (org-babel-execute:maxima):
	* ob-lisp.el (org-babel-execute:lisp):
	* ob-java.el (org-babel-execute:java):
	* ob-io.el (org-babel-io-evaluate):
	* ob-haskell.el (org-babel-execute:haskell):
	* ob-fortran.el (org-babel-execute:fortran):
	* ob-exp.el (org-babel-exp-code):
	* ob-emacs-lisp.el (org-babel-execute:emacs-lisp):
	* ob-ditaa.el (org-babel-execute:ditaa):
	* ob-core.el (org-babel-execute-src-block, org-babel-sha1-hash)
	(org-babel-parse-header-arguments, org-babel-reassemble-table)
	(org-babel-goto-src-block-head, org-babel-mark-block)
	(org-babel-expand-noweb-references, org-babel-script-escape)
	(org-babel-process-file-name):
	* ob-clojure.el (org-babel-execute:clojure):
	* ob-calc.el (org-babel-execute:calc):
	* ob-awk.el (org-babel-execute:awk):
	* ob-abc.el (org-babel-execute:abc):
	* ob-R.el (org-babel-expand-body:R):
	* ob-C.el (org-babel-C-execute): Avoid deprecated ((lambda) ...).

2013-11-12  Glenn Morris  <rgm@gnu.org>

	* ox-html.el (org-html-scripts): Add 2013 to copyright years.
	(org-html-infojs-template): Copyright holder to FSF.
2013-11-12 20:57:31 +01:00
Nicolas Goaziou 6202ec7b3b Remove need to declare drawers before using them
* lisp/org-agenda.el (org-agenda-prepare): Remove reference to
  `org-drawers-for-agenda'.
(org-agenda-show-1): Remove reference to `org-drawers'.
* lisp/org-clock.el (org-clock-remove-empty-clock-drawer,
  org-clock-cancel): Apply signature change to
  `org-remove-empty-drawer-at'.
* lisp/org-element.el (org-element--list-struct): Use
  `org-drawer-regexp' instead of `org-drawers'.
* lisp/org-feed.el (org-feed-drawer): Update docstring according to
  change.
* lisp/org-list.el (org-in-item-p, org-list-context): Use
  `org-drawer-regexp' instead of `org-drawers'.
* lisp/org-mobile.el (org-mobile-create-index-file): Remove reference
  to `org-drawers-for-agenda'.
* lisp/org-pcomplete.el (pcomplete/org-mode/drawer): Remove function.
* lisp/org.el (org-drawer-regexp): Make variable global.
(org-drawers): Remove variable.
(org-set-regexps-and-options): Ignore DRAWER keyword.
(org-cycle): Use `org-drawer-regexp' instead of `org-drawers'.
(org-cycle-hide-drawers): Add an optional argument to ignore some
drawers.
(org-remove-empty-drawer-at): Remove second argument.  Rewrite
function.
(org-clone-subtree-with-time-shift): Apply signature change to
`org-remove-empty-drawer-at'.
(org-toggle-ordered-property): Apply `org-delete-property' signature
change.
(org-map-entries): Remove reference to `org-drawers-for-agenda'.
(org-entry-delete): Remove optional argument.  Small refactoring.
(org-insert-drawer): Remove reference to `org-drawers'.
(org-delete-property): Apply `org-entry-delete' signature change.
(org-in-drawer-p): Rewrite function.
* testing/lisp/test-org-element.el: Update tests.
* testing/lisp/test-org.el: Update tests.
* testing/lisp/test-ox.el: Update tests.
2013-10-31 21:19:40 +01:00
Carsten Dominik d73bde62fe Fix incorrect time calculation for `org-extend-today-until'
* lisp/org-clock.el (org-clock-get-sum-start): Fix bad date
  math, affecting mode line and clock tables.

Patch by Ian Kelling
2013-10-17 07:41:49 +02:00
Sebastien Vauban 5aed072d3b Center currently clocked headline to top of screen
* org-clock.el (org-clock-goto-before-context): New option.
  (org-clock-goto): Use that option.
2013-09-13 08:08:42 +02:00
Carsten Dominik 4b749075f4 Center currently clocked headline close to top of screen
* lisp/org-clock.el (org-clock-goto): Recenter to thrd line

Patch modified from proposal by Sebastien Vauban.
2013-08-30 18:14:53 +02:00
Nicolas Goaziou 83b6cfcaec Merge branch 'maint' 2013-08-08 14:32:34 +02:00
Nicolas Goaziou ab8bfb8460 org-clock: Fix defcustom type for two variables
* lisp/org-clock.el (org-clock-total-time-cell-format,
  org-clock-file-time-cell-format): Use correct type.
2013-08-08 14:32:01 +02:00
Bastien Guerry 483977e016 Merge branch 'maint' 2013-07-30 12:44:56 +02:00
oleh 2710267ed7 o org-clock.el (org-clock-notify-once-if-expired): Honor `org-clock-sound'
* org-clock.el (org-clock-notify-once-if-expired): Honor
`org-clock-sound'.

TINYCHANGE
2013-07-30 12:44:43 +02:00
Bastien Guerry f1b99adbaf Merge branch 'maint' 2013-05-21 12:40:52 +02:00
Bastien Guerry 030e968982 Fix previous commit 2013-05-21 12:37:05 +02:00
Bastien Guerry 9eb5fd5dc0 org-clock.el (org-clock-modify-effort-estimate): Clarify docstring
* org-clock.el (org-clock-modify-effort-estimate): Clarify
docstring.

Thanks to Ken Mankoff for raising this.
2013-05-21 12:33:36 +02:00
Carsten Dominik a84c01642b Fix customization types of variables
* contrib/lisp/org-wl.el (org-wl-namazu-default-index): Fix custom type.
* lisp/ob-lob.el (org-babel-lob-files): Fix custom type.
* lisp/org-agenda.el (org-agenda-export-html-style):
(org-agenda-ndays):
(org-agenda-inactive-leader):
(org-agenda-day-face-function):
(org-agenda-auto-exclude-function): Fix custom type.
* lisp/org-bibtex.el (org-bibtex-prefix): Fix custom type.
* lisp/org-clock.el (org-clock-heading-function):
(org-show-notification-handler): Fix custom type.
* lisp/org-footnote.el (org-footnote-auto-adjust): Fix custom type.
* lisp/org-protocol.el (org-protocol-default-template-key): Fix custom type.
* lisp/org.el (org-make-link-description-function):
(org-link-translation-function):
(org-link-frame-setup):
(org-refile-target-verify-function):
(org-get-priority-function):
(org-use-fast-tag-selection):
(org-columns-modify-value-for-display-function):
(org-sparse-tree-default-date-type): Fix custom type.
* lisp/ox-html.el (org-html-postamble):
(org-html-postamble-format):
(org-html-preamble-format): Fix custom type.
* lisp/ox-odt.el (org-odt-content-template-file): Fix custom type.
* lisp/ox.el (org-export-with-archived-trees):
(org-export-initial-scope): Fix custom type.

Thanks to Glenn Moris for reporting these.  He used cus-test.el
to find them.
2013-05-09 15:19:02 +02:00
Bastien Guerry 3dd3100794 org-clock.el (org-clock-in): Don't forward by one character when setting the marker in the clock history
* org-clock.el (org-clock-in): Don't forward by one character
when setting the marker in the clock history.

This was done to prevent the marker from being broken when a user
manually insert some text right one it.  I cannot reproduce this
manual marker modification problem, so let's remove this ugly
exception, as it is not consistent with other clock markers.

Thanks to Bernt Hansen for pointing this out.
2013-04-24 10:47:16 +02:00
Bastien Guerry 13deb41a3a org-clock.el (org-clock-select-task): Remove successive duplicates in the clock history to consider
* org-clock.el (org-clock-select-task): Remove successive
duplicates in the clock history to consider.

Thanks to Sébastien Vauban for pointing at this.
2013-04-13 10:21:16 +02:00
Bastien Guerry 78b5dd8d56 org-clock.el (org-clock-insert-selection-line): Don't display the clockout time
* org-clock.el (org-clock-insert-selection-line): Don't
display the clockout time.

This partially reverts commit ff4b7a47, which introduced this, but
Bernt Hansen confirmed this was not practical in some circumstances.
2013-04-12 08:21:48 +02:00
Bastien Guerry ff4b7a4784 org-clock.el (org-clock-select-task): Throw a user error when the clock history is empty
* org-clock.el (org-clock-select-task): Throw a user error
when the clock history is empty.
2013-04-10 10:08:45 +02:00
Bastien Guerry 749829d591 org-clock.el (org-clock-select-task): Fix window to buffer
* org-clock.el (org-clock-select-task): Fix window to buffer.
Hide the cursor.
(org-clock-insert-selection-line): Add the clock-out time.

Thanks to Bernt Hansen for reporting the issue about the window.
2013-04-09 19:36:14 +02:00
Bastien Guerry ee422561c8 org-clock.el (org-clock-resolve): Enhance the content of the help window
* org-clock.el (org-clock-resolve): Enhance the content of the
help window.
2013-04-08 21:25:09 +02:00
Bastien Guerry bc3ccdfba2 Fix reverted commit 00a227
Make `org-resolve-clocks-if-idle' check for an existing marker buffer.
2013-04-04 09:42:57 +02:00
Bastien Guerry 3b5f56f0f4 Revert "org-clock.el: Set clock markers to nil on clock out/cancel"
This reverts commit 00a227c0d2.
2013-04-04 09:40:02 +02:00
Bastien Guerry 00a227c0d2 org-clock.el: Set clock markers to nil on clock out/cancel
* org-clock.el (org-resolve-clocks-if-idle): Only try to
resolve last clock if the clock buffer still exists.
(org-clock-out, org-clock-cancel): Set markers to nil.

Thanks to John Wiegley for reporting this bug.
2013-04-03 18:28:29 +02:00
Bastien Guerry 450878fb21 Fix previous commit 2013-03-15 11:43:27 +01:00
Bastien Guerry 6ae1718df5 org-clock.el: New :mstart parameter for clocktables
* doc/org.texi (The clock table): Document :mstart.

* lisp/org-clock.el (org-clocktable-defaults): Add :mstart
parameter.
(org-clock-special-range): New argument mstart.
(org-dblock-write:clocktable, org-dblock-write:clocktable)
(org-clocktable-write-default, org-clocktable-steps)
(org-clock-get-table-data): Handle the :mstart parameter.

Thanks to Peder Stray for coming up with this idea and for
proposing a first implementation.
2013-03-15 11:17:12 +01:00
Bastien Guerry e0e699ab3d org-compat.el: New compatibility function `org-defvaralias'
* org-compat.el (org-defvaralias): Newcompatibility function.
* org.el:
* org-agenda.el:
* org-list.el:
* org-gnus.el:
* org-clock.el: Use it.
2013-03-14 13:53:52 +01:00
Bastien Guerry 0a21f82962 Merge branch 'maint'
Conflicts:
	lisp/org-clock.el
2013-03-02 18:59:47 +01:00
Bastien Guerry 3b21f246d6 org-clock.el (org-clock-out): Fix bug.
* org-clock.el (org-clock-out): Fix bug: if a closing note
needs to be stored in the drawer where clocks are stored,
let's temporarily remove `org-clock-remove-empty-clock-drawer'
from `org-clock-out-hook'.

Thanks to Дядов Васил Стоянов for reporting this bug.
2013-03-02 17:39:23 +01:00
Bastien Guerry 295b0ba5d1 Bump :version to "24.4" and add :package-version.
The options updated are those who won't be in Emacs 24.3.
2013-02-26 18:21:28 +01:00
Bastien Guerry 372a3ecda8 New compatibility macro `org-with-silent-modifications'
* org-macs.el: Don't define `with-silent-modifications' for
emacsen that don't have it.

* org-compat.el (org-with-silent-modifications): New
compatibility macro.

* org.el (org-refresh-category-properties)
(org-refresh-properties, org-entry-blocked-p)
(org-agenda-prepare-buffers):
* org-indent.el (org-indent-remove-properties)
(org-indent-add-properties):
* org-colview.el (org-columns-display-here)
(org-columns-remove-overlays, org-columns-quit)
(org-columns-edit-value, org-columns-compute-all)
(org-columns-compute, org-agenda-colview-compute):
* org-clock.el (org-clock-sum): Use the compatibility macro
`org-with-silent-modifications' instead of
`with-silent-modifications'.

Thanks to Achim for a preliminary patch.
2013-02-25 11:44:27 +01:00
Bastien Guerry bd4750f24a Merge branch 'maint'
Conflicts:
	lisp/org-clock.el
	lisp/org.el
2013-02-24 19:19:01 +01:00
Bastien Guerry ac44a7af06 Move `org-at-clock-log-p' from org-clock.el to org.el
* org.el (org-at-clock-log-p): Delete.
* org-clock.el (org-at-clock-log-p): Move here.
2013-02-24 19:16:33 +01:00
Bastien Guerry 43c8aa02cc Use `with-silent-modifications' instead of `org-unmodified' when it makes sense
* org-macs.el: Add a comment on when to use `org-unmodified'
and when to use `with-silent-modifications'.

* org-colview.el (org-columns-display-here)
(org-columns-remove-overlays, org-columns-quit)
(org-columns-edit-value, org-columns-compute-all)
(org-columns-compute, org-agenda-colview-compute):
* org-clock.el (org-clock-sum):
* org.el (org-refresh-category-properties)
(org-refresh-properties, org-entry-blocked-p)
(org-agenda-prepare-buffers): Use `with-silent-modifications'
instead of `org-unmodified'.

Thanks to Stefan Monnier for reminding me about `with-silent-modifications'!
2013-02-23 14:57:51 +01:00
Bastien Guerry 65399674d5 Remove remember support
* org-protocol.el:
* org-bibtex.el: Remove remember support.

* org-clock.el (org-clock-heading-for-remember): Delete.
(org-clock-in): Do not set the heading for remember.

Users are encouraged to migrate their remember templates to
`org-capture-templates' instead of `org-remember-templates'.
See `org-capture-import-remember-templates' on how to ease
the transition.
2013-02-22 11:44:29 +01:00
Bastien Guerry 85a1395efa org-clock.el: Minor code clean-up
* org-clock.el (org-clock-set-current)
(org-clock-delete-current): Delete.
(org-clock-in, org-clock-out): Set and delete
`org-clock-current-task'.  Minor code clean-up.
2013-02-19 12:59:46 +01:00
Bastien Guerry d1e57bd884 Fix bug with `org-clock-rounding-minutes'
* org-clock.el (org-clock-in, org-clock-in-last): Tell
`org-current-time' to always return a past time.

* org.el (org-current-time): New argument `past' to force
returning a past time when rounding.

If (setq org-clock-rounding-minutes 5) and time is 12:33
the clock start time would be 12:35, and the clock mode-line
would display 0:-2.  The fix ensures the rounded value is
always in the past.
2013-02-19 12:40:33 +01:00
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
Bastien Guerry f3202903d6 New option `org-use-last-clock-out-time-as-effective-time'
* org.el (org-use-last-clock-out-time-as-effective-time): New option.
(org-current-effective-time): Use the new option.

* org-clock.el (org-clock-get-last-clock-out-time): New
function.

When set to `t', this new option will take the time of the last clock out
timestamp and use it when changing/logging the todo state.

Thanks to Gaizka Villate who suggested this.
2012-09-19 11:36:32 +02:00
Stuart Hickinbottom 4f5bd2522e Fix org-clock evaluation startup hang on Windows
* lisp/org-clock.el (org-x11idle-exists-p): Only shell out when running
on X.

The definition of this variable currently executes "command" via the
shell during evaluation, irrespective of the platform on which
Org-mode is running. Unfortunately, on Windows, this matches the
"command.com" NT Virtual DOS Machine executable and so this gets
launched, but this is a shell and therefore sits there waiting for
user input and never returns. The net result is that Emacs will hang
on Windows when evaluating org-clock.el with the ntdvm.exe process
spinning at 100%.

The simple fix is to check that the platform is X before trying to
deal with the "x11idle" external process.

TINYCHANGE
2012-08-29 19:41:14 +02:00
Bastien Guerry a9b8778b0c Code clean-up: rename some agenda internals.
* org.el (org-agenda-prepare-buffers): Rename from
`org-prepare-agenda-buffers'.
(org-match-sparse-tree, org-map-entries): Use the new names.

* org-agenda.el (org-agenda-prepare-window): Rename from
`org-prepare-agenda-window'.
(org-agenda-prepare): Rename from `org-prepare-agenda'.
(org-agenda-run-series, org-agenda-prepare, org-timeline)
(org-agenda-list, org-search-view, org-todo-list)
(org-tags-view, org-agenda-list-stuck-projects, org-diary)
(org-agenda-to-appt): Use the new names.

* org-mobile.el (org-mobile-create-index-file): Ditto.

* org-icalendar.el (org-export-icalendar): Ditto.

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

* org2rem.el (org2rem): Ditto.
2012-08-28 13:11:12 +02:00
Bastien Guerry 62064c73fc org-clock.el: Fix clock overlays bug
* org-clock.el (org-clock-put-overlay): Put the overlay on the
whole headline, not only on the last character.  This fixes a
bug with overlays on headlines ending with a bracketed link.

Thanks to Ryan Kaskel for reporting this.
2012-08-19 08:01:43 +02:00
Bastien Guerry 09743f48d6 Fix many small typos. 2012-08-13 05:59:44 +02:00
Bastien Guerry 70dd1196d2 Massive code clean-up.
Delete trailing whitespaces.
Indent all sexps correctly.
Sentences end with double spaces.
2012-08-11 19:10:44 +02:00
Bastien Guerry 002b700cb3 Use ̀org-looking-back' instead of `looking-back' to keep compat with XEmacs
* org-clock.el (org-clock-cancel): Use `org-looking-back'.

* org-pcomplete.el (org-thing-at-point): Ditto.

* org.el (org-timestamp-change): Ditto.
2012-08-10 15:02:45 +02:00
Bastien Guerry bc19977534 org-clock.el: Let C-u M-x org-clock-out RET now prompts for a state to switch to
* org-clock.el (org-clock-in): Call `org-clock-out' with the
new argument `switch-to-state' set to nil.  Fix docstring.
(org-clock-in-last): Prompt for a todo state to switch to when
called with three universal prefix arguments.  Don't display a
message when the clock is already running.  Update docstring.
(org-clock-out): New argument `switch-to-state'.  When this
argument is non-nil, prompt for a state to switch the clocked
out task to, overriding `org-clock-out-switch-to-state'.
2012-08-09 14:52:38 +02:00
Bastien Guerry de271e3751 Introduce a new special property CLOCKSUM_T for today's clocked time.
* org.el (org-special-properties): New special property
CLOCKSUM_T.
(org-entry-properties): Handle the new special property.

* org-colview.el (org-columns): Handle a new special property
CLOCKSUM_T.
(org-agenda-colview-summarize, org-agenda-colview-compute):
Ditto.

* org-clock.el (org-clock-sum-today): New function.
(org-clock-sum): New argument PROPNAME to set a custom text
property instead of :org-clock-minutes.

* org.texi (Special properties, Column attributes)
(Agenda column view): Document the new special property
CLOCKSUM_T.

Thanks to Brian Wood who asked a question wrt this.
2012-08-05 11:12:04 +02:00
Bastien Guerry 42d2552a83 Check for the existence of the x11idle command only once.
* org-clock.el (org-x11idle-exists-p): New variable.
(org-user-idle-seconds): Use it.
2012-07-28 11:53:05 +02:00
Bastien Guerry 0102b4b404 Revert "org-clock.el (org-user-idle-seconds): Simplify."
This reverts commit f398b9ee53.
2012-07-28 08:35:04 +02:00
Achim Gratz c2735e7c19 Re-apply (correctly): Move org-element.el from contrib/lisp to lisp/.
* org.el (org-mode-map): Add keybindings to
`org-element-transpose' and `org-narrow-to-element'.
(org-metaup): Fall back on `org-element-drag-backward'.
(org-metadown): Fall back on `org-element-drag-forward'.
Also move chunks of declarations and require statements to
get rid of compiler warnings.

* org-exp-blocks.el (org): Don't require org.  Add declarations.

* org-clock.el (org): Don't require org.

* ob-exp.el (org-list-forbidden-blocks): Add declarations.
2012-07-28 07:06:25 +02:00
Achim Gratz 234df465ad Revert "Move org-element.el from contrib/lisp to lisp/."
This reverts commit abbea59611.
2012-07-28 07:02:21 +02:00
Bastien Guerry f398b9ee53 org-clock.el (org-user-idle-seconds): Simplify.
* org-clock.el (org-user-idle-seconds): Simplify.

Thanks to Nick Dokos for paving the way (all the way down).
2012-07-28 01:42:59 +02:00
Bastien Guerry abbea59611 Move org-element.el from contrib/lisp to lisp/.
* org.el (org-mode-map): Add keybindings to
`org-element-transpose' and `org-narrow-to-element'.
(org-metaup): Fall back on `org-element-drag-backward'.
(org-metadown): Fall back on `org-element-drag-forward'.
Also move chunks of declarations and require statements to
get rid of compiler warnings.

* org-exp-blocks.el (org): Don't require org.  Add declarations.

* org-clock.el (org): Don't require org.

* ob-exp.el (org-list-forbidden-blocks): Add declarations.
2012-07-28 00:55:45 +02:00
Bastien Guerry 796b4ec43b org-clock.el: Set the marker for `org-clock-history' at a safer position.
* org-clock.el (org-clock-in): Set the marker for
`org-clock-history' at a safer position.

The clock marker stored in `org-clock-history' used to be at the
beginning of the heading.  When manually inserting content here,
the marker is not updated because it is *before* the point.  So
set the clock marker right after the first "*" of the headline
so that it will always be correctly updated.
2012-07-27 17:24:16 +02:00
Eric Schulte 556f725e5b "concat 'string" -> "concat"
Thanks to Achim for pointing out this careless oversight in my last
commit.

* lisp/org-clock.el (org-clock-special-range): "concat 'string" ->
  "concat"
  (org-clocktable-shift): "concat 'string" -> "concat"
2012-07-25 10:53:55 -06:00
Eric Schulte d7a8b6636a replacing cl concatenate with concat
* lisp/org-clock.el (org-clock-special-range): Replacing cl concatenate
  with concat.
  (org-clocktable-shift): Replacing cl concatenate with concat.
2012-07-25 09:24:11 -06:00
Nicolas Calderon Asselin db2bf2a818 Added checks to determine which idle time to use
* lisp/org-clock.el (org-clock-idle-time): Org-mode assumed that x11idle
  was an available command, and returned an idle time of 0 if it was not
  (never idle). Added checks so that org-idle-time will come from emacs'
  own current-idle-time if x11idle cannot be found or if it cannot
  retrieve the idle time from X11

TINYCHANGE
2012-07-24 17:10:10 +02:00
Bastien Guerry fea1b82bef Bind `org-clock-in-last' to C-c C-x C-x and ̀org-clock-cancel' to C-c C-x C-q.
* org.el (org-flag-drawer): Add a docstring.
(org-mode-map): Bind ̀org-clock-cancel' to "C-cC-xC-q" and
`org-clock-in-last' to "C-cC-xC-x".  This fixes a bug in the
previous keybinding for `org-clock-in-last', which would
override the one for `org-clock-in'.

* org-clock.el (org-clock-in-last): Prevent errors when there
is no clocking history.
(org-clock-cancel): Fix bug when checking against a clock log
in a folded drawer.

Thanks to Bernt Hansen who reported the problem.
2012-07-14 08:33:48 +02:00
Bastien Guerry 3ecd7a9ad0 Move `org-clock-out-time' to the right place.
Thanks to Achim Gratz for spotting the compiler warning.
2012-07-13 01:45:49 +02:00
Bastien Guerry 3528fc6b42 Implement continuous clocking. Small other improvements. Update documentation.
* org.el (org-mode-map): Add `C-c C-x C-I' as a keybinding for
`org-clock-in-last'.

* org-clock.el (org-clock-continuously): New option.
(org-clock-in): Three universal prefix arguments set
`org-clock-continuously' to `t' temporarily.
(org-clock-in-last): Fix call to `org-clock-select-task' and
support continuous clocking.
(org-clock-out-time): New variable.
(org-clock-out): set `org-clock-out-time' when clocking out.
Small docstring rewriting.
(org-clock-remove-empty-clock-drawer): Fix "invalid search
bound" bug when trying to delete empty logbook drawer.
(org-clock-cancel): If the clock log is gone, send a warning
instead of deleting the region that is supposed to contain it.

* org.texi (Clocking commands): New cindex.
(Clocking commands): Update documentation for `org-clock-in'.
Document `org-clock-in-last'.  Mention `org-clock-out' and
`org-clock-in-last' as commands that can be globally bound.
(Resolving idle time): Document continuous clocking.
2012-07-12 14:04:54 +02:00
Bastien Guerry d5aa0e0d73 Rename `org-indent-line-function' to `org-indent-line'.
* org.el (org-mode, org-add-log-setup)
(org-get-property-block, org-entry-put)
(org-property-next-allowed-value, org-return)
(org-indent-line): Rename `org-indent-line-function' to
`org-indent-line'.

* org-timer.el (org-timer-item): Ditto.

* org-table.el (org-table-store-formulas): Ditto.

* org-clock.el (org-clock-in, org-clock-find-position): Ditto.
2012-07-11 19:11:26 +02:00
Tim Howe f88679a399 org-clock: Customizable variable syntax fix
* org-clock.el (org-clocktable-defaults): Revert extra layer of quoting.

It appears the goal in 9b23f082 was to allow defaulting a plist member
to a variable; however the plist was being constructed with LIST and
therefore the `, combination was unnecessary.

TINYCHANGE
2012-07-10 11:15:22 +02:00
Bastien Guerry 9780de8b30 org-clock.el (org-clock-in-last): New command.
* org-clock.el (org-clock-in-last): New command.

This autoloaded command provides a way to clock in the last clocked
item stored in `org-clock-history' from any buffer.  This is handy
when you don't want to go back to your .org file to clock into the
last clocked task.
2012-07-06 12:54:43 +02:00
Bastien Guerry 8dd8540f55 org-clock.el (org-clock-in): Fix typo in docstring.
* org-clock.el (org-clock-in): Fix typo in docstring.
2012-07-06 12:34:36 +02:00
Bastien Guerry e32a4777df Merge branch 'maint' 2012-06-03 10:29:09 +02:00
Bastien Guerry 5968047924 Backport changes by Chong Yidong in Emacs trunk (revno 108457).
* org-clock.el (org-clock-string-limit)
(org-clock-modeline-total, org-clock-task-overrun-text)
(org-clock-mode-line-entry): Doc fix, "modeline" -> "mode line".
2012-06-03 10:28:46 +02:00
Achim Gratz 595d451280 use org-no-warnings macro for XEmacs compatibility
* lisp/org-agenda.el: Replace with-no-warnings with
  org-no-warnings (defined in org-macs.el).

* lisp/org-bbdb.el: Replace with-no-warnings with
  org-no-warnings (defined in org-macs.el).

* lisp/org-clock.el: Replace with-no-warnings with
  org-no-warnings (defined in org-macs.el).

* lisp/org.el: Replace with-no-warnings with org-no-warnings (defined
  in org-macs.el).
2012-05-19 09:48:57 +02:00
Bastien Guerry 7c513b3047 New option `org-clock-frame-title-format'.
* org-clock.el (org-frame-title-format-backup): New variable
to store the value of `frame-title-format' before `org-clock'
might replace it by `org-clock-frame-title-format'.
(org-clock-frame-title-format): New option.
(org-frame-title-string): Delete.
(org-clock-update-mode-line): Minor code reformatting.
(org-clock-in, org-clock-out, org-clock-cancel): Use
`org-clock-frame-title-format'.

See http://thread.gmane.org/gmane.emacs.orgmode/55477

Trying to update `frame-title-format' is tricky and error-prone, since
users can set up this variable in many different ways.  AFAIK there is
no equivalent to `global-mode-string' for setting the frame title, we
would use it otherwise.

The user can still configure `org-clock-frame-title-format' the way he
wants.
2012-05-05 14:21:13 +02:00
Bastien Guerry 005576f0b6 org-clock.el (org-clock-get-clock-string): Add a space.
* org-clock.el (org-clock-get-clock-string): Add a space.
2012-05-05 11:30:58 +02:00
Bastien Guerry c306dbe388 org-clock.el: Fix bug in `org-clocktable-write-default'.
* org-clock.el (org-clocktable-write-default): Temporarily
disable `delete-active-region' so that we don't accidently
delete an active region when exporting a subtree/region.

Thanks to Mike McLean for the detailed bug report.
2012-04-29 01:18:35 +02:00
Bastien Guerry 008689cc79 org-clock.el: Use `executable-find' instead of `org-program-exists'.
* org-clock.el (org-program-exists): Remove.
(org-show-notification, org-clock-play-sound): Use
`executable-find' instead of `org-program-exists'.

Thanks to Sébastien Vauban for pointing this.
2012-04-28 23:43:10 +02:00
Bastien Guerry 1c203d8d19 Match #+name/#+tblname/#+tblfm along with uppercase twins.
* org.el: Use (case-fold-search t).
(org-edit-special, org-ctrl-c-ctrl-c): Ditto.

* org-table.el:
(org-table-store-formulas, org-table-get-stored-formulas)
(org-table-fix-formulas, org-table-edit-formulas)
(org-old-auto-fill-inhibit-regexp, orgtbl-ctrl-c-ctrl-c)
(orgtbl-toggle-comment, org-table-get-remote-range): Ditto.

* org-footnote.el:
(org-footnote-goto-local-insertion-point): Ditto.

* org-exp.el: Ditto.

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

* org-colview-xemacs.el:
(org-dblock-write:columnview): Ditto.

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

* org-capture.el (org-capture-place-table-line): Ditto.

* ob.el (org-babel-data-names, org-babel-goto-named-src-block)
(org-babel-src-block-names)
(org-babel-where-is-src-block-result, org-babel-result-end)
(org-babel-where-is-src-block-head)
(org-babel-find-named-result, org-babel-result-names): Ditto.
2012-04-23 12:48:33 +02:00
Bastien Guerry ef956d7181 When clocking, Don't modify `frame-title-format' if it is a string.
* org-clock.el (org-clock-out, org-clock-cancel)
(org-clock-in): Don't modify `frame-title-format' if it is a
string.

Thanks to Mike McLean for reporting this and to Matt Lundin for
pointing at the problem in the code.
2012-04-22 09:01:28 +02:00
Bastien Guerry 80cc1ccd9e org-clock.el (org-program-exists): Fix docstring.
* org-clock.el (org-program-exists): Fix docstring.

Thanks to Sébastien Vauban for reporting this.
2012-04-21 12:10:51 +02:00
Bastien Guerry 41939cb04b org-clock.el (org-program-exists): Fix docstring.
* org-clock.el (org-program-exists): Fix docstring.

Thanks to Sébastien Vauban for reporting this.
2012-04-20 13:20:42 +02:00
Bastien Guerry d89823a75b org-clock.el: New option `org-clock-file-time-cell-format'.
* org-clock.el (org-clock-file-time-cell-format): New option.
(org-clocktable-write-default): Use it.
2012-04-20 13:06:46 +02:00
Adam Spiers 1685087f5f org.el: Display a message when no clock is active.
* org-clock.el (org-clock-modify-effort-estimate): Display a
message when no clock is currently active.

TINYCHANGE
2012-04-20 12:41:11 +02:00
George Kettleborough 37fafb7b9e Option for clock and timer to be displayed in frame-title
* org-clock.el: New option `org-clock-clocked-in-display' to control
whether the current clock is displayed in the mode line and/or frame
title.

* org-timer.el: New option `org-timer-display' to control whether
the current timer is displayed in the mode line and/or frame title.

This allows the clock and timer to be displayed in the frame title instead of,
or as well as, the mode line.  This is useful for people with limited space in
the mode line but with ample space in the frame title.
2012-04-20 11:56:34 +02:00
Bastien Guerry 8c4ccab028 Merge branch 'hotfix' 2012-04-11 01:14:39 +02:00
Bastien Guerry 56bd9dc552 org-clock.el: Rename `org-task-overrun*' to `org-clock-task-overrun*'.
* org-clock.el (org-clock-task-overrun-text)
(org-task-overrun, org-clock-get-clock-string)
(org-clock-update-mode-line)
(org-clock-notify-once-if-expired): Rename `org-task-overrun'
and `org-task-overrun-text' to `org-clock-task-overrun' and
`org-clock-task-overrun-text' respectively.
(org-task-overrun-text): New alias.
2012-04-11 01:14:21 +02:00
Bastien Guerry bdd922e3f7 Add :version to org-clock.el options. 2012-04-03 13:27:34 +02:00
Bastien Guerry 7d64e883b0 org-clock.el (org-show-notification): Use `fboundp' instead of `featurep' and the additional `require'.
* org-clock.el (org-show-notification): Use `fboundp' instead
of `featurep' and the additional `require'.

Thanks to Peter Münster for reporting this.
2012-04-02 16:52:16 +02:00
Bastien Guerry 42d60368a3 Merge branch 'hotfix-7.8.06' 2012-04-02 08:07:57 +02:00
Bastien Guerry 3658686f59 Fix name of dynamically bound variable in org-clock.el. 2012-04-02 08:07:52 +02:00
Bastien Guerry e3913a2ab5 Merge branch 'hotfix-7.8.06' 2012-04-02 00:53:37 +02:00
Bastien Guerry 5c38bf0ef7 Fix copyright and authors lines. 2012-04-02 00:53:28 +02:00
Bastien Guerry 967783215b Merge branch 'hotfix-7.8.06'
Conflicts:
	lisp/org.el
2012-03-31 11:04:40 +02:00
Bastien Guerry b46fa17a97 Fix global dynamic variables in org-clock.el.
Thanks to Martyn Jago for this patch.
2012-03-30 22:43:03 +02:00
Bastien Guerry 8ab92f8b55 Delete trailing whitespaces in core files. 2012-03-28 02:05:36 +02:00
Bastien Guerry 7686a81c14 New option to format the total time cells.
* org-clock.el (org-clock-in-prepare-hook): New option to
format the total time cells.
(org-clocktable-write-default): Use the new option.
2012-03-28 00:49:55 +02:00
Bastien Guerry eb7f7159c9 Merge branch 'hotfix-7.8.06' 2012-03-23 13:42:29 +01:00
Ilya Shlyakhter 532a1ac40a Tags/properties matcher: Fixed issues with todo-only matches
lisp/org.el (org-scan-tags): Require todo-only argument, and document
that it should be the same one set by make-org-tags-matcher.
Fix documentation to explain that todo-only is really
not-done-todo-only.

(org-make-tags-matcher): If todo part of matcher starts with /!,
matcher now always checks that the TODO keyword is present and
is a not-done state.  This matters e.g. for org-map-entries
which unlike org-scan-tags does not do its own separate todo-only
filtering.  Added docs to explain matcher dependencies.

(org-map-entries): Make sure todo-only is correctly passed from
org-make-tags-matcher to org-scan-tags.

* lisp/org-clock.el: (org-clock-get-table-data): Make sure todo-only
does not leak when it is set by make-org-tags-macher.

* lisp/org-crypt.el: (org-encrypt-entries, org-decrypt-entries): Make
sure todo-only is correctly passed from org-make-tags-matcher to
org-scan-tags.

* contrib/lisp/contacts.el: (org-contacts-filter) : Make sure todo-only
is correctly passed from org-make-tags-matcher to org-scan-tags.
2012-03-23 13:42:06 +01:00
Bastien Guerry ecd0562c5f Fix the master branch.
I started from the 78ec8e commit then cherry-picked and squashed
commits that have been done in master since then, except the bad
commits that overwrote the tree (in master) with the tree in maint.

This commit also bumps the version number to 7.8.06.

The only "fix" that was made between 78ec8e and the previous commit
is e0072f which has been reported to break stuff.
2012-03-19 22:01:29 +01:00
Bastien Guerry 6e306f65ff Fix copyright years in maint. 2012-03-17 16:31:04 +01:00
Bastien Guerry de42649f7b Manually revert maint to e85080.
e85080 is the last correct commit in the maint branch
before releasing 7.8.04.  The 7.8.05 release should be
done from this commit.
2012-03-17 16:28:46 +01:00
Bastien Guerry 73bb18ba37 Manually revert to the Release 7.8.04 tag. 2012-03-17 15:52:24 +01:00
Bastien Guerry 38c5045725 Fix copyright years. 2012-03-17 14:36:25 +01:00
Bastien Guerry 6e534f9c61 Manually revert back to commit e85080.
This fixes a wrong merge that should not have happened:
commit 7e903a merges the master branch into the maint branch,
while we really want to keep the maint branch a bugfix-only
branch.

This commit reverts back the maint branch to its state before
merging the master branch.  From there, we will fix remaining
problems with the maint branch (e.g. copyright issues) then
release this maint branch as Org-mode 7.8.05.
2012-03-17 14:34:01 +01:00
Carsten Dominik d23ce33583 Clocking work time: faster filtering of clock entries by trusting org-scanner-tags
* lisp/org-clock.el (org-clock-get-table-data): Bind org-scanner-tags
to tags-list and org-trust-scanner-tags to t while evaluating the
matcher, since the matcher is always evaluated at the current entry.

TINYCHANGE
2012-03-16 17:35:19 +01:00
Bastien Guerry 04971de4b9 Add version tag "24.1" for options introduced since Emacs 23.4 (and <= 24.1)
* org-exp.el (org-export-kill-product-buffer-when-displayed)
(org-export-initial-scope, org-export-date-timestamp-format)
(org-export-with-tasks, org-export-email-info)
(org-export-table-remove-empty-lines): Add version tag.

* org-mobile.el (org-mobile-files-exclude-regexp)
(org-mobile-use-encryption, org-mobile-encryption-tempfile)
(org-mobile-encryption-password, org-mobile-agendas): Add
version tag.

* ob-plantuml.el (org-plantuml-jar-path): Add version tag.

* org.el (org-babel-load-languages, org-clone-delete-id)
(org-log-buffer-setup-hook)
(org-loop-over-headlines-in-active-region)
(org-use-sub-superscripts, org-startup-with-beamer-mode)
(org-startup-with-inline-images, org-ctrl-k-protect-subtree)
(org-catch-invisible-edits)
(org-link-search-must-match-exact-headline)
(org-confirm-shell-link-not-regexp)
(org-confirm-elisp-link-not-regexp, org-log-refile)
(org-refile-use-cache)
(org-refile-active-region-within-subtree)
(org-todo-repeat-to-state, org-get-priority-function)
(org-agenda-jump-prefer-future)
(org-read-date-force-compatible-dates)
(org-use-effective-time)
(org-complete-tags-always-offer-all-agenda-tags)
(org-properties-postprocess-alist)
(org-format-latex-signal-error)
(org-latex-to-mathml-jar-file)
(org-latex-to-mathml-convert-command)
(org-export-latex-default-packages-alist)
(org-hidden-keywords, org-pretty-entities)
(org-pretty-entities-include-sub-superscripts)
(org-src-fontify-natively, org-effort-durations)
(org-speed-command-hook): Add version tag.

* org-html.el (org-export-html-footnote-separator)
(org-export-html-mathjax-options)
(org-export-html-mathjax-template)
(org-export-html-headline-anchor-format)
(org-export-html-preamble-format)
(org-export-html-postamble-format)
(org-export-html-table-align-individual-fields)
(org-export-html-protect-char-alist, org-export-html-divs):
Add version tag.

* org-ctags.el (org-ctags-path-to-ctags)
(org-ctags-open-link-functions)
(org-ctags-new-topic-template): Add version tag.

* ob-exp.el (org-export-babel-evaluate): Add version tag.

* org-beamer.el (org-beamer-use-parts)
(org-beamer-frame-level, org-beamer-frame-default-options)
(org-beamer-column-view-format, org-beamer-themes)
(org-beamer-environments-extra, org-beamer-fragile-re)
(org-beamer-outline-frame-title)
(org-beamer-outline-frame-options): Add version tag.

* org-wl.el (org-wl-link-remove-filter)
(org-wl-shimbun-prefer-web-links)
(org-wl-nntp-prefer-web-links, org-wl-disable-folder-check)
(org-wl-namazu-default-index): Add version tag.

* org-clock.el (org-task-overrun-text)
(org-clocktable-defaults, org-clock-clocktable-formatter)
(org-clock-clocktable-language-setup)
(org-clock-report-include-clocking-task)
(org-clock-resolve-expert): Add version tag.

* ob-lob.el (org-babel-lob-files): Add version tag.

* org-freemind.el (org-freemind-node-css-style): Add version
tag.

* org-archive.el (org-archive-reversed-order)
(org-archive-subtree-add-inherited-tags): Add version tag.

* org-bibtex.el (org-bibtex-autogen-keys, org-bibtex-prefix)
(org-bibtex-treat-headline-as-title)
(org-bibtex-export-arbitrary-fields)
(org-bibtex-key-property, org-bibtex-tags)
(org-bibtex-tags-are-keywords, org-bibtex-no-export-tags)
(org-bibtex-type-property-name): Add version tag.

* org-timer.el (org-timer-default-timer): Add version tag.

* org-taskjuggler.el (org-export-taskjuggler-extension)
(org-export-taskjuggler-project-tag)
(org-export-taskjuggler-resource-tag)
(org-export-taskjuggler-target-version)
(org-export-taskjuggler-default-project-version)
(org-export-taskjuggler-default-project-duration)
(org-export-taskjuggler-default-reports)
(org-export-taskjuggler-default-global-properties): Add
version tag.

* org-habit.el (org-habit-today-glyph)
(org-habit-completed-glyph): Add version tag.

* org-list.el (org-alphabetical-lists)
(org-list-ending-method, org-list-end-regexp)
(org-list-automatic-rules, org-list-use-circular-motion)
(org-list-indent-offset): Add version tag.

* ob-picolisp.el (org-babel-picolisp-cmd): Add version tag.

* org-icalendar.el (org-icalendar-alarm-time)
(org-icalendar-combined-description)
(org-icalendar-honor-noexport-tag)
(org-icalendar-date-time-format): Add version tag.

* org-src.el (org-src-tab-acts-natively): Add version tag.

* org-exp-blocks.el (org-export-blocks-postblock-hook): Add
version tag.

* org-table.el (org-table-exit-follow-field-mode-when-leaving-table)
(org-table-fix-formulas-confirm)
(org-table-duration-custom-format)
(org-table-formula-field-format): Add version tag.

* org-publish.el (org-publish-sitemap-sort-files)
(org-publish-sitemap-sort-folders)
(org-publish-sitemap-sort-ignore-case)
(org-publish-sitemap-date-format)
(org-publish-sitemap-file-entry-format): Add version tag.

* ob-js.el (org-babel-js-cmd): Add version tag.

* org-docbook.el (org-export-docbook-footnote-separator)
(org-export-docbook-xslt-stylesheet): Add version tag.

* org-entities.el (org-entities-ascii-explanatory)
(org-entities-user): Add version tag.

* ob.el (org-confirm-babel-evaluate)
(org-babel-no-eval-on-ctrl-c-ctrl-c): Add version tag.

* ob-tangle.el (org-babel-tangle-lang-exts)
(org-babel-post-tangle-hook, org-babel-pre-tangle-hook)
(org-babel-tangle-body-hook)
(org-babel-tangle-comment-format-beg)
(org-babel-tangle-comment-format-end)
(org-babel-process-comment-text): Add version tag.

* org-gnus.el (org-gnus-nnimap-query-article-no-from-file):
Add version tag.

* org-crypt.el (org-crypt-disable-auto-save): Add version tag.

* org-inlinetask.el (org-inlinetask-default-state): Add
version tag.

* ob-scheme.el (org-babel-scheme-cmd): Add version tag.

* ob-lisp.el (org-babel-lisp-dir-fmt): Add version tag.

* org-attach.el (org-attach-store-link-p): Add version tag.

* org-capture.el (org-capture-templates)
(org-capture-before-finalize-hook)
(org-capture-after-finalize-hook): Add version tag.

* org-agenda.el (org-agenda-skip-deadline-prewarning-if-scheduled)
(org-agenda-time-leading-zero, org-agenda-follow-indirect)
(org-agenda-menu-two-column, org-agenda-menu-show-matcher)
(org-agenda-timegrid-use-ampm)
(org-agenda-remove-timeranges-from-blocks)
(org-agenda-inactive-leader, org-agenda-current-time-string)
(org-agenda-show-current-time-in-grid)
(org-agenda-search-view-force-full-words)
(org-agenda-search-view-always-boolean)
(org-agenda-clock-consistency-checks)
(org-agenda-include-deadlines)
(org-agenda-move-date-from-past-immediately-to-today)
(org-agenda-day-face-function)
(org-agenda-category-icon-alist)
(org-agenda-bulk-custom-functions)
(org-agenda-insert-diary-extract-time): Add version tag.

* org-latex.el (org-export-latex-inputenc-alist)
(org-export-latex-tag-markup)
(org-export-latex-timestamp-inactive-markup)
(org-export-latex-href-format)
(org-export-latex-hyperref-format)
(org-export-latex-footnote-separator)
(org-export-latex-quotes)
(org-export-latex-table-caption-above)
(org-export-latex-listings-w-names)
(org-export-latex-minted-langs)
(org-export-latex-listings-options)
(org-export-latex-minted-options)
(org-latex-default-figure-position, org-export-pdf-logfiles):
Add version tag.

* org-faces.el (org-faces-easy-properties)
(org-fontify-quote-and-verse-blocks, org-cycle-level-faces):
Add version tag.

* ob-ditaa.el (org-ditaa-jar-option): Add version tag.

Thanks to Glenn Morris for reporting this.
2012-02-13 15:49:28 +01:00
Bernt Hansen df0a988a92 Fix J in agenda when clock out hook clocks in again
* org-clock.el (org-clock-out): Do not delete the current clocking task
when org-clock-out-hook clocks in another task

My clock out hook keeps the clock running by automatically clocking in
a new task (the parent task, or the default task).  This sets a new
clocking task which was then clobbered at the end of org-clock-out
so that J in the agenda would return

    "No running clock, use `C-c C-x C-j' to jump to the most recent one"

We now detect that another task is clocked in and skip clearing the
org-clock-current-task variable used by the agenda to determine if
the clock is currently running.
2012-02-12 19:44:23 +01:00
David Maus c9a510cf8e Moved `org-in-clocktable-p' from org-clock.el to org.el
* org-clock.el (org-in-clocktable-p): Moved to org.el.
* org.el (org-in-clocktable-p): New function. Moved from org-clock.el

Fixes a bug reported by suvayu ali in
<CAMXnza2W9VSJ2d-dDmsByNmTVgxnt1Onp=J5S=TsFEi8MOVNtg@mail.gmail.com>.

`org-context' depends on the function but org.el does not depend on
org-clock.el.
2012-02-08 20:09:48 +01:00
Bastien Guerry a7c6f70ab1 Revert "Remove file restrictions when generating clock report data"
This reverts commit 7a73e155a3.
2012-01-19 16:19:42 +01:00
Bernt Hansen 7a73e155a3 Remove file restrictions when generating clock report data
This may need more work for dynamic blocks used in files.
2012-01-11 16:42:38 +01:00
Bastien Guerry fadca5e8eb Fix typos and spelling mistakes.
Thanks to Paul Eggert for this fixes in Emacs trunk.
2012-01-10 11:56:15 +01:00
Bastien Guerry f6d7b32bf2 Fix trailing whitespaces. 2012-01-04 16:20:04 +01:00
Bastien Guerry e44d2975ff Fix copyright (to 2012) year and Org version (to 7.8.03). 2012-01-03 18:47:01 +01:00
Bastien Guerry b73075a8d2 Code cleanup up: rename org-on-*-p to org-at-*-p.
Rename `org-on-heading-p' and `org-on-target-p' to
`org-at-heading-p' and `org-at-target-p' to be more
consistent with the org-at-*-p family.

Also define two aliases.
2012-01-02 19:52:35 +01:00
Carsten Dominik 746bd50327 Fix clock regexps
* lisp/org-clock.el (org-clock-in):
(org-clock-find-position): Remove erraneous space in regexp

Patch by Joe Vornehm Jr.

TINYCHANGE
2011-12-31 09:05:11 +01:00
Dave Abrahams 4a8be63ac6 org-clock.el: Check the clock buffer is existing when clocking out.
* org-clock.el (org-clock-out-if-current): Check the clock
buffer is existing.

TINYCHANGE
2011-12-11 18:25:58 +01:00
Bernt Hansen 0151120b1b Fix marker in no buffer error for task state change in an indirect buffer
* lisp/org-clock.el (org-clock-out-if-current): Fix marker in no buffer error
  for task state change in an indirect buffer

org-clock-out-when-current was enhanced in 098cf35 (Clock: Clock out
when done also in indirect buffers, 2009-03-23) to handle indirect
buffers.

This enhancement uses (buffer-base-buffer (org-clocking-buffer)) but
when not clocking (org-clocking-buffer) returns nil - so
buffer-base-buffer returns the base buffer of the current buffer which
is never nil.  This leads to marker in no buffer errors trying to stop
the clock when it is not running.

Now we explicitly check up front that the clock is running before
any other conditions that lead to stopping the clock.
2011-12-11 18:22:06 +01:00
Roberto Huelga a39328cddf Make the function `org-program-exists' work on osx.
* org-clock.el (org-program-exists): Make the function
compatible with darwin systems.
2011-12-11 13:50:36 +01:00
Bastien Guerry fcdeeb9101 Fix typos fixed in Emacs trunk.
* org-freemind.el (org-freemind-write-mm-buffer): Fix typo.

* org-colview.el (org-columns-edit-value) (org-columns-next-allowed-value):
  Fix typos.

* org-bibtex.el (org-bibtex-autogen-keys): Fix typo.

* org-clock.el (org-clock-special-range): Fix typo.

Thanks to Paul Eggert for these fixes.
2011-11-28 15:11:52 +01:00
Carsten Dominik 278d5afa2f Allow time stampes without day name
* lisp/org-clock.el (org-clock-in):
(org-clock-find-position): Make space after date optional.
* lisp/org.el (org-set-regexps-and-options):
(org-ts-regexp):
(org-ts-regexp-both):
(org-ts-regexp1):
(org-ctrl-c-ctrl-c): Make `C-c C-c' on date fix the time stamp

* doc/org.texi (Creating timestamps): Document the effect of `C-c C-c'
on a timestamp.
2011-11-09 18:55:27 +01:00
Bastien Guerry cdbf7ed876 Revert "Move three functions and add appropriate require/declarations."
This reverts commit 8c3ecbe39a.
2011-08-19 22:11:15 +02:00
Bastien Guerry 9f337ee06c org-clock.el: remove `org-clocktable-sort-clock-data'.
This function by Max Mikhanosha was added accidently.  We are
waiting for the FSF to process Max copyright assignement to get
this function in org-mode.

Thanks to Achim Gratz for spotting at this.
2011-08-18 09:00:20 +02:00
Bastien Guerry 8c3ecbe39a Move three functions and add appropriate require/declarations.
* org-clock.el (org-duration-string-to-minutes)
(org-minutes-to-hh:mm-string, org-hh:mm-string-to-minutes):
Move from org.el.
2011-08-17 16:08:02 +02:00
Bastien Guerry 58f1dbccf8 Remove the "Version" header in Org libraries (leave it in org.el).
Also remove blank lines before the ";;; org*el ends here" declarations.

Having a "Version" header forced us to update every file when releasing a
new version of Org; it also forced us to update every file when merging Org
with Emacs trunk, thus cluttering the diffs between the previously merged
version and the new one with useless information.

Glenn Morris suggested this in emacs-devel:
http://lists.gnu.org/archive/html/emacs-devel/2011-08/msg00322.html
2011-08-17 14:42:34 +02:00
Bastien Guerry 7a18799e25 Remove arch-tag at the bottom of files. 2011-08-15 20:04:38 +02:00
Bastien Guerry 904ed18bc2 Fix copyright years for elisp files in core and contrib.
Also add "This file is not part of GNU Emacs." when this is the case.
2011-08-15 15:23:11 +02:00
David Maus 545bfddeea Provide edebug specifications for macros
* org-macs.el (org-with-gensyms, org-called-interactively-p)
(with-silent-modifications, org-bound-and-true-p)
(org-unmodified, org-re, org-preserve-lc)
(org-without-partial-completion, org-with-point-at)
(org-no-warnings, org-if-unprotected, org-if-unprotected-1)
(org-if-unprotected-at, org-with-remote-undo)
(org-no-read-only, org-save-outline-visibility)
(org-with-wide-buffer, org-with-limited-levels)
(org-eval-in-environment): Provide edebug specifications.
* org-src.el (org-src-do-at-code-block): Dto.
* org-publish.el (org-publish-with-aux-preprocess-maybe): Dto.
* org-compat.el (org-xemacs-without-invisibility): Dto.
* org-clock.el (org-with-clock-position, org-with-clock): Dto.
* org-agenda.el (org-agenda-with-point-at-orig-entry)
(org-batch-agenda, org-batch-agenda-csv)
(org-batch-store-agenda-views): Dto.
* ob.el (org-babel-do-in-edit-buffer)
(org-babel-map-src-blocks, org-babel-map-inline-src-blocks): Dto.
* ob-tangle.el (org-babel-with-temp-filebuffer): Dto.
* ob-table.el (sbe): Dto.
* ob-exp.el (org-babel-exp-in-export-file): Dto.
* ob-comint.el (org-babel-comint-in-buffer)
(org-babel-comint-with-output): Dto.
2011-08-12 08:38:59 +02:00
emacs 7340cee33a Update website to show 7.7 as current release 2011-07-28 10:33:35 +00:00