Commit Graph

10906 Commits

Author SHA1 Message Date
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 725a6c6a3d Another small fix to UTILITIES/x11idle.c. 2012-07-28 01:36:04 +02:00
Bastien Guerry f79a477cc4 Small spelling/cleanup fixes for UTILITIES/x11idle.c 2012-07-28 01:34:23 +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 88fd65f251 Merge branch 'master' of orgmode.org:org-mode 2012-07-28 00:57:14 +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
Nicolas Goaziou 144f2a3f9e org-md: Fix docstring
* contrib/lisp/org-md.el (org-md-headline-style): Fix docstring.
2012-07-28 00:49:58 +02:00
Nicolas Goaziou 5dac2ca753 org-e-ascii: Fix error when formatting an headline with a priority
* contrib/lisp/org-e-ascii.el (org-e-ascii--build-title): Fix error
  when formatting an headline with a priority.
2012-07-28 00:44:07 +02:00
Nicolas Goaziou edaa0c4ee7 org-md: Fix error when formatting an headline with a priority
* contrib/lisp/org-md.el (org-md-headline): Fix error when formatting
  an headline with a priority.
2012-07-27 23:05:34 +02:00
Nicolas Goaziou 029e499939 org-md: Fix spurious white space in Setext style
* contrib/lisp/org-md.el (org-md-headline): Fix spurious white space
  in Setext style.
2012-07-27 22:58:49 +02:00
Nicolas Goaziou 7b6e6e9ff5 org-md: Allow atx and Setext style for headlines
* contrib/lisp/org-md.el (org-export-md): New customize group.
(org-md-headline-style): New variable.
(org-md-headline): Allow atx and Setext style.  Also provide fall-back
for low level headlines.
2012-07-27 22:53:38 +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 b7a7a13ad1 Merge branch 'master' of orgmode.org:org-mode 2012-07-27 17:29:39 +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
Nicolas Goaziou 5057ae0fc2 org-export: Require info argument in some topology functions
* contrib/lisp/org-export.el (org-export-first-sibling-p,
  org-export-last-sibling-p, org-export-get-previous-element,
  org-export-get-next-element): Add INFO argument.  This is necessary
  to ignore non-exportable elements or objects.
(org-export--skip-p): Apply signature change.
* testing/lisp/test-org-export.el: Add tests.
* contrib/lisp/org-e-odt.el (org-e-odt-footnote-reference): Apply
  signature change.
* contrib/lisp/org-e-latex.el (org-e-latex-footnote-reference,
  org-e-latex-headline, org-e-latex-table-cell): Apply signature
  change.
* contrib/lisp/org-e-html.el (org-e-html-footnote-reference,
  org-e-html-headline): Apply signature change.
* contrib/lisp/org-e-beamer.el (org-e-beamer-export-snippet,
  org-e-beamer--format-block): Apply signature change.
2012-07-27 16:16:04 +02:00
Nicolas Goaziou f3e264af56 org-md: Add missing chuck from previous patch (536c55b)
* contrib/lisp/org-md.el (org-md-section): # protection shouldn't
  happen at the section level, when there is no difference between raw
  # from export blocks and # in plain text.
2012-07-27 14:43:12 +02:00
Nicolas Goaziou 536c55b644 org-md: Be more subtle when protecting #
* contrib/lisp/org-md.el (org-md-paragraph, org-md-plain-text): Make
  sure raw # (inserted with, for example, an export snippet) don't get
  escaped.  A few false positives don't hurt.
2012-07-27 14:05:44 +02:00
Nicolas Goaziou c8acf8d695 org-export and back-ends: Fix some docstrings 2012-07-26 15:33:27 +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
Nicolas Goaziou 065401cfdb org-md: Export back-end for Markdown format
* contrib/lisp/org-md.el: New file.
2012-07-26 12:41:26 +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 Goaziou b6b40424d2 org-e-ascii: Center shortened horizontal rules
* contrib/lisp/org-e-ascii.el (org-e-ascii-horizontal-rule): Center
  shortened horizontal rules.
2012-07-25 12:55:00 +02:00
Nicolas Goaziou 3df18bef9f org-export: Add test
* testing/lisp/test-org-export.el: Add test for subtree options.
2012-07-25 12:25:58 +02:00
Nicolas Goaziou 8d98835a3c org-export: Export properties from subtrees are case insensitive
* contrib/lisp/org-export.el (org-export--get-subtree-options): Export
  properties from subtrees are case insensitive.
2012-07-25 10:13:09 +02:00
Bastien Guerry f06a4db2be org-export-generic.el: Add require 'cl for defmacro*. 2012-07-25 08:32:54 +02:00
Nicolas Goaziou 2b6ba84ad6 org-export: Memoize results from `org-export-data'
* contrib/lisp/org-export.el (org-export-collect-tree-properties):
  Initialize hash table for memoization.
(org-export-data): Memoize results.
2012-07-24 22:52:29 +02:00
Nicolas Goaziou dbea7e658f org-export: Rename some internal functions
* contrib/lisp/org-export.el (org-export-get-environment,
  org-export-collect-tree-properties, org-export-data,
  org-export-expand-include-keyword): Use new names.
(org-export--parse-option-keyword): Renamed from
`org-export-parse-option-keyword'.
(org-export--get-subtree-options): Renamed from
`org-export-get-subtree-options'.
(org-export--get-inbuffer-options): Renamed from
`org-export-get-inbuffer-options'.
(org-export--get-buffer-attributes): Renamed from
`org-export-get-buffer-attributes'.
(org-export--get-global-options): Renamed from
`org-export-get-global-options'.
(org-export--allow-BIND-local): Renamed from
`org-export-allow-BIND-local'.
(org-export--confirm-letbind): Renamed from
`org-export-confirm-letbind'.
(org-export--install-letbind-maybe): Renamed from
`org-export-install-letbind-maybe'.
(org-export--get-min-level): Renamed from `org-export-get-min-level'.
(org-export--collect-headline-numbering): Renamed from
`org-export-collect-headline-numbering'.
(org-export--populate-ignore-list): Renamed from
`org-export-populate-ignore-list'.
(org-export--interpret-p): Renamed from `org-export--interpret-p'.
(org-export--prepare-file-contents): Renamed from
`org-export-prepare-file-contents'.
* contrib/lisp/org-e-publish.el (org-e-publish-find-date): Use new
  names.
* testing/lisp/test-org-export.el: Update tests.
2012-07-24 22:52:29 +02:00
Jambunathan K e0f59dfb05 (org-e-html-footnote-separator): Remove duplicate `
Also re-arrange defcustoms in alphabetical order.
2012-07-25 00:24:07 +05:30