Commit Graph

611 Commits

Author SHA1 Message Date
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