Commit Graph

14817 Commits

Author SHA1 Message Date
Nicolas Goaziou 45509c4490 ox: Fix erroneous code comment
* lisp/ox.el (org-export--generate-copy-script): Fix code comment.
2013-11-29 10:07:31 +01:00
Nicolas Goaziou 320ae9021e ox: Fix cache confusion during export
* lisp/ox.el (org-export--generate-copy-script): Do not share cache
  when copying buffers since keys and values are modified by
  side-effect.
2013-11-28 22:19:29 +01:00
Nicolas Goaziou 7ba387bdd2 Merge branch 'maint' 2013-11-28 11:46:33 +01:00
Nicolas Goaziou 07cbf9aa13 ox-freemind: Fix comma error when exporting
* contrib/lisp/ox-freemind.el (org-freemind-export-to-freemind): Fix
  code typo.

Reported-by: Jan-Mark Batke <badkey@gmx.net>
2013-11-28 11:44:44 +01:00
Bastien Guerry c811bb0ea5 org.el (org-cycle-hide-drawers): Fix bug about re-searching at the wrong side of point
* org.el (org-cycle-hide-drawers): Fix bug about re-searching
at the wrong side of point.

The bug was introduced by this commit:
http://orgmode.org/cgit.cgi/org-mode.git/commit/?id=e8bafd

And reported here:
http://article.gmane.org/gmane.emacs.orgmode/79282
2013-11-28 06:27:57 +01:00
Achim Gratz e655e664bf org: check for derived-mode-p instead of "org-mode" exactly
* lisp/org.el (org-mode-restart): Check for derived-mode-p instead of
  "org-mode" exactly.  This covers a situation normal-mode already
  instantiates a derived mode (e.g. via file local variables).
2013-11-27 20:52:03 +01:00
Achim Gratz f2483ec4bb org: fix commit 0911edfac8
* lisp/org.el (org-mode-restart): After `normal-mode´ the mode may not
  be "org-mode".  Explicitly switch to org-mode in that case.
2013-11-27 19:56:38 +01:00
Nick Dokos 0911edfac8 Second try: Ensure that file local variables are set
* lisp/org.el (org-mode-restart): Call normal-mode,
  instead of org-mode. This will set the mode but it
  will also set file local variables properly.

Reported by Tom Dye: C-c C-c on e.g an #+OPTIONS line
would lose file local variable settings.

The original fix (commit 5ea0228) was incorrect: if the
local variable was a mode setting, then we ended up in an
"infinite" recursion. Problem found, reported and a reproducer
provided by York Zhao.
2013-11-27 09:19:56 -05:00
Nick Dokos a82a5206f3 Revert "Ensure that file local variables are set"
This reverts commit 5ea02285ba.

York Zhao ran into an infinite recursion with this "fix".
2013-11-27 09:19:55 -05:00
Nicolas Goaziou 5a2dabc21b org-element: Optimize parser only when cache is active
* lisp/org-element.el (org-element-at-point): Try opportunistic
  shortcut only when cache is active.
2013-11-26 23:51:26 +01:00
Nicolas Goaziou 15246d1165 org-colview: Silence byte-compiler 2013-11-26 18:23:35 +01:00
Nicolas Goaziou 71c8474ae9 org-element: Speed-up for `org-element-at-point'
* lisp/org-element.el (org-element-at-point): Rewrite function. Remove
  optional argument.

Include an opportunistic search at the beginning of the function.  It
drastically improves speed on large sections for a small overhead on
small ones.
2013-11-26 18:18:33 +01:00
Nicolas Goaziou 2b22886005 org-element: Prepare signature change
* lisp/ob-exp.el: Declare signature change.
* lisp/org-macro.el: Declare signature change.
* lisp/org.el (org-backward-element, org-drag-element-backward): Avoid
  using optional argument from `org-element-at-point'.
* testing/lisp/test-org-element.el: Update test.
2013-11-26 18:08:19 +01:00
Carsten Dominik 0ae48c544b Fix bug in uncompilation of column format
* lisp/org-colview.el (org-columns-uncompile-format): Fix bug when retrieving
operator symbol.
2013-11-26 13:14:06 +01:00
York Zhao f1583aab46 Fix problem with :exact-positions in capture
* lisp/org-capture.el (org-capture-place-entry): Set :exact-position
before doing other stuff, to allow function with other target settings

TINYCHANGE

Assuming file "test.org" has a single headline "* Level 1" (ended with
newline character), when trying to use function type capture target in
an org-capture template, as shown in the example:

(setq org-capture-templates
      `(("t"
         "Test function type target"
         entry
         (function
          (lambda ()
            (set-buffer (org-capture-target-buffer "test.org"))
            (goto-char (point-max))))
         "* Level 2")))

When this template gets filled, file "test.org" becomes:

* Level 1
* Level 2

Instead of:

* Level 1
** Level 2

This is because when using function type target, `:exact-position' is
used to store buffer position returned by user's function (the lambda
function here), and function `org-capture-place-entry' will never
insert template as a child of current entry when `:exact-position' is
used.

The problem is addressed by not special casing for `:exact-position'
in function `org-capture-place-entry'.

York
2013-11-26 06:28:07 +01:00
Carsten Dominik 48db329296 Merge branch 'master' of orgmode.org:org-mode 2013-11-26 06:20:40 +01:00
Nicolas Goaziou a9eec72ecf Merge branch 'maint' 2013-11-25 23:36:38 +01:00
Nicolas Goaziou 3ead82a321 ox-publish: Error when publishing non-existent file
* lisp/ox-publish.el (org-publish-cache-ctime-of-src): Return an error
  when publishing a non-existent file.

Suggested-by: Arne Babenhauserheide <arne_bab@web.de>
2013-11-25 23:34:20 +01:00
Nicolas Goaziou 7bee47120b org-element: Update paragraph separate regexp
* lisp/org-element.el (org-element-paragraph-separate): More accurate
  regexp.
2013-11-25 23:19:48 +01:00
David Arroyo Menendez be8a1a2d69 org-license.el: add images directory to public domain functions 2013-11-24 22:09:37 +01:00
David Arroyo Menendez 06d1f7c3fa org-license.el: add public domain functions 2013-11-24 21:38:27 +01:00
Nicolas Goaziou 4a27c2b4b6 Improved Flyspell checks
* lisp/org.el (org-mode-flyspell-verify): Rewrite function using
  Org parser.  As a consequence, Org is more cautious about areas
  where checks are allowed.
(org-fontify-meta-lines-and-blocks-1, org-activate-footnote-links): Be
subtler when removing flyspell overlays.
(org-unfontify-region): Remove reference to unused `org-no-flyspell'
property.
(org-fontify-drawers): New function.
(org-set-font-lock-defaults): Use new function to fontify drawers.
* contrib/lisp/org-wikinodes.el (org-wikinodes-activate-links): Remove
reference to unused `org-no-flyspell' property.
2013-11-24 16:14:09 +01:00
Eric Schulte 8c98879d7c declare function to appease compiler
* lisp/ob-C.el (org-remove-indentation): Declare function to appease
  compiler.
* lisp/ob-core.el (org-remove-indentation): Declare function to
  appease compiler.
* lisp/ob-fortran.el (org-remove-indentation): Declare function to
  appease compiler.
2013-11-23 17:02:22 -07:00
Eric Schulte 39070b7fc7 sometimes remove common indentation when trimming
* lisp/ob-C.el (org-babel-C-execute): Remove common indentation when
  trimming.

* lisp/ob-core.el (org-babel-read-result): Remove common indentation
  when trimming.
  (org-babel-update-block-body): Remove common indentation when
  trimming.

* lisp/ob-fortran.el (org-babel-execute:fortran): Remove common
  indentation when trimming.

* lisp/ob-tangle.el (org-babel-process-comment-text): Better default
  to process tangled comments.
2013-11-23 15:57:29 -07:00
Eric Schulte 6a4dfd3182 fixed export of inline src blocks
* lisp/ob-exp.el (org-babel-exp-non-block-elements): Fixed export of
  inline src blocks.
2013-11-23 12:24:58 -07:00
Achim Gratz 1b0fb1a484 testing: allow to select tests
* mk/default.mk: Add default for new variable BTEST_RE to select all
  tests.  (BTEST_OB_LANGUAGES): Remove sh (always needed, as
  emacs-lisp) and add comment for ruby.  (BTEST): Use BTEST_RE to
  select tests from the test suite.  Reorganize pre-loading of Org,
  Babel, Ox and babel languages into a known clean environment.

* mk/targets.mk (CONF_TEST): Add BTEST_RE to the output of
  config-test.

* testing/org-batch-test-init.el: New file.  Remove all traces of any
  Org built into Emacs or otherwise present in the environment so it
  can not be picked up spuriously during testing or conceal errors in
  the Org version under test.

* testing/org-test.el (org-test-run-batch-tests): Showtest selection
  in messages.  (org-test-run-all-tests): Update ID locations.
2013-11-23 19:29:34 +01:00
Achim Gratz 9b6cff94aa Revert "added Makefile targets to check single tests"
This reverts commit 2c5251f0da.
2013-11-23 19:29:34 +01:00
Eric Schulte 1f498c93f2 change default sh code block shell to bash
* lisp/ob-sh.el (org-babel-sh-command): Change default sh code block
  shell to bash.
2013-11-23 09:14:27 -07:00
Achim Gratz e26b6fb77b Merge branch 'maint' 2013-11-23 16:18:10 +01:00
Achim Gratz 5213e0f704 org-crypt: fix 3e87d5893d
* lisp/org-crypt.el: Declare `epg-context´.
  (org-encrypt-string): Correct indentation.
2013-11-23 16:15:45 +01:00
Nicolas Goaziou e8bafdd04f Optimize hiding all drawers in a buffer
* lisp/org.el (org-cycle-hide-drawers): Make sure each drawer is only
  flagged once.
2013-11-23 09:34:48 +01:00
Nicolas Goaziou 402c310f00 Fix some defconst and docstrings
* lisp/org.el (org-drawer-regexp, org-clock-drawer-start-re,
  org-clock-drawer-end-re): Fix docstring.
(org-clock-drawer-re): Fix value
2013-11-23 09:34:48 +01:00
Nicolas Goaziou cdbdb9ee66 org-inlinetask: Small clean-up 2013-11-23 09:34:48 +01:00
Bastien Guerry b6a1584fa6 Merge branch 'maint' 2013-11-22 22:33:05 +01:00
Nicolas Richard 9ff70abc14 Use key-description on the keys mentionned by the functions defined by
`orgtbl-mode'.
2013-11-22 22:32:50 +01:00
Nicolas Richard a598e9c163 Remove old comment
The comment was introduced (in git) at commit
4be4c56239 ; it refers to a
FIXME located ~40 lines above it. The FIXME was removed in
dc8bc8e392.
2013-11-22 22:32:45 +01:00
Eric Schulte 89a35bc147 inline src block parser set "switches" in info
* lisp/ob-core.el (org-babel-parse-inline-src-block-match): Inline src
  block parser set "switches" in info, otherwise later offset are broken.
2013-11-22 08:28:29 -07:00
Eric Schulte bbcf17b969 set location info parameter for inline src blocks
* lisp/ob-core.el (org-babel-execute-src-block): Set location info
  parameter for inline src blocks.
  (org-babel-get-src-block-info): Set location info parameter for
  inline src blocks.
2013-11-22 08:28:29 -07:00
Eric Schulte 060d79f080 whitespace fixes 2013-11-22 08:28:29 -07:00
Nicolas Goaziou d0e8e57636 Merge branch 'maint' 2013-11-22 12:44:15 +01:00
Nicolas Goaziou 72a81dd06a Fix export of links to attachements (part 2)
* lisp/org.el (org-entry-get): Widen buffer in order to retrieve
  properties, as `org-entry-properties' and
  `org-entry-get-with-inheritance' already do.
2013-11-22 12:42:41 +01:00
Nicolas Goaziou 5ae3a25755 Fix export of links to attachments (part 2)
* lisp/org.el (org-entry-get): Widen buffer in order to retrieve
  a property, as both `org-entry-properties' and
  `org-entry-get-with-inheritance' already do.
2013-11-22 12:39:15 +01:00
Bastien Guerry 0a4d192b79 Merge branch 'maint' 2013-11-22 10:52:53 +01:00
Alexander Vorobiev b88b5d4fd1 org-compat: Support for getting data from Windows clipboard
* lisp/org-compat.el (org-get-x-clipboard): Use w32-get-clipboard-data
to get the clipboard data under Windows.

TINYCHANGE
2013-11-22 10:52:41 +01:00
Nicolas Goaziou 7a726dd137 Merge branch 'maint' 2013-11-22 09:49:17 +01:00
Nicolas Goaziou 23e6c72133 ox-html: Fix TOC entries
* lisp/ox-html.el (org-html--format-toc-headline): Add missing
  headline number in TOC entries.  This fixes commit
  4c94c4d062.
2013-11-22 09:48:25 +01:00
Eric Schulte 336430f6e8 ox-bibtex handle missing ebib or bibtex2html
If ebib is missing then the jump function from org-bibtex-extras.el
  will be used if defined, else no jump function will be used.

  Only call `org-bibtex-process-bib-files' on html export so that
  ox-bibtex may be used for latex export without bibtex2html being
  installed.
2013-11-21 20:59:07 -07:00
Eric Schulte 97e8bc15e7 Revert ""cite" link type in contrib/org-bibtex-extras"
This reverts commit 03c141a00e.
2013-11-21 20:55:53 -07:00
Eric Schulte 4547be972a raise useful error when obe-bibtex-file isn't set 2013-11-21 20:54:59 -07:00
David Arroyo Menendez 7b938d8c2c Merge branch 'master' of orgmode.org:org-mode 2013-11-22 00:12:47 +01:00