Commit Graph

11791 Commits

Author SHA1 Message Date
Bastien Guerry 1b4e396b6b Merge branch 'maint-fixes' into maint 2012-12-24 14:01:25 +01:00
Achim Gratz b63275350f Backwards compatibility: don't defalias special forms
* lisp/org-compat.el (org-condition-case-unless-debug): Do not use
  defalias for special forms, the Emacs 22 byte-compiler does not
  recognize them correctly when compiling macros.  Use a macro instead
  and rely on macro expansion.  That however makes the decision at
  compile time, which should be acceptable in this case since it only
  affects debugging.
2012-12-24 14:01:14 +01:00
Bastien Guerry 58999598ed New compatibility function `org-delete-directory'
* org-compat.el (org-delete-directory): New compatibility
function for Emacs 22, where `delete-directory' does not
support recursive deletion.

* org-odt.el (org-odt-cleanup-xml-buffers): Use the new
compatibility function.

Thanks to Achim and Jambunathan for suggesting this.
2012-12-24 13:51:48 +01:00
Bastien Guerry 40cb44e795 Fix regression: allow editing HTML and LaTeX source blocks again
* org.el (org-table-map-tables): Fix allowed blocks.
(org-edit-special): Fix regression: allow editing HTML and
LaTeX source blocks again.

* org-src.el (org-edit-src-code): Ditto.

Thanks to Nicolas Richard and Bernt Hansen for reporting bugs
in this area.
2012-12-24 01:25:33 +01:00
Bastien Guerry f4a2680f4c Merge branch 'maint-fixes' into maint 2012-12-24 01:14:42 +01:00
Bastien Guerry 73d506a8dc org.el (org-nonsticky-props): Add `htmlize-link'
* org.el (org-nonsticky-props): Add `htmlize-link'.

Thanks to Samuel Wales for reporting a bug related to this.
2012-12-24 00:08:02 +01:00
Bastien Guerry 317a96a471 org.el (org-nonsticky-props): Add `htmlize-link'
* org.el (org-nonsticky-props): Add `htmlize-link'.

Thanks to Samuel Wales for reporting a bug related to this.
2012-12-23 21:17:43 +01:00
Bastien Guerry 98a5f3df32 Don't allow special edit in verbatim blocks.
* org.el (org-edit-special): Don't edit in verbatim blocks.

* org-src.el (org-edit-src-code): Ditto.
2012-12-23 17:54:42 +01:00
Bastien Guerry f0a64ab3b5 org-table.el: Use `org-delete-backward-char' which doesn't modify match data anymore
* org-table.el (org-table-fedit-lisp-indent)
(orgtbl-self-insert-command): Use `org-delete-backward-char'
instead of `backward-delete-char'.

* org.el (org-delete-backward-char, org-delete-char): Save
match data.
2012-12-23 17:31:41 +01:00
Bastien Guerry c2e662cf79 Revert "Save match data in `org-delete-backward-char' and `org-delete-char'"
This reverts commit c800836d7c.
2012-12-23 17:26:45 +01:00
Bastien Guerry 54731c965d Merge branch 'maint-fixes' into maint 2012-12-23 17:20:38 +01:00
Bastien Guerry a118ae4e1c org-src.el (org-edit-src-code): Fix another bug about editing special blocks "example" and "verbatim"
* org-src.el (org-edit-src-code): Fix another bug about
editing special blocks "example" and "verbatim".
2012-12-23 17:20:27 +01:00
Bastien Guerry 9f4ecf79b1 org.el (org-edit-special): Fix bug about editing special blocks "example" and "verbatim"
* org.el (org-structure-template-alist): Add verbatim.
(org-edit-special): Fix bug about editing special blocks
"example" and "verbatim".
2012-12-23 17:18:47 +01:00
Jambunathan K 7ab4464ea4 org-odt.el: Fix Emacs Bug#13254
* lisp/org-odt.el (org-export-as-odt-batch): Init
`org-odt-zip-dir'.  Fix Emacs Bug#13254.
2012-12-23 12:42:43 +01:00
Jambunathan K b495c92239 org-odt.el: Correctly format link to headlines that have description
* lisp/org-odt.el (org-odt-format-org-link): Add check for
presence of description in headline links.

Fix
http://lists.gnu.org/archive/html/emacs-orgmode/2012-11/msg00841.html
2012-12-23 12:42:43 +01:00
Bastien Guerry c800836d7c Save match data in `org-delete-backward-char' and `org-delete-char'
* org.el (org-delete-backward-char, org-delete-char): Save
match data (`delete-backward-char' and `delete-char' don't.)
(org-enable-table-editor, org-insert-heading)
(org-remove-timestamp-with-keyword, org-self-insert-command):
Use `delete-backward-char' instead of `backward-delete-char'.

* org-table.el (org-table-fedit-lisp-indent)
(orgtbl-self-insert-command): Ditto.

* org-latex.el (org-export-latex-subcontent): Ditto.

* org-clock.el (org-clocktable-write-default): Ditto.

* org-ascii.el (org-export-ascii-preprocess): Ditto.

Thanks to Vegard Vesterheim for raising this issue and proposing a patch,
and to Carsten for pointing at the root of the problem.
2012-12-23 12:30:40 +01:00
Bastien Guerry 91056e2a8d org-export-generic.el: Small code clean-up
* org-export-generic.el (org-export-generic-preprocess): Use
`delete-backward-char' instead of `backward-delete-char'.
(org-generic-alist, def-org-export-generic-keyword)
(org-export-generic-remember-section, org-export-generic)
(org-export-generic-format, org-export-generic-header)
(org-generic-level-start): Remove dangling parentheses,
fix indentation.
2012-12-23 12:23:02 +01:00
Bastien Guerry 6b9d77eb8c orgguide.texi (Multi-state workflows, Agenda commands): Fix missing dashes
* orgguide.texi (Multi-state workflows, Agenda commands): Fix
missing dashes.
2012-12-22 23:30:59 +01:00
Bastien Guerry c846f024c1 Fix more instances of missing dashes. 2012-12-22 23:29:03 +01:00
Bastien Guerry 6e1521f13b org.texi and orgguide.texi: Hyphen and dash fixes.
See revno 111060 by Paul Eggert from the emacs-24 bzr branch.
2012-12-22 21:30:27 +01:00
Bastien Guerry f015ae5b8b org.el (org-todo): Ignore the comment string when changing a TODO state
* org.el (org-todo): Ignore the comment string when changing
the TODO state of a headline.

Thanks to Samuel Wales for reporting this.
2012-12-22 20:16:17 +01:00
Sebastien Vauban ce4e0846b2 When pasting a copied subtree, respect the whitelines before and after
* org.el (org-copy-subtree, org-paste-subtree): Fix whitespace
handling when copying/pasting a subtree.
2012-12-22 16:22:12 +01:00
Bastien Guerry 9333426c12 Re-apply commit 27bcf9a together with a workaround for `process-file'.
Thanks to Michael Albinus for hunting this bug and for providing
this workaround.
2012-12-21 09:45:53 +01:00
Bastien Guerry 3b9c1a0008 test-org-src.el (test-org-src/blank-line-block): Fix test
* test-org-src.el (test-org-src/blank-line-block): Fix test.
2012-12-21 09:36:20 +01:00
Bastien Guerry 30922bd7e9 org.el (org-edit-special): Fix docstring.
* org.el (org-edit-special): Fix docstring.
(org-in-src-block-p): Small enhancement.
2012-12-21 09:32:38 +01:00
Bastien Guerry 483aa1312d Revert "Backport revno 111277 from Emacs trunk."
This reverts commit 27bcf9a70b.
2012-12-21 08:50:26 +01:00
Bastien Guerry f8aab87141 Fix compiler warning. 2012-12-20 19:01:17 +01:00
Bastien Guerry 2824e1fd1d Update the tests wrt previous commit.
* test-org-exp.el (test-org-exp/stripping-commas): Update the
list of args for org-export-as-* functions.

* test-ob-lob.el (test-ob-lob/export-lob-lines): Ditto.

* test-ob-exp.el (ob-exp/noweb-on-export)
(ob-exp/noweb-on-export-with-exports-results)
(ob-exp/exports-both, ob-exp/mixed-blocks-with-exports-both)
(ob-exp/export-with-name)
(ob-exp/export-with-header-argument)
(ob-exp/evaluate-all-executables-in-order)
(ob-exp/noweb-strip-export-ensure-strips)
(ob-exp/export-from-a-temp-buffer): Ditto.
2012-12-20 18:54:57 +01:00
Bastien Guerry 44558f0bbd Unify the list of args for org-export-as-* functions.
* org-publish.el (org-publish-org-to): Call `org-export-as-*'
functions with the correct list of arguments.

* org-html.el (org-export-as-html): Delete obsolete arg
`hidden'.
(org-export-as-html-and-open, org-export-as-html-batch)
(org-export-region-as-html): Don't use obsolete arg.

* org-ascii.el (org-export-as-ascii): Delete obsolete arg
`hidden'.
(org-export-as-ascii-to-buffer): Don't use obsolete arg.
2012-12-20 18:54:33 +01:00
Bastien Guerry 8165be3aa5 org.el: Prevent link activation in source code blocks
* org.el (org-in-fixed-width-region-p): Save match data.
(org-in-src-block-p): Use case-folding for searching the block
boundaries.
(org-activate-plain-links, org-activate-angle-links)
(org-activate-bracket-links): Prevent link activation in
source code blocks.

Thanks to Sébastien Vauban for reporting a related issue.
2012-12-20 16:34:27 +01:00
Bastien Guerry e89994a75c Revert "org.el (org-set-font-lock-defaults): Don't activate links in source code blocks and fixed-width regions"
This reverts commit f983cf1729.
2012-12-20 16:15:54 +01:00
Bastien Guerry de84aadf8f org-odt.el: Fix Emacs bug #13197.
* org-odt.el (org-odt-cleanup-xml-buffers): Fix Emacs
Bug#13197 by setting the correct buffer before marking it
unmodified to silently kill him.

Thanks to Drew Adams for reporting this and to Jambunathan for
offering to fix it.
2012-12-20 16:06:25 +01:00
Michael Albinus 27bcf9a70b Backport revno 111277 from Emacs trunk.
* ob.el (org-babel-temp-file): Fix setting of
`temporary-file-directory' on remote hosts.

* ob-eval.el (org-babel-shell-command-on-region): Use
`process-file' instead of `call-process-region'.  The latter one
does not work on remote hosts.
2012-12-20 15:49:19 +01:00
Bastien Guerry f983cf1729 org.el (org-set-font-lock-defaults): Don't activate links in source code blocks and fixed-width regions
* org.el (org-set-font-lock-defaults): Don't activate links in
source code blocks and fixed-width regions.

Thanks to Sébastien Vauban for reporting an error related to this.
2012-12-20 15:42:53 +01:00
Bastien Guerry ab5e372926 org-agenda.el (org-agenda-finalize): Fix links activation
* org-agenda.el (org-agenda-finalize): Fix links activation.
2012-12-20 15:34:10 +01:00
Dmitry Antipov bfb9f9d10f Use (point-marker) instead of (move-marker (make-marker) (point))
* org-agenda.el (org-agenda-get-restriction-and-command): Use `point-marker'.
* org-capture.el (org-capture-place-template): Likewise.
* org-colview-xemacs.el (org-dblock-write:columnview): Likewise.
* org-colview.el (org-dblock-write:columnview): Likewise.
* org-mobile.el (org-mobile-locate-entry): Likewise.
* org-table.el (org-table-convert-region): Likewise.
* org.el (org-update-statistics-cookies): Likewise.
* contrib/lisp/org-invoice.el (org-dblock-write:invoice): Likewise.
2012-12-20 13:16:41 +01:00
Achim Gratz b508943d32 org-compat: new macro org-no-popups
* lisp/org-compat.el (org-no-popups): New wrapper macro which
  let-binds the correct variables to suppress popup windows depending
  on the Emacs version in use.  This is a compile-time decision when
  byte-compiling.

* lisp/org.el (org-get-location, org-switch-to-buffer-other-window):
  Use the wrapper `org-no-popups´ to let-bind the correct variables
  for suppression of popup windows.
2012-12-20 12:57:52 +01:00
Bastien Guerry dfa3c74e34 Fix commit 14ffe2. 2012-12-20 11:13:30 +01:00
Bastien Guerry 14ffe22b8f org.el (org-open-at-point): Handle non-links correctly.
* org.el (org-open-at-point): Throw the correct error on
non-links.  Use `user-error' instead of `error'.

This fixes a bug introduced in ad35e2.

Thanks to Samuel Loury for spotting this and for submitting a patch.
2012-12-20 09:39:35 +01:00
Bastien Guerry 963ede0a9d Fix some compiler warnings.
* org.el (org-in-fixed-width-region-p): Define before use.

* org-src.el (org-in-src-block-p): Declare function.
2012-12-20 01:16:01 +01:00
Bastien Guerry 23e2346c4c org-compat.el: Fix bug: don't use `eval-when-compile' when aliasing `user-error'.
* org-compat.el: Fix bug: don't use `eval-when-compile' when
aliasing `user-error'.

Thanks to Bernt Hansen for reporting this bug.
2012-12-19 17:43:57 +01:00
Achim Gratz b9ea74a195 Backwards compatibility for `user-error´
* lisp/org-compat.el (user-error): Defalias to `error´ for Emacsen
  that don't have it.
2012-12-19 15:33:29 +01:00
Achim Gratz bdc95549dd Backwards compatibility: use compatibility macro
* lisp/org-agenda.el (org-agenda-write): Use
  org-called-interactively-p instead of called-interactively-p.
2012-12-19 15:30:23 +01:00
Achim Gratz 9a71174348 Backwards compatibility: check for possibly undefined variables in org-find-invisible-foreground
* lisp/org.el (org-find-invisible-foreground): Do not use the value of
  variables `default-frame-alist´, `initial-frame-alist´ and
  `window-system-default-frame-alist´ when their symbol is not bound.

This avoids an error with Emacs 22, which does not define
`window-system-default-frame-alist´, that prevents the test suite from
even starting, the other variables are treated the same as a defensive
measure.
2012-12-19 11:04:22 +01:00
Bastien Guerry db28a7a0ab Merge branch 'maint' of orgmode.org:org-mode into maint 2012-12-19 00:23:59 +01:00
Bastien Guerry 1c57cd5a7d org-agenda.el (org-agenda-skip): Only check if point is inside a code block, not at a code block.
* org-agenda.el (org-agenda-skip): Only check if point is
inside a code block, not at a code block.

Thanks to Eric Fraga for reporting this problem.
2012-12-19 00:23:30 +01:00
Nicolas Goaziou 7739e8b5f7 Small refactoring
* lisp/org.el (org-fill-paragraph): Small refactoring.
2012-12-18 19:32:50 +01:00
Bastien Guerry 374efdd63e org.el (org-in-fixed-width-region-p): Rewrite using org-element.el.
* org.el (org-in-fixed-width-region-p): Rewrite using
org-element.el.

Thanks to Nicolas Goaziou for suggesting this.
2012-12-18 15:09:40 +01:00
Bastien Guerry 9d4dd69b30 org.el (org-fill-paragraph): Fill correctly in source code block.
* org.el (org-fill-paragraph): Fill correctly in source code
block.

Thanks to Sébastien Vauban for reporting this.
2012-12-18 12:49:49 +01:00
Nicolas Goaziou 20839ced71 org-element: Fix parsing of a list in a block in a list
* lisp/org-element.el (org-element--parse-elements,
  org-element-at-point): Fix parsing of a list in a block in a list.
* testing/lisp/test-org-element.el: Add test.
2012-12-16 00:45:17 +01:00