Commit Graph

6486 Commits

Author SHA1 Message Date
Eric Schulte 832dc71f31 ob-lob: now working with the new ob-get-src-block-info
ob-get-src-block-info wasn't correctly returning the name of the
  code block

* lisp/ob-lob.el (org-babel-lob-ingest): now returns the count of
  ingested code blocks

* lisp/ob.el (org-babel-get-src-block-info): walks up possible
  additional header arg lines before checking for the code block name

  (org-babel-merge-params): can now handle empty variables gracefully
2010-10-21 13:06:00 +01:00
Eric Schulte 3ab7f12792 org-test is now ready for the newyears 2010-10-21 13:06:00 +01:00
Eric Schulte 9931dae20a babel: exporting now working with the new ob-get-src-block-info schema
includes a simple export test

* lisp/ob-exp.el (org-babel-exp-in-export-file): wrapper for
  collecting information from within the original export file

  (org-babel-exp-src-blocks): simplified through use of the above
  macro

  (org-babel-exp-code): simplified through the use of new functions
  for parsing header arguments

  (org-babel-exp-results): simpler high-level organization, also this
  is now where the expansion of variable references takes place during
  export

* lisp/ob.el (org-babel-expand-variables): broke variable replacement
  in a parameter list into it's own function

  (org-babel-get-src-block-info): now using the above function
2010-10-21 13:05:59 +01:00
Eric Schulte 9ba9ef99a6 babel: now allows multi-line header arguments with #+headers: before code block
for example, from the test of this functionality
* multi-line header arguments
  :PROPERTIES:
  :ID:       b77c8857-6c76-4ea9-8a61-ddc2648d96c4
  :END:

  (map 'list #'list numbers letters)

| 1 | a |
| 2 | b |
| 3 | c |
| 4 | d |
| 5 | e |
| 6 | f |
| 7 | g |

* lisp/ob.el (org-babel-multi-line-header-regexp): new variable for
  matching header lines preceding code blocks

  (org-babel-src-name-w-name-regexp): now includes possible header
  lines between source name and code block

  (org-babel-get-src-block-info): now also collecting header arguments
  from preceding header lines

  (org-babel-src-block-names): updated match-string to reflect new
  value of org-babel-src-name-w-name-regexp

  (org-babel-merge-params): fixed error in variable string regexp
2010-10-21 13:05:59 +01:00
Eric Schulte 05054d5227 ensure ob-get-src-block-info returns nil if not matches
* lisp/ob.el (org-babel-get-src-block-info): small but crucial fix,
  this should return nil if not match found
2010-10-21 13:05:59 +01:00
Eric Schulte 3d2aec3588 adding simple test of variable resolution 2010-10-21 13:05:59 +01:00
Eric Schulte a9f3c9fe11 now using newer version of jump.el -- run $ git submodule update 2010-10-21 13:05:59 +01:00
Eric Schulte 529e7c98fd nominally working 2010-10-21 13:05:59 +01:00
Eric Schulte 9c0aae1814 more lightening -- resolving foreign functions between ob-ref and ob 2010-10-21 13:05:59 +01:00
Eric Schulte 539c804457 ob-emacs-lisp: whitespace cleanup <=80 columns
* lisp/ob-emacs-lisp.el (org-babel-expand-body:emacs-lisp): whitespace
  (org-babel-execute:emacs-lisp): whitespace
2010-10-21 13:05:58 +01:00
Eric Schulte c2dce939e8 more lightening 2010-10-21 13:05:58 +01:00
Dan Davison 07b45a64f2 Missing parenthesis 2010-10-21 13:05:58 +01:00
Dan Davison a06ea76c53 babel: Provide missing docstrings
* ob-sh.el (org-babel-sh-variable-assignments):
	Provide missing docstring
	* ob-python.el (org-babel-python-variable-assignments):
	Provide missing docstring
2010-10-21 13:05:58 +01:00
Dan Davison a59c4d7896 babel: octave: Fix variable assignments made by `org-babel-prep-session:octave'
* ob-octave.el (org-babel-expand-body:octave): Refactor: break variable
    assignment part out into a separate function
    (org-babel-octave-variable-assignments): New function constructing
    list of variable assignment statements
    (org-babel-prep-session:octave): Use new function
    `org-babel-octave-variable-assignments' instead of previous
    (incorrect) variable assignment code.
2010-10-21 13:05:58 +01:00
Dan Davison 8e151c066e babel: sh: Fix variable assignments made by `org-babel-prep-session:sh'
* ob-sh.el (org-babel-expand-body:sh): Refactor: break variable
    assignment part out into a separate function
    (org-babel-sh-variable-assignments): New function constructing
    list of variable assignment statements
    (org-babel-prep-session:sh): Use new function
    `org-babel-sh-variable-assignments' instead of previous
    (incorrect) variable assignment code.
2010-10-21 13:05:58 +01:00
Dan Davison 24a5f8b4e5 babel: python: Fix variable assignments made by `org-babel-prep-session:python'
* ob-python.el (org-babel-expand-body:python): Refactor: break variable
    assignment part out into a separate function
    (org-babel-python-variable-assignments): New function constructing
    list of variable assignment statements
    (org-babel-prep-session:python): Use new function
    `org-babel-python-variable-assignments' instead of previous
    (incorrect) variable assignment code.
2010-10-21 13:05:58 +01:00
Dan Davison 1bc914cd7a babel: R: Fix variable assignments made by `org-babel-prep-session:R'
* ob-R.el (org-babel-expand-body:R): Refactor: break variable
    assignment part out into a separate function
    (org-babel-R-variable-assignments): New function constructing
    list of variable assignment statements
    (org-babel-prep-session:R): Use new function
    `org-babel-R-variable-assignments' instead of previous
    (incorrect) variable assignment code.
2010-10-21 13:05:58 +01:00
Dan Davison 21e6738593 babel: Better variable names in `org-babel-initiate-session'
* ob.el (org-babel-initiate-session): Better variable names
2010-10-21 13:03:36 +01:00
Dan Davison 68b810dab5 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-10-21 13:03:09 +01:00
Eric Schulte e290e9e2f4 fixed some compilation warnings
* lisp/ob.el (org-number-sequence): declared
* lisp/ob-R.el (org-number-sequence): declared
2010-10-20 14:49:41 -06:00
Bastien Guerry 4cd56cfa7b org.texi: add a menu description. 2010-10-20 14:10:46 +02:00
Christian Egli 9542f8fa98 Fix an error in org-taskjuggler-get-unique-id
Don't try to pop from an empty list and downcase the result
2010-10-20 14:07:17 +02:00
Dan Davison 92531f3049 typo in variable name: org-inlinetask-defaut-state 2010-10-20 14:06:59 +02:00
Andreas Röhler 3829447296 20101020_texi-command-names.patch
BTW can't see where the meaning of key "S" is told...

Cheers
2010-10-20 14:05:43 +02:00
Carsten Dominik 33f947dcb5 Fix typos 2010-10-20 07:36:48 +02:00
Dan Davison ba9236054a babel: Bug fix in `org-babel-map-src-blocks'
* ob.el (org-babel-map-src-blocks): Store correct value of `end-block'
2010-10-19 13:20:35 +01:00
Dan Davison a6d30d3b9b babel: New function to mark the body of a src block.
* ob.el (org-babel-mark-block): New function to mark the body
    of a src block in the style of `mark-defun'.

    * ob-keys.el (org-babel-key-bindings): Bind
    `org-babel-mark-block' to C-c C-v C-M-h
2010-10-19 13:19:33 +01:00
Carsten Dominik c5a8bc9db4 Improve XEmacs compatibility
* lisp/org-compat.el (org-number-sequence): New function.
* lisp/ob-R.el (org-babel-expand-body:R): Use `org-number-sequence'.
* lisp/ob.el (org-babel-where-is-src-block-result): Use `org-number-sequence'.
(org-babel-current-buffer-properties): Fix variable definition.
* lisp/ob-ref.el (org-babel-ref-index-list): Use `org-number-sequence'.
* lisp/ob-latex.el (org-babel-latex-tex-to-pdf): Use the 2-argument version
of `shell-command'.
* lisp/org-latex.el (org-export-as-pdf): Use the 2-argument version
of `shell-command'.
2010-10-18 14:23:38 +02:00
Carsten Dominik 7335254531 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-10-18 12:36:27 +02:00
Thomas S. Dye 0cb3c523df documentation patch, Babel header arguments 2010-10-17 16:27:57 -06:00
Carsten Dominik c41409c530 Enhance XEmacs compatibility
* lisp/org-list.el (org-list-search-unenclosed-generic): Replace call
to booleanp.

* lisp/org-compat.el (org-decompose-region): New defsubst.
* lisp/org.el (org-toggle-pretty-entities):
(org-unfontify-region): Use `org-decompose-region'.
2010-10-17 18:39:26 +02:00
Andreas Röhler 217ceb8983 command-name org-insert-heading-respect-content
Hi Carsten,

herewith a first patch continuing command-name insertion (should be sent
already but seems not).
As the remaining has to be done manually, several patches will result.
Maybe consider granting write-access.

Cheers

Andreas

--
https://code.launchpad.net/~a-roehler/python-mode/python-mode-components
https://code.launchpad.net/s-x-emacs-werkstatt/
2010-10-17 18:11:31 +02:00
Carsten Dominik c9bb51e883 Make it configurable wether agenda jumping prefers the future
* lisp/org.el (org-agenda-jump-prefer-future): New option.
* lisp/org-agenda.el (org-agenda-goto-date): Use
`org-agenda-jump-prefer-future'.
2010-10-17 08:32:23 +02:00
Carsten Dominik c40247d4dd Document :HTML_CONTAINER_CLASS: property
* doc/org.texi (CSS support): Document :HTML_CONTAINER_CLASS: property
2010-10-17 07:53:48 +02:00
Noorul Islam f5918bdcc0 LaTeX export: use org-export-latex-hyperref-format
* lisp/org-latex.el (org-export-latex-links) : Replaced hard coded
hyperref format with custom
  variable `org-export-latex-hyperref-format'

On Sat, Oct 16, 2010 at 3:32 PM, Guy Wiener <wiener.guy@gmail.com> wrote:
> I found the following weird thing in org-latex, and I think it is a bug:
> The customization option "org-export-latex-hyperref-format" is suppose to
> render links to hyperrefs in the exported tex file. However, in
> org-latex.el, lines 1889 and 1892, the string "\\hyperref[%s]{%s}" is
> hard-coded, so that the link export format is not reallycustomizable. I
> replaced this string with the custom variable and the option works as
> expected - I.e., changing the option chanced the format of exported links.

Looks like commit cae0c63c48 has introduced
new customizable variable org-export-latex-hyperref-format but left
out some places
in the code to be replaced. Attached is the patch.

Log:

Found by  Guy Wiener <wiener.guy@gmail.com>

Thanks and Regards
Noorul
2010-10-17 07:39:34 +02:00
Carsten Dominik df5894cdcb Fix docstring of `org-insert-heading'
* lisp/org.el (org-insert-heading): Fix docstring.
2010-10-16 07:30:00 +02:00
Carsten Dominik 8820a25276 Fix typos 2010-10-16 07:19:00 +02:00
Carsten Dominik a2c342308d Fix placing capture items at beginning of buffer.
* lisp/org-capture.el (org-capture-place-entry): If the first
line is already a headline, just stay there.

Patch by THomas Fuchs.
TINYCHANGE

> I'm trying to capture and file an entry as an top-level entry as first entry

> in an org file without config at the beginning (no "#+").
> This leads to filing the entry as _second_ headline in the org file.

> The template is:
> ("z" "test" entry (file "~/Data/z.org") "* %^{Note} %t  :NOTE:\n %?"
> :prepend t)
>
> I think this is due to jumping over lines starting with "#+" at the
> beginning of the org file
> (line 715 in org-capture.el (org-capture-place-entry)).
> My file has no config header and starts with the first headline. Calling
> outline-next-heading
> in this situation leads to jumping to the second headline in the file.
2010-10-16 07:17:00 +02:00
Carsten Dominik 00171622f2 Add #+CATEGORY to the main index 2010-10-16 00:36:05 +02:00
Eric Schulte c9b017632e ob-sh: no longer fails on empty results
* lisp/ob-sh.el (org-babel-sh-evaluate): no longer assumes that
  results are non-nil
2010-10-15 09:25:33 -06:00
Eric Schulte 1ff357d59f removing old testing file as it can cause errors
the file testing/org-html.el will live on in the git VC history
2010-10-15 09:15:01 -06:00
Carsten Dominik b3c079e97b Start new file which describes maintainer tasks 2010-10-15 12:36:36 +02:00
Carsten Dominik 912ca55601 New Makefile target fixrelease to make a minor release from the maint branch 2010-10-15 12:13:32 +02:00
Carsten Dominik fd5acb3833 Fix the updateweb target 2010-10-15 11:58:35 +02:00
Carsten Dominik f66f0430d8 ASCII export: swallow {} after entity macro
* lisp/org-ascii.el (org-ascii-replace-entities): Match an optional {}
after an entity.
2010-10-15 09:39:42 +02:00
Carsten Dominik 935c310402 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-10-15 08:46:22 +02:00
Carsten Dominik 397880bcde Fix special character bug in `orgtbl-to-html'
* lisp/org-table.el (orgtbl-to-html): Apply `org-html-expand' to the
table fields.
2010-10-15 08:22:29 +02:00
Carsten Dominik b9105a5acf Fix typo 2010-10-15 07:55:06 +02:00
Carsten Dominik bf8d076bb5 When on the headline of an inline task, insert another inline tasks
* lisp/org.el (org-insert-heading): When on the headline of an inline
task, insert another inline tasks.
2010-10-15 07:51:54 +02:00
Eric Schulte d32c8d49e5 ob-tangle: only create links for blocks that will actually tangle
this commit includes a unit test

* lisp/ob-tangle.el (org-babel-tangle-collect-blocks): only create
  links for blocks that will actually tangle
2010-10-14 17:15:11 -06:00