Commit Graph

7063 Commits

Author SHA1 Message Date
Nicolas Goaziou 31aa36ca19 org-element: Fix typo in docstring
* lisp/org-element.el (org-element-text-markup-successor): Fix typo in
  docstring.
2012-08-12 00:51:50 +02:00
Nicolas Goaziou 8fc893a036 org-element: Fix small bug
* lisp/org-element.el (org-element-at-point): Return consistent value
  when function is called on a blank line within a plain list.
* testing/lisp/test-org-element.el: Add test.
2012-08-12 00:48:09 +02:00
Bastien Guerry 82af1bb96c org-agenda.el (org-agenda-get-sexps): Use `org-get-tags-at' to allow tag inheritance
* org-agenda.el (org-agenda-get-sexps): Use `org-get-tags-at'
to allow tag inheritance.

Thanks to Simon Thum for suggesting this.
2012-08-11 19:52:56 +02:00
Bastien Guerry e5c93760c8 org-capture.el (org-capture): Fix bug introduced by commit 1737d3
* org-capture.el (org-capture): Fix bug introduced by commit
1737d3.

Thanks to Simon Thum for reporting this.
2012-08-11 19:50:20 +02:00
Bastien Guerry b422af282d org-capture.el: Minor code cleanup 2012-08-11 19:35:34 +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
Michael Brand 042db379fc Add the capture feature sexp to org feed
* org-feed.el (org-feed-format-entry): Require `org-capture'.
Expand Elisp %(...) templates.
(org-feed-default-template): Update docstring.

* org-capture.el (org-capture-expand-embedded-elisp): New
function.
(org-capture-fill-template): Use it.
(org-capture-inside-embedded-elisp-p): New function to tell if
we are within an Elisp %(...) template.
2012-08-11 18:55:12 +02:00
Bastien Guerry 6966f20af2 org-publish.el: Fix problem with `org-publish-cache-ctime-of-src' not expanding from the correct directory
* org-publish.el (org-publish-needed-p)
(org-publish-update-timestamp, org-publish-file)
(org-publish-cache-file-needs-publishing): New argument
`base-dir'.
(org-publish-cache-ctime-of-src): Use the new argument to make
sure we find the file according to :base-directory.
2012-08-11 18:50:48 +02:00
Nicolas Goaziou d856b29b3b org-element: Fix comments in paragraph separator regexp
* lisp/org-element.el (org-element-paragraph-separate): Fix comments
  in paragraph separator regexp.  Optimize it.
2012-08-11 17:38:46 +02:00
Bastien Guerry 1737d3c4ee New command `org-capture-string'
* org-capture.el (org-capture-string): New command to prompt
for the interactive text interactively.  This can also be used
in Elisp programs to use ̀org-capture' with some initial text.
(org-capture-initial): New variable to store the initial text.
(org-capture): Use `org-capture-initial'.
2012-08-11 11:17:35 +02:00
Bastien Guerry 777ee3a4f9 org.el (org-emph-re): Tiny docstring formatting fix
* org.el (org-emph-re): Tiny docstring formatting fix.

Replay commit 8fb39a, but correctly this time.
2012-08-11 10:45:16 +02:00
Bastien Guerry ba16c3c6f5 Don't use `org-labels'
* org-compat.el (org-labels): Remove.

* org-bibtex.el (org-bibtex-headline): Don't use `org-labels'.

* ob.el (org-babel-sha1-hash, org-babel-noweb-p): Ditto.
2012-08-11 10:43:56 +02:00
Bastien Guerry ae21293a2e Revert "org.el (org-emph-re): Tiny formatting fix"
This reverts commit 8fb39ad25b.

Er.  Some changed should not be here.
2012-08-11 10:39:23 +02:00
Bastien Guerry 8fb39ad25b org.el (org-emph-re): Tiny formatting fix
* org.el (org-emph-re): Tiny formatting fix.
2012-08-11 09:57:01 +02:00
Bastien Guerry c5bc43133b org.el (orgstruct-setup): Require `org-element'.
* org.el (orgstruct-setup): Require `org-element'.

This prevents an error for git users who use orgstruct-mode
(and orgstruct++-mode) and forget to make autoloads.
2012-08-11 09:15:30 +02:00
Bastien Guerry 73c1948c15 org.el (org-store-link, org-open-at-point): New link type "help"
* org.el (org-store-link, org-open-at-point): New link type
"help".
2012-08-11 09:11:55 +02:00
Bastien Guerry baaa4873c7 org-compat.el (org-flet): Remove alias
* org-compat.el (org-flet): Remove alias.
2012-08-10 17:45:16 +02:00
Bastien Guerry 6c7ac786aa ob.el: Don't use `org-flet'
* ob.el (org-babel-edit-distance, org-babel-sha1-hash)
(org-babel-get-rownames, org-babel-insert-result)
(org-babel-merge-params)
(org-babel-expand-noweb-references): Don't use `org-flet'.
Also indent some functions correctly.
2012-08-10 17:44:45 +02:00
Bastien Guerry 57104f9fb2 ob.el: Don't use `org-flet'
* ob.el (org-babel-execute-src-block)
(org-babel-join-splits-near-ch, org-babel-format-result)
(org-babel-examplize-region): Don't use `org-flet'.
(org-babel-tramp-handle-call-process-region): Fix typo.
2012-08-10 17:23:00 +02:00
Bastien Guerry 966447c454 Don't use `org-flet' in ob-awk.el and ob-sh.el
* ob-awk.el (org-babel-awk-var-to-awk): Don't use `org-flet'.

* ob-sh.el (org-babel-sh-var-to-string): Ditto.
2012-08-10 16:05:26 +02:00
Bastien Guerry 1edf05f14c ob-tangle.el: Don't use `org-flet'
* ob-tangle.el (org-babel-tangle, org-babel-spec-to-string):
Don't use `org-flet'.
2012-08-10 15:40:00 +02:00
Bastien Guerry 9156bc2d64 Various minor fixes.
* org-pcomplete.el (org-compat): Require.

* ob-tangle.el (org-babel-load-file): Don't use `org-flet'.

* org-bibtex.el (org-bibtex-write): Use let*.
2012-08-10 15:32:24 +02:00
Bastien Guerry 8562d230ff org-plot.el (org-plot/gnuplot-script): Don't use `org-flet'
* org-plot.el (org-plot/gnuplot-script): Don't use `org-flet'.
2012-08-10 15:21:52 +02:00
Bastien Guerry 1be0faa40e org-bibtex.el: Don't use `org-flet'
* org-bibtex.el (org-bibtex-headline, org-bibtex-fleshout)
(org-bibtex-read, org-bibtex-write): Don't use `org-flet'.
2012-08-10 15:17:16 +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 090634584e org-mouse.el: Don't use `org-flet'
* org-mouse.el (org-mouse-timestamp-today)
(org-mouse-set-priority, org-mouse-popup-global-menu)
(org-mouse-context-menu): Don't use ̀org-flet'.
2012-08-10 14:57:19 +02:00
Bastien Guerry 4cc6a9db5e org.el (org-priority): Fix docstring
* org.el (org-priority): Fix docstring.
2012-08-10 14:56:36 +02:00
Bastien Guerry 0ac65cc663 org-publish.el: Small code clean-up
* org-publish.el (org-publish-write-cache-file)
(org-publish-initialize-cache)
(org-publish-cache-file-needs-publishing)
(org-publish-cache-get): Small code clean-up.
2012-08-10 12:46:01 +02:00
Bastien Guerry 640b8c4076 org-publish.el (org-publish-cache-ctime-of-src): Simplify.
* org-publish.el (org-publish-cache-ctime-of-src): Simplify.
2012-08-10 12:41:13 +02:00
Bastien Guerry 621364fc6d org-agenda.el: Add a 'tags property for agenda entries created from sexps
* org-agenda.el (org-agenda-get-sexps): Add a 'tags property
for agenda entries created from sexps.

Thanks to Simon Thum for reporting this.
2012-08-10 12:29:51 +02:00
Bastien Guerry d9ebb7c8be org-capture.el: Fix bug in placing point according to %?
* org-capture.el (org-capture-templates): Docstring clean up.
(org-capture-place-entry, org-capture-place-item)
(org-capture-place-plain-text, org-capture-place-table-line):
Ensure to always position the point according to %?.

Thanks to Gsqual for reporting this and to Nick Dokos for digging into this
issue.
2012-08-10 11:48:54 +02:00
Bastien Guerry ad67f20a39 Fix a compiler warning. 2012-08-10 11:17:02 +02:00
Bastien Guerry 24c9083bd5 org-table.el: Fix bug when converting remote table references.
* org-table.el (org-table-convert-refs-to-rc): Fix bug when
converting remote table references.

Thanks to Jose E. Marchesi who provided a preliminary patch for this.
2012-08-10 11:00:15 +02:00
Bastien Guerry 068a354747 org-agenda.el (org-agenda-switch-to): Run hooks in ̀org-agenda-after-show-hook'
* org-agenda.el (org-agenda-switch-to): Run hooks in
̀org-agenda-after-show-hook'.

Thanks to Jack Erwin for suggesting this.
2012-08-10 10:12:44 +02:00
T.F. Torrey a4e3ed9a2f org-rmail.el: Use `rmail-widen' instead of `widen'
* org-rmail.el (org-rmail-follow-link): Use `rmail-widen'
instead of `widen' and don't toggle header as `rmail-widen'
already takes care of this.

TINYCHANGE

--
T.F. Torrey
2012-08-10 09:59:16 +02:00
Bastien Guerry e85479aeb1 Don't use `org-flet' in some functions
* ob-ref.el (org-babel-ref-index-list): Use let* and rename
the variable `length' to `lgth'.

* org-plot.el (org-plot/gnuplot-to-grid-data): Don't use
̀org-flet'.

* org-exp.el (org-export-format-source-code-or-example):
Ditto.

* org-exp-blocks.el (org-export-blocks-preprocess): Ditto.

* ob.el (org-babel-view-src-block-info)
(org-babel-execute-src-block, org-babel-edit-distance)
(org-babel-switch-to-session-with-code)
(org-babel-balanced-split, org-babel-insert-result): Ditto.

* ob-ref.el (org-babel-ref-index-list): Ditto.

* ob-python.el (org-babel-python-evaluate-session): Ditto.

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

* ob-gnuplot.el (org-babel-expand-body:gnuplot): Ditto.

* ob-exp.el (org-babel-exp-do-export): Ditto.
2012-08-09 21:06:33 +02:00
Achim Gratz 3e63c3e97a Makefile: allow for different compilation methods
* targets.mk: Remove targets compile-source and compile-single,
  obsoleted by new configuration option.  Remove repetitive code in
  clean targets by using pattern substitution.  Avoid superfluous
  invocations of find by using multiple path arguments.

* Makefile: Remove compile-source and compile-single target
  documentation.

* default.mk: Add new option _COMPILE_ to select compilation method.
  Set default value to keep current behaviour.

* lisp/Makefile: Use new $(_COMPILE_) to dispatch compilation target.
  Implement private targets compile-dirall (default), compile-single,
  compile-slint1 and compile-slint2.

The additional compilation methods catch more and/or different errors
in the sources by compiling the sources in a single Emacs process per
compilation and with different conditions of the source directory, but
take much longer to compile even in the absence of such errors.  The
default method to use can be changed (like all other options) via
local.mk or temporarily on the command line.
2012-08-09 18:25:27 +02:00
Bastien Guerry 0c77568f67 org-table.el (orgtbl-to-generic): Fix docstring.
* org-table.el (orgtbl-to-generic): Fix docstring.
2012-08-09 16:17:05 +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 ced90464dd org.el (org-entry-get): Don't use `org-flet'
* org.el (org-entry-get): Don't use `org-flet'.
2012-08-08 15:19:24 +02:00
Bastien Guerry d70cf44e7b org.el: Fix compiler warnings. 2012-08-08 14:55:40 +02:00
Bastien Guerry 12101efc2f org.el: Fix names I forgot to change in the previous patch. 2012-08-08 14:48:35 +02:00
Nicolas Goaziou b523a3edf5 Fix tests
* lisp/org-element.el: Update code commets.
* testing/lisp/test-org-element.el: Remove tests for renamed
  navigation and manipulation fuctions.
* testing/lisp/test-org.el: Add tests for renamed navigation and
  manipulation functions.
2012-08-08 13:58:14 +02:00
Bastien Guerry ee483e98f7 Merge branch 'master' of orgmode.org:org-mode 2012-08-08 12:11:57 +02:00
Bastien Guerry 1c595f3e5d org.el: Rename `org-backward/forward-same-level' to `org-backward/forward-heading-same-level'
* org.el (org-forward-heading-same-level): Rename from
`org-forward-same-level'.
(org-backward-heading-same-level): Rename from
`org-backward-same-level'.
2012-08-08 12:11:51 +02:00
Bastien Guerry f485b0a889 Move org-element commands to org.el and rename them.
* org.el (org-forward-element): Rename from
`org-element-forward'.
(org-backward-element): Rename from `org-element-backward'.
(org-up-element): Rename from `org-element-up'.
(org-down-element): Rename from `org-element-down'.
(org-drag-element-backward): Rename from
`org-element-drag-backward'.
(org-drag-element-forward): Rename from
`org-element-drag-forward'.
(org-mark-element): Rename from `org-element-mark-element'.
(org-transpose-element): Rename from `org-element-transpose'.
(org-unindent-buffer): Rename from
`org-element-unindent-buffer'.
(org-mode-map): Update the names of a commands.
Remove useless declarations.

* org-element.el (org-element-forward, org-element-backward)
(org-element-up, org-element-down)
(org-element-drag-backward, org-element-drag-forward)
(org-element-mark-element, org-narrow-to-element)
(org-element-transpose, org-element-unindent-buffer): Move to
org.el.
2012-08-08 11:57:37 +02:00
Nicolas Goaziou 694a858506 Fix bug when marking subtree with point on an inlinetask
* lisp/org.el (org-mark-subtree): Fix bug when marking subtree with
  point on an inlinetask.  Refactor code.
* testing/lisp/test-org.el: Add test.
2012-08-08 11:50:09 +02:00
Bastien Guerry 06c8457f0c Merge branch 'master' of orgmode.org:org-mode 2012-08-08 11:36:48 +02:00
Nicolas Goaziou 0a04169769 org-element: Fix `org-element-at-point' in some corner cases
* lisp/org-element.el (org-element-item-parser,
  org-element-plain-list-parser): Make sure that the element ends at
  the beginning of a line if possible.
(org-element-at-point): Return expected element when point is at an
element's end or at its contents' end.
* testing/lisp/test-org-element.el: Add test.
* testing/lisp/test-org.el: Add test.
2012-08-08 09:56:28 +02:00
Bastien Guerry a66f44d123 org.el (org-forward-same-level): Fix typo in docstring.
* org.el (org-forward-same-level): Fix typo in docstring.
2012-08-08 09:32:13 +02:00
Christophe Junke 9dae6f04b1 Let `org-agenda-time-grid' control if the grid is displayed.
* org-agenda.el (org-agenda-list): Ensure that the
list returned by `org-agenda-add-time-grid-maybe' is appended
to `rtnall' before checking if the latter is emtpy.

In the case where rtnall is empty (no item for current day), we do not
call org-agenda-add-time-grid-maybe.  This seems bogus because that
function is already computing whether the time grid must be included,
and does so according to the user's preferences.

In particular, the `org-agenda-time-grid' variable has a
'require-timed' parameter controlling the visibility of the time grid.

So, this patch :

 - removes the premature check for rtnall being empty,
 - inconditionally calls org-agenda-add-time-grid-maybe,
 - and finally checks the emptiness of the resulting list
   before pretty printing.

TINYCHANGE
2012-08-07 23:44:08 +02:00
Bastien Guerry 179f5e484a org-agenda.el: New commands `org-agenda-next/previous-item'.
* org-agenda.el (org-agenda-mode-map): Bind
`org-agenda-show-priority' to `C-c,' instead of `P'.
(org-agenda-next-item, org-agenda-previous-item): New
commands to move by one item down/up in the agenda.
(org-agenda-mode-map): Bind `org-agenda-next-item' and
`org-agenda-previous-item' to `N' and `P' respectively.

Thanks to Eric Abrahamsen for this idea and a first patch.
2012-08-07 23:11:26 +02:00
Nicolas Goaziou d70f965486 Do not make a special case for inlinetasks when marking a subtree
* lisp/org.el (org-mark-subtree): Do not make a special case for
  inlinetasks when marking a subtree. These are handled by
  `org-element-mark-element'.
* testing/lisp/test-org.el: Add test.
2012-08-07 13:38:32 +02:00
Bastien Guerry 7bc9b2242e org-rmail.el: Fix compiler warnings. 2012-08-07 13:27:18 +02:00
Bastien Guerry 1f7263d6b1 org-rmail.el: Fix bug when storing and inserting a link.
* org-rmail.el (org-rmail-store-link, org-rmail-follow-link):
Toggle headers when necessary.

Thanks to T.F. Torrey for reporting this bug and for proposing a fix.
2012-08-07 12:09:33 +02:00
Bastien Guerry 93acc82b96 Fix yet another compiler warning.
Let's go to sleep now.
2012-08-07 02:05:10 +02:00
Bastien Guerry 01bd28be69 org-element.el (org-narrow-to-element): Autoload.
* org-element.el (org-narrow-to-element): Autoload.
2012-08-06 20:11:33 +02:00
Bastien Guerry 7efbd4222d org.el: Enhance `C-c @' and use `M-h' for `org-element-mark-element'.
* org.el (org-mode-map): Use `M-h' for
`org-element-mark-element'.
(org-mark-subtree): Allow a numeric prefix argument to move up
into the hierarchy of headlines.

* org-element.el (org-element-up, org-element-down): Autoload.
2012-08-06 20:02:54 +02:00
Bastien Guerry 1276ab3ff1 Fix compiler warnings.
* org.el: Declare functions and don't require org-element.

* org-element.el (org-element-at-point, org-element-forward)
(org-element-backward, org-element-drag-backward)
(org-element-drag-forward, org-element-mark-element)
(org-element-transpose, org-element-unindent-buffer): Autoload.
Require 'org and remove all declarations.
2012-08-06 19:13:43 +02:00
Bastien Guerry 974c69803e org-exp-blocks.el: Fix compiler warning. 2012-08-06 19:12:51 +02:00
Bastien Guerry 2a1c9a26f0 Merge branch 'master' of orgmode.org:org-mode 2012-08-06 18:01:07 +02:00
Eric Schulte e400a80429 improved handling of results that look like elisp
* lisp/ob.el (org-babel-string-read): Don't automatically evaluate
  code block results which look like elisp.
  (org-babel-import-elisp-from-file): Raise a warning message when the
  process of reading code block results raises an error.
2012-08-06 09:37:09 -06:00
Bastien Guerry 690372d948 org-exp-blocks.el: Fix compiler warning. 2012-08-06 17:08:23 +02:00
Bastien Guerry 8e4f897c49 org-element.el: Declare variables. 2012-08-06 17:06:13 +02:00
Bastien Guerry 4ea4cc848c org-element.el: Declare more functions to fix compiler warnings. 2012-08-06 16:47:58 +02:00
Bastien Guerry 256f7dc998 org-pcomplete.el: Fix compiler warning. 2012-08-06 16:42:24 +02:00
Bastien Guerry 7791d40045 Add declarations to org-element.el 2012-08-05 20:14:21 +02:00
Bastien Guerry 6cd13146c9 org.el: Use variables instead of constants for `org-outline-regexp-bol' and `org-heading-regexp'
* org.el (org-outline-regexp-bol, org-heading-regexp): Use
variables instead of constants.

This fixes compiler warnings when compiling with Emacs 23.4.
2012-08-05 20:03:39 +02:00
Bastien Guerry b7a61ed7ea org-archive.el (org-datetree-find-date-create): Declare.
* org-archive.el (org-datetree-find-date-create): Declare.

This fixes a compiler warning when compiling with Emacs 23.4.
2012-08-05 20:02:36 +02:00
Bastien Guerry 2cd4333398 Fix two compiler warnings. 2012-08-05 18:59:51 +02:00
Bastien Guerry 4f627f86d7 org.el: Fix bug in ̀org-open-at-point'.
* org.el (org-open-at-point): Only set
`clean-buffer-list-kill-buffer-names' when the feature
'midnight has been loaded.

Thanks to François Allisson for reporting this bug.
2012-08-05 11:40:47 +02:00
Bastien Guerry 216768531f org-icalendar.el: Let APPT_WARNTIME take precedence over ̀org-icalendar-alarm-time'.
* org-icalendar.el (org-print-icalendar-entries): Let
APPT_WARNTIME take precedence over ̀org-icalendar-alarm-time'.
2012-08-05 11:30:23 +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 6f571de2f0 org-agenda.el: More appropriate error when there is no Org agenda.
* org-agenda.el (org-agenda-check-type): Throw a more
appropriate error message when no agenda is currently being
displayed.
2012-08-05 09:16:40 +02:00
Bastien Guerry 4ea1d6206a Merge branch 'master' of orgmode.org:org-mode 2012-08-04 23:03:45 +02:00
Bastien Guerry a27c0d0fcc org.el: Make `org-entry-get' find a property before the first headline.
* org.el (org-get-property-block): Find blocks before the
first headline.
(org-entry-properties): Minor code cleanup.
(org-entry-get, org-entry-get-with-inheritance): Get property
before the first headline.
2012-08-04 23:02:03 +02:00
Achim Gratz b9916f2e2b Makefile: enable one-process-per-source compilations again
* default.mk: Re-introduce ELC for single file compilation.

* targets.mk: New targets compile-single and compile-single-source
  that get handed off to lisp/Makefile.

* lisp/Makefile: Implement pattern rule using $(ELC).  Implement
  target compile-single that uses a separate Emacs process for each
  target by invoking the pattern rule.  Implement target
  compile-single-source that additionally removes the compiled file
  directly after it has been produced, so compilation will always use
  source files only, never byte-compiled files.

* Makefile: Document new targets.

These new targets are meant to check for problems with
interdependencies in Org.
2012-08-04 15:59:08 +02:00
Nicolas Goaziou 9d045b21bb org-element: Consider first "+" as a comment when parsing an ill-defined keyword
* lisp/org-element.el (org-element-comment-parser): Consider first "+"
  as a comment when parsing an ill-defined keyword.
2012-08-04 10:19:27 +02:00
Bastien Guerry 71c957d903 org-mobile.el: Fix tags gathering again.
Thanks to James Harkins for the patch.
2012-08-04 10:22:20 +02:00
Eric Schulte 1952afa6ed more efficient org-babel-with-temp-filebuffer
* lisp/ob-tangle.el (org-babel-with-temp-filebuffer): Don't execute
  macro argument multiple times.
2012-08-03 13:34:10 -06:00
Bastien Guerry 62bf9cace0 org-mobile.el (org-mobile-create-index-file): Use `files-alist'.
* org-mobile.el (org-mobile-create-index-file): Use `files-alist'.
2012-08-03 20:05:04 +02:00
Abdó Roig-Maranges dd49e0b225 Option to chose directory for latex preview images
* org.el (org-latex-preview-ltxpng-directory): New option.
  (org-preview-latex-fragment): Store LaTeX preview images in
  `org-latex-preview-ltxpng-directory'.

Added an option `org-latex-preview-ltxpng-directory' with a path
where the preview images will be stored.  The default does not
change (small little ltxpng scattered all over the place) but now
the user can chose an absolute path and put all the images on a
single place.

TINYCHANGE
2012-08-03 19:53:43 +02:00
Bastien Guerry 96551f3dd8 Delete `org-make-link' and replace previous occurrences by `concat'.
* org.el (org-make-link): Delete.
(org-store-link, org-insert-link)
(org-file-complete-link): Don't use `org-make-link'.

* org-wl.el (org-wl-store-link-folder)
(org-wl-store-link-message): Ditto.

* org-vm.el (org-vm-store-link): Ditto.

* org-rmail.el (org-rmail-store-link): Ditto.

* org-mhe.el (org-mhe-store-link): Ditto.

* org-mew.el (org-mew-store-link): Ditto.

* org-irc.el (org-irc-erc-store-link): Ditto.

* org-info.el (org-info-store-link): Ditto.

* org-id.el (org-id-store-link): Ditto.

* org-gnus.el (org-gnus-group-link, org-gnus-article-link):
Ditto.

* org-eshell.el (org-eshell-store-link): Ditto.

* org-bbdb.el (org-bbdb-store-link): Ditto.
2012-08-03 19:03:21 +02:00
Bastien Guerry 341042a09e org.el: New option `org-url-hexify-p'.
* org.el (org-url-hexify-p): New option.  When non-nil (the
default), hexify URLs when creating a link.

Thanks to Gustav Wikström who suggested this.
2012-08-03 18:51:43 +02:00
Bastien Guerry 1ac2552273 org.el (org-insert-link): Make sure point is at the beginning of the buffer.
* org.el (org-insert-link): Make sure point is at the
beginning of the buffer.
2012-08-03 16:23:57 +02:00
Bastien Guerry 8fca59f71f org.el: Allow opening multiple shell links.
* org.el (clean-buffer-list-kill-buffer-names): Declare.
(org-open-at-point): Allow opening multiple shell links by
creating a new output buffer for each shell process.  The new
buffer is added to `clean-buffer-list-kill-buffer-names'.

Thanks to Tobias Naehring for this idea.
2012-08-03 15:32:01 +02:00
Bastien Guerry 6c2d37debf org-mobile.el: Fix the creation of the list of available tags.
* org-mobile.el (org-mobile-create-index-file): Use
`org-global-tags-completion-table' instead of
`org-tag-alist-for-agenda' to get the tags for the index file.

Thanks to James Harkins who helped figuring out the problem here.
2012-08-03 14:30:18 +02:00
Bastien Guerry bf36319582 org.el (org-global-tags-completion-table): Fix typo in docstring.
* org.el (org-global-tags-completion-table): Fix typo in docstring.
2012-08-03 14:21:59 +02:00
Bastien Guerry 1e34c5d34f org.el: Fontify links to current buffer when inserting a link.
* org.el (org-link-to-org-use-id): use `org-capture' instead
of `org-remember' in the docstring.
(org-link-fontify-links-to-this-file): New function to fontify
links to the current buffer in `org-stored-links'.
(org-store-link): Small code simplification.
(org-link-prettify): Enclose literal links into <...> instead
of [[...]].
(org-insert-link): Use `org-link-fontify-links-to-this-file'.
Also allow completion over links' descriptions, as well as
links destinations.  When the user uses the description for
completion, don't prompt again for a description.

Thanks to Yagnesh Raghava Yakkala who suggested this.
2012-08-03 14:08:20 +02:00
Bastien Guerry 7fdd49dd33 org-capture.el: Fix docstring by adding Gnus to the list of mail clients.
* org-capture.el (org-capture-templates): Fix docstring by
adding Gnus to the list of mail clients.

Thanks to Tassilo Horn for spotting this.
2012-08-03 14:01:19 +02:00
Bastien Guerry 3977d4b373 org.el (org-log-repeat): Enhance docstring.
* org.el (org-log-repeat): Enhance docstring.
2012-08-03 10:09:11 +02:00
Nicolas Goaziou ecba5542e6 org-element: List interpretation doesn't depend on its structure
* lisp/org-element.el (org-element-item-interpreter): Simplify bullet
  creation.
(org-element-plain-list-interpreter): Fix wrong bullets, if needed.

This change allows to intrepret plain lists without providing list's
structure, which can be a bit hairy.  For example, the following
snippet now suffices to create a list programmatically:

  (org-element-interpret-data
   '(plain-list nil
                (item (:bullet "-") (paragraph nil "a"))
                (item (:bullet "-") (paragraph nil "b"))))
2012-08-02 21:56:39 +02:00
Nicolas Goaziou eb2eacf91d org-element: Fix parsing when a keyword follows the commented line
* lisp/org-element.el (org-element-comment-parser): Fix parsing when
  a keyword follows the commented line.
* testing/lisp/test-org-element.el: Add test.
2012-08-02 19:47:14 +02:00
Suhail Shergill 28582bfa0f org-html.el: Make footnotes unique to an entry
* lisp/org-html.el (org-export-as-html): If possible, use the
  :CUSTOM_ID: property to assign unique ids to footnotes.

TINYCHANGE
2012-08-02 18:22:06 +02:00
Bastien Guerry ee1d70172d org.el: Don't bind C-<up> and C-<down> to `org-element-backward/forward'.
* org.el (org-mode-map): Don't bind C-<up> and C-<down> to
`org-element-backward/forward' as these functions stops when
there is no element of the same type before/after point.  It
is useful to navigate with `forward/backward-paragraph' with
no stop in most cases.
2012-08-02 18:18:35 +02:00
Bastien Guerry 21ec0159b8 org-capture.el: New template %l to insert the literal link.
* org-capture.el (org-capture-templates): New template %l to
insert the literal link pointing at the current buffer.

* org.texi (Template expansion): Document the new %l template.

Thanks to Eric Abrahamsen for this idea.
2012-08-02 17:06:22 +02:00
Bastien Guerry 2201d838a4 Merge branch 'master' of orgmode.org:org-mode 2012-08-02 11:59:34 +02:00
Bastien Guerry aa490ffa04 Small doc fix.
* org.texi (Fast access to TODO states): Fix documentation
about allowed characters for fast todo selection.

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

This fixes this wrong change here:
http://orgmode.org/w/?p=org-mode.git;a=commit;h=b6cb72
2012-08-02 11:59:27 +02:00
Nicolas Goaziou 198b079a64 Auto-fill first paragraph in footnote definitions
* lisp/org.el (org-fill-context-prefix): Auto-fill first paragraph in
  footnote definitions.
2012-08-02 11:25:07 +02:00
Eric Schulte 96d4c5ef0a fix org-check-version undefined error when compiled
Prior to this change compiling org-mode and then running Org-mode
functions from a batch Emacs would throw the following error.

  Symbol's function definition is void: org-check-version

Moving the require of org-compat before the use of this function in
org.el fixes this problem.

* lisp/org.el (org-compat): Require org-compat before we first use one
  of its functions (a macro actually).
2012-08-01 09:53:19 -06:00
Bastien Guerry 6cf637fd1d org.el: Prepare `org-fill-paragraph' for `message-mode'.
* org.el (org-fill-paragraph): Falls back on
`message-fill-paragraph' if required in `message-mode'.
2012-08-01 17:51:55 +02:00
Bastien Guerry da8215bc06 org-pcomplete.el: Allow completion over #+OPTIONS, #+TITLE, #+AUTHOR, #+EMAIL and #+DATE.
* org-pcomplete.el (pcomplete/org-mode/file-option/x): New macro.
(pcomplete/org-mode/file-option/options)
(pcomplete/org-mode/file-option/title)
(pcomplete/org-mode/file-option/author)
(pcomplete/org-mode/file-option/email)
(pcomplete/org-mode/file-option/date): Use the new macro to
offer completion over default values for #+OPTIONS, #+TITLE,
#+AUTHOR, #+EMAIL and #+DATE.
2012-08-01 17:19:13 +02:00
Bastien Guerry b771d4b05b org-agenda.el: Bugfix for `org-agenda-write'.
* org-agenda.el (org-agenda-write): Fix bug when writing
agenda to an external file while `org-agenda-sticky' is
non-nil.
2012-08-01 16:32:36 +02:00
Bastien Guerry a88dae9236 Fix compilation warning. 2012-08-01 16:20:22 +02:00
Bastien Guerry a865abb5fe Let's a :APPT_WARNTIME: property override `appt-message-warning-time' in `org-agenda-to-appt'.
* org.el (org-speed-commands-default): New speedy command to
quickly add the :APPT_WARNTIME: property.

* org-agenda.el (org-agenda-to-appt): Use the :APPT_WARNTIME:
property to override `appt-message-warning-time' when adding
an appointment from an entry.

* org.texi (Weekly/daily agenda): Mention APPT_WARNTIME and
its use in `org-agenda-to-appt'.

This feature has been suggested, along with preliminary patches,
by Ivan Kanis.  Thanks!
2012-08-01 16:05:47 +02:00
Bastien Guerry 7024560981 org.el: `org-self-insert-cluster-for-undo' now defaults to nil.
* org.el (org-version): Improve docstring.
(org-self-insert-cluster-for-undo): The default value should
be nil for Emacs >=24.1.  See bug#11774.

See http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11774 for a
discussion about this.
2012-08-01 15:32:15 +02:00
Bastien Guerry 4508dc55e5 org.el (org-fontify-meta-lines-and-blocks-1): Fix previous commit.
* org.el (org-fontify-meta-lines-and-blocks-1): Fix previous
commit.
2012-08-01 14:15:16 +02:00
Nicolas Goaziou a8e00ff0dc Inlined comment syntax is reduced to "#"
* lisp/org.el (org-mode): Define new comment syntax.
(org-fontify-meta-lines-and-blocks-1, org-strip-protective-commas,
org-fill-context-prefix, org-insert-comment,
org-comment-or-uncomment-region): Use new comment syntax.
* lisp/org-element.el (org-element-comment-parser,
  org-element-comment-interpreter, org-element--current-element): Use
  new comment syntax.
* testing/lisp/test-org-element.el: Update tests.
* testing/lisp/test-org.el: Update tests.
2012-08-01 10:47:47 +02:00
Nicolas Goaziou 783fd91e66 When at an item or a footnote definition, fill first paragraph instead
* lisp/org.el (org-fill-paragraph): When at an item or a footnote
  definition, fill first paragraph instead.
* testing/lisp/test-org.el:
2012-07-31 20:49:11 +02:00
Bastien Guerry 64a30f6ecb More flyspell enhancements.
* org.el (org-options-keywords): New constant.
(org-additional-option-like-keywords): Remove duplicates with
keywords in the new constant.
(org-additional-option-like-keywords-for-flyspell): Use the
new constant.
(org-mode-flyspell-verify): Exclude keywords from the new
constant.

* org-pcomplete.el (pcomplete/org-mode/file-option): Use
`org-options-keywords'.
2012-07-31 18:30:54 +02:00
Bastien Guerry 427fee0e4a Fix bug.
* org.el (org-toggle-heading): Bugfix: use
`org-element-mark-element' instead of `org-mark-list'.
2012-07-31 17:51:13 +02:00
Bastien Guerry cbb7742d3b org-list.el (org-mark-list): Delete.
* org-list.el (org-mark-list): Delete.
2012-07-31 17:15:07 +02:00
Eric Schulte 2817f68c17 anonymous function instead of using flet
* lisp/ob-comint.el (org-babel-comint-with-output): Don't name the
  filter function, but rather pass through the anonymous lambda
  directly.
2012-07-31 08:14:12 -06:00
Bastien Guerry 5b9cbe9291 Merge branch 'master' of orgmode.org:org-mode 2012-07-31 16:14:33 +02:00
Bastien Guerry eb5631359a Update a few keybindings in org.el and fix a problem in org-element.el.
* org.el: Update a few keybindings.

Use [(control down)] and "\M-}" for `org-element-forward'.
Use [(control up)] and "\M-{ `org-element-backward'.
Use "\C-c\C-^" for `org-element-up'.
Use "\C-c\C-_" for `org-element-down'.
Use "\C-c\C-@" for `org-element-mark-element'.

* org-element.el (org-element-down): Throw an error when the
element has no content.
2012-07-31 16:11:45 +02:00
Nicolas Goaziou fcca4ab8e4 Fix filling when point is at the very end of a paragraph
* lisp/org.el (org-fill-paragraph): Fix filling when point is at the
  very end of a paragraph.
* testing/lisp/test-org.el: Add test.
2012-07-31 15:42:30 +02:00
Bastien Guerry e3f30e12d2 Add `orgtbl-to-table.el' and `orgtbl-to-unicode'.
* org-table.el (orgtbl-radio-table-templates): Add a template
for org-mode.
(orgtbl-to-orgtbl): Complete and align the table created with
orgtbl-to-orgtbl, in case the user use the function for radio
tables.
(orgtbl-to-table.el): New function to export a table to
another one using the table.el format.
(orgtbl-to-unicode): New function to export a table using
unicode characters.
2012-07-31 15:40:05 +02:00
Bastien Guerry 64de70e1be Merge branch 'master' of orgmode.org:org-mode 2012-07-31 15:26:19 +02:00
Nicolas Goaziou 4d00c5bf4d Complete handling of comment syntax
* lisp/org.el (org-mode): Set comments related variables.
(org-insert-comment, org-comment-or-uncomment-region): New functions.
* testing/lisp/test-org.el: Add test.
2012-07-31 13:55:44 +02:00
Bastien Guerry 86499cb9a8 org-exp.el (org-export-language-setup): Use "Sommaire" for the translation of "Table of contents".
* org-exp.el (org-export-language-setup): Use "Sommaire"
for the french translation of "Table of contents", to avoid a
possible bug when exporting to ODT.
2012-07-31 12:30:30 +02:00
Eric Schulte 0202adb1c0 Merge branch 'master' of orgmode.org:org-mode 2012-07-30 09:37:08 -06:00
Nicolas Goaziou 5cb9beea9b Add tests about filling and auto-filling
* lisp/org.el (org-fill-context-prefix): Small refactoring.
(org-fill-paragraph): Add code comments.
* testing/lisp/test-org.el: Add tests
2012-07-30 15:25:13 +02:00
Bastien Guerry 4c2c6dba7b Enhance flyspelling.
* org.el (org-additional-option-like-keywords): Add keywords.
(org-additional-option-like-keywords-for-flyspell): New
constant to use with flyspell.
(org-mode-flyspell-verify): Use the dedicated constant and
don't check `org-startup-options'.

Thanks to Bjarte Johansen for bringing this up.
2012-07-30 13:02:48 +02:00
Bastien Guerry 9f66ab1d84 Fix bug when using `org-store-agenda-views' with `org-agenda-sticky' on.
* org-agenda.el (org-batch-store-agenda-views): Use the sticky
agenda buffer name, if required.
(org-agenda-write): New parameter `agenda-bufname' to allow
setting the agenda buffer name.

Thanks to François Allisson for reporting this bug.
2012-07-30 12:19:17 +02:00
Bastien Guerry 8eb584331a Add punctuation at the end of the first line of docstrings. Code cleanup. 2012-07-30 10:08:15 +02:00
Nicolas Goaziou 7cf9e5afb5 org-element: Modify output from `org-element-at-point' and `org-element-context'
* lisp/org-element.el (org-element-at-point): Add :parent property to
  output.
(org-element-context): Add :parent property to output.  Also return
a single element or object instead of a list of parents.
(org-element-forward, org-element-up): Apply changes.
* testing/lisp/test-org-element.el: Add tests.
2012-07-30 00:40:21 +02:00
Bastien Guerry 8466541b1d Add keybindings for `org-element-forward', `org-element-backward', `org-element-up' and `org-element-down'.
* org.el (org-mode-map): Add keybindings for
`org-element-forward', `org-element-backward',
`org-element-up' and `org-element-down'.
2012-07-29 19:26:24 +02:00
Bastien Guerry 8e8955089f Fix `org-auto-fill-function'.
* org.el (org-auto-fill-function): Don't call `do-auto-fill'
within (org-let org-fb-vars ...) as `do-auto-fill' should do
the right thing whether orgstruct++-mode is turned on or off.
2012-07-29 10:43:50 +02:00
Bastien Guerry 2959acb18c New option `org-sparse-tree-default-date-type' to specify what is a "date" in `org-sparse-tree'.
* org.el (org-sparse-tree-default-date-type): New option.
(org-ts-type): New variable.
(org-sparse-tree): New argument `type'.  Use the new option
`org-sparse-tree-default-date-type' as the default value for
`type'.  Fix docstring.
(org-re-timestamp): New function.
(org-check-before-date, org-check-after-date)
(org-check-dates-range): Use `org-ts-type' and
`org-re-timestamp' to tell compute the date regexp.

Thanks to John Hendy who triggered this change.
2012-07-29 10:03:57 +02:00
Nicolas Goaziou 94dd2e5243 Rewrite filling functions
* lisp/org.el (org-fill-context-prefix): New function.
(org-fill-paragraph, org-auto-fill-function): Use new function.  Also
handle comments.
(org-adaptive-fill-function): Remove function.
(org-get-local-variables, orgstruct++-mode): Don't store now unused
adaptive-fill* functions.
2012-07-29 08:55:54 +02:00
Bastien Guerry da1830ebe6 Also set `normal-auto-fill-function' when turning on/off orgstruct++-mode.
* org.el (orgstruct++-mode, org-get-local-variables): Also set
`normal-auto-fill-function' when turning on/off orgstruct++-mode.
2012-07-29 08:19:33 +02:00
Nicolas Goaziou 4b9aaf60d1 org-element: Fix `org-element-at-point' function
* lisp/org-element.el (org-element-at-point): Fix function when buffer
  starts with an inlinetask.  Also fix it when called on the last
  element in a greater element or the buffer.
2012-07-29 00:08:18 +02:00
Nicolas Goaziou e7397fda3f org-element: Refactor code
* lisp/org-element.el (org-element-center-block-parser,
  org-element-dynamic-block-parser,
  org-element-footnote-definition-parser,
  org-element-headline-parser, org-element-inlinetask-parser,
  org-element-quote-block-parser, org-element-special-block-parser,
  org-element-plain-list-parser): Refactor code.
 (org-element-drawer-parser): Fall-back to paragraph parser when
  drawer is incomplete.
* testing/lisp/test-org-export.el: Update test.
2012-07-29 00:08:18 +02:00
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
Eric Schulte 82e269a472 common lisp should be mentioned as a babel language
Thanks to dunib from #org-mode for pointing this out.

* lisp/org.el (org-babel-load-languages): Common lisp should be
  mentioned as a supported babel language.
2012-07-27 05:18:53 -06: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
Bastien Guerry 620737757f org.el: Fix bug in `org-refile'.
* org.el (org-refile): Fix bug: prevent looping when calling
`org-set-tags' internally.
2012-07-12 14:29:54 +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 9fb530dc48 org.el: Allow moving the region by one line up and down.
* org.el (org-move-line-down, org-move-line-up): Remove.
(org-metaup, org-metadown): When the region is active, move it
up/down by one line, with no regard to the context.
2012-07-12 11:57:05 +02:00
Bastien Guerry 1fe42fd0bc 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-12 10:30:33 +02:00
Bastien Guerry 9b264cf3a0 org-pcomplete.el: Ignore trailing whitespaces while looking-back at properties.
* org-pcomplete.el (org-thing-at-point): Ignore trailing
whitespaces while looking-back at properties.

Thanks to David Coate who reported a related issue.
2012-07-12 10:02:15 +02:00
Bastien Guerry 8610790a4e org.el: Update comment section about mapping outline.el commands. 2012-07-12 08:31:20 +02:00
Jambunathan K 963b1c53bb Merge remote-tracking branch 'origin/maint' 2012-07-12 00:59:52 +05:30
Jambunathan K 73165e8ba5 org-odt.el: Use `condition-case-no-debug'
* lisp/org-odt.el (org-odt-cleanup-xml-buffers): Use
`condition-case-no-debug' instead of
`condition-case-unless-debug'.  This ensures backward
compatibility with Emacs versions < 24.1.
2012-07-12 00:57:36 +05:30
Bastien Guerry be56d706ae org.el: New function `org-indent-region'.
* org.el (org-mode): Set `indent-region-function'.
(org-indent-region): New function.
(org-fill-paragraph): When in a src block, use `indent-region'
to indent the whole source code instead of falling back on
`fill-paragraph', as this function messes up the code.
2012-07-11 20:45:17 +02:00
Bastien Guerry afe5eb140e Fix some docstrings format.
* org-src.el (org-edit-src-code): Fix docstring formatting.

* ob.el (org-babel-do-key-sequence-in-edit-buffer): Ditto.
2012-07-11 19:33:29 +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
Bastien Guerry 94b9bec27c Merge branch 'master' of orgmode.org:org-mode 2012-07-11 18:36:31 +02:00
Bastien Guerry dadc199491 org-src.el: Fix some typos in docstrings.
* org-src.el (org-src-font-lock-fontify-block)
(org-src-strip-leading-and-trailing-blank-lines)
(org-src-ask-before-returning-to-edit-buffer)
(org-edit-src-code, org-edit-src-continue)
(org-edit-fixed-width-region)
(org-src-do-key-sequence-at-code-block)
(org-src-font-lock-fontify-block, org-src-fontify-buffer): Fix
typos in docstrings.
2012-07-11 18:36:22 +02:00
Bastien Guerry bd4c629e96 Fix docstring and comment typos.
* org-docbook.el (org-export-docbook-emphasis-alist): Fix
typo: use "format string" instead of "formatting string".

* org-latex.el (org-export-latex-emphasis-alist)
(org-export-latex-title-command, org-export-latex-tables):
Ditto.

* org-html.el (org-export-html-postamble): Ditto.
2012-07-11 18:03:02 +02:00
Bastien Guerry 97e001e88e org-latex.el: New option `org-export-latex-hyperref-options-format'.
* org-latex.el (org-export-latex-hyperref-options-format): New option.
(org-export-latex-make-header): Use it.
2012-07-11 17:59:56 +02:00
Nicolas Goaziou e886c548e4 Merge branch 'maint' 2012-07-11 17:58:03 +02:00