Commit Graph

5110 Commits

Author SHA1 Message Date
Bastien Guerry ff038caae5 Revert "Silence byte-compiler with a new alias: filter-buffer-substring-functions."
This reverts commit 5a2eec3207.

The replacement of `buffer-substring-filters' by
`filter-buffer-substring-functions' requires some rewriting
of functions like `org-indent-remove-properties-from-string'.
2011-07-06 20:56:39 +02:00
Bastien Guerry 737241402a org-indent.el: tiny docstring fix. 2011-07-06 20:49:55 +02:00
Bastien Guerry 382e69ee6c org-publish.el: fix bug in `org-publish-cache-file-needs-publishing'.
* install/git/org-mode/lisp/org-publish.el
(org-publish-cache-file-needs-publishing): only check against .org
files.
2011-07-06 19:21:50 +02:00
Bastien Guerry 7a88eaec29 New face: org-default.
* install/git/org-mode/lisp/org.el (org-mode): Use org-default as
the default face in org-mode.

* install/git/org-mode/lisp/org-faces.el (org-default): New face.

M-x customize-face RET org-default RET lets the user define a default
face for org-mode.
2011-07-06 17:25:29 +02:00
Bastien Guerry c6b22dee33 org-publish.el: Take #+INCLUDE: directives into account.
* install/git/org-mode/lisp/org-publish.el
(org-publish-cache-file-needs-publishing): Takes care of more
recently included files, returning `t' in case the file including
them needs to be republished.
2011-07-06 17:04:07 +02:00
Martyn Jago 514ed6b79c ob-lilypond: more consistent behavior with other code block languages
>    Hi
>
>    I've added functionality to make ob-lilypond act in a consistent
>    org-babel way by default (think ob-dot).
>
>    The previous modus operandi is now known as arrange-mode and is
>    selected by setting ly-arrange-mode to t
>
>    More details including examples are at
>    http://github.com/mjago/ob-lilypond
2011-07-06 07:17:29 -06:00
Bastien Guerry c86a84828d EXPERIMENTAL/org-export.el: Delete redundant function.
`org-export-export-preprocess-string' was a dummy copy of
`org-export-preprocess-string', adapted for specific needs
of org-mw-export.  We now use `org-export-preprocess-string'
directly.  This requires a minor change in this latter function:
if :for-backend is not explicitely passed, then the let binding
of `org-export-current-backend' falls back on the previous value
of org-export-current-backend'.
2011-07-06 12:56:53 +02:00
Nicolas Goaziou 301b3450fe org-exp: remove tasks before normalizing footnotes
* lisp/org-exp.el (org-export-preprocess-string): if the last subtree
  is a task, footnotes may be removed along with the subtree. This
  patch ensures footnotes are put at the end of the buffer after the
  subtree has been removed.
2011-07-05 20:42:15 +02:00
Nicolas Goaziou de0fcdffa4 org-footnote: distinguish footnotes from links
* lisp/org-footnote.el (org-footnote-at-reference-p): verify that what
  looks like a footnote doesn't belong to a link.
(org-footnote-next-reference-or-definition): check more strictly
footnote definitions.
2011-07-05 14:01:44 +02:00
Bastien Guerry 5a2eec3207 Silence byte-compiler with a new alias: filter-buffer-substring-functions.
When `filter-buffer-substring-functions' is not a known variable to
Emacs (for versions < 24.1), we alias it to `buffer-substring-filters'.
2011-07-05 12:00:15 +02:00
Bastien Guerry 330ed08feb org.el: fix `org-end-of-meta-data-and-drawers'
Back to the previous version of `org-end-of-meta-data-and-drawers',
with a better fix.

Thanks to Eric Abrahamsen for this.
2011-07-05 11:05:20 +02:00
Deech 5a5036cc13 Ignore errors when launching a language's mode when tangling a source block.
The lua-mode for instance was throwing errors that killed the tangling process.

* lisp/ob-tangle.el (org-babel-tangle): Ignore errors thrown by
  language modes.
2011-07-04 15:00:17 -06:00
Eric S Fraga 9f056593a5 org-table.el: Er... fix the previous fix about time formulas computation.
The error was introduced by Bastien, not Maciek Starzyk.  Bzg was
trying to fix things manually too hastily :)
2011-07-04 12:23:25 +02:00
Bastien Guerry b9af1d0cd5 ob-ref.el: declare two functions.
Declare `org-id-find-id-in-file' and `org-show-context'.

Thanks to Achim Gratz for spotting this.
2011-07-04 11:05:07 +02:00
Rémi Vanicat 5a20035809 org-agenda.el: fix bug in org-diary-class.
calendar-absolute-from-gregorian returns a number of day and
should not be used here.
2011-07-04 11:00:54 +02:00
Maciek Starzyk 429b1cc81a org-table.el: Fix bug in formula duration computation. 2011-07-04 10:51:29 +02:00
Bastien Guerry 71eff05694 org-footnote.el: fix a few compiler warnings.
Thanks to Achim Gratz for catching them.
2011-07-03 21:32:41 +02:00
Eric Schulte e409a859ff ob-python: inhibit return of the eoe string during session evaluation
* lisp/ob-python.el (org-babel-python-evaluate-session): Inhibit
  return of the eoe string during session evaluation.
2011-07-03 12:12:11 -06:00
Eric Schulte fcede7c577 ob-python: enough newlines to ensure a return when ":results output :session"
* lisp/ob-python.el (org-babel-python-evaluate-session): Enough
  newlines to ensure a return when ":results output :session".
2011-07-03 12:08:13 -06:00
Eric Schulte 9e7ef71da3 ob-python: more robust session evaluation
* lisp/ob-python.el (org-babel-python-evaluate-session): Introduced a
  new local function for sending input with a slight delay to allow
  pythong to re-draw the prompt.  No longer removing newlines inside
  code block bodies (was due to a defective regexp).
2011-07-03 09:19:50 -06:00
Bastien Guerry 16faa2b6c1 org-macs.el: new function `org-format-seconds'.
* install/git/org-mode/lisp/org-table.el
(org-table-time-seconds-to-string): use `org-format-seconds'
instead of `format-seconds'.

* install/git/org-mode/lisp/org-macs.el (org-format-seconds):
handle case where `format-seconds' does not exist.
2011-07-03 13:23:09 +02:00
Bastien Guerry a14815aa92 org-publish.el: delete trailing whitespaces. 2011-07-03 13:07:27 +02:00
David Maus 60d24c01ea Properly handle relative symlinks when publishing
* org-publish.el (org-publish-cache-ctime-of-src): Properly handle
relative symlinks.

At Thu, 07 Apr 2011 01:11:00 -0400,
Nick Dokos wrote:
>
> org-publish-cache-ctime-of-src tries (but does not always succeed) to
> deal with symlinks: file-symlink-p returns the target as a string, but
> if the target is relative to the symlink, that's not going to fly.
> e.g. if c is a symlink like this
>
>     /a/b/c->../d/f
>
> then (file-symlink-p "/a/b/c") -> "../d/f"
> but if the current directory is any place other than /a/b, the target
> will not be found, the file attributes are going to be nil and
> the function will blow up.
2011-07-03 13:06:52 +02:00
David Maus c4066dca8e Use function argument instead of dynamically scoped symbol
* org-latex.el (org-export-latex-preprocess): Use function argument
instead of dynamically scoped symbol.

Export options are passed to org-export-preprocess-string which passes
them down to backend specific preprocessor. The :footnotes option is
included.
2011-07-03 13:05:19 +02:00
David Maus 813f8028dd Use org-string-match-p for backward compatibility with Emacs22
* org-freemind.el (org-freemind-convert-links-helper)
(org-freemind-convert-text-p, org-freemind-write-mm-buffer)
(org-freemind-get-node-style): Use org-string-match-p for backward
compatibility with Emacs22.
2011-07-03 13:05:11 +02:00
David Maus 97538eb9ec Add missing :group keyword in defcustom
* org-html.el (org-export-html-protect-char-alist): Add missing :group
keyword in defcustom.
2011-07-03 13:05:05 +02:00
David Maus 4f17b5362a Call kill-buffer with argument nil
* ob-haskell.el (org-babel-haskell-export-to-lhs): Call kill-buffer
with argument indiciating to kill current buffer. Emacs 22
compatibility.

GNU Emacs 22.3.2 (i686-pc-linux-gnu) of 2011-05-28 on x60s

C-h f kill-buffer RET

kill-buffer is an interactive built-in function in `C source code'.
It is bound to C-x k.
(kill-buffer buffer)

Kill the buffer buffer.
The argument may be a buffer or the name of a buffer.
With a nil argument, kill the current buffer.
2011-07-03 13:04:46 +02:00
David Maus eaa724404b Toggle partial-completion-mode only if it is turned on
* org-macs.el (org-without-partial-completion): Toggle
partial-completion-mode only if it is turned on.
2011-07-02 16:51:55 +02:00
Bastien Guerry 43a380708e org.el: tiny fix to org-add-planning-info. 2011-07-02 15:23:25 +02:00
Bastien Guerry 5fb8c750fb org.el: fix issues with timestamps: insert them at the same position.
* install/git/org-mode/lisp/org.el (org-add-planning-info): fix
issues with timestamps not being inserted at the same position.
2011-07-02 15:13:03 +02:00
Bastien Guerry 2e20cf9358 org-table.el: return correct duration string for Calc formulas. 2011-07-02 13:34:22 +02:00
Bastien Guerry 12687ad200 org-table.el: Implement computation of durations with "T" flag
* install/git/org-mode/lisp/org-table.el
(org-table-time-string-to-seconds)
(org-table-time-seconds-to-string): New functions.
(org-table-eval-formula): Implement the "T" (time) flag for
computing durations.
2011-07-02 13:08:54 +02:00
Bastien Guerry da086f9606 Bugfix `org-without-partial-completion' (again).
Er... We need to call ,@body when partial-completion-mode is nil.
2011-07-02 12:15:20 +02:00
Bastien Guerry 65815f64a4 Fix `org-without-partial-completion' again.
This uses the macro David Maus suggests.  In particular, it doesn't
use the (let (pc-mode ...)) binding, which, as David states, could
cause leakage if the pc-mode variable is used within ,@body.
2011-07-02 11:25:56 +02:00
Bastien Guerry 467435dba7 Don't include org-lparse.el in the list of contributed modules.
This modules is a dependancy of org-odt.el, which is the real
library users want to load.
2011-07-02 11:15:57 +02:00
Jambunathan K 67be9be326 Add org-lparse and org-odt as contrib modules
--

>From 9b97d19c1184d3cf2cc82831e3d29067cf91f014 Mon Sep 17 00:00:00 2001
From: Jambunathan K <kjambunathan@gmail.com>
Date: Sat, 2 Jul 2011 01:56:01 +0530
Subject: [PATCH] Add org-lparse and org-odt as contrib modules

* lisp/org.el (org-modules): Add org-lparse and org-odt as
contrib modules.
* contrib/README: Ditto
2011-07-02 11:13:22 +02:00
Eric Schulte 9c0ddffdc4 fix typo 2011-07-01 17:37:30 -07:00
Eric Schulte ca4472063a org: fontify #+header lines
* lisp/org.el (org-fontify-meta-lines-and-blocks-1): Include header
  lines.
  (org-additional-option-like-keywords): Include data as a synonym for
  results.
2011-07-01 13:12:03 -07:00
Eric Schulte 6ddad0a91a ob: not including export-variable headers in cache sha1
* lisp/ob.el (org-babel-sha1-hash): Improving code layout and removing
  export-variable headers in cache sha1.
2011-07-01 12:56:22 -07:00
Martyn Jago dacf18e80a ob-lilypond: test suite, all tests passing 2011-07-01 12:22:33 -07:00
Eric Schulte 0b6eb6de3c ob-ref: don't let org-id rescan all IDs when trying to resolve a reference
* lisp/ob-ref.el (org-babel-ref-goto-headline-id): Don't let org-id
  rescan all IDs when trying to resolve a reference.
2011-07-01 12:09:34 -07:00
Julien Barnier 549a521256 Fix some #+ blocks fontification when there is no lang attribute
* lisp/org.el (org-fontify-meta-lines-and-blocks-1): Fix test for src blocks
lang attribute

When there is no lang attribute to a block (for quote, verse or others), the
lang variable is not nil, but an empty string.
2011-07-01 17:28:32 +02:00
Eric S Fraga ca07a5ba62 * Allow for a different markup for inactive time stamps on latex export 2011-07-01 11:03:58 +02:00
Bastien Guerry 0461d55c41 Merge branch 'master' of orgmode.org:org-mode 2011-07-01 09:38:47 +02:00
Eric Schulte 311b09d926 ob-org: expanding variables in Org-mode text
* lisp/ob-org.el (org-babel-expand-body:org): Implemented this
  function, only action is to expand variables.
  (org-babel-execute:org): Uses the new body-expansion function.
2011-06-30 15:23:46 -07:00
Nicolas Goaziou 934aae8812 Allow white spaces between the counter and the check-box in an item
* lisp/org-list.el (org-list-full-item-re): allow counter and
  check-box to be separated by white spaces.
(org-list-struct-apply-struct): reflect changes made to
`org-list-full-item-re'.
* lisp/org-html.el (org-html-export-list-line): recognize spaces
  between counter and check-boxes as valid.
* lisp/org-docbook.el (org-export-docbook-list-line): ditto.
2011-06-30 22:57:18 +02:00
Nicolas Goaziou e070ebe6b0 org-list: org-list-insert-item respects its POS argument value
* lisp/org-list.el (org-list-insert-item): make sure point is moved
  to the specified POS before starting the function.
2011-06-30 20:35:56 +02:00
Eric Schulte 0e4d6f3e77 moving ob-lilypond into the core of Org-mode 2011-06-30 11:06:22 -07:00
Nicolas Goaziou ffa016ba3d Fix some glitches in footnotes fontification
* lisp/org.el (org-activate-footnote-links): properly fontify inline
  footnotes.
(org-set-font-lock-defaults): apply changes to previous function.
2011-06-30 19:29:14 +02:00
Nicolas Goaziou bab6c5bf5a org-footnote: find correct reference when two footnotes are side-by-side
* lisp/org-footnote.el (org-footnote-at-reference-p): first check if
  point is at the beginning of a footnote. Indeed `org-in-regexp'
  first checks backwards and might find an incorrect footnote if they
  are side-by-side.
2011-06-30 19:14:18 +02:00