0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-09-22 11:10:42 +00:00
Commit graph

5871 commits

Author SHA1 Message Date
Nicolas Goaziou 7e49b85c56 org-export: Cleanup #+name and #+results
* lisp/org-exp.el (org-export-res/src-name-cleanup): Remove #+name and
  #+results lines during preprocess.

Now Babel doesn't handle anymore those keywords cleanup (as #+name may
be used for other thing than code evaluation), that task is moved to
org-export.el.  See commit 25a0a02121.
2011-12-04 17:01:19 +01:00
Eric Schulte 33d764f24e fix compiler warnings in ob-picolisp
* lisp/ob-picolisp.el (ob-comint): Required.
  (comint): Required.
  (cl): Required.
  (run-picolisp): Declared.
  (org-babel-execute:picolisp): Capture free variable, and replace
  function from cl-extra with core function.
2011-11-29 09:16:14 -07:00
Eric Schulte 6cad241b0e moving ob-picolisp into the core
Thanks to Thorsten Jolitz for contributing support for this new
language.

* Makefile (LISPF): Add ob-picolisp to the Makefile.
* contrib/babel/langs/ob-picolisp.el: Remove from contrib.
* lisp/ob-picolisp.el: Add to core lisp directory.
* lisp/org.el (org-babel-load-languages): Add Pico Lisp to the list of
  supported code block languages.
2011-11-29 09:05:31 -07:00
Eric Schulte e902a75a23 improved warnings of bibtex errors during multi-headline export
* lisp/org-bibtex.el (org-bibtex): Now catches bibtex errors and
  directs the user to the location of the error.
2011-11-29 08:56:55 -07:00
Bastien Guerry 4916e1d401 org-agenda.el (org-agenda-dim-blocked-tasks): Fix typo.
* org-agenda.el (org-agenda-dim-blocked-tasks): Fix typo.

Thanks to Paul Eggert for spotting this and fixing it in Emacs trunk.
2011-11-28 15:24:50 +01:00
Bastien Guerry 90868e2d88 Fix typo fixed in Emacs trunk.
* ob.el (org-babel-execute-src-block): Fix typo.

Thanks to Juanma Barranquero for spotting this.
2011-11-28 15:13:04 +01:00
Bastien Guerry fcdeeb9101 Fix typos fixed in Emacs trunk.
* org-freemind.el (org-freemind-write-mm-buffer): Fix typo.

* org-colview.el (org-columns-edit-value) (org-columns-next-allowed-value):
  Fix typos.

* org-bibtex.el (org-bibtex-autogen-keys): Fix typo.

* org-clock.el (org-clock-special-range): Fix typo.

Thanks to Paul Eggert for these fixes.
2011-11-28 15:11:52 +01:00
Bastien Guerry fd94918e41 org.el: Fix two typos in docstrings.
* org.el (org-link-unescape, org-link-unescape-compound): Fix two
  typos in docstrings.
2011-11-28 15:07:49 +01:00
Thomas Dye 811f9160de * lisp/ob-R.el: Added tikzDevice support. 2011-11-28 00:07:46 -07:00
Jérémy Compostella 09982081b5 org-babel-exp-lob-one-liners should not parse the entire buffer.
The org-babel-exp-lob-one-liners search "call" pattern through the entire
buffer instead of the region given as arguments.
2011-11-25 09:32:11 -07:00
David Maus 4d312a07f5 Remove clocking information when preparing a clone
* org.el (org-clone-subtree-with-time-shift): Remove clocking
information and empty drawers when preparing a clone.

Fixes a regression introduced by
516b2fbb87, reported by Bernt Hansen in
http://article.gmane.org/gmane.emacs.orgmode/49385
2011-11-23 21:35:35 +01:00
Carsten Dominik c52c23fdfd Merge branch 'master' of orgmode.org:org-mode 2011-11-23 07:36:23 +01:00
Carsten Dominik 6107173c78 Require parse-time for `org-read-date-get-relative' 2011-11-23 07:36:07 +01:00
Eric Schulte 25a0a02121 no longer strip code and result names during block preprocessing
* lisp/ob-exp.el: Don't add `org-exp-res/src-name-cleanup' to
  `org-export-blocks-postblock-hook'.
2011-11-22 08:18:26 -07:00
Eric Schulte 1234afcc54 correctly toggle visibility of named code blocks
* lisp/ob.el (org-babel-hide-result-toggle): Skip over header argument
  lines when toggling named code block visibility.
2011-11-22 08:05:34 -07:00
Eric Schulte 0bd9981e0d Don't license to kill text inside blocks when getting a title
* lisp/org-exp.el (org-export-grab-title-from-buffer): Don't license
  to kill text inside blocks when getting a title.
2011-11-22 07:56:00 -07:00
Eric Schulte a998cae722 the :eval header argument now takes 4(6) possible values
* doc/org.texi (eval): Documenting the full range of :eval header
  argument values.
* lisp/ob.el (org-babel-confirm-evaluate): Adding support for new
  range of :eval header arguments.
* testing/lisp/test-ob.el (test-ob/eval-header-argument): Testing the
  :eval header argument.
2011-11-22 07:32:39 -07:00
Eric Schulte c166760fcc Revert "Revert "new babel latex feature :imagemagick -- By Andreas Leha""
This reverts commit c6f6b3421e.

Andreas has now signed the FSF copyright assignment papers.
2011-11-22 06:59:58 -07:00
Eric Schulte edef1fa5ca ":eval non-export" inhibits evaluation during export
* doc/org.texi (eval): Documentation of the new :eval option.
* lisp/ob.el (org-babel-confirm-evaluate): Inhibit evaluation during
  export when eval is set to "non-export".
2011-11-21 18:19:45 -07:00
Eric Schulte 3693952e3b New option to update intermediate in-buffer results
* lisp/ob-ref.el (org-babel-update-intermediate): New custom variable.
  (org-babel-ref-resolve): Optionally update the in-buffer results of
  code blocks which are evaluated to resolve references.
2011-11-21 10:02:39 -07:00
Eric Schulte 1b014d1cb2 Merge branch 'master' of orgmode.org:org-mode 2011-11-20 09:40:52 -07:00
Eric Schulte 82c0f9bf69 Allow spaces around "=" in code block variable specifications
* lisp/ob.el (org-babel-join-splits-near-ch): Rejoins a list of a
  split string when a character appears on either side of the split.
  (org-babel-parse-multiple-vars): Rejoin splits around "=" signs.
2011-11-20 09:40:08 -07:00
Eric Schulte 15417f67c4 Added a less functional Org-mode copy of the cl reduce function.
* lisp/org.el (org-reduce): Added a less functional Org-mode copy of
  the cl reduce function.
2011-11-20 09:38:54 -07:00
Nicolas Goaziou b5935f777e Fontify src blocks following a "name" keyword
* lisp/org.el (org-fontify-meta-lines-and-blocks-1): Recognize "name"
  as a valid keyword that can preceed a block.
2011-11-20 10:40:25 +01:00
Eric Schulte f55810593e don't try to evaluate #+call lines in verbatim blocks
* lisp/ob-exp.el (org-babel-exp-lob-one-liners): Don't limit
  in-verbatim check to inline code blocks, do lob code blocks as well.
* testing/lisp/test-ob-lob.el (test-ob-lob/do-not-eval-lob-lines-in-example-blocks-on-export):
  Test ensuring that #+call lines in verbatim blocks are not evaluated
2011-11-18 11:30:59 -07:00
Carsten Dominik 78f7382879 Merge branch 'master' of orgmode.org:org-mode 2011-11-17 18:06:20 +01:00
Carsten Dominik 773596e347 Use prefix arg 0 to inhibit note taking for TODO change
* lisp/org.el (org-todo): Interpret 0 prefix arg as note inhibitor.

Sometimes I want to quickly make a few TODOs done in the agenda and I
want to bypass the note taking I have normally set up.  With this
change, I can press `0 t d' in the agenda to do this.
2011-11-17 08:56:11 +01:00
Eric Schulte 7c21098323 Don't match partial names when resolving code or data references
* lisp/ob.el (org-babel-named-src-block-regexp-for-name): Ensure that
  partial names are not matched.
  (org-babel-named-data-regexp-for-name): Ensure that partial names
  are not matched.
* testing/lisp/test-ob.el (test-ob/do-not-resolve-to-partial-names-data):
  Test to ensure that partial names are not matched.
2011-11-16 06:15:31 -07:00
Eric Schulte 19884ab280 resolve named code blocks before named data
* lisp/ob-ref.el (org-babel-ref-resolve): Search for named code blocks
  before named data.
* lisp/ob.el (org-babel-named-data-regexp-for-name): New function for
  finding named data.
* testing/lisp/test-ob.el (test-ob/resolve-code-blocks-before-data-blocks):
  Test to ensure that named references are resolved in the correct
  order.
2011-11-15 20:13:41 -07:00
Eric Schulte 8114cf2bc4 Gracefully handle results which are neither lists nor strings.
* lisp/ob.el (org-babel-insert-result): Gracefully handle results
  which are neither lists nor strings.
2011-11-15 15:30:35 -07:00
Eric Schulte c21692506d fix bug missing references to example blocks
* lisp/ob-ref.el (org-babel-ref-resolve): Don't change location when
  looking at the contents.
* testing/lisp/test-ob.el (test-ob/catches-all-references): Test
  enforcing the correct behavior.
2011-11-15 11:18:26 -07:00
Milan Zamazal a5ed98e452 Create visibility overlays properly
* org.el (org-set-outline-overlay-data): Use outline-flag-region to make a
region invisible.  This ensures all necessary actions, especially adding
isearch-open-invisible property, are applied.
2011-11-15 18:39:57 +01:00
Eric Schulte 4f7e1fb108 fix compilation warning
* lisp/ob-lob.el (org-babel-in-example-or-verbatim): Fix compilation
  warning.
2011-11-15 08:56:26 -07:00
Eric Schulte 83dfaa5c8f named code blocks are replaced with their results
* lisp/ob.el (org-babel-find-named-result): Downcase "name" before comparison.
* testing/lisp/test-ob.el (test-ob/does-not-replace-a-block-with-the-results):
  Test that named code blocks are replaced with their results.
2011-11-15 08:56:25 -07:00
Eric Schulte 16e4e9b5cc fix typo
* lisp/ob-lisp.el (org-babel-execute:lisp): Fixed typo.
  (org-babel-lisp-vector-to-list): Fixed typo.
2011-11-15 08:56:25 -07:00
Eric Schulte 1ed12cac1a passing all tests after code block syntax changes
* lisp/ob-exp.el (org-babel-in-example-or-verbatim): Some valid
  execution contexts (e.g., call lines) look like commented lines.
* lisp/ob.el (org-babel-get-src-block-info): Empty match string
  doesn't count.
  (org-babel-process-params): Always process parameters, even if you
  don't to table splitting.
* testing/lisp/test-ob-C.el (ob-C/table): Ignore failures for this C
  test.
* testing/lisp/test-ob-fortran.el (ob-fortran/input-var): Ignore
  failures for this fortran test.
2011-11-15 08:56:24 -07:00
Eric Schulte 3af89e696a property names ending in plus accumulate
This results in the following behavior.

  #+property: var  foo=1
  #+property: var+ bar=2

  #+begin_src emacs-lisp
    (+ foo bar)
  #+end_src

  #+results:
  : 3

  #+begin_src emacs-lisp
    (org-entry-get (point) "var" t)
  #+end_src

  #+results:
  : foo=1 bar=2

  * overwriting a file-wide property
    :PROPERTIES:
    :var:      foo=7
    :END:

  #+begin_src emacs-lisp
    foo
  #+end_src

  #+results:
  : 7

  #+begin_src emacs-lisp
    (org-entry-get (point) "var" t)
  #+end_src

  #+results:
  : foo=7

  * appending to a file-wide property
    :PROPERTIES:
    :var+:      baz=3
    :END:

  #+begin_src emacs-lisp
    (+ foo bar baz)
  #+end_src

  #+results:
  : 6

  #+begin_src emacs-lisp
    (org-entry-get (point) "var" t)
  #+end_src

  #+results:
  : foo=1 bar=2 baz=3

* lisp/org.el (org-update-property-plist): Updates a given property
  list with a property name and a property value.
  (org-set-regexps-and-options): Use org-update-property-plist.
  (org-entry-get): Use org-update-property-plist.
* testing/examples/property-inheritance.org: Example file for testing
  appending property behavior.
* testing/lisp/test-property-inheritance.el: Tests of appending
  property behavior.
* lisp/ob.el (org-babel-balanced-split): Allow splitting on single
  characters as well as groups of two characters.
  (org-babel-parse-multiple-vars): Split variables on single spaces.
2011-11-15 08:56:24 -07:00
Eric Schulte 7e93b90f88 Standardized code block keywords
Nick Dokos <nicholas.dokos@hp.com> writes:

> Eric Schulte <schulte.eric@gmail.com> wrote:
>
>> The attached updated patch fixes a bug in the original.
>>
>
> Minor problem in applying:
>
> ,----
> | $ git apply ~/Mail/inbox/724
> | /home/nick/Mail/inbox/724:671: trailing whitespace.
> | #+name:
> | /home/nick/Mail/inbox/724:599: new blank line at EOF.
> | +
> | warning: 2 lines add whitespace errors.
> `----

The attached version fixes these issues, Thanks -- Eric

>From 0e43d59ee8d46a63f86780a502de726271bc39de Mon Sep 17 00:00:00 2001
From: Eric Schulte <schulte.eric@gmail.com>
Date: Fri, 28 Oct 2011 10:44:21 -0600
Subject: [PATCH] removing code block, results and call-line synonyms -- BREAKING CHANGE

Following a round of on-list discussion many code block synonyms have
been removed, moving forward the following syntax is valid.

- call lines are specified with #+call:
- code blocks are named with #+name:
- results are named with #+name:, however results generated by a code
  block may still be labeled with #+results:, and tables named with
  #+tblname: will be considered to be named results

The following function may be used to update an existing Org-mode
buffer to the new syntax.

  (defun update-org-buffer ()
    "Update an Org-mode buffer to the new data, code block and call line syntax."
    (interactive)
    (save-excursion
      (flet ((to-re (lst) (concat "^[ \t]*#\\+" (regexp-opt lst t)
                                  "\\(\\[\\([[:alnum:]]+\\)\\]\\)?\\:[ \t]*"))
             (update (re new)
                     (goto-char (point-min))
                     (while (re-search-forward re nil t)
                       (replace-match new nil nil nil 1))))
        (let ((old-re (to-re '("RESULTS" "DATA" "SRCNAME" "SOURCE")))
              (lob-re (to-re '("LOB")))
              (case-fold-search t))
          (update old-re "name")
          (update lob-re "call")))))

Note: If an old version of Org-mode (e.g., the one shipped with Emacs)
      is installed on your system many of the important variables will
      be pre-defined with a defvar and *will not* have their values
      automatically updated, these include the following.
      - org-babel-data-names
      - org-babel-result-regexp
      - org-babel-src-block-regexp
      - org-babel-src-name-regexp
      - org-babel-src-name-w-name-regexp
      It may be necessary to either remove the source code of older
      versions of Org-mode, or to explicitly evaluate the ob.el file.

* lisp/ob-exp.el (org-exp-res/src-name-cleanup): Updated
  Documentation.
* lisp/ob-lob.el (org-babel-block-lob-one-liner-regexp): Updated
  regular expression.
  (org-babel-inline-lob-one-liner-regexp): Updated regular expression.
* lisp/ob-ref.el (org-babel-ref-resolve): Notice when something that
  looks like a data results may actually be a code block.
* lisp/ob-table.el: Updated documentation.
* lisp/ob.el (org-babel-src-name-regexp): Simplified regexp.
  (org-babel-get-src-block-info): Updated match strings.
  (org-babel-data-names): Simplified acceptable names.
  (org-babel-find-named-block): Indentation.
  (org-babel-find-named-result): Updated to not return a code block as
  a result.
* lisp/org.el (org-fontify-meta-lines-and-blocks-1): Removing
  references to old syntactic elements.
  (org-additional-option-like-keywords): Removing references to old
  syntactic elements.
* contrib/babel/library-of-babel.org: Updated to make use of the new
  syntax.
* testing/examples/babel-dangerous.org: Updated to make use of the new
  syntax.
* testing/examples/babel.org: Updated to make use of the new syntax.
* testing/examples/ob-awk-test.org: Updated to make use of the new
  syntax.
* testing/examples/ob-fortran-test.org: Updated to make use of the new
  syntax.
* testing/lisp/test-ob.el: Removed two bad tests which tested the
  literal values of old regular expressions rather than their
  behavior.
2011-11-15 08:56:24 -07:00
Carsten Dominik b43c1c621f Fix function call order in previous patch
* lisp/org-agenda.el (org-agenda-get-todos): Swap calls to `org-trim' and
`buffer-substring'.
2011-11-14 08:35:12 +01:00
Nicolas Goaziou 57caa09106 org-agenda: Do not break TODO list view with empty tasks
* lisp/org-agenda.el (org-agenda-get-todos): Prevent an error when
  encountering tasks with only the TODO keyword.
2011-11-14 00:43:02 +01:00
Nicolas Goaziou b13b3e30d7 Allow cdlatex expansions at a list item or an headline
* lisp/org.el (org-try-cdlatex-tab): Don't try to expand a LaTeX
environment when at an item or an headline, but allow LaTeX
fragments.
(org-cycle): Try to call `cdlatex-tab' before cycling item's or
headline's visibility, in order to catch LaTeX fragments within.

This patch is based on the report and work of Maik Beckmann.
2011-11-13 10:31:47 +01:00
Eric Schulte f48321a9ac Require a newline and spaces before a code block.
* lisp/org-exp-blocks.el (org-export-blocks-preprocess): Require a
  newline and spaces before a code block.
2011-11-11 14:17:57 -07:00
Eric Schulte 67a26e0141 execute call lines when executing an entire buffer
* lisp/ob-lob.el (org-babel-map-call-lines): Allow mapping of code
  over all call lines in a buffer.
* lisp/ob.el (org-babel-execute-buffer): Execute call lines when
  executing an entire buffer.
2011-11-09 14:35:04 -07:00
Eric Schulte 4cf9de5ea0 don't disassemble tables twice on export
* lisp/ob.el (org-babel-process-params): Don't disassemble tables
  twice.
2011-11-09 14:12:05 -07:00
Carsten Dominik 059e4bd5e3 Merge branch 'timestamps-without-dayname' 2011-11-09 19:18:02 +01:00
Carsten Dominik 278d5afa2f Allow time stampes without day name
* lisp/org-clock.el (org-clock-in):
(org-clock-find-position): Make space after date optional.
* lisp/org.el (org-set-regexps-and-options):
(org-ts-regexp):
(org-ts-regexp-both):
(org-ts-regexp1):
(org-ctrl-c-ctrl-c): Make `C-c C-c' on date fix the time stamp

* doc/org.texi (Creating timestamps): Document the effect of `C-c C-c'
on a timestamp.
2011-11-09 18:55:27 +01:00
Eric Schulte a4273cbe0e call lines are more careful about being in example or verbatim blocks
* lisp/ob-lob.el (org-babel-lob-execute-maybe): Don't execute a call
  inside a verbatim block.
* lisp/ob-exp.el (org-babel-in-example-or-verbatim): Check for example
  blocks.
2011-11-08 19:43:55 -07:00
Eric Schulte 7720786c41 fix whitespace errors 2011-11-08 13:52:11 -07:00
Litvinov Sergey fddd85a172 construct a table from the output of maxima code block
Please consider a patch to construct a table from the output of maxima
code block.

>From a0305117f4e793c93d7d10bc7aab04f96bd62e9c Mon Sep 17 00:00:00 2001
From: Litvinov Sergey <slitvinov@gmail.com>
Date: Sat, 1 Oct 2011 22:29:18 +0200
Subject: [PATCH] [ob-maxima] Construct a table from the output of the code block. Add
 ert tests.
2011-11-08 13:51:27 -07:00
Litvinov Sergey 8d3a4da034 Extend ob-maxima: add input variables and graphic output
* lisp/ob-maxima.el (org-babel-tangle-lang-exts): Maxima extension.
  (org-babel-maxima-expand): Add input variables and graphic output.
  (org-babel-execute:maxima): Add input variables and graphic output.
  (org-babel-maxima-var-to-maxima): Add input variables and graphic
  output.
  (org-babel-maxima-graphical-output-file): Add input variables and
  graphic output.
  (org-babel-maxima-elisp-to-maxima): Add input variables and graphic
  output.
* testing/examples/ob-maxima-test.org: Examples for new Maxima
  behavior.
2011-11-08 13:40:23 -07:00
Eric Schulte 6bbc3566f7 bring ob-fortran into the core -- FSF assignment completion
Thanks to Sergey Litvinov for contributing this language support!

* lisp/ob-fortran.el: Adding support for Fortran code blocks.
* Makefile (LISPF): Compile Fortran support.
* lisp/org.el (org-babel-load-languages): Adding fortran to this list.
2011-11-08 14:18:57 -07:00
Jambunathan K d293492f09 org-exp.el (org-export-push-to-kill-ring): Minor fix to docstring 2011-11-08 03:13:06 +05:30
Nicolas Goaziou d6898e589a org-footnote: Remove opportunity to have inline footnotes at beginning of line
* lisp/org-footnote.el (org-footnote-new): Cannot insert an inline
footnote at beginning of line anymore.
(org-footnote-at-reference-p): Don't recognize inline footnotes at
beginning of line.

It is technically possible to allow inline footnotes at beginning of
line, their syntax being different enough from standard references.
Though, after normalizing them, they will become standard footnotes
still at beginning of line, which will break them.
2011-11-06 14:14:36 +01:00
Nicolas Goaziou 2a58775d9e Correctly fontify headlines with special keywords
* lisp/org.el (org-set-font-lock-defaults): Fix small error in
  matching group that prevented fontification of keywords like
  org-comment-string and stars in headlines.
2011-11-03 21:23:59 +01:00
Carsten Dominik 4d2a5c97f2 Merge branch 'master' of orgmode.org:org-mode 2011-11-03 08:57:36 +01:00
Carsten Dominik 31d9fd44ac Make it possible to check before invisible edits
* lisp/org.el (org-catch-invisible-edits): New option.
(org-self-insert-command):
(org-delete-backward-char):
(org-delete-char): Call `org-check-before-invisible-edit'.
(org-check-before-invisible-edit): New function.
2011-11-03 08:57:26 +01:00
Suvayu Ali a081581693 Respect export options for subtree export title
* org-exp.el (org-solidify-link-text): Respect org-export-with-tags
  when forming the export title during subtree export.

TINY CHANGE
2011-11-02 11:15:46 +01:00
Nicolas Goaziou e31e89430a Globalize some variables to make them available in buffers not in Org mode
* lisp/org.el (org-heading-regexp, org-heading-keyword-regexp-format,
  org-heading-keyword-maybe-regexp-format): Globalize variables so
  they are accessible even in buffers not in Org mode.
2011-11-01 11:40:11 +01:00
David Maus a9559dc08a Don't use default-description if link description function is defined
* org.el (org-insert-link): Don't use default-description if a
`org-make-link-description-function' is defined.
2011-11-01 06:24:42 +01:00
Eric Schulte 8354fd9e0f Allow multi-line properties to be specified in property blocks
#+begin_property
    var foo=1,
        bar=2,
        baz=3,
        qux=4
  #+end_property
  #+begin_src emacs-lisp
    (+ foo bar baz qux)
  #+end_src

  #+results:
  : 10

* lisp/org.el (org-set-regexps-and-options): Use property blocks for
  multi-line properties.
2011-10-31 12:28:50 -06:00
Bastien Guerry b3e1e7320f org.el: Don't throw an error when editing takes place at the first point of the buffer.
* org.el (org-self-insert-command): Don't throw an error when
editing takes place at the first point of the buffer.

Thanks to Carsten Dominik for pointing this error.
2011-10-30 09:58:37 +01:00
Bastien Guerry d3370f1608 org.el: Unfold invisible region at point or right before point when editing.
* org.el (org-self-insert-command): Unfold invisible region at
point or right before point when editing.

Thanks to Suvayu Ali for discussing this.
2011-10-30 02:58:31 +02:00
Bastien Guerry 21eef3b137 org-faces.el (org-agenda-filter-tags): Use the 'modeline face as default.
* org-faces.el (org-agenda-filter-tags): Use the 'modeline face as
  default.
2011-10-30 01:36:59 +02:00
Bastien Guerry ae02e3f333 Merge branch 'master' of orgmode.org:org-mode 2011-10-29 15:01:10 +02:00
Bastien Guerry 97d107d981 org-html.el (org-html-expand): Return nil if STRING is nil.
* org-html.el (org-html-expand): Prevent a nil value for
STRING to return an error, just return nil.
2011-10-29 15:00:52 +02:00
Bastien Guerry 25bd31ae36 org-latex.el: Allow "/" character in the #+LaTeX_CLASS option.
* org-latex.el (org-export-latex-set-initial-vars): Allow "/"
character in the #+LaTeX_CLASS option.

Thanks to Richard Lewis for a request about this.
2011-10-29 14:43:52 +02:00
Nicolas Goaziou f2b3fe7318 org-footnote: Don't store text-properties of footnote definitions
* lisp/org-footnote.el (org-footnote-at-reference-p,
  org-footnote-at-definition-p): Don't store text-properties of footnote definitions.
2011-10-29 14:21:56 +02:00
Bastien Guerry b2408c0096 org-html.el: Bugfix: Convert special characters in some meta tag.
* org-html.el (org-export-as-html): Convert special characters
in meta tag "author", "date", "keyword" and "description".

Thanks to Pavel Panchekha for raising this issue.
2011-10-29 14:17:56 +02:00
Bastien Guerry ad09e1e036 org-capture.el: improve docstring for `org-capture-before-finalize-hook'.
* org-capture.el (org-capture-before-finalize-hook): Docstring
improvement: mention that the buffer is widened when this hook
is run.

Thanks to Paul for a suggestion about this.
2011-10-29 14:07:18 +02:00
Sebastien Vauban d85e0e35ec Don't output DIV preamble tags when contents is empty.
* org-html.el (org-export-as-html): Make sure the div for
preamble is not inserted when the preamble is empty.
2011-10-29 13:28:28 +02:00
Bastien Guerry 3267c69ccd Small improvements over the previous commit.
Use org-propertize instead of propertize and
use a better default for tags in the mode-line
when filtering.
2011-10-29 13:23:20 +02:00
Sebastien Vauban 639699518a Add custom face for highlighting tags used in agenda filtering.
* org-agenda.el (org-agenda-set-mode-name): Highlight tags
used for filtering (shown in the mode-line).

* org-faces.el: Add face `org-agenda-filter-tags'.
2011-10-29 13:19:41 +02:00
Eric Schulte 1134385a87 better handling of multiple-variable :var code block header arguments
* lisp/ob.el (org-babel-parse-multiple-vars): Trimming excess
  white space from split variables.
2011-10-28 13:58:33 -06:00
Nicolas Goaziou cfed6e9366 Add a way to search for a link search without impacting buffer visibility
* lisp/org.el (org-link-search): Add an optional argument preventing
  function from revealing context around match.
2011-10-28 17:36:14 +02:00
Bastien Guerry 728611fa77 Fix compiler warnings. 2011-10-28 17:26:22 +02:00
Bastien Guerry ef08850783 * org-agenda.el (calendar-check-holidays): Declare function.
Thanks to Achim Gratz for spotting this.
2011-10-28 16:53:36 +02:00
Bastien Guerry 6da350bf06 org.el: Fix bug when matching the face property before following a link.
* org.el (org-return): Fix bug when matching the face property
before following a link.

Thanks to Paul Sexton for the analysis and the fix.
2011-10-28 16:42:20 +02:00
Bastien Guerry 30f7c5cc0d Merge branch 'master' of orgmode.org:org-mode 2011-10-28 15:17:06 +02:00
Matt Lundin 87fc97d131 Fix holidays symbol in org-class
* lisp/org-agenda.el: (org-class): Fix holidays symbol in org-class.
  This was resulting in an "Bad sexp..." warning.
2011-10-28 15:14:12 +02:00
Carsten Dominik f6a766548c Save complex heading regexp for column view
* lisp/org.el (org-scan-tags): Also remember `org-complex-heading-regexp'
in a property.
2011-10-28 14:47:32 +02:00
Bastien Guerry 735bf5cd05 Merge branch 'master' of orgmode.org:org-mode 2011-10-28 11:18:21 +02:00
Carsten Dominik ca49e893ab Turn off auto insert and TeX master query for export
* lisp/org-latex.el (org-export-as-latex): Turn off auto-insert and
set TeX-master to t when creating new TeX buffers.
* lisp/org-docbook.el (org-export-as-docbook):
* lisp/org-html.el (org-export-as-html): Turn off auto-insert
when creating new buffers.
2011-10-28 10:03:33 +02:00
Bastien Guerry 901121ac45 Merge branch 'master' of orgmode.org:org-mode 2011-10-27 18:23:08 +02:00
Carsten Dominik 23b8111ffa Merge branch 'master' of orgmode.org:org-mode 2011-10-27 18:13:33 +02:00
Carsten Dominik 1432e4bc79 Fix remote references that contain pointers to first/last rows/columns
* lisp/org-table.el (org-table-formula-handle-first/last-rc): Do not
expand pointers to first/last row/column that are inside a call
to `remote'.
(org-table-get-remote-range): Expand pointers to first/last
row/column.

Wu Feng writes:

> Hello,
>
> First, please check below simple example, I defined two tables (T1 and
> T2). In table-2, I remotely refer to the @>$1 (last row, column 1) and
> $LR2 (last row, column 2) of T1.
>
> #+TBLNAME: T1
> | 11 | 12 |
> | 21 | 22 |
> | 31 | 32 |
>
> #+TBLNAME: T2
> | xxx | xxx | xxx | xxx |
> | #   |  21 |  32 |     |
> #+TBLFM: @>$3=remote(T1,$LR2)::@>$2=remote(T1,@>$1)
>
> Obviously, the expected results are:
>
> - remote(T1,@>$1) is replaced by 31
> - remote(T1,$LR2) is replaced by 32
>
> But I got 21 for remote(T1,@>$1). The $LR version works perfectly
> (though the manual says $LR is out-dated)
>
> Below are debug info when evaluating remote(T1,@>$1). Looks like @> in
> the remote reference is mapped to the last row of the current table, not
> of the remote table.
>
> Substitution history of formula
> Orig:   remote(T1,@2$1)
> $xyz->  remote(T1,@2$1)
> @r$c->  (21)
> $1->    (21)
> Result: 21
> Format: NONE
> Final:  21
>
> Emacs  : GNU Emacs 23.3.1 (i686-pc-linux-gnu, GTK+ Version 2.24.6)
> of 2011-09-13 on shirley
> Package: Org-mode version 7.7
2011-10-27 17:48:07 +02:00
Michael Sperber 2d296c12ea org-capture and XEmacs, indenting too far
Robert Pluim <rpluim@gmail.com> writes:

> Hi, I'm using XEmacs 21.5  (beta29) "garbanzo" d27c1ee1943b+ [Lucid]
> (i686-pc-cygwin, Mule) of Mon Oct 18 2010 on RPluim, with the following
> org-capture-templates
>
> (("t" "Todo" entry (file+headline "~/org/notes.org" "Tasks") "* TODO %?"))
>
> The problem is that for some reason the resulting TODO heading is has 2
> extra spaces, and is placed at too deep a level, giving:
>
> * Tasks
> ***   TODO a task
>
> I've tested this on a fairly recent emacs24 build, and everything works
> fine there, so this is probably something XEmacs specific.  Can anyone
> suggest any way to track this down (I'd bisect, but I've yet to find a
> 'good' version)?

I finally got around to looking into this: The reason is that, in
org-capture mode, `outline-level' is bound to outline.el's function,
which is off by one compared to org-mode's.  I used this patch to fix
it:

Could somebody review and maybe apply this?
2011-10-26 19:49:51 +02:00
Michael Sperber d493a0eced * org-capture.el (org-capture-get-indirect-buffer): Fix XEmacs
compatibility issue when creating an indirect buffer.

TINYCHANGE
2011-10-26 19:43:07 +02:00
Christophe Rhodes cc4a75462f support LATEX_CLASS_OPTIONS in #+SETUPFILE
* lisp/org-exp.el (org-infile-export-plist): Handle LATEX_CLASS_OPTIONS
  the same way than LATEX_CLASS.
2011-10-26 19:27:00 +02:00
Bastien Guerry de8cd8ee41 Bugfix: make `org-return' detect 'org-link face properly.
* org.el (org-return): Check the presence of the 'org-link
face even in contexts where there is more than one face.

Thanks to Maximilian Matthé for reporting this bug.
2011-10-26 19:20:12 +02:00
Yuri Lenskiy 6115980993 Addition of default-description parameter to org-insert-link
This patch, against the stable 7.7 branch version of org.el, adds a
default-description argument to org-insert-link that, if non-nil, will
become the default description.

- Yuri Lenskiy
2011-10-26 19:04:36 +02:00
Eric Schulte a5cbe6a6cb adding list of SQL specific header argument names which should be inherited
* lisp/ob-sql.el (org-babel-header-arg-names:sql): SQL specific header
  argument names which should be inherited.
2011-10-26 06:20:12 -06:00
Nicolas Goaziou dba3e22c93 Have a more informative return value for `org-in-block-p'
* lisp/org.el (org-in-block-p): Return matched name of block, if any.
  It can be useful when a list of block names is provided as an argument.
2011-10-26 10:45:28 +02:00
Nicolas Goaziou 679a0e1fe9 Fix a regexp in HTML and DocBook exporters
* lisp/org-docbook.el (org-export-as-docbook): Fix regexp.
* lisp/org-html.el (org-export-as-html): Fix regexp.

The erroneous regexp would identify the string " *" as an headline.
2011-10-25 16:39:31 +02:00
Carsten Dominik 8444207d3e Make `diary-class' skip hlidays if the user asks for it.
* lisp/org-agenda.el (org-class): Allow holidays to be skipped.
2011-10-25 16:07:01 +02:00
Carsten Dominik 4e33bfb83a Mark `org-diary-class obsolete' 2011-10-25 16:00:06 +02:00
Eric Schulte 2429e83491 ob-shen: fix two compilation errors
* lisp/ob-shen.el (org-babel-execute:shen): Fix two compilation
  errors.
2011-10-24 20:00:02 -06:00
Bastien Guerry 2494eaea49 Minor docstring fix.
Thanks to Peter Münster for spotting this.
2011-10-24 23:47:59 +02:00
Peter Münster 68ffb7a7cc Agenda: Allow filter list without category in org-agenda-to-appt
* lisp/org-agenda.el (org-agenda-to-appt): Make sure filter-items are
strings before calling `string-match'.

Now it's possible to use (org-agenda-to-appt t '((headline "string"))).

TINYCHANGE
2011-10-24 23:43:58 +02:00
Nicolas Goaziou 711b7d7d3a org-footnote: Remove text-properties from label
* lisp/org-footnote.el (org-footnote-at-reference-p,
org-footnote-at-definition-p): Remove text-properties from label.
2011-10-24 08:11:07 +02:00
Bastien Guerry 767f5188ee * org-html.el (org-export-as-html): Add a "title" meta tag. 2011-10-23 23:39:23 +02:00
Bastien Guerry db04ef7498 org-agenda.el (org-agenda-to-appt): Better filtering.
* org-agenda.el (org-agenda-to-appt): Allow to refine the
scope of entries to pass to `org-agenda-get-day-entries' and
allow to filter out entries using a function.

Thanks to Peter Münster for raising a related issue and to
Tassilo Horn for this idea.
2011-10-23 23:21:34 +02:00
Bastien Guerry ba2d84b5f9 Merge branch 'master' of orgmode.org:org-mode 2011-10-23 23:03:03 +02:00
Bastien Guerry bc29a5c7ab Silence byte-compiler. 2011-10-23 22:45:53 +02:00
Nicolas Goaziou dc62cdcdf1 org-agenda: Fix small display bug.
* lisp/org-agenda.el: Fix small display bug.
2011-10-23 22:42:48 +02:00
Nicolas Goaziou 77eeb0df1b Fix regexps for headlines
* lisp/org.el (org-set-regexps-and-options): Fix small bug introduced
  by commit dfcb6faef1.
2011-10-23 18:14:58 +02:00
Nicolas Goaziou dfcb6faef1 Provide more consistent regexps for headlines
* lisp/org-agenda.el (org-search-view): Simplify regexp.
(org-agenda-get-todos): Use new format string.
* lisp/org-archive.el (org-archive-all-done): Simplify regexp.
* lisp/org-ascii.el (org-export-as-ascii): More accurate regexp.
* lisp/org-colview-xemacs.el (org-columns-capture-view): Use new
  format string and new string.
* lisp/org-colview.el (org-columns-capture-view): Use new format
  string and new string.
* lisp/org-docbook.el (org-export-as-docbook): More accurate
  regexp.  Also use new regexp to match generic headlines.
* lisp/org-exp.el (org-export-protect-quoted-subtrees): More accurate
  regexp.  Also use new regexp to match generic headlines.
* lisp/org-html.el (org-export-as-html): More accurate regexp.  Also
  use new regexp to match generic headlines.
* lisp/org-mouse.el (org-mouse-match-todo-keyword): Removed unused
  and now erroneous function.
* lisp/org.el (org-heading-regexp, org-heading-keyword-regexp-format):
  New variables.
(org-set-regexps-and-options): Create regexps according to the
following rule: use spaces only to separate elements from an headline,
while allowing mixed tabs and spaces for any indentation job.
(org-nl-done-regexp, org-looking-at-done-regexp): Removed variables.
(org-set-font-lock-defaults): Fontify again headlines with a keyword
and no other text.  Use new format strings.
(org-get-heading, org-toggle-comment, org-prepare-agenda-buffers,
org-toggle-fixed-width-section): Use new format string.
(org-todo): More accurate regexps.
(org-point-at-end-of-empty-headline): Simplify regexp.
(org-insert-heading): Headline can sometimes be nil.

This patch attempts to reduce the number of hard-coded headlines, by
providing two format strings and one generic string to cover most of
the cases of headline construction.
2011-10-23 09:30:13 +02:00
David Maus 440ec7e2da Avoid conflict between bulk command and loop-over-headlines
* org-agenda.el (org-agenda-bulk-action): Bind
`org-loop-over-headlines-in-active-region' to nil to avoid conflict
with bulk command.
2011-10-22 16:20:44 +02:00
David Maus 2ac0810d19 Skip invisible headlines when mapping over headlines in active region
* org.el (org-deadline, org-schedule): Skip invisible headlines when
mapping over headlines in active region.
2011-10-22 16:20:14 +02:00
David Maus e67a28e963 New customization variable: Loop over headlines in active region
* org.el (org-loop-over-headlines-in-active-region): New customization
variable. Loop over headlines in active region.
(org-schedule, org-deadline): Apply to headlines in region depending
on new customization variable.
2011-10-22 16:19:25 +02:00
David Maus 810a2e8a5d Immediately return if scope is 'region but no region is active
* org.el (org-map-entries): Immediately return if scope is 'region but
no region is active.
2011-10-22 16:17:50 +02:00
David Maus 336cc53518 Extend scope 'region to include entire body of last headline in active region
* org.el (org-map-entries): Extend scope 'region to include
entire body of last headline in active region.
2011-10-22 16:17:43 +02:00
Bastien Guerry 8302ba8df0 ob-calc.el: Remove (require 'calc-store). 2011-10-22 15:34:06 +02:00
Bastien Guerry ecf5368afe ob.el: Fix byte-compiler warning about free variable. 2011-10-22 15:28:01 +02:00
Bastien Guerry 4d10c36e2b * org-src.el (org-edit-src-code): Fix typo-bug.
This is leftover from Tassilo's previous patch applied today.
2011-10-22 15:26:36 +02:00
Bastien Guerry da5a68a0bc Rename org-format-agenda-item' to org-agenda-format-item'.
* org.el (org-format-agenda-item, org-scan-tags): Rename
`org-format-agenda-item' to `org-agenda-format-item'.

* org-agenda.el (org-search-view)
(org-get-entries-from-diary, org-agenda-get-todos)
(org-agenda-get-timestamps, org-agenda-get-sexps)
(org-agenda-get-progress, org-agenda-get-deadlines)
(org-agenda-get-scheduled, org-agenda-get-blocks)
(org-agenda-format-item, org-agenda-add-time-grid-maybe)
(org-agenda-change-all-lines)
(org-agenda-add-entry-to-org-agenda-diary-file): Rename
`org-format-agenda-item' to `org-agenda-format-item'.

Using the `org-agenda-' prefix makes more sense here.
2011-10-22 15:08:33 +02:00
Bastien Guerry e0c1855dba Silent byte-compiler about `category-pos'.
* org-agenda.el: Replace `category-pos' by `org-category-pos'
to silent byte-compiler.
2011-10-22 15:04:33 +02:00
Bastien Guerry a46f58e7d0 * org.el: Declare external function `cdlatex-compute-tables'.
* org.el (cdlatex-compute-tables): Declare external function
`cdlatex-compute-tables'.
2011-10-22 15:01:02 +02:00
Bastien Guerry 28e5997b26 org-latex.el: Fix problem when matching #+LaTeX_CLASS.
* org-latex.el: (org-export-latex-set-initial-vars): Fix problem when
  matching #+LaTeX_CLASS.

Thanks to Torsten Wagner for spotting this.
2011-10-22 12:07:43 +02:00
Tassilo Horn 4bbdfd229d Replace org-mode-p with usual (eq major-mode 'org-mode) check
Additionally, replace one

  (or (org-mode-p) (derived-mode-p 'org-mode))

with

  (derived-mode-p 'org-mode)

cause that is reflexive anyway (returns true, if the current mode is
org-mode).

Delete one check testing for org-mode or org derived mode
2011-10-22 11:29:24 +02:00
Rafael Laboissiere aa2ebf4f7b Fix typos in variable description
* lisp/org.el (org-link-search-must-match-exact-headline): Fix typos.

TINYCHANGE
2011-10-22 11:15:42 +02:00
Bastien Guerry 8d84173873 org-latex.el (org-export-latex-make-header): Add some hyperref options.
* org-latex.el (org-export-latex-make-header): Add some hyperref
  options.

Thanks to Mikhail Titov for a preliminary version of this patch.
2011-10-22 11:05:28 +02:00
Kai Tetzlaff af0789a5a8 Variable publishing-directory? (resent with patch as attachment)
Bastien <bzg@altern.org> writes:

Hi Bastien,

> The patch looks good but I'd like to understand it better.
> Can you send an example configuration working with your patch?

In org-publish-project-alist, i have HTML publishing projects which
should be published to different target directories depending on e.g.
where emacs is running (which i determine in my init files using the MAC
address of the default GW, the name the machine, ...).

Here is an example: At home, i publish to a local directory
(:publishing-directory "~/tmp/publish-test") but at work i would like to
publish directly to a webserver (:publishing-directory
"/plinkx:doxydoc:~/public_html/publish-test" - this is on w32, using
tramps PuTTY/plink). To avoid having to change the definition of the
publishing project when i change locations i would like to construct the
actual value of :publishing-directory by calling a function:

         ("publishing-dir-test"
         :base-directory "~/Documents/Work/RS"
         :recursive t
         :base-extension "org"
         :exclude-tags ("intern")
         :publishing-directory '(expand-file-name "publish-test" kt:org-default-publishing-dir)
         :publishing-function org-publish-org-to-html)

Depending on the location i'm in, 'kt:org-default-publishing-dir' would
be set to either "~/tmp" or "/plinkx:doxydoc:~/public_html". Without the
patch, the example above does not work as the value of
:publishing-directory does not get evaluated.

> Also, please try to send git patch using these conventions:
> http://orgmode.org/worg/org-contribute.html#sec-5
>
> Thanks a lot!

Thanks for the hint. I've attached a revised version of the patch which
includes a changelog/commit msg - i hope that works for you.

Publish: allow dynamic construction of the publish destination.

* org-publish.el (org-publish-file): Added 'eval'ing the value of the
 :publishing-directory property before using it as destination of the
 publishing project. This allows to construct the publish destination
 directory dynamically at run-time using the return value of a
 function.

TINYCHANGE
2011-10-22 10:41:15 +02:00
Bastien Guerry 989b079dd7 org-agenda.el (org-agenda-list-stuck-projects): Fix tiny bug.
* org-agenda.el (org-agenda-list-stuck-projects): Fix tiny bug.

This bug was introduced by a typo in Michael's patch for XEmacs
compatibility.
2011-10-22 10:13:11 +02:00
Carsten Dominik 0c8b9711a3 Agenda: Add missing option, document time stamp movement to future
* lisp/org-agenda.el (org-agenda-move-date-from-past-immediately-to-today):
New option.
(org-agenda-date-later): Improve the logical structure.

* doc/org.texi (Agenda commands): Document that S-right on a line
representing a past date will immediately shift that date to today.
2011-10-22 08:39:54 +02:00
Carsten Dominik 8d1b48fd5f Merge branch 'master' of orgmode.org:org-mode 2011-10-21 23:32:35 +02:00
Carsten Dominik 54a9cb0d99 Maintain XEmacs compatibility
* lisp/ob-calc.el (featurep): Require calc-store.
* lisp/org-agenda.el (org-agenda-list-stuck-projects): Fix regexp
special handling.
* lisp/org-compat.el (fboundp): Support for XEmacs.
* lisp/org-exp.el (org-export): Protect XEmacs from `(redisplay)' call.
* lisp/org-footnote.el (org-footnote-re): Optimize macro processing.
* lisp/org.el (org-set-autofill-regexps): Xemacs compatibility.

Patch by Michael Sperber, checked and slightly modified by Carsten.
2011-10-21 22:36:53 +02:00
Eric Schulte 93bdeb9212 two more quick fixes
* lisp/ob.el (org-babel-balanced-split): Balance both [] and ()
  groupings.
  (org-babel-parse-header-arguments): Be sure to replace removed ":"
  characters.
2011-10-21 11:36:06 -06:00
Eric Schulte 0bcb248ee6 quick fix for a tiny bug
* lisp/ob.el (org-babel-parse-header-arguments): Quick fix for a tiny bug.
2011-10-21 11:21:39 -06:00
Eric Schulte 4c3d289faf Now allow multiple "var" specifications behind a single ":var"
* lisp/ob.el (org-babel-params-from-properties): Now splits multiple
  var arguments behind a single ":var".
  (org-babel-balanced-split): Separated balanced splitting of strings
  out into a new function.
  (org-babel-parse-multiple-vars): Splits multiple var arguments
  behind a single ":var".
2011-10-21 11:15:18 -06:00
Bastien Guerry f796790779 Merge branch 'master' of orgmode.org:org-mode 2011-10-21 17:57:40 +02:00
Bastien Guerry 5091facd7f org.el: Enable recursive minibuffers in `org-completing-read'.
org.el: (org-completing-read): Enable recursive minibuffers and add
the `C-c !' key in the minibuffer local map.

Thanks to Skip Collins for the idea and to Nick Dokos for the
implementation.
2011-10-21 17:46:37 +02:00
Carsten Dominik a1ebd4e207 Merge branch 'master' of orgmode.org:org-mode 2011-10-21 16:58:01 +02:00
Bastien Guerry b2632dc458 org.el: Remap outline-promote' and outline-demote' keys.
* org.el: Remap `outline-promote' and `outline-demote' keys to
`org-promote-subtree' and `org-demote-subtree'.

Thanks to Michael Brand for the suggestion.
2011-10-21 16:21:49 +02:00
Leo 5e67e9d824 Check if marker is valid before use
* lisp/org-agenda.el (org-agenda-do-context-action): Check if marker
is valid before use.
2011-10-21 10:09:40 +02:00
Carsten Dominik 7caa7e1ff7 Fix shifting of data ranges.
* lisp/org-agenda.el (org-agenda-date-later): Fix shifting of date ranges.

Patch based on code by Niels Giesen.
TINYCHANGE
2011-10-21 10:07:02 +02:00
Eric Schulte 080e2decbc removing `org-babel-params-from-buffer' and #+PROPERTIES: entirely
* lisp/ob.el: Removing `org-babel-params-from-buffer' and
  #+PROPERTIES: entirely.
* lisp/ob-exp.el (org-babel-exp-src-block): Removing
  `org-babel-params-from-buffer' and #+PROPERTIES: entirely.
* lisp/ob-lob.el (org-babel-lob-execute): Removing
  `org-babel-params-from-buffer' and #+PROPERTIES: entirely.
2011-10-20 15:26:43 -06:00
Eric Schulte 04a978fde5 removing #+BABEL: lines in favor of general #+PROPERTIES: lines
* lisp/ob.el (org-babel-params-from-buffer): Removing #+BABEL: lines
  in favor of general #+PROPERTIES: lines.

* doc/org.texi (Buffer-wide header arguments): Removing documentation
  of the defunct #+BABEL: structure.
2011-10-20 13:42:31 -06:00
Carsten Dominik 619da643a3 Merge branch 'master' of orgmode.org:org-mode 2011-10-20 09:39:30 +02:00
Eric Schulte 92a01caa6d ob-sql: insert into a temporary buffer
* lisp/ob-sql.el (org-babel-execute:sql): Insert into a temporary
  buffer.
2011-10-19 12:07:48 -06:00
Carsten Dominik d622d2f709 Make sure cdlatex customization is taken into account properly
* lisp/org.el (org-cdlatex-mode): Run cdlatex-mode-hook and update
the internal cdlatex tables.
2011-10-19 18:56:13 +02:00
Eric Schulte faaa881c50 ob-sql returns literal results when requested
* lisp/ob-sql.el (org-babel-execute:sql): Respect literal-results options.
2011-10-18 10:15:04 -06:00
Eric Schulte c1ac640944 fix multi-table bug in code block colname and rowname handling
Thanks to Nick Dokos for suggesting this fix

* lisp/ob.el (org-babel-disassemble-tables): Fix multi-table bug in
  code block colname and rowname handling.
2011-10-18 10:08:48 -06:00
Carsten Dominik 35d924cc80 Fix bug in regexp for #+include
* lisp/org-publish.el (org-publish-cache-file-needs-publishing): Fix regexp
to not inlcude newlines.
2011-10-16 20:00:23 +02:00
Carsten Dominik a9a304d938 Keep byte compiler happy 2011-10-16 16:54:52 +02:00
Carsten Dominik 782a172110 Fix parenthesis error 2011-10-16 16:51:13 +02:00
Carsten Dominik 9a132f3164 Remove table overlays before restart
* lisp/org.el (org-ctrl-c-ctrl-c): Remove table overlays before restart.
2011-10-16 13:38:48 +02:00
Carsten Dominik a9689b8750 Match entities before number, so that \sim2 is fontified correctly
* lisp/org.el (org-fontify-entities): Match entities before numbers, as in
`\sim2'.
2011-10-16 13:23:02 +02:00
Carsten Dominik f20eef318e Agenda: New behaviour when shifting scheduled date forward.
* lisp/org-agenda.el (org-agenda-date-later): Make pushing forward
a past date to jump immedialtely to today.
2011-10-16 11:09:45 +02:00
Carsten Dominik 85cce6fa85 Move some of the new defcustoms to the customization section 2011-10-16 10:57:21 +02:00
Carsten Dominik 2e93c951e5 Parse and store both col align and col width spec for later use
* lisp/org-exp.el (org-store-forced-table-alignment): Parse
the column cookie for both alignment and width specification.
Store the resulting value in `org-col-cookies' property.
Retire the previously used `org-forced-aligns' property for
consistency.  Renamed local variable `aligns' to `cookies'.
* lisp/org-html.el (org-format-org-table-html): Use
`org-col-cookies'.  Renamed local variable forced-aligns to
col-cookies.

This is a preparatory patch.  A backend can look at the colwidth
specification and (at it's discretion) use it to control relative
sizes of individual columns in a table.  At this moment, it is unclear
whether the widths used to control the display of table in Org buffer
can be overloaded to also control the formatting of table in a
backend.

Refer following discussion with Matt Price:
http://lists.gnu.org/archive/html/emacs-orgmode/2011-08/msg01053.html
2011-10-16 10:54:20 +02:00
Carsten Dominik 4f2f222c00 Add support for LaTeX to MathML conversion
* lisp/org.el (org-latex-to-mathml-jar-file)
(org-latex-to-mathml-convert-command): New user-customizable
variables.
(org-format-latex-mathml-available-p, org-create-math-formula)
(org-format-latex-as-mathml): New functions.
(org-format-latex): Add a new local variable block-type that
notes the nature of the equation - inline or display.
Associate it's value to `org-latex-src-embed-type' property of
dvipng links.  Add mathml as new processing type.

Patch by Jambunathan.
2011-10-16 10:52:32 +02:00
Sébastien Vauban 05ead2de3b Rebase: Add tree name to prompt
* lisp/org.el (org-refile): Add tree name to prompt.
2011-10-14 11:20:35 +02:00
Carsten Dominik 54d7df6774 Make it possible to place table captions below the table
* lisp/org-latex.el (org-export-latex-tables): Honor
`org-export-latex-table-caption-above'
(org-export-latex-table-caption-above): New option.

Patch by Thomas Dye.
2011-10-10 21:05:03 +02:00
Eric Schulte 3e86300d6d now including language specific header arg values in insertion options
* lisp/ob.el (org-babel-insert-header-arg): Now including language
  specific header arg values in insertion options.
2011-10-09 09:31:32 -06:00
Eric Schulte d7d0230bf4 Fixed typo in org-babel-insert-header-arg.
Thanks to Torsten Wagner for pointing this out and for suggesting
  the original feature.

* lisp/ob.el (org-babel-insert-header-arg): Fixed typo.
2011-10-09 09:11:10 -06:00
Carsten Dominik 9bd1c338a0 Merge branch 'master' of orgmode.org:org-mode 2011-10-09 13:17:58 +02:00
Jambunathan K f8cd4a3793 org-odt help
> I would like to submit 2 more patches - one to the manual and other to
> org-exp.el.

I am attaching the promised patch to org-exp.el. Can someone review and
commit this change?

Please note that I have withheld the changes to org-odt & co which make
use of this change.

ps: The patch to org.texi will follow soon - maybe in a day or two.

>From 39ab2a263336ba077c7cd6627a3203c55c5bddba Mon Sep 17 00:00:00 2001
From: Jambunathan K <kjambunathan@gmail.com>
Date: Tue, 4 Oct 2011 23:32:35 +0530
Subject: [PATCH] org-exp.el: Enhance `org-export-number-lines' to support odt export

* lisp/org-exp.el (org-export-number-lines): Modified.  Add a
new parameter `preprocess' and use this for backend-agnostic
handling of literal examples.

This parameter is currently exercised only by the odt exporter.  Hint:
See future commits.
2011-10-09 13:17:08 +02:00
Nicolas Goaziou 8e358f2cef Allow subscripts and superscripts to start at bol
* lisp/org.el (org-match-substring-regexp,
  org-match-substring-with-braces-regexp): Allow subscripts and
  superscripts to start at beginning of line.
2011-10-09 09:35:27 +02:00
Eric Schulte 4a7dd1e087 binding new code block header argument helper function to C-c C-v h 2011-10-08 16:38:32 -06:00
Eric Schulte 9135ec76dd New helper function for inserting common code block header arguments
* lisp/ob.el (org-babel-common-header-args-w-values): New variable to
  hold common header arguments and their default values.
  (org-babel-header-arg-names): Redefined using the new common header
  arg variable.
  (org-babel-insert-header-arg): New function to help when inserting
  header arguments.
2011-10-08 16:31:50 -06:00
David Maus 85d0a9fc05 Remove unnecessary protection markers
* org-html.el (org-html-handle-links): Remove unnecessary protection
markers when publishing link in default format.

Left-over from the mess that was 7.5's HTML export.
2011-10-08 21:18:57 +02:00
Pieter Praet 7e5c0263fc org-crypt: when running org-decrypt-entry', only run auto-save-mode' check if on an encrypted entry
* lisp/org-crypt.el (org-crypt-check-auto-save): New function, see next change.
* lisp/org-crypt.el (org-decrypt-entry): Break the auto-save-mode check out
  into a separate function, and call it at a later point, to assure it only
  runs when visiting an encrypted entry.

Currently `org-decrypt-entry' is doing the auto-save-mode check whenever
it's run, regardless of context, while this only makes sense when run on
an entry which is actually encrypted (or looks like it, at least).

TINYCHANGE
2011-10-08 18:10:37 +02:00
John J Foerch a5d4783a7e Short timestamp in org-log-note-headings
Two new format codes support insertion of a short-format time stamp.
%d for an inactive time stamp, and %D for an active one.

* lisp/org.el (org-log-note-headings): Document new %d and %D escapes.
(org-store-log-note): Implement new %d and %D escapes.

TINYCHANGE
2011-10-08 17:55:17 +02:00
niels giesen a6d74af2b9 Continue numbering from any previous numbered snippet with +n, even when previous numbered snippet does not immediately precede it.
* org-mode/lisp/org-exp.el (org-export-number-lines):

  Check whether number parameter (this is a numbered block!) is
  non-nil as well as whether cont is nil (this numbered block should
  *not* continue numbering where we left off before!) before resetting
  the count to zero.

  From the docs:

    If you use a `+n' switch, the numbering from the previous
    numbered snippet will be continued in the current one.

  With this change I believe the code complies with the docs.
2011-10-08 16:30:56 +02:00
Carsten Dominik 468aa115ef Merge branch 'master' of orgmode.org:org-mode 2011-10-08 09:02:36 +02:00
Dave Abrahams e53f62eba9 Add indirect agenda follow mode
* lisp/org-agenda.el (org-agenda-follow-indirect): New option.
(org-agenda-follow-mode): Call `org-agenda-do-context-action' fro
follow mode.
(org-agenda-do-context-action): Also do indirect follow mode action.

By setting `org-agenda-follow-indirect' to a non-nil value,
`org-agenda-follow-mode' will use an indirect buffer to display only
the current item, rather than the whole agenda file in which it lives
2011-10-08 09:01:50 +02:00
Eric Schulte 32a6752267 fix typo in new sbe specification
* lisp/ob-table.el (sbe): Fix typo in new sbe specification.
2011-10-07 12:22:04 -06:00
Eric Schulte 75e65de150 sbe now allows specification of header arguments
* lisp/ob-table.el (sbe): If first variable is a string and not a cons
  cell, then interpret it as a string of header arguments to be passed
  to the code block.
2011-10-07 12:18:00 -06:00
Eric Schulte 623dd10c96 ob-shen: fix build error
* lisp/ob-shen.el (shen-eval-defun): Declare external function.
  (org-babel-execute:shen): Move requirement of inf-shen into the
  function in which it is used to fix build error.
2011-10-07 09:09:49 -06:00
Eric Schulte 53573d6e28 adding initial support for evaluation of shen code blocks 2011-10-06 19:55:47 -06:00
Carsten Dominik 5147f6b008 Make org-open-at-point only ask once whether new header should be created
* lisp/org.el (org-open-at-point): Make org-open-at-point only ask once
about creating a new headline

When following "thisfile" links org-open-at-point is kind enough to
retry org-link-search again after widening the buffer it can't be
found. However org-link-search also asks the question "No match -
create this as a new heading? (y or n)" when target can't be
found. This means that the question is asked twice when following a
nonexistent link and answering no.

This is fixed by setting org-link-search-inhibit-query in first try,
so only second invocation asks the question.

TINYCHANGE

Patch by Anders Waldenborg
2011-10-06 10:53:31 +02:00
Nick Dokos 1d65423da8 Bug: org-refile-targets doesn't say whether it's AND or OR [7.7 (release_7.7.351.gb8b5)]
Dave Abrahams <dave@boostpro.com> wrote:

> I would change the doc for org-refile-targets to say that the resulting
> list of targets is the union of all the targets matched by each cons
> cell.  I think you could take that pretty much verbatim.
>

How's this?

Nick

---------------------------------------------------------------------------
>From f853b04fb474493b3b7b8857794c9f120c5f7822 Mon Sep 17 00:00:00 2001
From: Nick Dokos <nick@dokosmarshall.org>
Date: Wed, 28 Sep 2011 23:49:13 -0400
Subject: [PATCH] Amplify the doc for org-refile-targets

* lisp/org.el: (org-refile-targets) Elaborated the documentation of
               the variable as suggested by Dave Abrahams.

TINYCHANGE
2011-10-06 10:13:05 +02:00
Carsten Dominik 2978501ad0 Bugfix for alignment of tag next to header name
* lisp/org.el (org-align-tags-here): Allow tags to be placed right
after heading.
(org-tags-column): Document the meaning of tags column 0.

Patch by Michael Brand.

TINYCHANGE
2011-10-06 09:44:08 +02:00
niels giesen 3d83564b7d Time range end in agenda view not displayed
Giovanni Ridolfi <giovanni.ridolfi@yahoo.it> writes:

> michael holzer <michi_holzer_news@gmx.at> writes:
>
>> When I have an entry that contains a time range, for example:
>>
>> * timerange
>>   <2011-09-30 Fri 14:00>--<2011-09-30 Fri 18:00>
>>
>> this shows up in the agenda view as:
>>
>>   uni:        14:00...... timerange
>>
>> while I would expect something like:
>>
>>   uni:        14:00-18:00 timerange
>>
>
> |the manual says:
> |Time ranges can be specified with two timestamps,
> |like ‘<2005-05-10 Tue 20:30>--<2005-05-10 Tue 22:15>’.
> |
> | 20:30-22:15 Marvin escorts the Hitchhikers to the bridge
>
> I confirm this bug.
>
> Org-mode version 7.7 0e9d401519
> GNU Emacs 23.3.1 (i386-mingw-nt5.1.2600) of 2011-03-10 on 3249CTO
>
> Giovanni
>
>

Funny enough, I noticed this too last week, so I whipped up this patch.
It inserts the range when start date is the same as the end date. Please
test (it's still young) && include in Org if you so please.

#+begin_src diff
>From dcf81753aa5cab311f2a3a0272e4691e4bc6ea38 Mon Sep 17 00:00:00 2001
From: Niels Giesen <niels.giesen@gmail.com>
Date: Mon, 26 Sep 2011 11:43:55 +0200
Subject: [PATCH] Show timestamp ranges in agenda

* lisp/org-agenda.el (org-agenda-get-blocks): Show timestamp ranges in
  agenda if start day is same as end day
2011-10-05 16:46:18 +02:00
Carsten Dominik 1790d6c073 Make org-refile interface for jumping to a target work before first heading
* lisp/org.el (org-refile-get-location): Ignore errors when
collection heading to be excluded.
2011-10-05 16:23:03 +02:00
Carsten Dominik ee3a68216b Revert "Avoid XHTML strict problems by not enclosing special blocks in paragraph tags"
This reverts commit 4e3cc81a2e.
2011-10-04 23:31:43 +02:00
Carsten Dominik 4e3cc81a2e Avoid XHTML strict problems by not enclosing special blocks in paragraph tags
* lisp/org-special-blocks.el (org-special-blocks-convert-html-special-cookies):
Avoid XHTML strict problems by not enclosing special blocks in
paragraph tags.
2011-10-04 16:22:27 +02:00
Bernt Hansen 106993d310 Check argument is a string before calling string-match
* lisp/org-html.el (org-export-as-html): Check string-match argument
(org-html-handle-time-stamps): Check string-match argument

Avoid wrong-type-argument errors during exporting.
2011-10-04 14:35:33 +02:00
Carsten Dominik aefd49b909 Change default value of `org-agenda-skip-additional-timestamps-same-entry'
* lisp/org-agenda.el (org-agenda-skip-additional-timestamps-same-entry):
Change default value.
2011-10-04 14:30:32 +02:00
Carsten Dominik 620913e596 Improve error reporting on bad time stamps during agenda construction
* lisp/org.el (org-time-string-to-time):
(org-time-string-to-absolute): Add optional arguments BUFFER and POS
for error reporting.
* lisp/org-agenda.el (org-get-all-dates):
(org-agenda-get-timestamps):
(org-agenda-get-deadlines):
(org-agenda-get-scheduled):
(org-agenda-get-blocks): Call time stamp parsing functions with
information on where the timestamp was taken from.
2011-10-04 14:12:11 +02:00
Carsten Dominik a33fc1ce7d Fix typo in previous commit 2011-10-04 10:00:10 +02:00
Carsten Dominik 3268d3b48f Run org-cycle-hook' after show-all' in indirect buffer
* lisp/org.el (org-tree-to-indirect-buffer): Run `org-cycle-hook' after `show-all'
in indirect buffer.
2011-10-04 09:57:02 +02:00
Nicolas Goaziou 809318dd5b Better handling of ill-formed lists
* lisp/org-list.el (org-list-parents-alist): When no parent is found
  for an item, set it as the closest less indented item above.  If
  none is found, make it a top level item.
(org-list-write-struct): Externalize code.
(org-list-struct-fix-item-end): New function.
(org-list-struct): Remove a now useless fix.
* lisp/org.el (org-ctrl-c-ctrl-c): Use new function.
2011-10-02 23:17:11 +02:00
Nicolas Goaziou 824e06752b `org-special-ctrl-a/e' effectively behaves specially on items
* lisp/org.el (org-end-of-line): When on an item, move point at the
  end of the line, but before any hidden text.  Thus, it's still
  possible to use commands, like C-c C-c, acting at items.  This is
  still disabled if `org-special-ctrl-a/e' ignores C-e.
2011-10-01 20:37:16 +02:00
Nicolas Goaziou 0fff59cd43 org-footnote: Small refactoring
* lisp/org-footnote.el (org-footnote-renumber-fn:N): Small
  refactoring.
2011-10-01 08:57:33 +02:00
Nicolas Goaziou 0e9d401519 org-footnote: Fix an infloop
* lisp/org-footnote.el (org-footnote-renumber-fn:N): Fix an infloop
  introduced by commit 1effad02be.
2011-09-29 22:53:45 +02:00
Nicolas Goaziou a77117ba80 org-footnote: Remove useless org-re
* lisp/org-footnote.el (org-footnote-at-definition-p): remove useless
  org-re.
2011-09-29 22:44:58 +02:00
Nicolas Goaziou 1effad02be org-footnote: Only renumber real footnotes references or definitions
* lisp/org-footnote.el (org-footnote-renumber-fn:N): Verify point is
  at a real footnote reference or definition before renumbering it.
2011-09-29 22:34:15 +02:00
Tassilo Horn 2e2bd083da Fix renumbering for footnotes at BOL.
Hi all,

org-footnote-renumber-fn:N invalidates footnotes that appear as the
first thing on a line.  Here's a test file including the recipe.

--8<---------------cut here---------------start------------->8---
* Bla

  This is a line in which the following footnote that is inserted exactly
  [fn:1] is the first thing in that line.  And now invoke
  org-footnote-renumber-fn:N and see it breaking.

* Footnotes

[fn:1] Test
--8<---------------cut here---------------end--------------->8---

Note, that in larger org files, it's likely that you don't even notice
that the footnotes break.

Once I added a patch on patchwork that fixed this issue, and that's
shown as "accepted".

  http://patchwork.newartisans.com/patch/705/

I think, I've marked it as deferred or so myself because I've thought
the issue was fixed in the meantime, but that doesn't seem to be true.

Here's an updated patch.
2011-09-29 15:55:30 +02:00
Nicolas Goaziou c00fe037be org-footnote: Don't offer to create a footnote when it already exists
* lisp/org-footnote.el (org-footnote-goto-definition): This patch
  makes sure the function says when a definition has been found.
  Thus, moving from the reference to the definition doesn't offer to
  create the latter again.
2011-09-29 15:30:46 +02:00
Nicolas Goaziou c7abf641eb org-footnote: fix commit 774f9cb8e6
* lisp/org-footnote.el (org-footnote-create-definition): Explicitely
  move point after tag, if it has just been inserted.
2011-09-29 15:20:34 +02:00
Eric Schulte dec0b8e975 gnuplot, don't quote file names on Windows systems
Thanks to Alex Vorobiev for suggesting this change

* lisp/ob-gnuplot.el (org-babel-execute:gnuplot): Don't quote file
  names on Windows systems.
2011-09-29 06:54:49 -06:00
Nicolas Goaziou 774f9cb8e6 org-footnote: ensure footnote tag is inserted after footnotes in non-Org buffers
* lisp/org-footnote.el (org-footnote-create-definition): When the tag
  is missing, it is created before any existing footnote, or at end of
  buffer.  In the latter case, the marker pointing at the position
  where the new footnote is going to be inserted (at end of buffer)
  stays before the tag.  This patch makes sure that the marker will be
  kept after the tag.
2011-09-28 19:07:38 +02:00
Eli Zaretskii 1a97f29c34 Force left-to-right paragraphs in Org buffers.
* org.el (org-mode): Force left-to-right paragraphs in Org
buffers.  For a related discussions, see
https://lists.gnu.org/archive/html/emacs-devel/2011-09/msg00349.html.
2011-09-27 19:33:09 +02:00
Nicolas Goaziou e9ce64c8bb ob-asymptote: silence byte-compiler
* lisp/ob-asymptote.el (org-babel-asymptote-define-type): silence byte-compiler.
2011-09-25 16:19:27 +02:00
John Wiegley 706de59f07 Fixed an incorrect paren placement 2011-09-24 12:06:25 -05:00
Eric Schulte ad21eeff85 fix bug in R session evaluation
* lisp/ob-R.el (org-babel-R-evaluate): Fix bug in R session
  evaluation.
2011-09-21 09:10:21 -06:00
John Wiegley 0c09937069 New vars: org-habit-today-glyph, org-habit-completed-glyph 2011-09-21 04:09:49 -05:00
Eric Schulte 4fbefd87aa configurable property name for bibtex entry types
* lisp/org-bibtex.el (org-bibtex-type-property-name): Configurable
  property name for bibtex entry types.
  (org-bibtex-headline): Use new configurable property name.
  (org-bibtex-check): Use new configurable property name.
  (org-bibtex-create): Use new configurable property name.
  (org-bibtex-write): Use new configurable property name.
2011-09-20 09:20:53 -06:00
Bastien Guerry fcdbb5e6c9 org.el (org-paste-subtree): Remove useless (concat ...).
* org.el (org-paste-subtree): Remove useless (concat ...).

See change from Stefan Monnier here:
https://lists.gnu.org/archive/html/emacs-diffs/2011-09/msg00224.html
2011-09-20 08:38:34 +02:00
Eric Schulte 1b11c7e6a0 replacing usage of characterp with integerp (which should work w/Emacs22)
* contrib/babel/langs/ob-fortran.el (org-babel-fortran-var-to-fortran):
  Replacing usage of characterp with integerp (which should work w/Emacs22).
* lisp/ob-C.el (org-babel-C-var-to-C): Replacing usage of characterp
  with integerp (which should work w/Emacs22).
2011-09-17 14:52:29 -06:00
Nicolas Goaziou 1e1cde7546 org-footnote: check context around definition at a proper place
* lisp/org-footnote.el (org-footnote-at-definition-p): Context must be
  valid at the beginning of line, not at point.
2011-09-17 12:01:54 +02:00
Eric Schulte 647849dff9 better delimiting of Org-mode text preceding a code block
Thanks to Christopher Genovese for this change

* lisp/ob-tangle.el (org-babel-tangle-collect-blocks): Better
  delimiting of Org-mode text preceding a code block.
2011-09-16 09:52:34 -06:00
Eric Schulte 6844094edb Don't delete variable values when checking for assignment.
* lisp/ob.el (org-babel-get-src-block-info): Fixing bug, accidentally
  deleted variable values.
2011-09-16 09:52:34 -06:00
Eric Schulte b9922ba879 customizable processing of Org-mode text used as comments in tangled source-code files
* lisp/ob-tangle.el (org-babel-process-comment-text): Customizable
  function to process comment text.
  (org-babel-tangle-collect-blocks): Make use of new customizable
  processing function.
  (org-babel-spec-to-string): Call customizable function rather than
  `org-babel-trim'.
2011-09-16 09:52:34 -06:00
Eric Schulte 65d05b00b0 ob-R: don't process output when "scalar" or "verbatim"
* lisp/ob-R.el (org-babel-execute:R): Collect and pass along the
  result-params.
  (org-babel-R-evaluate): Accept result-params and if "scalar" or
  "verbatim" don't process output.
  (org-babel-R-evaluate-session): Accept result-params and if "scalar"
  or "verbatim" don't process output.
2011-09-15 15:43:35 -06:00
Eric Schulte 267015b24a differentiate between result types and wrappers
* lisp/ob.el (org-babel-merge-params): Differentiate between result
  types and wrappers.
2011-09-15 15:22:14 -06:00
Eric Schulte 11f07576cb Check that functional-syntax variables are initialized.
* lisp/ob.el (org-babel-get-src-block-info): Check that
  functional-syntax variables are initialized.
2011-09-15 09:24:29 -06:00
Eric Schulte f075ada9a1 Adding a note for a future enhancement.
* lisp/ob.el (org-babel-check-src-block): Adding a note for a future
  enhancement.
2011-09-15 09:11:12 -06:00
Carsten Dominik 11dec73c0c Merge branch 'master' of orgmode.org:org-mode 2011-09-14 08:54:53 +02:00
Carsten Dominik a3c3ff3fde Restore point when exporting a subtree
* lisp/org-exp.el (org-export): Restore point when exporting a subtree.
2011-09-14 07:48:49 +02:00
Eric Schulte 0037ef9261 more robust to code blocks with empty bodies
* lisp/ob.el (org-babel-parse-src-block-match): More robust to code
  blocks with empty bodies.
2011-09-13 09:36:03 -06:00
Eric Schulte 597e1eb4fe Don't error on empty code block body.
* lisp/ob.el (org-babel-parse-src-block-match): Don't error on empty
  code block body.
2011-09-13 08:57:29 -06:00
David Maus 4122a51366 Unescape plain link before open
* org.el (org-open-at-point): Unescape plain link.

This should fix a problem with open plain links reported by
Sebastien Vauban.
2011-09-11 16:51:23 +02:00
David Maus 5a373f649e Remove unnecessary link unescape
* org-html.el (org-html-handle-links): Remove unnecessary link
unescape.

PATH is already unescaped and should never be escaped twice. Big
thanks to Jambunathan K for analyzing the problem.
2011-09-11 16:50:43 +02:00
Bastien Guerry 28ae6b4de1 Revert "org.el (org-fixup-indentation): Correctly indent meta lines."
This reverts commit 6b04befa48.
2011-09-09 19:47:41 +02:00
Eric Schulte a4e881207d better error message for unassigned variables
* lisp/ob.el (org-babel-merge-params): Better error message for
  unassigned variables.
2011-09-08 11:44:49 -06:00
Christian Egli 2178b63545 Merge branch 'master' of orgmode.org:org-mode 2011-09-07 15:45:40 +02:00
Christian Egli 14304f6dcd taskjuggler export: take buffer local variables into account
* org-taskjuggler.el (org-export-as-taskjuggler): Clone the
buffer local variables to the temporary buffer before
exporting.

The taskjuggler exporter handles properties. When defining buffer
local priorities the export fails however, as buffer local variables
are not taken into account since the export happens in a new temporary
buffer. This commit fixes that by cloning the relevant buffer local
variables into the temporary buffer before exporting.
2011-09-07 15:45:14 +02:00
Eric Schulte d0a3a3870f org-exp: only remove commas on the front line of a code block
* lisp/org-exp.el (org-export-select-backend-specific-text): Only
  remove commas on the front line of a code block.
2011-09-06 21:52:17 -06:00
Martyn Jago 223ac13486 Inline source block and test fixes * lisp/ob.el: Fixed late night refactoring error * testing/examples/babel.org: whitespace * testing/lisp/test-ob.el: Fixed test-org-babel/inline-src-block-regexp (regression error) Renamed test-org-babel/parse-header-args2 since duplicate test heading Made test-org-babel/parse-header-args less brittle 2011-09-06 08:53:07 -06:00
Martyn Jago d7d052ec7c Bug fixes to inline source block execution triggering. * lisp/ob.el: Created org-babel-get-inline-src-block-matches() to fix problems with org-ctrl-c-ctrl-c not triggering inline src block execution when point is on or after a space within the inline src block body. Also fixed execution problems where inline src block is on buffer line 1. * testing/examples/babel.org: Test data for org-babel-get-inline-src-block-matches()
* testing/lisp/test-ob.el: Tests for
  org-babel-get-inline-src-block-matches()
2011-09-06 08:52:59 -06:00
Eric Schulte 0d580520cc better code block demarcation
* lisp/ob.el (org-babel-demarcate-block): Copy headers and indent to
  column of point when a block is split.
2011-09-04 17:06:07 -06:00
Eric Schulte 0b6de9a026 corrected file insertion for inline results
* lisp/ob.el (org-babel-insert-result): Corrected file insertion for
  inline results.
2011-09-04 10:51:34 -06:00
Nicolas Goaziou ff4af45e68 org-footnote: no footnote in latex fragments
* lisp/org-footnote.el (org-footnote-in-valid-context-p): No footnote
  in latex fragments.
2011-09-04 16:45:39 +02:00
Martin Rudalics 4a8634e1a5 org-compat.el: Remove LABEL argument from pop-to-buffer-same-window call.
* org-compat.el (org-pop-to-buffer-same-window): Remove LABEL
argument from pop-to-buffer-same-window call.
2011-09-02 18:18:56 +02:00
Eric Schulte a611170b57 ob-R: improve prompt detection regexp. Thanks to the users of ess-tracebug for this new regexp
* lisp/ob-R.el (org-babel-R-evaluate-session): Improve prompt
  detection regexp.
2011-09-01 12:03:43 -06:00
Nicolas Goaziou ea7732d269 org-inlinetask: Small refactoring
* lisp/org-inlinetask.el (org-inlinetask-goto-end): Small refactoring.
2011-09-01 08:49:28 +02:00
Nicolas Goaziou 84226fe2b5 ob-asymptote: simplify table to array conversion process
* lisp/ob-asymptote.el (org-babel-asymptote-var-to-asymptote):
  refactor code.
(org-babel-asymptote-table-to-array): removed function.
2011-08-31 06:09:42 -06:00
Nicolas Goaziou 77537073a1 ob-asymptote: full support for uni-dimensional lists
* lisp/ob-asymptote.el (org-babel-asymptote-var-to-asymptote):
  recognize non-nested lists as uni-dimensional arrays.
2011-08-31 06:09:36 -06:00
Eric Schulte cae9f947be babel: don't check for header arguments in properties with leading ":"s
* lisp/ob.el (org-babel-params-from-properties): Don't check for
  header arguments in properties with leading ":"s.
2011-08-30 14:51:00 -06:00
Nicolas Goaziou d775777afc org-inlinetask: fix `org-inlinetask-goto-end' with one line long tasks
* lisp/org-inlinetask.el (org-inlinetask-goto-end): Correctly detect
  the end of an inlinetask when the next one starts immediately after
  the current one.  Also, return position of point.
2011-08-30 14:28:36 +02:00
Nicolas Goaziou 2ff74fc5b6 ob: allow inline src blocks to start at bol
* lisp/ob.el (org-babel-inline-src-block-regexp): Allow regexp to
  start at bol.
2011-08-29 16:05:18 -06:00
Nicolas Goaziou 1421887cde ob-asymptote: small fix
* lisp/ob-asymptote.el (org-babel-asymptote-define-type): elisp floats
  are asymptote reals.
2011-08-29 23:06:35 +02:00
Nicolas Goaziou 755f597a05 ob-asymptote: mixed-types tables default to string arrays
* lisp/ob-asymptote.el (org-babel-asymptote-table-to-array): Require a
new argument TYPE specifying the detected type of array.  If it's a
string array, make sure every element is returned as a string. Also
improve doc-string.
(org-babel-asymptote-var-to-asymptote): Fill new argument.  Small
refactoring.
(org-babel-asymptote-define-type): Rewrite to avoid stopping search at
first float found, as strings have precedence over floats.
2011-08-29 11:56:25 -06:00
Nicolas Goaziou d6aa8ffa13 org-footnote: fix xhtml export
* lisp/org-footnote.el (org-footnote-normalize): be sure to separate
  the last footnote definition from the rest of the buffer.

Thanks to Jambunathan K for reporting this.
2011-08-29 13:05:57 +02:00
Eric Schulte f5e09fbd30 ob-awk: safer variable expansion
* lisp/ob-awk.el (org-babel-expand-body:awk): Allow for symbolic
  variable names.
2011-08-28 09:03:19 -06:00
Nicolas Goaziou 63ce11b1ca Allow $...$ and $x$ latex fragment types at beginning of line
* lisp/org.el (org-latex-regexps): Allow matching latex fragments of
  type "$" and "$1" at beginning of line.
2011-08-27 15:04:51 +02:00
Bastien Guerry c462683ba2 Merge branch 'master' of orgmode.org:org-mode 2011-08-25 23:42:43 +02:00
Bastien Guerry 8bd2ff192e org-agenda.el: Add `category-pos' in let construct.
* org-agenda.el (org-search-view, org-agenda-get-todos)
(org-agenda-get-deadlines, org-agenda-get-scheduled): Add
`category-pos' in let construct.

Thanks to Achim Gratz for spotting this.
2011-08-25 23:42:07 +02:00
Nicolas Goaziou 4574cc11bc org-footnote: preserve narrowing when searching a definition
* lisp/org-footnote.el (org-footnote-get-definition): the function has
  to widen buffer if definition has not been found in the current
  narrowed part. Be sure to restore that restriction once the
  definition is found.
2011-08-25 21:12:07 +02:00
Michal Sojka cd8d1b095b icalendar: Make alarm duration RFC5545 compliant
* org-icalendar.el (org-print-icalendar-entries): Make alarm duration
RFC5545 compliant.

The format of alarm trigger was incorrect because "T" letter from
dur-time element was missing (see
http://tools.ietf.org/html/rfc5545#section-3.3.6). This caused some
software (such as KOrganizer) to not interpret the alarms correctly.

TINYCHANGE
2011-08-25 16:39:35 +02:00
Bastien Guerry 02fad0981f org-agenda.el: Correctly set the `org-category-pos' property.
* org-agenda.el (org-agenda-get-timestamps)
(org-agenda-get-sexps, org-agenda-get-progress): Correctly set
the `org-category-pos' property.

Thanks to Michael Brand for signaling this problem, and to Nick
Dokos and Erik Iverson for confirming it.
2011-08-25 15:20:10 +02:00
Bastien Guerry 236642dc54 org-html.el (org-export-html-divs): Improve docstring.
* org-html.el (org-export-html-divs): Improve docstring.
2011-08-25 15:09:44 +02:00
Bastien Guerry 50412d29c5 Merge branch 'master' of orgmode.org:org-mode 2011-08-25 09:39:38 +02:00
Carsten Dominik be25be1c8d Merge branch 'master' of orgmode.org:org-mode 2011-08-25 08:48:16 +02:00
Carsten Dominik e91f6db1e3 Keep table row/column removal from creating invalid formulas
* lisp/org-table.el (org-table-fix-formulas): Throw error when changing
formula leads to an invalid formula.

This fix catches at least one case, the one described by Nicolas:

> | 1 | 2 | 3 |
> | 1 | 2 | 3 |
> #+TBLFM: @2$1..@2$3=@1
> If I remove the second column (M-S-Left), the formula is correctly
> updated. But when I remove the last column, the formula gets partly
> deleted and becomes:
>
>                            #+TBLFM: @2$1..
>
2011-08-25 08:16:00 +02:00
Bastien Guerry eabea0ef85 * org.el (org-archive-location): Minor docstring fix.
Thanks to John Hendy for pointing this out.
2011-08-25 00:33:13 +02:00
Bastien Guerry d203b61a11 Merge branch 'master' of orgmode.org:org-mode 2011-08-24 22:32:55 +02:00
Achim Gratz ccc99317de backport copyright and license headers from Emacs trunk 2011-08-24 22:32:38 +02:00