Commit Graph

5026 Commits

Author SHA1 Message Date
Eric Schulte 5b7646ce08 ob: expand noweb references to headline contents
* lisp/ob-ref.el (org-babel-ref-goto-headline-id): Split out into its
  own function.
  (org-babel-ref-headline-body): Split out into its own function.
  (org-babel-ref-resolve): Using new functions, and alignment.
* lisp/ob.el (org-babel-ref-goto-headline-id): Declare function.
  (org-babel-ref-headline-body): Declare function.
  (org-babel-expand-noweb-references): Now expands noweb references to
  headlines during expansion.
2011-06-28 13:04:58 -07:00
Eric Schulte a2cf4b43f2 ob-ref: resolve variable references to headline contents
* lisp/ob-ref.el (org-babel-ref-resolve): Now resolves references to
  headlines by either global or custom id, in which case the contents
  of the headline are returned literally.
2011-06-28 13:04:58 -07:00
Eric Schulte ef42f3cc9c ob-lob: inline calls should export even when preceeded by an "="
* lisp/ob-exp.el (org-babel-in-example-or-verbatim): Also check for in
  verbatim emphasis.
  (org-babel-exp-lob-one-liners): Cleaner checking for escaped call
  lines.
2011-06-28 13:04:57 -07:00
Nicolas Goaziou cc76e76509 org-list: fix bug with item cycling
* lisp/org-list.el (org-cycle-item-indentation): cycling back to
  original position deleted any additional information in the item,
  like a counter or a tag.
2011-06-28 20:26:49 +02:00
Nicolas Goaziou c4086ad1e4 org-list: doc-strings white-spaces fixes 2011-06-28 20:26:49 +02:00
Bastien Guerry f9cc3f525b org.el: make org-time-stamp also keep warning periods.
... not only repeaters.

Thanks to Karl Voit for spotting this.
2011-06-28 19:27:12 +02:00
Laurence Mitchell 8d93fc8a3b lisp/org-latex.el: Convert quotes to their LaTeX equivalents
Convert quotes to their LaTeX equivalents using
org-export-latex-quotation-marks.
2011-06-28 19:18:02 +02:00
Bastien Guerry ed8627de92 Fix binding problem in org-without-partial-completion.
Thanks to Paul Sexton for spotting this.
2011-06-28 18:47:56 +02:00
Pieter Praet 7bae223536 org-crypt: make org-decrypt disable auto-save-mode (configurable)
As auto-save-mode can only cause leakage when there's actual decrypted
data lying around, don't check for it (and potentially cause annoyance)
on init, but only when org-decrypt-entry is called.

* lisp/org-crypt.el:
  - add defcustom `org-crypt-disable-auto-save'
  - `org-decrypt-entry': before decrypting, check whether
    `auto-save-mode' is enabled for the current buffer, and act
    on it according to how `org-crypt-disable-auto-save' is set.
  - remove comment re "encrypt[ing] Org auto-saved buffers"
  - remove on-init check for `auto-save-default'
2011-06-28 12:04:16 +02:00
Eric Schulte 27c3cad589 ob: preserve the order of variable parameters
* lisp/ob.el (org-babel-merge-params): Ensure variable parameters are
  not reversed.

* lisp/ob-ref.el (org-babel-ref-split-args): Ensure variable
  parameters are not reversed.
2011-06-27 11:31:12 -07:00
Eric Schulte d1f0ae650f ob: fix results insertion for inline blocks which happen to start a line
* lisp/ob.el (org-babel-insert-result): Fix results insertion for
  inline blocks which happen to start a line.
2011-06-27 10:36:27 -07:00
Eric Schulte acec7eb7c3 ob-lob: fix the logic checking if a call line is commented
* lisp/ob-exp.el (org-babel-exp-lob-one-liners): Fix the logic
  checking if a call line is commented.
2011-06-27 10:36:27 -07:00
Bastien Guerry d7c693c1ff org.el: fix bug about repeater not kept when using org-time-stamp
Thanks to Karl Voit for reporting this.
2011-06-27 18:22:37 +02:00
Vincent Belaïche 6d18e03519 * org.el (org-read-property-name): Propose default property name.
Propose default property name value by looking at whether current line
is already some property setting.
2011-06-27 12:35:08 +02:00
Achim Gratz d37223562d Introduce CLOCK_INTO_DRAWER property like the existing LOG_INTO_DRAWER
* lisp/org.el (defcustom org-log-into-drawer): correct typo
* lisp/org-clock.el: new function org-clock-into-drawer to change
  the location of clock events based on properties CLOCK_INTO_DRAWER
  or, as fallback, LOG_INTO_DRAWER, like it is already possible for
  state change logs.
* lisp/org-clock.el (org-clock-jump-to-current-clock): add statement
  to let clause to bind org-clock-into-drawer to result of function
  eval
* lisp/org-clock.el (org-clock-find-position): add statement
  to let clause to bind org-clock-into-drawer to result of function
  eval, change let to let* since the binding is used later in the
  same clause
* doc/org.texi: document that both CLOCK_INTO_DRAWER and
  LOG_INTO_DRAWER can be used to override the contents of variable
  org-clock-into-drawer (or if unset, org-log-into-drawer)
* doc/org.texi: @xref->@pxref
2011-06-27 12:12:23 +02:00
Eric Schulte 85cabe1eab ob-lob: ensure 'cl is loaded during compilation so we can use flet
* lisp/ob-lob.el (require): Ensure 'cl is loaded during compilation so
  we can use flet.
2011-06-26 17:13:18 -07:00
Eric Schulte 4e0387a766 ob-lob: correctly indent results of non-inline call lines.
* lisp/ob-lob.el (org-babel-lob-get-info): Correctly indent results of
  non-inline call lines.
2011-06-25 17:56:40 -07:00
Eric Schulte dceaf7da4f ob-exp: don't export inline call_ blocks which aren't whitespace padded
* lisp/ob-exp.el (org-babel-exp-lob-one-liners): Don't export inline
  call_ blocks which aren't whitespace padded.
2011-06-25 17:45:06 -07:00
Eric Schulte 9e686bd681 ob: ensure that un-named variables are assigned correctly
* lisp/ob.el (org-babel-merge-params): Do not reverse variable order,
  and be sure to increment variable index as appropriate.
2011-06-25 15:20:05 -07:00
Eric Schulte 7cfca9a969 ob-lob: fixed problem in inline call line regexp
* lisp/ob-lob.el (org-babel-inline-lob-one-liner-regexp): Updated to
  successfully match optional trailing header arguments in square
  brackets.
  (org-babel-lob-get-info): Updated to match the new regexp.
2011-06-25 15:06:28 -07:00
Eric Schulte 36164f0607 ob: fix empty-argument bug introduced by recent inline call lines
* lisp/ob-lob.el (org-babel-lob-get-info): If the arguments are empty,
  then allow them to be so.
2011-06-25 14:25:18 -07:00
Eric Schulte 1b95d2e9ce ob: unnamed variables are assigned in order
* lisp/ob.el (org-babel-merge-params): If variables are not named they
  are assigned in order.
2011-06-25 14:11:53 -07:00
Eric Schulte 4127e53cda ob: remove code comments pointing to online documentation
* lisp/ob.el: Remove code comment about online documentation.
* lisp/ob-exp.el: Remove code comment about online documentation.
* lisp/ob-lob.el: Remove code comment about online documentation.
2011-06-25 13:17:31 -07:00
Jambunathan K 7adb6675d7 org-export-format-source-code-or-example: Fix commit f0177f (org-odt)
* lisp/org-exp.el (org-export-format-source-code-or-example):
Fix signature of org-<backend>-format-source-code-or-example
function.
2011-06-25 10:53:14 +02:00
Eric Schulte 3d60c1a1d8 ob: replace call to called-interactively-p with backwards-compatible interactive-p
* lisp/ob.el (org-babel-sha1-hash): Replace call to
  called-interactively-p with backwards-compatible interactive-p.
2011-06-24 19:48:10 -07:00
Eric Schulte 5c3def4713 ob: export of inline call blocks
* lisp/ob-exp.el (org-babel-exp-lob-one-liners): Appropriate
  replacement of inline call blocks with their results.
2011-06-24 15:16:11 -07:00
Eric Schulte 6c771d236d ob: inserting inline call block results appropriately
* lisp/ob-lob.el (org-babel-inline-lob-one-liner-regexp): Removing
  this trailing space ensures that the insertion of the results looks
  nice.
* lisp/ob.el (org-babel-insert-result): Insert inline lob line results
  as inline results.
2011-06-24 14:53:30 -07:00
Eric Schulte 825f6d382d ob-exp: introducing inline call lines to the export engine
* lisp/ob-exp.el (org-babel-exp-lob-one-liners): Calculate length
  appropriately given the style (block or inline) of the lob line.
* lisp/ob-lob.el (org-babel-block-lob-one-liner-regexp): New regexp
  specific for block lob lines.
  (org-babel-inline-lob-one-liner-regexp): New regexp specific for
  inline lob lines.
  (org-babel-lob-one-liner-regexp): Combination of two lob regexps.
  (org-babel-lob-get-info): Return info from *either* the block or
  inline lob lines.
2011-06-24 14:44:28 -07:00
Eric Schulte 6323bbded9 ob-exp: fixed a bug in exportation of #+call lines
* lisp/ob-exp.el (org-babel-exp-lob-one-liners): Corrected the
  structure of the resulting info list.
* lisp/ob-lob.el (org-babel-default-lob-header-args): Export the
  results of call lines by default.
2011-06-24 13:53:25 -07:00
Niels Giesen d3100fd13f * lisp/org-icalendar.el (org-print-icalendar-entries): Add 'uid text
property based on the ID property of the org entry to the first
  character of the diary entry.

This text property can be used by `icalendar--create-uid', instead
of creating a uid by itself.

NOTE: `icalendar--create-uid' should be patched to pick up this uid.

TINYCHANGE
2011-06-24 17:22:24 +02:00
Bastien Guerry dad5a348ad org-crypt.el: reduce the warning time from 5 to 1 second. 2011-06-24 12:53:19 +02:00
Carsten Dominik 95fa250e60 Merge branch 'Jambu' 2011-06-24 10:03:11 +02:00
Carsten Dominik 67893d3158 Declare a function to keep compiler happy 2011-06-24 06:47:32 +02:00
Jambunathan K fd2e471a6f Control insertion point for footnote definitions during pre-process
PATCH-5/5 org-odt compatibility patch

From 22c4feee78ff9a1ab7cc48275ec29d322a3472a1 Mon Sep 17 00:00:00 2001
From: Jambunathan K <kjambunathan@gmail.com>
Date: Thu, 23 Jun 2011 13:17:18 +0530
Subject: [PATCH 5/5] Control insertion point for footnote definitions during pre-process.

* lisp/org-footnote.el
(org-footnote-insert-pos-for-preprocessor): New variable.
(org-footnote-normalize): Use it.
2011-06-23 23:10:45 +02:00
Jambunathan K 01c2f06ea4 Simplify org-export-format-source-code-or-example
PATCH-4/5 org-odt compatibility patch

Addtional Note: Diff looks primarily because of
un-indentation. Effective changes are just couple of lines.

From 923402f12f30a39d54e16c0b105db2b1f20c2a7c Mon Sep 17 00:00:00 2001
From: Jambunathan K <kjambunathan@gmail.com>
Date: Thu, 23 Jun 2011 12:06:33 +0530
Subject: [PATCH 4/5] Simplify org-export-format-source-code-or-example.

* lisp/org-exp.el (org-export-format-source-code-or-example):
Simplify. Also add `org-native-text' as a text property to the
formatted text and throw error for unknown backends.
2011-06-23 23:10:24 +02:00
Jambunathan K f0177f4a11 Support custom formatters for marking up source or example blocks
PATCH-3/5 org-odt compatibility patch

From a7881b8d146ddb27452b00ff19c345899d356536 Mon Sep 17 00:00:00 2001
From: Jambunathan K <kjambunathan@gmail.com>
Date: Thu, 23 Jun 2011 11:24:32 +0530
Subject: [PATCH 3/5] Support custom formatters for marking up source or example blocks.

* lisp/org-exp.el (org-export-format-source-code-or-example):
Add support for:
- custom formatters for existing backends
- seamless plugging in of new backends.
2011-06-23 23:10:09 +02:00
Jambunathan K 67da474db5 org-exp.el: Allow easy plugging in of new backends
PATCH-2/5: org-odt compatibility

From 2bc4854fb86a96b69e53db00603e0b2f8f47fe08 Mon Sep 17 00:00:00 2001
From: Jambunathan K <kjambunathan@gmail.com>
Date: Thu, 23 Jun 2011 02:16:30 +0530
Subject: [PATCH 2/5] org-exp.el: Allow easy plugging in of new backends.

* lisp/org-exp.el (org-export-backends): New variable.
(org-export-select-backend-specific-text): Use above
variable. Also mark text between #+BACKEND and
#+BEGIN_BACKEND...#+END_BACKEND with org-native-text
property. This text property is currently used only by the new
line-oriented generic exporter (which is not yet part of the
repo).
2011-06-23 23:09:53 +02:00
Jambunathan K aca61a173c org-export: Reserve a slot for OpenDocumentExporter
PATCH-1/5 for org-odt compatibility

From 06379ccef996e8dabd8dcced6cbe430aacdef3f0 Mon Sep 17 00:00:00 2001
From: Jambunathan K <kjambunathan@gmail.com>
Date: Thu, 23 Jun 2011 01:53:37 +0530
Subject: [PATCH 1/5] org-export: Reserve a slot for OpenDocumentExporter.

* lisp/org-exp.el (org-export): Reserve keys 'o' and 'O' for
OpenDocumentText export and bind them to org-export-as-odt and
org-export-as-odt-and-open.
2011-06-23 23:09:35 +02:00
Eric Schulte 40d80baa1b ob-exp: less verbose when in batch mode
* lisp/ob-exp.el (org-babel-exp-src-block): Less verbose when in batch
  mode.
2011-06-22 19:12:20 -07:00
Eric Schulte 93bcee0f98 ob-clojure: treat vectors as elisp lists
* lisp/ob-clojure.el (org-babel-execute:clojure): Convert vectors to
  lists before reading into emacs-lisp.
2011-06-21 15:45:19 -07:00
Eric Schulte 4a0e5cf88f initialize variable from ob-tangle in language files that use it
* lisp/ob-C.el (ob-tangle): initialize variable from ob-tangle.
* lisp/ob-asymptote.el (ob-tangle): initialize variable from ob-tangle.
* lisp/ob-awk.el (ob-tangle): initialize variable from ob-tangle.
* lisp/ob-clojure.el (ob-tangle): initialize variable from ob-tangle.
* lisp/ob-haskell.el (ob-tangle): initialize variable from ob-tangle.
* lisp/ob-latex.el (ob-tangle): initialize variable from ob-tangle.
* lisp/ob-lisp.el (ob-tangle): initialize variable from ob-tangle.
* lisp/ob-ocaml.el (ob-tangle): initialize variable from ob-tangle.
* lisp/ob-perl.el (ob-tangle): initialize variable from ob-tangle.
* lisp/ob-python.el (ob-tangle): initialize variable from ob-tangle.
* lisp/ob-ruby.el (ob-tangle): initialize variable from ob-tangle.
* lisp/ob-tangle.el (ob-tangle): initialize variable from ob-tangle.
2011-06-21 15:45:19 -07:00
Carsten Dominik e860e08e58 Merge branch 'master' of orgmode.org:org-mode 2011-06-21 20:07:08 +02:00
Eric Schulte 3f3fc513b7 ob-emacs-lisp: respects ":results verbatim"
* lisp/ob-emacs-lisp.el (org-babel-execute:emacs-lisp): Respects ":results verbatim".
2011-06-21 10:38:11 -07:00
Carsten Dominik 6413de8e91 Introduce alias for diary-float
* lisp/org-agenda.el (org-float): Aliases for `diary-float'.

This is just to make sure that all the diary sexp functions
have org- equivalents.  org-float is just an alias because no
arguments need to be switched around.
2011-06-21 15:43:14 +02:00
Eric Schulte 56de599c00 ob-python: Send RET after every line w/session evaluation
* lisp/ob-python.el (org-babel-python-evaluate-session): Send
  comint-send-input after every line when interacting with an
  interactive python process.
2011-06-20 19:18:59 -07:00
Nicolas Goaziou a0bc3bdebc org-list: fix update of check-boxes cookies in whole trees
* lisp/org-list.el (org-reset-checkbox-state-subtree): make the
  command more robust, and correctly update check-boxes in the whole
  sub-tree.
(org-update-checkbox-count): fix bug accumulating count of checkboxes
when walking a subtree.
(org-update-checkbox-count-maybe): add an optional argument passed to
org-update-checkbox-count.

Thanks to Paul Mead for the report.
2011-06-20 21:59:58 +02:00
Bastien Guerry 8608b6651d Fix doubled-word typo.
Thanks to Jim Meyering <jim@meyering.net> for this upstream fixes.
2011-06-20 15:38:24 +02:00
Ted Zlatanov b3aad7ffa8 Do not error out on fontification errors
* org.el (org-fontify-meta-lines-and-blocks): Ignore errors.

Signed-off-by: Julien Danjou <julien@danjou.info>
2011-06-20 11:23:44 +02:00
Eric Schulte adf16ffdd7 ob-emacs-lisp: respect the ":results scalar" header argument combination
* lisp/ob-emacs-lisp.el (org-babel-execute:emacs-lisp): Respect the
  ":results scalar" header argument combination.
2011-06-19 16:06:55 -07:00
Dan Davison 4f3a31dd97 Fix a bug in in-buffer src fontification
* lisp/org-src.el: Append a space character to copied text so that the
                   final text property change is picked up correctly
2011-06-17 16:51:29 -07:00