Commit Graph

10627 Commits

Author SHA1 Message Date
Bastien Guerry 9139521186 Complete commit 9e006d11
* org.el (org-preview-latex-fragment): Remove LaTeX fragments
overlays when they are displayed.  Fix message.
2014-07-28 01:24:56 +02:00
Bastien Guerry 96323cf2aa Merge branch 'maint' 2014-07-28 01:03:03 +02:00
Bastien Guerry d8a0ee7aad org.el (org-paste-subtree): Fix match subexpression
* org.el (org-paste-subtree): Fix match subexpression.

Thanks to Anders Johansson for reporting this.
2014-07-28 01:02:50 +02:00
Bastien Guerry aef3b6c3f9 org-refile: Don't copy the refiled subtree to the clipboard
* org.el (org-paste-subtree): New parameter `remove', to
remove the pasted subtree from the `kill-ring'.
(org-refile): Use the new parameter of `org-paste-subtree'.

Thanks to Samuel Wales for suggesting this.
2014-07-28 00:49:01 +02:00
Bastien Guerry 99f999944e org-src.el (org-src-font-lock-fontify-block): Do not use `font-lock-ensure'
* org-src.el (org-src-font-lock-fontify-block): Use
`font-lock-fontify-buffer' instead of `font-lock-ensure',
otherwise fonts are not displayed for src blocks.

Thanks to Mathäus Meyer for reporting this.
2014-07-28 00:34:55 +02:00
Bastien Guerry 8f3a1f3d22 Fix trailing whitespace in previous commit 2014-07-28 00:01:23 +02:00
Rainer M. Krug 4c415f38a5 Make transfer of values from R type aware
* lisp/ob-R.el (org-babel-R-assign-elisp): Add different cases for
transfering integer, float, string and other variables to R so that
integer values are transferred as integers (L) and stored in R as
such.  This change is backward compatible as integer values are
numerical values in R.

Moved definition of R functions for transfer of tables into defconst
ob-R-transfer-variable-table-with-header and
ob-R-transfer-variable-table-without-header.
2014-07-28 00:01:00 +02:00
Rainer M. Krug fdfb59454a lisp/ob-R.el: Fix tangling with tables
* lisp/ob-R.el (org-babel-R-assign-elisp): Fix variable transfer of
tables by using text connections in R instead of files.  Variable
transfer of tables does not depend on files anymore, i.e. works also
when tangling.
2014-07-28 00:00:52 +02:00
Bastien Guerry da8b695b2b ob-core.el (org-babel-insert-header-arg): Tiny message fix
* ob-core.el (org-babel-insert-header-arg): Tiny message fix.
2014-07-27 23:25:41 +02:00
Bastien Guerry ac4b11e565 ox-html.el (org-html-protect-char-alist): Make a defvar
* ox-html.el (org-html-protect-char-alist): Make a defvar.
2014-07-27 19:55:49 +02:00
Bastien Guerry 9e006d1128 org.el (org-ctrl-c-ctrl-c): Don't remove LaTeX fragments overlays
* org.el (org-ctrl-c-ctrl-c): Don't remove LaTeX fragments overlays.
2014-07-27 19:44:40 +02:00
Rainer M. Krug 2aec9fddd4 ox-latex.el (org-latex-listings-langs): Add `(makefile "make")'
* ox-latex.el (org-latex-listings-langs): Add `(makefile "make")'.
2014-07-27 16:20:45 +02:00
Bastien Guerry 3aef08ddeb org.el (org-activate-plain-links): Don't activate :elisp: and 🐚 tags
* org.el (org-activate-plain-links): Don't activate :elisp:
and 🐚 tags as links.  Enhance the docstring.
(org-activate-angle-links, org-activate-footnote-links)
(org-activate-bracket-links, org-activate-dates)
(org-activate-target-links): Minor docstrings enhancement.

Thanks to Andrea Rossetti for reporting this.
2014-07-27 15:58:13 +02:00
Bastien Guerry d4799ebfc1 org-table.el (org-table-eval-formula): Better error throwing
* org-table.el (org-table-eval-formula): Throw an error when
trying to replace a wrong formula specifier.

Thanks to Alejandro Suarez for reporting this.
2014-07-27 15:05:48 +02:00
Nicolas Goaziou fbc7097ffa Merge export and special blocks within back-ends
* lisp/ox-ascii.el (org-ascii-export-block): Remove function.
(org-ascii-special-block): Handle raw special blocks.

* lisp/ox-beamer.el (org-beamer-export-block): Remove function.

* lisp/ox-html.el (org-html-export-block): Remove function.
(org-html-special-block): Handle raw special blocks.

* lisp/ox-latex.el (org-latex-export-block): Remove function.
(org-latex-special-block): Handle raw special blocks.

* lisp/ox-man.el (org-man-export-block): Remove function.
(org-man-special-block): Handle raw special blocks.

* lisp/ox-md.el (org-md-export-block): Remove function.

* lisp/ox-odt.el (org-odt-export-block): Remove function.
(org-odt-special-block): Handle raw special blocks.

* lisp/ox-texinfo.el (org-texinfo-export-block): Remove function.
(org-texinfo-special-block): Handle raw special blocks.

* contrib/lisp/ox-groff.el (org-groff-export-block): Remove function.
(org-groff-special-block): Handle raw special blocks.

* contrib/lisp/ox-koma-letter.el (org-koma-letter-export-block):
  Remove function.
2014-07-27 14:29:24 +02:00
Nicolas Goaziou bc43228e6d Remove `export-block' syntax type
* lisp/org-element.el (org-element-all-elements): Remove
  `export-block' type.
(org-element-block-name-alist): Make it a defconst since it is not
meant to be changed anymore.
(org-element-export-block-parser,
org-element-export-block-interpreter): Remove functions.

* lisp/ox.el (org-export-filters-alist): Remove export block filter.
(org-export-register-backend): Do not alter
`org-export-block-name-alist' anymore.
(org-export-define-backend, org-export-define-derived-backend): Update
docstring.
(org-export-filter-export-block-functions): Remove variable.

* testing/lisp/test-org-element.el (test-org-element/export-block-parser,
  test-org-element/export-block-interpreter): Remove tests.

* testing/lisp/test-ox.el (test-org-export/define-backend): Update test.
2014-07-27 14:29:21 +02:00
Nicolas Goaziou 173ade7078 org-element: Add `:raw-value' property to special blocks
* lisp/org-element.el (org-element-special-block-parser): Add
  `:raw-value' property.
2014-07-27 14:29:17 +02:00
Nicolas Goaziou b77a026a24 Merge branch 'maint' 2014-07-27 14:28:53 +02:00
Nicolas Goaziou 2160b3d242 ox: Implement predicate for export blocks
* lisp/ox.el (org-export-raw-special-block-p): New function.

* testing/lisp/test-ox.el (test-org-export/raw-special-block-p): New
  test.

This patch is a forward-compatibility measure since the function is
mandatory for export back-ends in Org 8.3. It makes it easier for
back-end maintainers to provide a back-end compatible with both Org
8.2 and 8.3.
2014-07-27 14:25:44 +02:00
Nicolas Goaziou 451e20d982 Merge branch 'maint'
Conflicts:
	testing/lisp/test-org-element.el
2014-07-26 15:10:22 +02:00
Nicolas Goaziou 38ff96ecc3 org-element: Fix parsing multi-line links
* lisp/org-element.el (org-element-link-parser): Properly handle
  multi-line links according to RFC 3986 when enclosed within square
  brackets.

* testing/lisp/test-org-element.el (test-org-element/link-parser): Add
  test.
2014-07-26 15:08:23 +02:00
Nicolas Goaziou ef3c574715 org-element: Update regexps
* lisp/org-element.el (org-element--cache-sensitive-re): Update
  regexps.
2014-07-25 20:37:37 +02:00
Nicolas Goaziou 214ef7d461 Merge branch 'maint' 2014-07-25 15:24:45 +02:00
Nicolas Goaziou 0e01e3eb13 org-element: Fix object parsing in captions
* lisp/org-element.el (org-element-parse-secondary-string): Clone all
  local variables from current buffer before parsing a secondary
  string.  Small refactoring.
(org-element-object-variables): Remove variable.

* testing/lisp/test-org-element.el (test-org-element/secondary-string-parsing):
  Add test.

Thanks to Thomas S. Dye for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/88850
2014-07-25 15:11:10 +02:00
Nicolas Goaziou b15a9c0c1c ox-ascii: Fix line break preservation
* lisp/ox-ascii.el (org-ascii--justify-element): Fix line break
  preservation.

Thanks to Miguel Ruiz for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/88866
2014-07-25 14:05:58 +02:00
Nicolas Goaziou dd6b4ffcef ox-ascii: Use options instead of defcustoms in code
* lisp/ox-ascii.el (org-ascii--current-text-width,
  org-ascii--build-title, org-ascii--build-toc,
  org-ascii--list-listings, org-ascii--list-tables,
  org-ascii-template--document-title, org-ascii-inner-template,
  org-ascii-template, org-ascii-code, org-ascii-drawer,
  org-ascii-headline, org-ascii-inline-src-block,
  org-ascii-format-inlinetask-default, org-ascii-inlinetask,
  org-ascii-link, org-ascii-paragraph, org-ascii-quote-block,
  org-ascii-section, org-ascii-src-block, org-ascii-table,
  org-ascii--table-cell-width, org-ascii-table-cell,
  org-ascii-verbatim, org-ascii-verse-block,
  org-ascii-filter-headline-blank-lines,
  org-ascii-filter-paragraph-spacing): Use options instead of
  hard coded variables.
2014-07-25 13:48:28 +02:00
Nicolas Goaziou f4455f4902 Merge branch 'maint' 2014-07-25 11:21:56 +02:00
Nicolas Goaziou 43a8b979f8 ox-odt: Silence byte-compiler
* lisp/ox-odt.el (org-odt--format-paragraph): Change signature to
  include info.
(org-odt-footnote-reference, org-odt-paragraph): Apply signature
change.
2014-07-25 11:20:49 +02:00
Nicolas Goaziou ced4fa3205 Merge branch 'maint' 2014-07-25 11:05:49 +02:00
Nicolas Goaziou bacfe5b4f7 org-clock: Update syntax for indentation in clock tables
* lisp/org-clock.el (org-clocktable-indent-string): Use "\emsp"
  instead of "\__", which is not supported anymore since Org 8.0.

Thanks to Buddy Butterfly for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/88842
2014-07-25 11:02:55 +02:00
Nicolas Goaziou 010d105b04 Merge branch 'maint' 2014-07-24 15:01:25 +02:00
Nicolas Goaziou 776972cfe8 ox-odt: Fix handling of quoted and centered paragraphs
* lisp/ox-odt.el (org-odt--paragraph-style): New function.
(org-odt--format-paragraph): Use new function to get proper style to
apply.

Thanks to Baptiste for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/88798
2014-07-24 14:59:24 +02:00
Nick Dokos db0130468b Merge branch 'maint' 2014-07-23 23:58:13 -04:00
Nick Dokos c9613c0cad When editing a table formula, point is not necessarily on its referent.
* org-table.el (org-table-show-reference): Call `set-window-start'
  with the calculated values `min' and `max', not with
  (point-min) and (point-max).

Reported by Luke Crook (http://article.gmane.org/gmane.emacs.orgmode/88610)
	    Thorsten Grothe (http://thread.gmane.org/gmane.emacs.orgmode/88698)
	    and Robert Klein in the latter thread.

Robert Klein bisected it down to 30220ffcdc.
2014-07-23 23:57:06 -04:00
Rasmus 0be96db56e org-element.el: Allow one-line LaTeX environments
* org-element.el (org-element--latex-begin-environment,
org-element--latex-end-environment): New format strings to identify
beginning and ending of LaTeX environments.
(org-element-latex-environment-parser, org-element-paragraph-parser,
org-element--current-element): Use `org-element--latex-begin-environment'
and `org-element--latex-end-environment'.

* test-org-element.el (test-org-element/latex-environment-parser):
Add tests.
2014-07-23 10:24:10 +02:00
Nicolas Goaziou 29f3662035 Merge branch 'maint' 2014-07-23 10:09:04 +02:00
Nicolas Goaziou d0959d410b org-element: Fix test failure
* lisp/org-element.el (org-element--current-element): Fix regexp.
2014-07-23 10:07:55 +02:00
Nicolas Goaziou 02f2d5b42a Merge branch 'maint' 2014-07-22 11:55:33 +02:00
Nicolas Goaziou ec0e3cf70b org-element: Fix regexp matching LaTeX environments
* lisp/org-element.el (org-element--current-element): Fix regexp
  matching latex environments.  Discrepancy with regexp used in
  `org-element-latex-environment-parser' introduced matching errors.
2014-07-22 11:52:32 +02:00
Nicolas Goaziou 8feb8b93d5 org-element: Small optimization
* lisp/org-element.el (org-element--cache-for-removal): Do not remove
a robust element whenever only its contents are modified.  Remove
inlinetasks as robust elements since modifying a node property inside
implies to parse the task again.
2014-07-20 19:35:52 +02:00
Nicolas Goaziou 3c14db8685 org-element: Fix infloop in cache
* lisp/org-element.el (org-element--cache-process-request): Take into
  consideration changes to come so as to avoid parsing elements with
  false beginning positions.
(org-element--cache-sync): Change signature.

Thanks to Thorsten Jolitz for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/88673
2014-07-20 19:09:52 +02:00
Nicolas Goaziou 7bd8fafe7a org-element: Better collision handling in cache sync requests
* lisp/org-element.el (org-element--cache-process-request): Handle
  cases where procesing the first request brings us past the start of
  the next one.
2014-07-20 19:08:58 +02:00
Nick Dokos 335e97f5ab Merge branch 'maint'
Merge bug fix for org-table.el:org-table-clean-before-export.
2014-07-18 23:47:03 -04:00
Nick Dokos 79873390ed org-clean-before-export matches non-special columns spuriously
* org-table.el (org-table-clean-before-export): The regexes match
  spaces in addition to the special characters that might be used in
  the first column as special marking characters.  Remove the space
  from the character class.

  In addition, the `special' variable included a backslash which
  afaict does nothing: delete it.

  The function itself takes an optional parameter which is not used by
  any of the callers: get rid of it.  Getting rid of it allows a small
  simplification of the code.

The bug was found by Thorsten Grothe:

    http://thread.gmane.org/gmane.emacs.orgmode/88634
2014-07-18 23:44:46 -04:00
Nicolas Goaziou 05be573e92 org-element: Fix re-parenting during cache synchronization
* lisp/org-element.el (org-element--cache-process-request): Correctly
  re-parent elements in cache in some corner cases.
* testing/lisp/test-org-element.el (test-org-element/cache): Add tests.
2014-07-17 18:12:59 +02:00
Nicolas Goaziou 33a344be33 org-element: Fix corner case in cache synchronization
* lisp/org-element.el (org-element--cache-submit-request): When
  changes happen before first know element, start from phase 1 instead
  of phase 2 in order to properly re-parent subsequent elements, if
  needed.
(org-element--cache-process-request): Do not propagate beginning
position since it is already available to the request.
2014-07-17 18:12:49 +02:00
Nicolas Goaziou 476ea10a70 org-element: Fix "wrong-type-argument" error in cache
* lisp/org-element.el (org-element--cache-sync): Do not copy phase
  number into next request.  This is a special case that deserves to
  be handled locally.  See below.
(org-element--cache-process-request): Properly transfer phase in
a special case, which is now commented.  Also fix phase numbers in
comments.  Small refactoring.

Thanks to Alan Schmitt for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/88406
2014-07-17 16:34:06 +02:00
Nicolas Goaziou 8d0f7340ed ox: Fix inline footnote definitions
* lisp/ox.el (org-export-collect-tree-properties): Make sure changes
  to the parse tree propagate to the value of
  `org-export-get-footnote-definition'.

Thanks to Florian Beck for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/88419
2014-07-16 16:11:52 +02:00
Nicolas Goaziou baa2c5943a org-element: Avoid using a slow regexp
* lisp/org-element.el (org-element-latex-fragment-parser): Avoid using
  a slow regexp.
2014-07-06 23:55:48 +02:00
Nicolas Goaziou 4235718d79 org-element: Small optimizations
* lisp/org-element.el (org-element-latex-fragment-parser): Avoid
  matching twice regexps in some cases.
(org-element--object-lex): Avoid making a funcall if a line break
isn't possible.

This patch also removes the limit on the number of lines a latex
fragment with a single dollar can span over.
2014-07-06 23:15:44 +02:00
Nicolas Goaziou 0ce82e53a1 org-element: Fix docstring
* lisp/org-element.el (org-element-footnote-reference-interpreter):
  Fix docstring.
2014-07-06 19:06:54 +02:00
Nicolas Goaziou ca6ecf9e49 org-element: Remove :inline-definition from inline footnotes
* lisp/org-element.el (org-element-recursive-objects): Add
  `footnote-reference'.
(org-element-secondary-value-alist): Remove reference to
`footnote-reference'.
(org-element-footnote-reference-parser): Definition for inline
references is stored as the contents of the reference, not in
a secondary string.
(org-element-footnote-reference-interpreter): Apply changes from
parser.

* lisp/ox.el (org-export-get-footnote-definition,
  org-export-get-environment): Apply changes from parser.

* testing/lisp/test-org-element.el (test-org-element/footnote-reference-parser):
  Update test.
(test-org-element/context): Add test.

Storing definition in a secondary string was a poor design choice as
there is no "primary" string anyway.  This also prevents
`org-element-context' from finding objects within the inline
definition.
2014-07-06 11:24:12 +02:00
Nicolas Goaziou df9ccbd119 org-element: Reach orphaned elements during cache sync
* lisp/org-element.el (org-element--cache-sync-requests): Change
  pattern.
(org-element--cache-sync, org-element--cache-submit-request): Update
request pattern.
(org-element--cache-process-request): Remove orphaned elements during
first phase.

An orphaned element is an element not directly altered by changes to
buffer but with one of its parent removed.
2014-07-05 10:54:09 +02:00
Nicolas Goaziou f1433d82ae org-element: Fix buffer positions when merging requests
* lisp/org-element.el (org-element--cache-submit-request): Correctly
  compute buffer positions where cache is missing, taking into account
  the request not yet applied.
2014-07-05 10:54:09 +02:00
Eric Schulte fdc673dac0 remove extra escape org-emphasis-regexp-components
specifically in the second 'post' element

* lisp/org.el (org-emphasis-regexp-components): Remove extra escape
  org-emphasis-regexp-components, specifically in the second 'post'
  element.
2014-07-03 07:59:15 -04:00
Nicolas Goaziou 126e2bcebd org-element: Fix corner case
* lisp/org-element.el (org-element--cache-for-removal): Fix corner
  case when changes happen in a robust element (e.g., a center block)
  within a fragile element (e.g., a plain list).  Do not assume that
  all parents from a robust element are also robust.
2014-06-30 23:47:37 +02:00
Nicolas Goaziou ef8e9cf045 org-element: Fix bug in sync request submission
* lisp/org-element.el (org-element--cache-submit-request): Do not
  modify ending position twice.
2014-06-30 23:47:37 +02:00
Nicolas Goaziou d1f2d73b08 org-element: Improve sychronization request submission
* lisp/org-element.el (org-element--cache-submit-request): Store
  parent of first element to delete, if any.  This saves a call to
  `org-element--cache-find' in a very common use case.
(org-element--cache-sync-requests): Update docstring accordingly.
2014-06-30 23:47:36 +02:00
Nicolas Goaziou 67c1e54a5b org-element: Tiny refactoring
* lisp/org-element.el (org-element--cache-submit-request): Tiny
  refactoring.
2014-06-30 23:47:36 +02:00
Nicolas Goaziou 093d455f7f org-element: Better threshold computation during synchronization
* lisp/org-element.el (org-element--cache-process-request): Threshold
  is based off beginning of the first element to shift instead of the
  end of the changes.
2014-06-30 23:47:36 +02:00
Nicolas Goaziou 1a9b074d9f org-element: Simplify request processing
* lisp/org-element.el (org-element--cache-process-request): Do not try
  to find orphans for now.  Remove useless comments.  Refactor code.
2014-06-30 23:45:20 +02:00
Nicolas Goaziou ba9c43fc81 org-element: Do not trust a stored request after cache sync
* lisp/org-element.el (org-element--cache-submit-request): Do not
  trust a stored request after calling `org-element--cache-sync' since
  it may as well not exist anymore (i.e., the synchronization was
  complete).
2014-06-30 23:44:51 +02:00
Nicolas Goaziou 815c218f22 org-element: Small fix
* lisp/org-element.el (org-element--cache-submit-request): Fix off by
  one error when updating cache.  Changes happening at the beginning
  to the previous ones, which are always located at the beginning of
  an element, imply to delete previous element.  Also do not call
  `org-element--cache-sync' if there's nothing to synchronize.
2014-06-29 17:17:23 +02:00
Nicolas Goaziou f12f9543fc org-element: Tiny fix
* lisp/org-element.el (org-element-headline-parser): Do not assume
  property drawers are correctly formed.
2014-06-29 15:25:54 +02:00
Nicolas Goaziou 49f3c6e558 org-element: Fix inlinetask parsing
* lisp/org-element.el (org-element-inlinetask-parser): Do not infloop
  when parsing property drawer in an inlinetask.

* testing/lisp/test-org-element.el (test-org-element/headline-properties):
  Add test.

Thanks to Aaron Ecay for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/88133
2014-06-29 15:23:22 +02:00
Nicolas Goaziou 2824502e2e org-element: Fix cache corruption when altering a drawer
* lisp/org-element.el (org-element--cache-submit-request): Correctly
  update cache when changes alter the contents of a greater
  element (e.g. a property drawer).

Thanks to Alan Schmitt for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/88086
2014-06-28 00:28:45 +02:00
Nicolas Goaziou 2ae77c5e50 org-element: Fix parsing path starting with ~
* lisp/org-element.el (org-element-link-parser): Do not prepend "//"
  to paths starting with "~".

Since b1dcd0fb0b, link parser doesn't
expand file names anymore. We need to prevent it from "fixing" paths
starting with "~", as it can cause trouble to some
exporters (e.g. latex).
2014-06-27 17:28:56 +02:00
Nicolas Goaziou 16c71d6b78 org-element: Small refactoring
* lisp/org-element.el (org-element--cache-generate-key): Small
  refactoring.
2014-06-26 22:00:27 +02:00
Nicolas Goaziou db995f2b9d org-element: Use full range of integers for cache keys
* lisp/org-element.el (org-element--cache-generate-key): Allow
  negative numbers in keys.  Small refactoring.
2014-06-26 21:13:43 +02:00
Nicolas Goaziou afa759f27c Merge branch 'maint' 2014-06-26 12:18:35 +02:00
Nicolas Goaziou a5beff869f ox-ascii: Fix tables with a width cookie
* lisp/ox-ascii.el (org-ascii--table-cell-width): Correctly export
  tables with width cookies.
2014-06-26 12:17:28 +02:00
Nicolas Goaziou d5bc5859af org-element: Fix typo
* lisp/org-element.el (org-element--cache-generate-key): Fix typo in
  docstring.
2014-06-26 01:11:26 +02:00
Nicolas Goaziou d40dbc6ca2 org-element: More refactoring
* lisp/org-element.el (org-element--cache-generate-key): Refactor key
  computation.
(org-element--cache-default-key): Remove variable.
2014-06-26 01:08:15 +02:00
Nicolas Goaziou 03040f109f org-element: Refactoring
* lisp/org-element.el (org-element--cache-sensitive-re): New variable
(org-element--cache-opening-line, org-element--cache-closing-line):
Removed variables.
(org-element--cache-before-change, org-element--cache-after-change):
Refactoring.  Also simplify process.
2014-06-25 23:53:23 +02:00
Nicolas Goaziou e46c62d96f org-element: Small cache fix
* lisp/org-element.el (org-element--cache-before-change): Ignore case
  sensitivity when looking for a modified sensitive line.
2014-06-25 23:51:04 +02:00
Nicolas Goaziou c9eaea360a Fix `org-drag-element-backward'
* lisp/org.el (org-drag-element-backward): Correcly drag elements in
  a drawer or a block.
* testing/lisp/test-org.el (test-org/drag-element-backward): Add test.
2014-06-25 10:49:52 +02:00
Eric Schulte 1c3bdbb80a inhibit <p> wraps on a whole-list basis
* lisp/ox-html.el (org-html-paragraph): Extend the special case of
  inhibiting <p> wrappers to only perform such inhibition when *every*
  element of the list is a single paragraph long.  Otherwise unsightly
  spacing results.
2014-06-23 20:08:09 -04:00
Eric Schulte 518b60aa42 allow square brackets in emphasis post-match
* lisp/org.el (org-emphasis-regexp-components): Allow square brackets
  in the emphasis post match.
2014-06-23 17:47:03 -04:00
Nicolas Goaziou 77e234e578 org-element: Fix thinko
* lisp/org-element.el (org-element--cache-key-less-p): Fix thinko.
2014-06-23 23:45:00 +02:00
Achim Gratz 6d15cd3b89 ob-shell: honor the specified shell for :session
* lisp/ob-shell.el: Remove defcustom `org-babel-sh-command' and
  replace with `shell-file-name' throughout.
  (org-babel-variable-assignments:sh): Make check for bash work in more
  cases.

The original code and the patched version rely on the shell being
available via PATH.  Instead the shell name should be mapped to the
appropriate executable via an alist and invoked via an absolute
filename.  For security reasons the permissible shells should probably
be taken from /etc/shells or equivalent by default.  Instead of
checking for bash, the same or another alist could provide the
information of whether or not the shell supports arrays (which indeed
were introduced by ksh originally).
2014-06-23 20:53:22 +02:00
Achim Gratz 2685f31a50 ob-shell: stratify shell variable quoting
* lisp/ob-shell.el: Remove unused defcustom
  `org-babel-sh-var-quote-fmt'.
  (org-babel-variable-assignments:bash_array):
  (org-babel-variable-assignments:bash_assoc): Remove superfluous
  `mapcar' and double quotes around parameters.
  (org-babel-sh-var-to-sh): Single-quote the whole string and escape
  all single quotes in the original string.
2014-06-23 20:53:16 +02:00
Matt Lundin 4a4dbe16d8 Fix speedkeys to move subtrees up and down
* lisp/org.el (org-speed-commands-default): Bind "U" and "D" to
`org-metaup' and `org-metadown'.

Org speed keys were not updated to reflect the recent changes to
org-shiftmetaup and org-shiftmetadown.  As a result the default
bindings for speedkeys "U" and "D" were destructive, since they moved
only single lines.  Binding them to org-metaup and org-metadown fixes
the problem.

Thanks to Marco Wahl for reporting the problem:
http://permalink.gmane.org/gmane.emacs.orgmode/87873
2014-06-23 16:55:21 +02:00
Nicolas Goaziou 69773248c5 org-element: Fix cache
* lisp/org-element.el (org-element--cache-after-change): Preserve
  match data.

Thanks to Matt Lundin for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/87871
2014-06-23 12:28:11 +02:00
Rasmus def0361b7b ox-latex.el: Extends `org-latex-logfiles-extensions'
ox-latex.el (org-latex-logfiles-extensions): Add more extensions.
2014-06-23 11:26:17 +02:00
Bastien Guerry ddb536e833 Merge branch 'maint' 2014-06-23 09:45:48 +02:00
Bastien Guerry be9a1638af Fix typos: backport revision r117377 from emacs trunk 2014-06-23 09:40:19 +02:00
Eric Schulte 8ad20618d1 map alternate code blocks shell names to sh-mode
* lisp/org-src.el (org-src-lang-modes): Map alternate shell names to
  sh-mode.
2014-06-22 19:50:31 -04:00
Achim Gratz 22410544c7 org: correct package-version for org-structure-template-alist
* lisp/org.el (org-structure-template-alist): Package version should
  be a symbol name, not a string.

Fixes ce41c076c0.
2014-06-22 10:26:43 +02:00
Aaron Ecay 551945e396 lisp/ox-latex.el (org-latex-logfiles-extensions): add more extensions
* lisp/ox-latex.el (org-latex-logfiles-extensions): Add several more
file extensions.

- biber: bcf, blg, run.xml
- tikz externalize: figlist
- xelatex -no-pdf: xdv
2014-06-22 00:14:47 -04:00
Aaron Ecay ce41c076c0 org.el: insert missing quote 2014-06-21 23:32:18 -04:00
Aaron Ecay 5ee0d29f57 Remove another vestige of org-mtags
* lisp/org-src.el (org-edit-src-find-region-and-lang): Remove old
<foo>-style tags.

This completes commit 94939bd
2014-06-21 21:38:32 -04:00
Aaron Ecay 94939bd473 org-mtags: remove
* contrib/lisp/org-mtags.el: Delete file.
* lisp/org.el (org-structure-template-alist): Remove <foo>-style tags.
(org-complete-expand-structure-template): Don't handle <foo>-style tags.
2014-06-21 20:48:46 -04:00
Bastien Guerry ce2359eb80 Merge branch 'maint'
Conflicts:
	lisp/org.el
2014-06-20 08:44:06 +02:00
Bastien Guerry 4b0557bdd8 org.el: Delete `org-fix-ellipsis-at-bol'
* org.el (org-fix-ellipsis-at-bol): Delete.
(org-mode, org-show-context, org-isearch-end): Don't use
`org-fix-ellipsis-at-bol'.
2014-06-20 08:41:34 +02:00
Nicolas Goaziou f336de2f82 org-element: Tweak cache parameters
* lisp/org-element.el (org-element-cache-sync-idle-time,
  org-element-cache-sync-break): Increase values as synchronizing
  cache too makes editing somewhat sluggish without any benefit.
2014-06-19 22:32:23 +02:00
Nicolas Goaziou 8e49c823fd org-element: Optimize cache
* lisp/org-element.el (org-element--cache-for-removal): New function.
(org-element--cache-submit-request): Do not synchronize cache when
changes can be merged with next request.

This shortcut is particularly useful when many changes happen in the
same area, which is expensive to parse (e.g., a large list).
2014-06-19 22:32:23 +02:00
Nicolas Goaziou b2f200f0a1 org-element: Sync cache after changes instead of before them
* lisp/org-element.el (org-element--cache-sync,
  org-element--cache-process-request): Change signature.
(org-element--cache-before-change): Do not synchronize cache
preemptively.
(org-element--cache-submit-request): Synchronize cache preemptively.

This change makes possible to skip cache preemptive synchronization
under some circumstances.
2014-06-19 22:32:22 +02:00
Nicolas Goaziou 87dbce239d org-element: Extend format for cache sync requests
* lisp/org-element.el (org-element--cache-sync-requests): Also store
  beginning position for buffer modifications.
(org-element--cache-sync, org-element--cache-process-request)
(org-element--cache-submit-request): Adapt to new request template.

This change is required for a future cache optimization.
2014-06-19 22:32:22 +02:00
Nicolas Goaziou 2084ff06d8 org-element: Tiny refactoring
* lisp/org-element.el (org-element--cache-sync): Do not check return
  value from `org-element--cache-process-request'.
(org-element--cache-process-request): Throw `interrupt' when the
request cannot be processed.
(org-element--cache-process-request): Do not catch interruption from
  `org-element--parse-to'.
(org-element--parse-to): Throw `interrupt' when the process stops
before finding the result.
2014-06-19 22:32:22 +02:00
Nicolas Goaziou 8b959237fc ox: Small refactoring
* lisp/ox.el (org-export-get-category): Refactor code.
2014-06-18 23:30:54 +02:00