Commit graph

6779 commits

Author SHA1 Message Date
Nicolas Goaziou 2da2c923aa org-macs: Fix typo in `org-with-limited-levels'
* lisp/org-macs.el (org-with-limited-levels): Fix typo.
2012-07-29 00:08:18 +02:00
Bastien Guerry 46daa10bf3 org-agenda.el (org-agenda-start-with-log-mode): Add relevant customization types.
* org-agenda.el (org-agenda-start-with-log-mode): Add relevant
customization types.

Thanks to John Wiegley for raising this issue and to Carsten for
directions.
2012-07-28 18:53:11 +02:00
Bastien Guerry 60c63df0cf Merge branch 'master' of orgmode.org:org-mode 2012-07-28 17:36:24 +02:00
Bastien Guerry e6337a9e22 org-faces.el (org-document-title): Use the normal height.
* org-faces.el (org-document-title): Use the normal height.

The :height 1.44 was ugly, visually disruptive.  If you disagree
and miss the good old fat face, set `org-document-title' to whatever
suits you.
2012-07-28 17:36:10 +02:00
Nicolas Goaziou 2227a17691 org-element: Fix paragraph parsing
* lisp/org-element.el (org-element-paragraph-separate): Refactor.
(org-element-paragraph-parser): Fix paragraph parsing.
* testing/lisp/test-org-element.el: Add test.
2012-07-28 14:35:35 +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
Nicolas Goaziou b04f9e3268 `org-fill-paragraph' is backed up by Org Element
* lisp/org.el (org-fill-paragraph): Rewrite function using
  `org-element-at-point'.
* lisp/org-element.el (org-element-fill-paragraph): Remove function.
* testing/lisp/test-org-element.el: Remove test.
* testing/lisp/test-org.el: Add test.
2012-07-28 11:47:58 +02:00
Nicolas Goaziou 07eaea26dd `org-planning-or-clock-line-re' is not buffer-local anymore
* lisp/org.el (org-planning-or-clock-line-re): Make it a defconst.
  It's no use to make it a buffer-local variable since variables on
  which it depends are not buffer-local anyway.
2012-07-28 11:47:58 +02:00
Nicolas Goaziou db45fc76b4 Provide default value for `org-drawer-regexp' in non-Org buffers
* lisp/org.el (org-drawer-regexp): Provide default value for
  `org-drawer-regexp' in non-Org buffers.
2012-07-28 11:47:58 +02:00
Bastien Guerry f2cec000e1 org.el (org-mode-map): Rebind org-insert-all-links' to C-c C-M-l'.
* org.el (org-mode-map): Rebind `org-insert-all-links' to `C-c C-M-l'.
2012-07-28 11:39:32 +02:00
Bastien Guerry 90f3940e14 New command `org-insert-all-links'.
* org.el (org-insert-all-links): New command.
(org-insert-link): `org-keep-stored-link-after-insertion' is
now checked when the link to insert has been defined,
regardless on how it has been defined.  Also don't read the
description interactively when the `default-description'
parameter was given.
(org-mode-map): Bind `org-insert-all-links' to `C-c C-L'.
2012-07-28 10:44:10 +02:00
Bastien Guerry 3a18eefe9d New command `org-inc-effort' to increment the effort value.
* org.el (org-inc-effort): New command to increment the effort
property.
(org-set-effort): Use it.
(org-mode-map): Bind it to `C-c C-x E'.
(org-speed-commands-default): Use `E' as a speed command for it.
2012-07-28 09:33:19 +02:00
Bastien Guerry e10ff18ffc Fix bug when setting a property where an empty property is already there.
* org.el (org-re-property-keyword): New function.
(org-entry-put): Use it to fix a bug with respect to setting
the value of a property when a property line with no value
already exists.
2012-07-28 09:13:43 +02:00
Bastien Guerry ec73186384 org.el: Adjust clock in other org files correctly.
* org.el (org-timestamp-change): Adjust clock in other org
files correctly.
2012-07-28 08:59:39 +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 6347bf2f72 Another fix for broken commit abbea59611
* lisp/org.el: Move check for outline-mode-keymap after (require 'outline).
2012-07-28 07:43:23 +02:00
Achim Gratz 044b0ff7e8 Fix breakage from previous commit
* lisp/org-element.el: Do not (require 'org).

* lisp/org-agenda.el: Remove duplicate requires.
2012-07-28 07:21:20 +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 f250f6beba New keybinding C-c C-x C-z' for org-resolve-clocks'.
* org.el (org-mode-map): Bind `org-resolve-clocks' to `C-c C-x C-z'.

* org.texi (Resolving idle time): Document new keybinding.

Thanks to Joseph Thomas for suggesting this.
2012-07-28 01:23:37 +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 8f5b9b2bdf org.el (org-timestamp-change): Don't use the `position'.
* org.el (org-timestamp-change): Don't use the `position'.
2012-07-27 21:59:22 +02:00
Bastien Guerry b86a6f6f34 S-M-<up/down> now adjusts previous/next clock when hit on clock timestamps.
* org.el (org-clock-history, org-clock-adjust-closest): New
variables.
(org-timestamp-change): Maybe adjust the next or previous
clock in `org-clock-history'.
(org-shiftmetaup, org-shiftmetadown): On clock logs, update
the timestamp at point and adjust the next or previous clock
in `org-clock-history', when possible.

* org.texi (Clocking commands): Document the use of
S-M-<up/down> on clock timestamps.

Thanks to Joseph Thomas who suggested this.
2012-07-27 17:29:29 +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
Bastien Guerry eb7a9a1d8d org-timer.el (org-timer-pause-or-continue, org-timer-stop): Autoload.
* org-timer.el (org-timer-pause-or-continue, org-timer-stop):
Autoload.
2012-07-27 17:21:33 +02:00
Bastien Guerry 9e8ce98ba6 org-mobile.el (org-mobile-post-pull-hook): Fix docstring.
* org-mobile.el (org-mobile-post-pull-hook): Fix docstring.

Thanks to Moritz Ulrich for pointing this.
2012-07-26 15:02:32 +02:00
Bastien Guerry 0b54bce2c4 org.el: Fix indentation of a property line starting at the beginning of a line.
* org.el (org-indent-line): Fix indentation of a property line
starting at the beginning of a line.
2012-07-26 08:09:22 +02:00
Achim Gratz 2dfa6aaf79 Let ob-C and ob-fortran work correctly on Windows/Cygwin
* lisp/ob.el (org-babel-exeext): New defconst to hold extension for
  executables or nil if none.  Should be ".exe" for both Windows and
  Cygwin.

* lisp/ob-C.el (org-babel-C-execute): Use org-babel-exeext when
  constructing the target file name for the compiled executable.

* lisp/ob-fortran.el (org-babel-execute:fortran): Add org-babel-exeext
  when constructing the target file name for the compiled executable.
2012-07-25 12:02:01 -06: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 0327b5a3c1 org-bibtex: org-flet w/recursion -> org-labels
* lisp/org-bibtex.el (org-bibtex-headline): Replacing org-flet with
  org-labels.
2012-07-25 10:13:50 -06:00
Eric Schulte ce3aa4ab2b strip quotes from calc internal representations
This allows more calculations to be performed, but at what cost?

* lisp/ob-calc.el (org-babel-execute:calc): Strip single quotes from
  calc internal representations.
2012-07-25 09:32:03 -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
Eric Schulte 64418e2920 remove use of map at runtime
* lisp/ob.el (org-babel-edit-distance): Remove use of map at runtime.
2012-07-25 09:24:04 -06:00
Eric Schulte 63b5f8f2e8 replace flet/labels with org-flet/org-labels
This patch ensure Org-mode will build on all supported versions of
Emacs, after the renaming of the cl macros behind the cl- prefix in the
recent Emacs trunk.

* lisp/org-compat.el (org-flet): Compatibility function now that flet
  has been removed from cl-macs.
  (org-labels): Compatibility function now that labels has been removed
  from cl-macs.
* lisp/ob-R.el (org-compat): Require org-compat.
* lisp/ob-comint.el: Require org-compat.
* lisp/ob-exp.el (org-babel-exp-do-export): Switch to compatibility
  function.
* lisp/ob-gnuplot.el (org-babel-expand-body:gnuplot): Switch to
  compatibility function.
* lisp/ob-lob.el (org-babel-lob-get-info): Switch to compatibility
  function.
  (org-babel-lob-execute): Switch to compatibility function.
* lisp/ob-python.el (org-babel-python-evaluate-session): Switch to
  compatibility function.
* lisp/ob-ref.el (org-babel-ref-index-list): Switch to compatibility
  function.
* lisp/ob-sh.el (org-babel-sh-var-to-string): Switch to compatibility
  function.
* lisp/ob-tangle.el (org-babel-load-file): Switch to compatibility
  function.
  (org-babel-tangle): Switch to compatibility function.
  (org-babel-spec-to-string): Switch to compatibility function.
* lisp/ob.el (org-babel-view-src-block-info): Switch to compatibility
  function.
  (org-babel-execute-src-block): Switch to compatibility function.
  (org-babel-edit-distance): Switch to compatibility function.
  (org-babel-switch-to-session-with-code): Switch to compatibility
  function.
  (org-babel-sha1-hash): Switch to compatibility function.
  (org-babel-balanced-split): Switch to compatibility function.
  (org-babel-join-splits-near-ch): Switch to compatibility function.
  (org-babel-get-rownames): Switch to compatibility function.
  (org-babel-format-result): Switch to compatibility function.
  (org-babel-insert-result): Switch to compatibility function.
  (org-babel-examplize-region): Switch to compatibility function.
  (org-babel-merge-params): Switch to compatibility function.
  (org-babel-noweb-p): Switch to compatibility function.
  (org-babel-expand-noweb-references): Switch to compatibility function.
* lisp/org-bibtex.el (org-bibtex-headline): Switch to compatibility
  function.
  (org-bibtex-fleshout): Switch to compatibility function.
  (org-bibtex-read): Switch to compatibility function.
  (org-bibtex-write): Switch to compatibility function.
* lisp/org-exp-blocks.el (org-export-blocks-preprocess): Switch to
  compatibility function.
* lisp/org-exp.el (org-export-format-source-code-or-example): Switch to
  compatibility function.
* lisp/org-macs.el (org-called-interactively-p): Indentation fix.
* lisp/org-mouse.el (org-mouse-timestamp-today): Switch to compatibility
  function.
  (org-mouse-set-priority): Switch to compatibility function.
  (org-mouse-popup-global-menu): Switch to compatibility function.
  (org-mouse-context-menu): Switch to compatibility function.
* lisp/org-plot.el (org-plot/gnuplot-to-grid-data): Switch to
  compatibility function.
  (org-plot/gnuplot-script): Switch to compatibility function.
* lisp/org.el (org-entry-get): Switch to compatibility function.
  (org-fill-paragraph): Switch to compatibility function.
  (org-auto-fill-function): Switch to compatibility function.
2012-07-25 09:23:57 -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
Jambunathan K f4148cf525 Merge origin/maint 2012-07-19 19:29:24 +05:30
Jambunathan K 16d23c07dd org-compat.el: Augment earlier commit
* lisp/org-compat.el (org-condition-case-unless-debug): Alias
to `condition-case' when both `condition-case-no-debug' and
`condition-case-unless-debug' is unavailable.
2012-07-19 19:15:42 +05:30
Jambunathan K 137cd87e4d org-odt.el: Replace `flet' with equivalent construct
* lisp/org-odt.el (org-odt-do-image-size): Replace `flet' with
equivalent construct.
2012-07-19 19:04:14 +05:30
Bastien Guerry 7cc0eda245 New alias `org-condition-case-unless-debug'.
* org-odt.el (org-odt-cleanup-xml-buffers): Use the new alias.

* org-compat.el: Alias `org-condition-case-unless-debug' to
`condition-case-unless-debug' or `condition-case-no-debug'.
2012-07-19 19:00:12 +05:30
Achim Gratz 0c9ba74955 provide for .el files that should be installed, but not compiled
* lisp/Makefile: Add LISPN (empty by default) which is used to filter
  out files from LISPC.  This means that install will not fail due to
  a corresponding .elc missing.  This might become useful if lisp
  source files set "no-byte-compile: t" for whatever reason.
2012-07-15 18:31:37 +02:00
Achim Gratz 6fbc226ca5 further cleanup for org version
* UTILITIES/org-fixup.el (org-make-org-version): Provide feature
  'org-version.
* lisp/org-compat.el (org-check-version): New macro.  Check if
  org-version.el exists and provide autoloads to that. Otherwise check
  if org-fixup.el exists and use it to provide definitions.  Finally
  if nothing worked, complain about a botched installation and provide
  fallback definitions.
* lisp/org.el: Use org-check-version.

This should finally provide the correct behaviour in all supported
use-cases as well as a few corner scenarios that were reported on the
mailing list and allow to always build on Git, ELPA and Emacs Bzr
correctly.  The file org-version.el must be added to the Emacs sources
and should be re-generated each time orgmode Git is synced to Emacs
Bzr (it would be best to automate this).

Note that the internal functions (org-release) and (org-git-release)
are not autoloaded when org-version is not present and become only
available when org.el is loaded.  This should pose no problem since
they are only used by (org-version), which is autoloaded from org.el.
2012-07-15 13:53:53 +02:00
Achim Gratz 6762c7ea60 Clean-up for build system support and a fix for org-version.
* UTILITIES/org-fixup.el: Clean up and add doc strings.
* UTILITIES/org-fixup.el (org-make-autoloads): Add optional arguments
  and implementation for comopiling and force compiling.
* UTILITIES/org-fixup.el (org-make-autoloads-compile,
  org-make-autoloads-compile-force): Convenience definitions with
  pre-selected arguments, avoids complicated quoted on invocation from
  command line.
* UTILITIES/org-fixup.el (org-fixup): Add "-git" to git version when
  run from a bare Git worktree.  Give message instead of returning
  string inside quoted progn for easier tracing.
* lisp/org.el: Fix a subtle error resulting in version functions
  sometimes not being defined and byte-compiling failing.  Always
  compile in fallback definitions into org.elc -- org-fixup either
  provides re-definitions at compile-time or checks org-version.el and
  then the git work tree when run uncompiled.  So the fallback
  definitions will only come into effect when org-fixup is not
  available.
2012-07-14 20:42:18 +02:00
Bastien Guerry b6cb722377 Explicitely says only letters are supported as fast TODO selection keys.
* org.texi (Fast access to TODO states): Explicitely says only
letters are supported as fast TODO selection keys.

* org.el (org-todo-keywords): Ditto.

Thanks to Samuel Wales for pointing at this.
2012-07-14 09:15:50 +02:00
Bastien Guerry dacd62b98d org.el (org-use-fast-todo-selection): Reformat docstring.
* org.el (org-use-fast-todo-selection): Reformat docstring.
2012-07-14 09:06:24 +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 ef3d4b5965 org.el: Allow %(my-function) as a specifier in abbreviated links.
* org.el (org-link-expand-abbrev): Implement "%(my-function)"
as a new specifier.  Update the docstring.

* org.texi (Link abbreviations): Illustrate the use of the
"%h" specifier.  Document the new "%(my-function)" specifier.

Thanks to Takaaki ISHIKAWA who came all the way down from Tokyo
to Paris and raised a not-so-distant issue: "could we translate
emails from the mailing list and have a URI for each translated
email?"  See the update in the manual for an answer.
2012-07-13 18:22:45 +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 3270f3a0eb org.el (org-startup-options): Fix docstring formatting.
* org.el (org-startup-options): Fix docstring formatting.
2012-07-13 01:17:42 +02:00
Bastien Guerry ce80dee476 org.el (org-use-sub-superscripts): Fix typo in docstring.
* org.el (org-use-sub-superscripts): Fix typo in docstring.
2012-07-13 01:14:32 +02:00