Commit Graph

15657 Commits

Author SHA1 Message Date
Nicolas Goaziou 3e5fc4540b org-element: Fix docstring
* lisp/org-element.el (org-element--cache-objects): Fix docstring.
2014-03-27 10:47:36 +01:00
Nicolas Goaziou b5dd32c7e4 org-element: Rewrite object parsing algorithm
* lisp/org-element.el (org-element-all-successors,
  org-element-object-successor-alist): Remove variables.
(org-element-object-restrictions): Update value.
(org-element-bold-parser, org-element-code-parser,
org-element-entity-parser, org-element-export-snippet-parser,
org-element-footnote-reference-parser,
org-element-inline-babel-call-parser,
org-element-inline-src-block-parser, org-element-italic-parser,
org-element-latex-fragment-parser, org-element-line-break-parser,
org-element-link-parser, org-element-macro-parser,
org-element-radio-target-parser, org-element-statistics-cookie-parser,
org-element-strike-through-parser, org-element-subscript-parser,
org-element-superscript-parser, org-element-target-parser,
org-element-timestamp-parser, org-element-underline-parser,
org-element-verbatim-parser): Return nil when syntax at point is not
of the expected type.
(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-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,
org-element--get-next-object-candidates): Remove functions.
(org-element-timestamp-regexp, org-element--object-regexp): New
variables.
(org-element--object-lex): New function.
(org-element--parse-objects, org-element-context): Make use of new
tools.

This patch simplifies a lot object parsing and should improve
significantly `org-element-context''s speed.

http://permalink.gmane.org/gmane.emacs.orgmode/83872
2014-03-27 01:25:52 +01:00
Nicolas Goaziou e2872b21e4 ox-latex: Fix defcustom
* lisp/ox-latex.el (org-latex-hyperref-template): Add keywords.
2014-03-26 17:59:39 +01:00
Rick Frankel 37df5f94f4 Allow disabling of htmlization in ox-html export.
* lisp/ox-html.el (org-html-htmlize-output-type): Add `nil'
  option (no htmlization).
(org-html-fontify-code): Return plain text if
`org-html-htmlize-output-type' is `nil'.
2014-03-26 08:42:23 -04:00
Bastien Guerry 1f155ef1e7 Merge branch 'maint' 2014-03-25 21:47:02 +01:00
Bastien Guerry e330027ac1 org-agenda.el (org-agenda-show-new-time): Don't use `move-beginning-of-line'
* org-agenda.el (org-agenda-show-new-time): Don't use
`move-beginning-of-line' as it is slower and not needed.

Thanks to Matt Lundin for reporting this.
2014-03-25 21:46:50 +01:00
Achim Gratz 539b89451c ob-sh: add :hlines processing and :hline-string header arg
* lisp/ob-sh.el (org-babel-variable-assignments:sh): Check for
  ":hlines yes" and use header arg :hlines-string if
  defined (default to "hline") and add this to the call of
  `org-babel-sh-var-to-sh'.
  (org-babel-sh-var-to-sh, org-babel-sh-var-to-string): Add additional
  optional string argument `hline' and use it for the :hline parameter
  in the call to `orgtbl-to-generic'.
2014-03-25 19:25:58 +01:00
Achim Gratz cd1fcb6837 Merge branch 'maint' 2014-03-25 19:15:20 +01:00
Achim Gratz c6e0157095 org-test: fix macro definitions so that eager macro expansion doesn't fail
* testing/org-test.el (org-test-with-temp-text,
  org-test-with-temp-text-in-file): Correct quoting of macro
  expansion.

Macro arguments must not be used during macro expansion since they are
not available at that time; conversely, bindings established during
macro expansion generally can not be used at macro execution
time (unless un-quoted during expansion).
2014-03-25 19:11:01 +01:00
Nicolas Goaziou ea097c25dd ox-latex: Allow :options in LaTeX attributes
* lisp/ox-latex.el (org-latex-src-block): Allow to add options to
  listings or minted block-wise.
(org-latex-listings-options, org-latex-minted-options): Update
docstring.

* doc/org.texi (@LaTeX{} specific attributes): Document feature.
2014-03-25 19:08:56 +01:00
Achim Gratz 9973fbc347 ob-lob: do not use cl at runtime
* lisp/ob-lob.el (org-babel-lob-execute): Do not use defun subseq from
  cl at runtime.  Replace concatenation of sub-sequences by splicing
  the modified params list into a copy of info (pre-must info be
  preserved).
2014-03-25 18:59:59 +01:00
Achim Gratz 078329f813 Merge branch 'maint' 2014-03-25 18:59:25 +01:00
Achim Gratz e89adba685 ob-gnuplot: create a proper table even when handed just a vector
* lisp/ob-gnuplot.el (org-babel-gnuplot-process-vars):
  `org-babel-gnuplot-table-to-data´ expects a table, so we need to
  construct one when Babel hands us a vector.

Thanks to Eric Fraga for reporting the bug.
http://permalink.gmane.org/gmane.emacs.orgmode/84072
2014-03-25 18:55:13 +01:00
Nicolas Goaziou cd9685cd10 ox-publish: Fix code typo (take 3)
* lisp/ox-publish.el (org-publish-cache-file-needs-publishing): Fix
  code typo.
2014-03-25 16:06:46 +01:00
Bastien Guerry 71ee4425b6 Merge branch 'master' of orgmode.org:org-mode 2014-03-25 12:13:01 +01:00
Bastien Guerry 4cf2b55cb0 Merge branch 'maint' 2014-03-25 12:04:19 +01:00
Bastien Guerry 0e344ae04a org-compat.el (org-move-to-column): Fix bug
* org-compat.el (org-move-to-column): Temporarily set
`buffer-invisibility-spec' more accurately.

Thanks to Samuel Wales for reporting this.
2014-03-25 12:04:09 +01:00
Nicolas Goaziou b982b57cb1 ox-publish: Fix code typo (part 2)
* lisp/ox-publish.el (org-publish-cache-file-needs-publishing): Fix
  code typo.
2014-03-25 10:46:34 +01:00
Nicolas Goaziou 317d2f1898 ox-publish: Fix code typo
* lisp/ox-publish.el (org-publish-cache-file-needs-publishing): Fix
  code typo.
2014-03-25 10:38:48 +01:00
Nicolas Goaziou 1c1936fbb1 Allow radio links after an apostrophe and mid-word
* lisp/org.el (org-make-target-link-regexp): Allow radio links after
  an apostrophe and mid-word.  Small refactoring.

* testing/lisp/test-ox.el (test-org-export/resolve-radio-link): Add
  test.

See http://permalink.gmane.org/gmane.emacs.orgmode/84108.
2014-03-25 10:21:26 +01:00
Nicolas Goaziou bebb7597a7 ox-publish: Fix small bug
* lisp/ox-publish.el (org-publish-cache-file-needs-publishing):
  Correctly extract filename.

This bug was introduced in 6062f9ea72.
Thanks to steckerhalter for reporting it.
2014-03-25 10:05:27 +01:00
Bastien Guerry 6289868d28 Revert "org-plot: Handle explicit date/time index"
This reverts commit e2b6c506c2.
2014-03-25 09:18:25 +01:00
Nicolas Goaziou ad16ef42da Silence byte-compiler 2014-03-24 21:07:43 +01:00
Nicolas Goaziou 6d1d61f667 Rename `org-babel-under-commented-heading-p'
* lisp/org.el (org-in-commented-heading-p): New function.
* lisp/ob-tangle.el (org-babel-under-commented-heading-p): Remove
  function.
(org-babel-tangle-collect-blocks): Use new function.
* lisp/ob-exp.el (org-babel-exp-process-buffer): Use new function.

* testing/lisp/test-org.el (test-org/in-commented-heading-p): New
  test.
2014-03-24 13:29:42 -04:00
Nicolas Goaziou 230d09aeb0 Merge branch 'maint' 2014-03-24 14:20:23 +01:00
Nicolas Goaziou 2e79bd8119 export back-ends: Update radio target export
* contrib/lisp/ox-groff.el (org-groff-link):
* lisp/ox-ascii.el (org-ascii-link):
* lisp/ox-beamer.el (org-beamer-link):
* lisp/ox-html.el (org-html-link):
* lisp/ox-latex.el (org-latex-link):
* lisp/ox-md.el (org-md-link):
* lisp/ox-odt.el (org-odt-link): Update radio target export according
  to recent changes.

See bug report at http://permalink.gmane.org/gmane.emacs.orgmode/82923
2014-03-24 14:13:24 +01:00
Nicolas Goaziou 8212776cfc Fix radio target parsing
* lisp/org-element.el (org-element-all-successors,
  org-element-object-restrictions): Prioritize `link' over other
  successors in order to find radio links starting with another syntax
  object (e.g., an entity).  Also allow text markup within radio
  targets.
(org-element-link-parser): Add contents to radio targets.

* lisp/org.el (org-make-target-link-regexp): Fix regexp so it can
  match targets starting with an Org object (e.g., an entity).
(org-ctrl-c-ctrl-c): Fix function when applied on an object contained
within a radio target.

* testing/lisp/test-org-element.el (test-org-element/radio-target-parser): Add test.
* testing/lisp/test-ox.el (test-org-export/resolve-radio-link): Add test.
2014-03-24 14:13:24 +01:00
Nicolas Goaziou 955d9d8a78 Change "\" and "~" syntax to symbol
* lisp/org.el (org-mode): Change "\" and "~" characters syntax from
  `punctuation' to `symbol' so they are on par with other characters used
  in Org syntax (e.g., "/", "*"...).

This change is needed to correctly find radio links starting with an
entity:

  <<<\alpha-test>>> \alpha-test
2014-03-24 14:13:24 +01:00
Nicolas Goaziou 09ee2336ef Merge branch 'maint' 2014-03-24 13:59:44 +01:00
Nicolas Goaziou 33dce5b98f Fix LaTeX and Beamer publishing process
* lisp/ox-beamer.el (org-beamer-publish-to-pdf):
* lisp/ox-latex.el (org-latex-publish-to-pdf): Ensure ".tex" file is
  generated in the same directory as the ".org" file.

Thanks to Rafael for reporting it.  See
http://permalink.gmane.org/gmane.emacs.orgmode/84095.
2014-03-24 13:58:25 +01:00
Bastien Guerry bf27c6b71f Merge branch 'maint' 2014-03-24 06:29:26 +01:00
Bastien Guerry c4bca1c384 Fix 3a233aa 2014-03-24 06:29:14 +01:00
Bastien Guerry 2836c9cd81 org-rss-headline: Replace bracket links by their descriptions
* contrib/lisp/ox-rss.el (org-rss-headline): Replace bracket
links by their descriptions.

Thanks to steckerhalter for reporting this.
2014-03-24 06:27:31 +01:00
Muchenxuan Tong cb91729595 org-mac-link: Improve grabbing behavior for Chrome.
* contrib/lisp/org-mac-link.el (org-as-mac-chrome-get-frontmost-url):
  Improve AppleScript used for grabbing information from Chrome.  Now
  it's shorter and doesn't require switching to the app.  Also,
  starting and ending quote are trimmed only when necessary.
2014-03-23 09:25:07 +01:00
Nicolas Richard b3a10b66fe Keep documentation on "Previewing LaTeX" in its own section
* doc/org.texi (@LaTeX{} fragments)
(Previewing @LaTeX{} fragments): Keep documentation on
"Previewing LaTeX" in its own section.
2014-03-22 17:40:52 +01:00
Nicolas Goaziou 9665f83f7b Merge branch 'maint' 2014-03-22 15:16:44 +01:00
Nicolas Goaziou d91d4bfb47 ox-latex: Fix underline in sections
* lisp/ox-latex.el (org-latex-headline): Hard-code "\underline" in
  sections because "\uline" ("ulem" package) returns an error and
  "\ul" ("soul" package) doesn't support chinese characters.

See http://permalink.gmane.org/gmane.emacs.orgmode/83962 for the
related thread.
2014-03-22 15:15:35 +01:00
Nicolas Goaziou 95eeefa9bc Revert "LaTeX: Use \ul (from the "soul" package) instead of \uline"
This reverts commit b399ff0cba.
2014-03-22 15:15:35 +01:00
Bastien Guerry e183bb08f5 Merge branch 'maint' 2014-03-22 09:40:51 +01:00
Aaron Ecay cb53665e55 Fix org-src-edit interaction with undo.
* org-src.el (org-edit-src-exit): Place an undo boundary before
writing changes back to parent buffer.

The previous code attempted to preserve the undo information in the
indirect buffer editing the source code, but this interacts poorly
with the undo system, and can lead to undo operations scrambling the
buffer.  The new approach means that edits made in the indirect buffer
cannot be undone piece-by-piece (instead, all changes made in the
indirect buffer constitute one “change” from the point of view of
undo), but the misbehavior of undo is (hopefully) now avoided.
2014-03-22 09:40:18 +01:00
Nicolas Goaziou 7e689ae961 org-element: Fix infloop in `org-element-context'
* lisp/org-element.el (org-element-context): Fix infloop.
2014-03-22 09:16:36 +01:00
Bastien Guerry 368aa1078f Merge branch 'maint' 2014-03-22 00:28:30 +01:00
Bastien Guerry b399ff0cba LaTeX: Use \ul (from the "soul" package) instead of \uline
* ox-latex.el (org-latex-text-markup-alist): Use \ul{...} for
underlining instead of \uline{...} as requiring the hyperref
package makes \uline{...} unusable on headline.

* org.el (org-latex-default-packages-alist): Add the "soul"
package.

Thanks to Konstantin Kliakhandler for reporting this.
2014-03-22 00:27:34 +01:00
Nicolas Goaziou d6d1f25429 Fix `org-open-at-point'
* lisp/org.el (org-open-at-point): Correctly open fuzzy links when
  path is hexified.
* testing/lisp/test-org.el (test-org/coderef): New test.
(test-org/fuzzy-links): Add test.
2014-03-21 14:51:34 +01:00
Bastien Guerry 83a55c6f5b Merge branch 'maint' 2014-03-21 12:51:16 +01:00
Bastien Guerry 5a195423d3 org.el (org-refresh-properties): Bugfix
* org.el (org-refresh-properties): Don't add the property to
the whole subtree, only to the part between the beginning of
the headline and the end of the "content", before any other
headline.  This fix a bug about properties displayed as
inherited in the agenda, where Org properties are checked
against text properties.

Thanks to Sébastien Vauban for reporting this.
2014-03-21 12:51:04 +01:00
Bastien Guerry 343a6dd082 org.texi (Macro replacement): Small rewrite
* org.texi (Macro replacement): Small rewrite.

Thanks to Nicolas for his suggestions.
2014-03-21 10:03:50 +01:00
Bastien Guerry 3abea32044 Merge branch 'master' of orgmode.org:org-mode 2014-03-21 09:56:50 +01:00
Bastien Guerry ec8f5dba02 Fix comment typo
* ox-latex.el (org-latex--text-markup): Replace newlines by
whitespaces in \verb constructs.
2014-03-21 09:56:41 +01:00
Bastien Guerry f8cb7803cc ox-latex.el (org-latex--text-markup): Replace newlines by whitespaces in \verb constructs
* ox-latex.el (org-latex--text-markup): Replace newlines by
whitespaces in \verb constructs.

Thanks to Alan Schmitt for reporting this.
2014-03-21 09:56:18 +01:00