1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-12-04 08:47:03 +00:00
Commit Graph

16028 Commits

Author SHA1 Message Date
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
Eric Schulte
5ab53d101d rm dependency of ox-bibtex on org-bibtex-extras
* contrib/lisp/org-bibtex-extras.el: Remove functions to find
  citations, moved into ox-bibtex.

* contrib/lisp/ox-bibtex.el: Add functionality to follow cite links.
2014-06-25 12:43:33 -04:00
Eric Schulte
076726fbb6 drop cite options for non-latex backends
These options break citation handling for these other backends, so we
should just drop them.

* contrib/lisp/ox-bibtex.el (org-bibtex-merge-contiguous-citations):
  Drop citation options for HTML and ASCII export.
2014-06-25 07:14:45 -04: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
f05216987d contrib/lisp/ox-extra.el: fix typos/thinkos 2014-06-21 21:54:32 -04:00
Aaron Ecay
c4ceeb34f1 contrib/lisp/ox-extra.el: new file 2014-06-21 21:41:10 -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
c6cc27c5ec ox-koma-letter: Small fix
* contrib/lisp/ox-koma-letter.el (koma-letter): Do not set a default
  value for "from address".

That address is computed later (see special headlines).
2014-06-19 22:31:01 +02:00
Bastien Guerry
a77118b3ca Merge branch 'maint'
Conflicts:
	contrib/lisp/ox-koma-letter.el
2014-06-19 00:49:20 +02:00
IOhannes m zmoelnig
08a9587e01 ox-koma-letter.el (koma-letter): Use `org-koma-letter-from-address'
* ox-koma-letter.el (koma-letter): Use
`org-koma-letter-from-address'.

TINYCHANGE
2014-06-19 00:47:42 +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
Nicolas Goaziou
ab145f0df5 org-element: Properly parse headline properties
* lisp/org-element.el (org-element-headline-parser,
  org-element-inlinetask-parser): First find appropriate property
  drawer in order to read properties.

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

Thanks to Sébastien Vauban for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/87701
2014-06-18 23:28:19 +02:00
Nicolas Goaziou
b1dcd0fb0b org-element: Do not expand file name when parsing links
* lisp/org-element.el (org-element-link-parser): Do not expand file
  name when parsing links so that Tramp doesn't kick in.

Thanks to Sébastien Vauban for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/87696
2014-06-18 19:22:21 +02:00
Grégoire Jadi
9303717691 contrib/lisp/org-contacts.el: Factorize the construction of the database
* contrib/lisp/org-contacts.el (org-contacts-at-point): New function
  used to return the contact at point.
(org-contacts-db): Factorize the construction of the database using
`org-contacts-at-point' and fix a small typo.
2014-06-17 16:42:08 +09:00
Grégoire Jadi
e57c4c6e32 contrib/lisp/org-contacts.el: Add a hook to allow users to plug completion functions
* contrib/lisp/org-contacts.el (org-contacts-complete-functions): A
  hook that contains the list of functions used to complete contacts.
(org-contacts-message-complete-function): Use the new hook.

Suggested by John Kitchin.
2014-06-17 16:41:49 +09:00
Thierry Banel
25fc4d8344 Make C, C++, D, Java, Groovy compilers customizable
* ob-C.el (org-babel-C-compiler):
	(org-babel-C++-compiler):
	(org-babel-D-compiler): changed defvar to defcustom
	* ob-java.el (org-babel-java-command):
	(org-babel-java-compiler): changed defvar to defcustom
	* ob-groovy.el (org-babel-groovy-command):
	changed defvar to defcustom
2014-06-16 11:05:01 -04:00
Bastien Guerry
d100d590e1 org-agenda.el (org-agenda-filter-by-tag): Don't refresh the agenda
* org-agenda.el (org-agenda-filter-by-tag): Don't refresh the
agenda.
2014-06-16 11:44:25 +02:00