Commit Graph

9324 Commits

Author SHA1 Message Date
Carsten Dominik 8ad6f534f9 Fix parenthesis bug left by earlier patch
* lisp/org.el (org-read-date-minibuffer-local-map): Fix parenthesis bug
2013-09-08 08:57:20 +02:00
Carsten Dominik 3e99e9298c Allow sparse trees with property values containing a slash
* lisp/org.el (org-make-tags-matcher): Do not interpret / in property
value as starter of TODO match.
2013-09-08 08:56:17 +02:00
Carsten Dominik b64626ecf4 Preserve point when switching to overview
* lisp/org.el (org-overview): Preserve point.

We want to preserve point when changing global visibility.  This is a
bit dangerouns, because it can leave point in an invisible location.
However, we want to make sure that pressing M-TAG three times returns
us to the same position as before.
2013-09-08 08:13:35 +02:00
Carsten Dominik 75400198ef Merge branch 'maint' 2013-09-08 07:33:34 +02:00
Carsten Dominik e8023dde58 Turn off replacing of disputed keys for the read-date keymap
* lisp/org.el (org-read-date-minibuffer-local-map): Don't replace disputed
keys when defining this keymap.
(org-read-date: Remove unnecessary binding of `org-replace-disputed-keys'.

This original fix did not work, thanks to Miro Bezjak for showing what
the proper fix should be.
2013-09-08 07:33:18 +02:00
Oleh 9a0e84fbd7 Lazy autoloading of org-id.el to follow links
* lisp/org.el (org-open-at-point): The new code is being run in the
same spot as `org-open-link-functions'.  In case they failed, check
if link matches "^id:" and if so, load the id interface and follwo the
link.

This fixes Emacs bug#14910: org-mode `org-open-at-point' doesn't
follow id links.
2013-09-07 21:16:58 +02:00
Michael Brand 0f5f58037d Fix table formula debugger error display
* lisp/org-table.el (org-table-eval-formula): Align the arrow pointing
to the error in a Calc formula to the other fomula debugger logs.
2013-09-07 16:21:38 +02:00
Roberto Huelga Díaz 54d805aed4 Timer: play a sound as configured by `org-clock-sound' actualy only beep
* lisp/org-timer.el (org-timer-set-timer): Use the variable
  `org-clock-sound' when calling `org-notify'.

When org-notify second parameter is t we only get the standard beep.
Evaluating with coma we can use different sounds for differents
running timers, as `org-clock-sound' was set when
`org-timer-set-timer' get execute

Patch proposal by Roberto Huelga Díaz.

TINYCHANGE
2013-09-06 16:01:22 +02:00
Nicolas Goaziou 2e3f5558d7 Do not handle `adaptive-fill-regexp' in comments
* lisp/org.el (org-adaptive-fill-function): Do not handle
  `adaptive-fill-regexp' in comments as the behaviour is not
  satisfying.
* testing/lisp/test-org.el: Remove test.
2013-09-06 12:32:13 +02:00
Nicolas Goaziou 5fdb93eb39 Merge branch 'maint' 2013-09-04 15:26:11 +02:00
Nicolas Goaziou 29c2827469 org-list: Fix list repairing
* lisp/org-list.el (org-list-struct-apply-struct): Do not move item's
  contents within a child above when repairing indentation.
* testing/lisp/test-org-list.el: Add tests.
2013-09-04 15:21:33 +02:00
Carsten Dominik f144938735 Merge branch 'master' of orgmode.org:org-mode 2013-09-03 16:11:05 +02:00
Carsten Dominik 7fdb56a861 Small adjustment to behavior of org-insert-heading
* lisp/org.el (org-insert-heading): Allow to remove blank lines if the
user does not want any.
2013-09-03 16:10:16 +02:00
Nicolas Goaziou 1ad8f4a01e ox-html: Fix meta tag output for properties
* lisp/ox-html.el (org-html--build-meta-info): Fix output of meta tags
  when properties are present.

Reported-by: Kyle Machulis <kyle@nonpolynomial.com>
2013-09-03 14:11:37 +02:00
Nicolas Goaziou fe1289b382 Revert "ignore inline source block on #+ prefixed lines"
This reverts commit 24812caff4.  This is
a wrong fix sinc the function already calls `org-element-context',
which cannot find Babel code in macros anyway.
2013-09-03 14:10:38 +02:00
Carsten Dominik 0022904e83 Revert "Revert "Use `xdg-open' to open files where available""
This reverts commit e26c55f5b5.
2013-09-03 09:54:03 +02:00
Carsten Dominik 4242b12d1b Fix typo. 2013-09-03 07:07:57 +02:00
Carsten Dominik e26c55f5b5 Revert "Use `xdg-open' to open files where available"
This reverts commit 15ae89b394.
2013-09-02 22:55:30 +02:00
Eric Schulte 24812caff4 ignore inline source block on #+ prefixed lines
* lisp/ob-exp.el (org-babel-exp-non-block-elements): Ignore inline
  source block on #+ prefixed lines.
2013-09-02 10:33:55 -06:00
Carsten Dominik 7916e491c5 Fix typo in a docstring
* lisp/org.el (org-unlogged-message): Fix typo in dostring.
2013-09-02 16:15:07 +02:00
Carsten Dominik cb35fa9f46 Handle literal 'hline arguments passed to ruby
* lisp/ob-ruby.el: New customizations `org-babel-ruby-hline-to' and
`org-babel-ruby-nil-to'
(org-babel-ruby-var-to-ruby): Convert incoming 'hlines.
(org-babel-ruby-table-or-string): Convert outgoing nils.

Patch by Rick Frankel.
2013-09-02 16:11:28 +02:00
Bastien Guerry 138f18d3ce Fix compiler warnings.
* org-attach.el (vc-git-root):
* ob-shen.el (org-babel-ruby-var-to-ruby): Declare.
2013-09-02 13:33:52 +02:00
Carsten Dominik 15ae89b394 Use `xdg-open' to open files where available
* lisp/org.el (org-file-apps-defaults-gnu): Use `xdg-open' to open files
  where available.
2013-09-02 12:06:28 +02:00
Carsten Dominik 3f10db731c Improve docstring of `orgtbl-radio-table-templates'
* lisp/org-table.el (orgtbl-radio-table-templates): Improve docstring.
2013-09-02 11:33:54 +02:00
Carsten Dominik ed499997e9 Don't overpopulate the message buffer
* lisp/org.el (org-unlogged-message): New function.
(org-cycle): Use `org-unlogged-message'.
(org-cycle-internal-global): Use `org-unlogged-message'.
(org-cycle-internal-local): Use `org-unlogged-message'.
(org-global-cycle): Use `org-unlogged-message'.
(org-display-outline-path): Use `org-unlogged-message'.
2013-09-02 08:50:00 +02:00
Carsten Dominik 36bd978659 Fix completion of headline names after *
* lisp/org-pcomplete.el (org-make-org-heading-search-string): Fix function
declaration.
(pcomplete/org-mode/searchhead): Remove incorrect second arguments to
`org-make-org-heading-search-string'.
2013-09-02 08:08:58 +02:00
Carsten Dominik a6986494a0 Turn off replacing disputed keys for rog-read-date
* lisp/org.el (org-read-date): Turn off replacing disputed keys when defining
the minibuffer keys during date selection.
2013-09-02 07:51:08 +02:00
oleh 1871bf6933 Allow nil as return of sexp in capture templates
* lisp/org-capture.el (org-capture-expand-embedded-elisp): Throw error if
result is not a string and not nil.  If the result is nil, treat it as
if it was the empty string.
2013-09-01 19:47:37 +02:00
Carsten Dominik 2dc1f8d19e Merge branch 'master' of orgmode.org:org-mode 2013-09-01 15:00:07 +02:00
rasmus 8a05053ce4 Remove dependency on latexsym LaTeX package
* ox-latex.el (org-latex-item): Use square as unchecked symbol.
* org.el (org-latex-default-packages-alist): Remove latexsym.

Use amssymb symbols to reduce required packages.
2013-09-01 14:30:36 +02:00
rasmus b69fa027c0 org-entities: New entities
* org-entities.el (org-entities): Add support for ell, imath, jmath,
varphi, varpi, aleph, gimel, beth, dalet, cdots, S (§), dag, ddag,
colon, therefore, because, triangleq, leq, geq, lessgtr, lesseqgtr,
ll, lll, gg, ggg, prec, preceq, preccurleyeq, succ, succeq,
succurleyeq, setminus, nexist(s), mho, check, frown, diamond.  Changes loz,
vert, checkmark, smile and tilde.
2013-09-01 14:28:13 +02:00
Carsten Dominik b8c85a13bb Improve the empty line insertion behavior of `org-insert-heading'.
* lisp/org.el (org-insert-heading): Improve the empty line insertion behavior.
Basically, never remove empty lines, only add them.

This was a request by Nicolas Goaziou.
2013-09-01 14:04:48 +02:00
Carsten Dominik 2c38c3acc0 Use vc-git to find the git repository for org-attach
* lisp/org-attach.el (org-attach-commit): Use vc-git to find the git
repository.

Org attach use to fail to commit the attached file in git or git annex
when the .git repository is not in the data sub-directory.

This new code will use vc-git to find the .git file, and from this do
what is needed for committing file into git or git annex.

Patch by Remi Vanicat
2013-08-31 15:58:12 +02:00
Carsten Dominik 7f9d0688d4 Fix cursor movement to a specific column
* lisp/org-compat.el (org-move-to-column): Turn off invisibility stuff
for moving the cursor to a column.

Pathc by Nick Dokos
2013-08-31 15:44:34 +02:00
Carsten Dominik 76dc3eb0af Combine org-mac-message.el and org-mac-link-grabber into org-mac-link.el
* contrib/lisp/org-mac-link-grabber.el: File removed.
* contrib/lisp/org-mac-link.el: New file.
* contrib/lisp/org-mac-message.el: File removed
* lisp/org.el (org-modules): Update with the new module org-mac-link

Patch by Anthony Lander
2013-08-31 15:29:03 +02:00
Nicolas Goaziou 580b7fce95 Merge branch 'maint' 2013-08-31 14:34:37 +02:00
Nicolas Goaziou 22b4473fcc ox: Do not build TOC for headlines below H value
* lisp/ox.el (org-export-collect-headlines): Do not build TOC for
  headlines below H value.
* testing/lisp/test-ox.el: Add test.

Reported-by: Jambunathan K <kjambunathan@gmail.com>
2013-08-31 14:30:25 +02:00
Carsten Dominik d11ba3ade6 Turn off message logging of displayed outline path
* lisp/org.el (org-display-outline-path): Do not log outline path in
Message buffer.
2013-08-31 08:43:08 +02:00
Carsten Dominik 1d63fb7ebc Speed up agenda by allowing to turn of some drawer properties
* lisp/org.el (org-agenda-ignore-drawer-properties): New option
(org-agenda-prepare-buffers): Honour
`org-agenda-ignore-drawer-properties'.

Following a proposal by Daniel Clemente
2013-08-31 07:56:40 +02:00
Carsten Dominik 4b749075f4 Center currently clocked headline close to top of screen
* lisp/org-clock.el (org-clock-goto): Recenter to thrd line

Patch modified from proposal by Sebastien Vauban.
2013-08-30 18:14:53 +02:00
Carsten Dominik daf36fc918 Fix some issue with orgtbl-mode
* lisp/org-table.el (orgtbl-send-replace-tbl): Allow multiple spaces between
keywords in RECEIVE ORGTBL lines.
* doc/org.texi (A @LaTeX{} example): Fix typo in variable name.
2013-08-30 17:53:28 +02:00
Carsten Dominik 31c2c517f4 Merge branch 'master' of orgmode.org:org-mode 2013-08-30 17:10:45 +02:00
Nicolas Goaziou 81626dcc15 Merge branch 'maint' 2013-08-30 14:38:03 +02:00
Nicolas Goaziou cb35032641 org-element: Modify misleading comment
* lisp/org-element.el (org-element-context): Modify misleading
  comment.
2013-08-30 14:37:16 +02:00
Nicolas Goaziou c33e04dcf2 Merge branch 'maint' 2013-08-30 14:22:07 +02:00
Nicolas Goaziou 026b99ecb8 org-element: Fix parsing error in `org-element-context'
* lisp/org-element.el (org-element-text-markup-successor,
  org-element-latex-or-entity-successor,
  org-element-export-snippet-successor,
  org-element-footnote-reference-successor,
  org-element-inline-babel-call-successor,
  org-element-inline-src-block-successor,
  org-element-line-break-successor, org-element-link-successor,
  org-element-plain-link-successor, org-element-macro-successor,
  org-element-radio-target-successor,
  org-element-statistics-cookie-successor,
  org-element-sub/superscript-successor,
  org-element-table-cell-successor, org-element-target-successor,
  org-element-timestamp-successor): Remove LIMIT argument.
(org-element--parse-objects, org-element--get-next-object-candidates):
Apply signature change to successors.
(org-element-context): Narrow buffer around object containers so
parsing of objects when using this function is done under the same
restrictions as in buffer parsing.
* testing/lisp/test-org-element.el: Add test.
2013-08-30 14:19:30 +02:00
Nicolas Goaziou eaa458594f Merge branch 'maint' 2013-08-29 10:43:19 +02:00
Nicolas Goaziou 180d112334 ox: Fix void `org-table-number-fraction'
* lisp/ox.el (org-export-table-cell-alignment): Ensure required
  variables are available.

This error is triggered in ODT export with lists using :list-table
feature.  This creates tables as parsed data on the fly in the tree,
triggering call to `org-export-table-cell-alignment', but `org-table'
library may not be available.
2013-08-29 10:38:15 +02:00
Nicolas Goaziou 39384cc157 ox: Fix 8c833ed9fb
* lisp/ox.el (org-export-table-cell-alignment): Use correct :test.
  See 2baa2c3afa.
2013-08-29 10:37:53 +02:00
Nicolas Goaziou 754a72eb2a Merge branch 'maint' 2013-08-29 10:22:09 +02:00
Nicolas Goaziou 8c833ed9fb ox: Fix stack overflow in equal error (part 2)
* lisp/ox.el (org-export-table-cell-alignment): Apply the same changes
  as in 2baa2c3afa.
2013-08-29 10:17:09 +02:00
Nicolas Goaziou 718e1ec3c4 Merge branch 'maint' 2013-08-29 10:08:24 +02:00
Nicolas Goaziou 2baa2c3afa ox: Fix stack overflow in equal error
* lisp/ox.el (org-export-table-cell-width): Modify key (now an
  element) and value structure (now a vector) of cache so it can use
  `eq' as test. Elements are circular lists so `equal' cannot apply on
  them.

Reported-by: Jambunathan K <kjambunathan@gmail.com>
2013-08-29 10:04:22 +02:00
Nicolas Goaziou 895d18abc0 ox-publish: Remove unused dynamically scoped variable
* lisp/ox-publish.el (project-plist): Remove variable.
2013-08-27 10:32:59 +02:00
Nicolas Goaziou e7c8872005 ox: Fix docstrings
* lisp/ox.el (org-export-to-buffer, org-export-to-file): Fix
  docstrings.
2013-08-27 10:32:59 +02:00
Nicolas Goaziou c2fa90248c ox-org: Fix arguments mismatch in `org-export-as-org'
* lisp/ox-org.el (org-export-as-org): Add missing BODY-ONLY argument,
which is always nil in this back-end.

Reported-by: Nicolas Girard <girard.nicolas@gmail.com>
2013-08-23 09:32:35 +02:00
Nicolas Goaziou 54431e2a5b Merge branch 'maint' 2013-08-22 21:55:51 +02:00
Nicolas Goaziou 9e51049b22 Fix filling with `adaptive-fill-regexp'
* lisp/org.el (org-adaptive-fill-function): Look for a fill prefix at
  the beginning of the paragraph and subsquently on its second line
  instead of the current line.
* testing/lisp/test-org.el: Add test
2013-08-22 21:54:52 +02:00
Nicolas Goaziou 6fdc2361c9 ob-core: Fix wrong indentation of results
* lisp/ob-core.el (org-babel-get-src-block-info): Look for indentation
  value at the correct location.
* testing/lisp/test-ob.el: Add test.
2013-08-21 14:16:28 +02:00
Craig Tanis 927f1bd5e9 Latex export: Fix the position of captions on unfontified src blocks
* lisp/ox-latex (org-latex-src-block): Change format string to
  position caption after figure content.

Note: This is now consistent with the caption positioning for
formatted src blocks, later in the same function.

TINYCHANGE
2013-08-15 10:00:45 +02:00
Achim Gratz 75f73e0b87 ob-python
From 8f3c510f43e458a1bbb58b126fc4e402007e6cfe Mon Sep 17 00:00:00 2001
From: Achim Gratz <Stromeko@Stromeko.DE>
Date: Mon, 12 Aug 2013 21:10:27 +0200
Subject: [PATCH] ob-python: run-python requires argument cmd

* lisp/ob-python.el: Supply non-optional argument `cmd' to all
  invocations of `run-python'.  Invert a condition of to remove an
  expendable progn form.

46d05e4d08 corrected the signatore in the declaration of run-python,
but the call without an argument was left in.
2013-08-12 13:18:23 -06:00
Nicolas Goaziou cf8cc35ec5 ox: Fix test errors
* lisp/ox.el (org-export-data-with-backend): Set temporary back-end as
  the new back-end in local communication channel.
(org-export-filter-apply-functions): Handle corner case where back-end
is nil.
* testing/lisp/test-ox.el: Small refactoring.
2013-08-12 10:42:05 +02:00
Nicolas Goaziou 2a28def0ae Merge branch 'maint' 2013-08-10 10:13:32 +02:00
Trevor Murphy 13cb28a227 Timestamps: Handle sub-10-min ranges when updating timestamps
* lisp/org.el (org-get-compact-tod): Always pad minutes to two places.

TINYCHANGE
2013-08-10 10:12:34 +02:00
Nicolas Goaziou 73b060b768 ox: Only provide back-end name as second argument of filters
* lisp/ox.el (org-export-filter-apply-functions): Only provide
  back-end name (a symbol) as second argument of filters, not the full
  back-end (a vector).
2013-08-10 09:42:20 +02:00
Eric Abrahamsen e45701beff lisp/org.el (org-ctrl-c-ctrl-c): Set tags for headlines whose text is a link
* lisp/org.el (org-ctrl-c-ctrl-c): 'C-c C-c' on a link is usually a
  no-op. If that link is in a headline, act as if the 'C-c C-c' was
  called on the headline, not the link.
2013-08-09 11:37:26 +02:00
Nicolas Goaziou ef2d475bf8 Merge branch 'maint'
Conflicts:
	lisp/ox.el
2013-08-08 18:49:17 +02:00
Nicolas Goaziou c82cb4f75e ox-publish: Correctly return document title
* lisp/ox-publish.el (org-publish-find-title): Fix title when no
  #+TITLE property is provided.
* lisp/ox.el (org-export-store-default-title): Remove-function.
(org-export--default-title): Remove variable.
(org-export-options-alist): Do not use a default value.
(org-export--get-buffer-attributes): Store a default title.
(org-export-as): Apply function removal.
(org-export--get-global-options): Do not set a property with an
explicitely nil value.
2013-08-08 18:45:39 +02:00
Nicolas Goaziou 74750b0839 ox-publish: Fix prefix for some variables
* lisp/ox-publish.el (org-publish-sitemap-sort-files,
  org-publish-sitemap-sort-folders, org-publish-sitemap-ignore-case,
  org-publish-sitemap-requested, org-publish-sitemap-date-format,
  org-publish-sitemap-file-entry-format): Set prefix to
  "org-publish-sitemap" instead of "org-sitemap".
(org-publish-compare-directory-files, org-publish-get-base-files-1,
org-publish-projects, org-publish-format-file-entry): Use new prefix.
2013-08-08 16:21:53 +02:00
Nicolas Goaziou 83b6cfcaec Merge branch 'maint' 2013-08-08 14:32:34 +02:00
Nicolas Goaziou ab8bfb8460 org-clock: Fix defcustom type for two variables
* lisp/org-clock.el (org-clock-total-time-cell-format,
  org-clock-file-time-cell-format): Use correct type.
2013-08-08 14:32:01 +02:00
Carsten Dominik 131e7a679e Allow to specify the names of automatic bookmarks
* lisp/org.el (org-bookmark-names-plist): New user option.
(org-set-regexps-and-options-for-tags): Use `org-bookmark-names-plist'.
(org-refile): Use `org-bookmark-names-plist'.
* lisp/org-capture.el (org-capture-bookmark-last-stored-position): Use
`org-bookmark-names-plist'.

Patch modified from a proposal by Oleh.
2013-08-08 12:43:03 +02:00
Muchenxuan Tong 59eff74fad save-restriction in `org-mobile-push'
* lisp/org-mobile.el (org-mobile-push): add `save-restriction'

The fact that pushing org-file loses my narrow context annoys me.

TINYCHANGE
2013-08-08 08:49:20 +02:00
Carsten Dominik 2b9f8c9433 Rewrite org-insert-heading for maintainability
* lisp/org.el (org-insert-heading): Rewritten from scratch.
(org-N-empty-lines-before-current): New function
(org-insert-heading-respect-content): Set the correct argument to
force a heading even in lists.
2013-08-08 08:34:40 +02:00
Nicolas Goaziou 9154c70a04 Export back-ends: Apply changes to export functions
* contrib/lisp/ox-confluence.el (org-confluence-export-as-confluence):
* contrib/lisp/ox-deck.el (org-deck-export-as-html,
  org-deck-export-to-html):
* contrib/lisp/ox-freemind.el (org-freemind-export-to-freemind):
* contrib/lisp/ox-groff.el (org-groff-export-to-groff,
  org-groff-export-to-pdf):
* contrib/lisp/ox-koma-letter.el (org-koma-letter-export-as-latex,
  org-koma-letter-export-to-latex, org-koma-letter-export-to-pdf):
* contrib/lisp/ox-rss.el (org-rss-export-as-rss,
  org-rss-export-to-rss):
* contrib/lisp/ox-s5.el (org-s5-export-as-html,
  org-s5-export-to-html):
* contrib/lisp/ox-taskjuggler.el (org-taskjuggler-export):
* lisp/ob-haskell.el:
* lisp/ox-ascii.el (org-ascii-export-as-ascii,
  org-ascii-export-to-ascii):
* lisp/ox-beamer.el (org-beamer-export-as-latex,
  org-beamer-export-to-latex, org-beamer-export-to-pdf):
* lisp/ox-html.el (org-html-export-as-html, org-html-export-to-html):
* lisp/ox-icalendar.el (org-icalendar-export-to-ics):
* lisp/ox-latex.el (org-latex-export-as-latex,
  org-latex-export-to-pdf):
* lisp/ox-man.el (org-man-export-to-man, org-man-export-to-pdf):
* lisp/ox-md.el (org-md-export-as-markdown,
  org-md-export-to-markdown):
* lisp/ox-odt.el (org-odt-export-to-odt):
* lisp/ox-org.el (org-org-export-as-org, org-org-export-to-org):
* lisp/ox-publish.el (org-publish-org-to):
* lisp/ox-texinfo.el (org-texinfo-export-to-texinfo,
  org-texinfo-export-to-info):
* testing/lisp/test-ob-exp.el (test-ob-exp/org-babel-exp-src-blocks/w-no-file):
2013-08-07 16:11:42 +02:00
Nicolas Goaziou 6f55864f20 ox: Add arguments to `org-export-to-file' and `org-export-to-buffer'
* lisp/ox.el (org-export-to-buffer): Add two arguments: one to trigger
  asynchronous export and the other to do extra processing from within
  the buffer.
(org-export-to-file): Add two arguments: one to trigger asynchronous
  export and the other to do extra processing on the output file.
(org-export-async-start): Small clean up.
2013-08-07 16:10:38 +02:00
Nicolas Goaziou d1d918100e ox: Fix f5161671ce
* lisp/ox.el (org-export-as): Use new back-end structure.
2013-08-03 09:46:58 +02:00
Nicolas Goaziou b95d7842f2 Merge branch 'maint' 2013-08-03 09:45:42 +02:00
Nicolas Goaziou f5161671ce ox: Re-introduce `org-export-current-backend' for compatibility
* lisp/ox.el (org-export-current-backend): New variable.
(org-export-as): Use new variable.

Thanks to Christophe Rhodes for providing a preliminary patch.
2013-08-03 09:44:34 +02:00
Nicolas Goaziou 6db74e8d5c Merge branch 'maint' 2013-08-03 01:52:27 +02:00
Nicolas Goaziou 216521ea2b ox-ascii: Remove spurious new line between a table and the caption below
* lisp/ox-ascii.el (org-ascii-table): Remove spurious new line between
  a table and the caption below.

Thanks to Rick Frankel for reporting it and providing a patch.
2013-08-03 01:51:47 +02:00
Nicolas Goaziou a3375f3432 Merge branch 'maint' 2013-07-31 14:45:09 +02:00
Nicolas Goaziou cc10c80d85 ox: Preserve coding system when writing output to a file
* lisp/ox.el (org-export-to-file): Preserve coding system when writing
  output.
2013-07-31 14:44:33 +02:00
Bastien Guerry 483977e016 Merge branch 'maint' 2013-07-30 12:44:56 +02:00
oleh 2710267ed7 o org-clock.el (org-clock-notify-once-if-expired): Honor `org-clock-sound'
* org-clock.el (org-clock-notify-once-if-expired): Honor
`org-clock-sound'.

TINYCHANGE
2013-07-30 12:44:43 +02:00
Eric Schulte 184109d416 ob-core remove-if -> org-remove-if
* lisp/ob-core.el (org-babel-merge-params): Replace remove-if with
  org-remove-if.
2013-07-29 18:18:41 -06:00
Eric Schulte db9f11a860 check html-link-home exists before triming
Ensure that the :html-link-home property exists before passing it to
  `org-trim' which assumes it's argument is a string.
2013-07-30 00:04:10 +02:00
Eric Schulte 99a8d97ffa don't modify missing header arguments during merge
* lisp/ob-core.el (org-babel-merge-params): More careful to check that
  the colname- and rowname-names header arguments exist during merge.
2013-07-29 07:58:22 -06:00
Nicolas Goaziou d73ff5fd61 Merge branch 'maint' 2013-07-28 21:40:37 +02:00
Nicolas Goaziou 33a2c7ea68 ox: Fix compilation error with Emacs < 24
* lisp/ox.el (org-export-stack-mode-map): Fix compilation error with
  Emacs < 24.
2013-07-28 21:40:02 +02:00
Nicolas Goaziou 9b7f43768f Merge branch 'maint' 2013-07-28 21:33:24 +02:00
Nicolas Goaziou 17ba41434e ox: Maintain compatibility with Emacs 23
* lisp/ox.el (org-export--dispatch-action): Maintain compatibility
  with Emacs 23.
2013-07-28 21:32:48 +02:00
Nicolas Goaziou aef1b17773 Merge branch 'maint' 2013-07-28 10:17:17 +02:00
Nicolas Goaziou 36161345d1 Reintroduce support for `adaptive-fill-regexp' in paragraphs and comments
* lisp/org.el (org-adaptive-fill-function, org-fill-paragraph): Add
  support for `adaptive-fill-regexp' in paragraphs and comments.
* testing/lisp/test-org.el: Add tests.
2013-07-28 10:16:03 +02:00
Aaron Ecay 0cef5b63eb ox-latex: support SVG images
* lisp/ox-latex.el (org-latex-inline-image-rules): add "svg" to
supported filetypes.
(org-latex--inline-image): implement the appropriate code for including
SVG files.

This relies on the "svg" LaTeX package (http://www.ctan.org/pkg/svg)
2013-07-27 02:24:38 -04:00
Aaron Ecay 46d05e4d08 Update function declaration in ob-python.el
* lisp/ob-python.el: Update the arglist passed to `declare-function' for
`run-python'.
2013-07-27 02:21:22 -04:00
Eric Schulte 3142297d69 delete colnames/rownames for replaced variables
Thanks to Rick Frankel for help debugging this problem.

* lisp/ob-core.el (org-babel-merge-params): When merging parameters, if
  a variable is replaced with a new value, then delete colnames/rownames
  for the original value of that variable.
2013-07-26 18:53:13 -06:00
Nicolas Goaziou 6f20e3f0ff Merge branch 'maint' 2013-07-25 19:00:51 +02:00
Nicolas Goaziou af300bd5b0 Fix indentation after a list
* lisp/org.el (org-indent-line): Fix indentation after a list.
2013-07-25 18:57:59 +02:00
Bastien Guerry c815fe55cd Merge branch 'maint' 2013-07-24 01:37:33 +02:00
Bastien Guerry c31ad79326 ox.el: Remove reference to the obsolete variable `org-export-language-setup'
* ox.el: Remove reference to the obsolete variable
`org-export-language-setup'.
2013-07-24 01:37:16 +02:00
Nicolas Goaziou 814755a2d7 ox: Fix small bug
* lisp/ox.el (org-export--get-inbuffer-options): Fix small bug
  introduced in 908d42c9b6.
2013-07-22 16:06:47 +02:00
Nicolas Goaziou 908d42c9b6 ox: Multiple options can be set through the same keyword
* lisp/ox.el (org-export--get-inbuffer-options): Multiple options can
  now be set through the same buffer keyword.
* testing/lisp/test-ox.el: Add test.
2013-07-22 15:15:01 +02:00
Nicolas Goaziou 95dd398f6a Merge branch 'maint'
Conflicts:
	testing/lisp/test-org-element.el
2013-07-21 15:54:08 +02:00
Nicolas Goaziou b4a8ec9321 org-element: Fix infloop when parsing a list at the end of buffer
* lisp/org-element.el (org-element-plain-list-parser): Fix infloop
  when parsing a list at the end of buffer, if buffer doesn't end at
  a line beginning.
* testing/lisp/test-org-element.el: Add test.
2013-07-21 15:51:14 +02:00
Nicolas Goaziou 17b584df89 Merge branch 'maint' 2013-07-20 13:53:35 +02:00
Nicolas Goaziou 21dd83661b org-element: Do not url-decode parsed links
* lisp/org-element.el (org-element-link-parser): Do not url-decode
  parsed links.

The function now assumes link at point is correctly encoded if needed.
`org-insert-link' already automatically url-encode generated links,
and link types not handled by this function (e.g., custom-id links) do
not need such encoding.
2013-07-20 13:51:18 +02:00
Nicolas Goaziou 3386033165 Merge branch 'maint' 2013-07-18 15:57:15 +02:00
Nicolas Goaziou 40b44e4505 org-pcomplete: Remove spurious white spaces in block completion
* lisp/org-pcomplete.el (pcomplete/org-mode/file-option): Remove
  spurious white spaces, excepted for source blocks' opening string.
  Small refactoring.
2013-07-18 15:54:15 +02:00
Andreas Leha 0b770b125f add *.tikz files as possible result files for latex blocks
* lisp/ob-latex.el (org-babel-execute:latex) add a tizk option
  that copies the body of the block into a tikz file
2013-07-17 15:44:49 -06:00
Eric Schulte 8d5ad6553f make java executable configurable for ditaa blocks
* lisp/ob-ditaa.el (org-babel-ditaa-java-cmd): Make java executable
  configurable for ditaa blocks.
2013-07-17 08:20:37 -06:00
Eric Schulte f6ac1a2078 fix bug in ob-sh when dealing with list variables
* lisp/ob-sh.el (org-babel-sh-var-to-string): Fix bug in ob-sh when
  dealing with list variables.
2013-07-17 08:15:41 -06:00
Nicolas Goaziou e8766c33f8 Merge branch 'maint' 2013-07-15 17:43:24 +02:00
Nicolas Goaziou 1af5a8a7c8 org-pcomplete: Fix completion for block boundaries
* lisp/org-pcomplete.el (pcomplete/org-mode/file-option): Remove
  spurious colons from block boundaries.
2013-07-15 17:42:13 +02:00
Feng Shu 2a94fca6ca Fix generating LaTeX formula images
* lisp/ox-odt.el (org-odt--translate-latex-fragments): Fix imagemagick support.
* lisp/ox-html.el (org-html-latex-environment)
(org-html-latex-fragment): Fix imagemagick support.
* org.el (org-create-formula-image-with-imagemagick): Generate correct
size formula image.
(org-format-latex-header): Change pagestyle command position.
* doc/org.texi (@LaTeX{} fragments)
(Previewing @LaTeX{} fragments)
(Math formatting in HTML export)
(Working with @LaTeX{} math snippets): Add document about creating
formula image with imagemagick.
2013-07-15 15:31:38 +02:00
Eric Schulte ca56230fc1 more robust sbe macro 2013-07-14 16:20:49 -06:00
Eric Schulte 4899c79e66 org-src-lang-modes in block demarcation options
* lisp/ob-core.el (org-babel-demarcate-block): Include
  org-src-lang-modes in block demarcation options.
2013-07-13 12:37:09 -06:00
Eric Schulte 7f5288780f removed modification of org-babel-load-languages
* lisp/ob-C.el: Don't modify `org-babel-load-languages' from ob-* files.
2013-07-13 11:05:45 -06:00
rasmus 6727f1aa75 Better C++ recognition
* ob-C.el: Added =C++= to =`org-babel-load-languages'=
automatically after loading =C=.
* org-src.el (org-src-lang-modes): Added association between
language =C++= and =`c++-mode'=.

=C++= is added to org-babel-load-languages to make
`org-babel-demarcate-block' recognize =C++= as a proper language.
2013-07-13 10:35:34 -06:00
Nicolas Goaziou 0c233ae4e9 Merge branch 'maint' 2013-07-12 15:12:01 +02:00
Nicolas Goaziou 7fcf4995af ox-publish: Fix :recursive parameter ignoring extension restriction
* lisp/ox-publish.el (org-publish-find-date): Also return date for
  directories.
(org-publish-get-base-files-1): Fix :recursive parameter ignoring
extension restriction.
2013-07-12 15:09:58 +02:00
Nicolas Goaziou 44082746da Merge branch 'maint' 2013-07-12 09:19:24 +02:00
Nicolas Goaziou 956837087b ox-beamer: Remove strange indentation in default header
* lisp/ox-beamer.el: Remove strange indentation in default header.
2013-07-12 09:18:47 +02:00
Nicolas Goaziou 0cdf2eb7ce Merge branch 'maint'
Conflicts:
	contrib/lisp/ox-koma-letter.el
2013-07-12 09:10:26 +02:00
Nicolas Goaziou a2a5c8fd5b ox-beamer/latex/koma-letter: Fix missing newlines in header
* contrib/lisp/ox-koma-letter.el (org-koma-letter-template): Fix
  missing newlines in header.
* lisp/ox-beamer.el (org-beamer-template): Fix missing newlines in
  header.
* lisp/ox-latex.el (org-latex-template): Fix missing newlines in
  header.
2013-07-12 09:07:23 +02:00
Eric Schulte 9f3bed367b optional svg output for latex code blocks
* lisp/ob-latex.el (org-babel-latex-htlatex): Set this variable to
  "htlatex" (or path to said) to enable svg generation from latex code
  blocks.
  (org-babel-latex-htlatex-packages): Libraries required for automatic
  svg generation.
  (org-babel-execute:latex): Generate SVG images directly from latex
  code blocks (assumes tikz).
2013-07-11 10:05:13 -06:00
Bastien Guerry 918551cec8 Merge branch 'maint' 2013-07-11 14:33:18 +02:00
Bastien Guerry 202c5895b1 org.el (org-set-regexps-and-options-for-tags): Fix concatenation of the tags list
* org.el (org-set-regexps-and-options-for-tags): Fix
concatenation of the tags list.

Thanks to Nick for reporting this bug and to Rainer for confirming the fix.
2013-07-11 14:33:08 +02:00
Nicolas Goaziou 203f4c9b05 ox: Fix "wrong-type-argument" error in template insertion
* lisp/ox.el (org-export-insert-default-template): Fix
  "wrong-type-argument" error in template insertion.

Thanks to Eric Abrahamsen for reporting this.
2013-07-11 08:48:36 +02:00
Nicolas Goaziou 5074999605 Merge branch 'maint' 2013-07-10 14:14:18 +02:00
Nicolas Goaziou 136081a0d4 Use empty commented lines as separators when filling comments
* lisp/org.el (org-fill-paragraph): Use empty commented lines as
  separators when filling comments.  This mimics default behaviour
  from "newcomment.el", which is not used in Org.
* testing/lisp/test-org.el: Add tests.
2013-07-10 14:13:39 +02:00
Bastien Guerry 044c8c5ebb Merge branch 'maint' 2013-07-10 12:13:09 +02:00
Bastien Guerry 681bd0cfd9 ox-odt.el (org-odt-pixels-per-inch): Use 96.0 as the default
* ox-odt.el (org-odt-pixels-per-inch): Use 96.0 as the default.

Thanks to Vincent Liard for this patch.
2013-07-10 12:12:59 +02:00
Nicolas Goaziou 020eb8eaef ox-html: Fix inline image attributes
* lisp/ox-html.el (org-html-link): Add image attributes to "img" tag,
  not to the "a" container.  Also fix spacing for attributes.

Thanks to Robert Eckl for reporting it.
2013-07-10 10:12:43 +02:00
Kodi Arfer 535bf4a1f2 ox-html: Under html5-fancy, use <nav> for the ToC
* lisp/ox-html.el (org-html-toc): Use <nav> instead of <div>
  for the root element when appropriate.

TINYCHANGE
2013-07-09 22:51:18 +02:00
Kodi Arfer 03040dd44d ox-html: Allow "Figure %d:", etc. to be styled
* lisp/ox-html.el (org-html-paragraph): Wrap "Figure %d:" in
  <span class="figure-number">.
  (org-html-list-of-tables, org-html-table): Wrap "Table %d:" in
   <span class="table-number">.
  (org-html-list-of-listings): Wrap "Listing %d:" in
  <span class="listing-number">.
* doc/org.text (CSS support): Mention .figure-number,
  .listing-number, and .table-number.

I didn't change org-html-style-default, so these labels won't
appear special by default.

TINYCHANGE
2013-07-09 22:28:53 +02:00
Nicolas Goaziou d5c11e6b5a Merge branch 'maint' 2013-07-09 13:53:36 +02:00
Nicolas Goaziou c78fa35252 Fix error when filling consecutive comments
* lisp/org.el (org-fill-paragraph): Do not mix consecutive comments
  when filling any of them.
* testing/lisp/test-org.el: Add test.

Thanks to Samuel Wales for reporting it.
2013-07-09 13:52:00 +02:00
Nicolas Goaziou fe8bfb8bd9 Merge branch 'maint' 2013-07-08 22:27:35 +02:00
Nicolas Goaziou eb37142b14 ox-html: Fix number of arguments when setting `org-html-format-headline-function'
* lisp/ox-html.el (org-html-format-headline--wrap): Fix number of
  arguments when setting `org-html-format-headline-function'.

Thanks to Jisang Yoo for reporting it.
2013-07-08 22:27:03 +02:00
Bastien Guerry fdaa996e90 org.el (org-refile): Allow to only copy the subtree without moving it
* org.el (org-refile): With a numeric prefix argument of `3',
emulate (setq org-refile-keep t) and copy the subtree to the
target location, don't delete it.

* org.texi (Refile and copy): Document `C-3 C-c C-w' and add
an index entry for `org-refile-keep'.
2013-07-08 10:19:03 +02:00
Bastien Guerry 878d6c35e3 Merge branch 'maint' 2013-07-06 16:15:36 +02:00
Bastien Guerry 4269178827 org.el (org-set-regexps-and-options-for-tags): Fix the setting of tag groups when relying on `org-tag-alist'
* org.el (org-set-regexps-and-options-for-tags): Fix the
setting of tag groups when relying on `org-tag-alist', not on
tags directly set in the buffer with the #+TAGS option.

Thanks to Maurice for reporting this.
2013-07-06 16:15:18 +02:00
Nicolas Goaziou 0bab94dedf Merge branch 'maint' 2013-07-06 00:41:04 +02:00
Nicolas Goaziou 0aa0fdd971 org-element: Fix interpretation of empty items
* lisp/org-element.el (org-element-item-interpreter): This patch fixes
  "(wrong-type-argument arrayp nil)" error when trying to interpret
  empty items.
* testing/lisp/test-org-element.el: Add test.
2013-07-06 00:39:28 +02:00
Nicolas Goaziou acb351444e Merge branch 'maint' 2013-07-05 21:14:43 +02:00
Nicolas Goaziou e5630add27 org-element: Fix "*" itemized plain lists interpretation
* lisp/org-element.el (org-element-item-interpreter): Correctly
  interpret back plain lists with "*" items.  This fixes "This is not
  a list" error returned in this case.
* testing/lisp/test-org-element.el: Add test.
2013-07-05 21:12:47 +02:00
Bastien Guerry 2629b767b1 Merge branch 'maint' 2013-07-05 14:30:59 +02:00
Bastien Guerry 848240c1cf Merge branch 'maint' of orgmode.org:org-mode into maint 2013-07-05 14:30:48 +02:00
Bastien Guerry ce08e04629 org-agenda.el (org-agenda-archive-with): Save window excursion
* org-agenda.el (org-agenda-archive-with): Save window
excursion.
2013-07-05 14:29:51 +02:00