Commit graph

8756 commits

Author SHA1 Message Date
Nicolas Goaziou bc8d34541b ox-beamer: Do not ignore uppercase environements
* lisp/ox-beamer.el (org-beamer--frame-level): Small refactoring.
(org-beamer--format-block, org-beamer-headline): Do not systematically
downcase environment names as some require upper case in their
names (e.g. noteNH and CJK).

Thanks to James Harkins for reporting the bug.
2013-04-20 08:32:10 +02:00
Bastien Guerry 3d994a602c ob-core.el (org-babel-insert-result): Fix bug when inserting results as a list: ensure we split a string containing "\n"
* ob-core.el (org-babel-insert-result): Fix bug when inserting
results as a list: ensure we split a string containing "\n".

Thanks to Sébastien Vauban for reporting this.
2013-04-19 19:44:40 +02:00
Bastien Guerry 5ef07dc54a ox-html.el: Fix copyright header
* ox-html.el: Fix copyright header.
2013-04-18 19:32:07 +02:00
Bastien Guerry 1e3cb91ccb org.el (org-store-link): Don't add a search string when storing a link from a radio target
* org.el (org-store-link): Don't add a search string when
storing a link from a radio target.
(org-open-at-point): Jump to the radio link (<<<radio>>>), not
to the simple target (<<target>>).
2013-04-18 17:27:17 +02:00
Nicolas Goaziou 60aa1682ce ox: Change scope for `org-export-with-timestamps'
* lisp/ox.el (org-export-with-timestamps): Only applies to isolated
  timestamps, i.e. timestamps in a paragraph containing only
  timestamps and empty strings.
(org-export--skip-p): Skip timestamps according to new behaviour.
* testing/lisp/test-ox.el: Update tests.
2013-04-18 16:58:56 +02:00
Bastien Guerry 2c46ecee4f org-table.el (org-table-get-remote-range): Fix typo
* org-table.el (org-table-get-remote-range): Fix typo.
2013-04-18 15:42:31 +02:00
Bastien Guerry 87e1e9406e Makefile (clean-install): Also remove ox*.el* files
* Makefile (clean-install): Also remove ox*.el* files.
2013-04-18 14:43:45 +02:00
Bastien Guerry 03920a01fa Merge branch 'master-apply-aaron-patch2'
Conflicts:
	lisp/ob-core.el
2013-04-18 12:28:03 +02:00
Aaron Ecay bf29482973 Clean up various org-babel-*-maybe commands
* lisp/ob-core.el (org-babel-when-in-src-block): New macro.
  (org-babel-execute-src-block-maybe)
  (org-babel-expand-src-block-maybe)
  (org-babel-load-in-session-maybe, org-babel-pop-to-session-maybe):
  Use it.

org-babel-get-src-block-info is a potentially expensive operation, which
is why its ‘light’ argument exists.  But in any case, it is overkill to
query the whole info, if all that is needed is whether point is in a
block or not.  Factor the simplified common code out into a macro.
2013-04-18 12:26:23 +02:00
Bastien Guerry ccdfa8ddf8 org-datetree.el: Be more restrictive when finding a year datetree
* org-datetree.el (org-datetree-find-month-create)
(org-datetree-find-day-create): Add a docstring.
(org-datetree-find-year-create): Only match headlines with a
year or a year and one or more tags.

Thanks to Suvayu Ali for reporting this.
2013-04-18 12:20:08 +02:00
Aaron Ecay 4d763f35f5 Fix bug in org-babel-execute-src-block
* lisp/ob-core.el (org-babel-execute-src-block): Use `copy-tree'
to prevent setf from modifying users variables withing let-bound
`info' variable.

Otherwise, the setf calls in this function can reach into and change
other configuration variables, such as the library of babel.
2013-04-18 10:48:57 +02:00
Aaron Ecay 25869e5670 Add 'inline-only option to org-export-babel-evaluate
* lisp/ob-exp.el (org-export-babel-evaluate): Add a 'inline-only option.
  (org-babel-exp-results): Implement 'inline-only for
  `org-export-babel-evaluate'.
* doc/org.texi (Exporting code blocks): Document the 'inline-only setting
  for `org-export-babel-evaluate'.

This is useful because there is no way for inline results to be stored.
The imagined usecase is that all non-inline source blocks will be
evaluated manually by the user.  Inline blocks, however, must be
evaluated during export, or they will be simply deleted by the exporter.
2013-04-18 10:41:47 +02:00
Bastien Guerry 4757c5c8dd Merge branch 'master' of orgmode.org:org-mode 2013-04-18 10:29:12 +02:00
Bastien Guerry 4231cb4b12 Use `org-add-hook' in some places and merge Emacs revno r112320
* ox.el (org-export-stack-mode)
* org-crypt.el (org-crypt-check-auto-save)
(org-crypt-use-before-save-magic): Use `org-add-hook' when the
hooks are local hooks.

* org-indent.el (org-indent-mode)
* org-agenda.el (org-agenda-mode): Use `org-add-hook' and
merge upstream change from Emacs revno r112320.
2013-04-18 10:29:00 +02:00
Bastien Guerry 217d14ecc2 ob-core.el (org-babel-pop-to-session-maybe): Fix docstring
* ob-core.el (org-babel-pop-to-session-maybe): Fix docstring.
(org-babel-pop-to-session-maybe): Use true function's name,
not its alias.
2013-04-18 10:22:34 +02:00
Nicolas Goaziou 77c5710de2 ox-latex: Handle consecutive alterning sub and superscript
* lisp/ox-latex.el (org-latex--script-size): Handle consecutive
  alterning sub and superscript.

This patch fixes export of "a^b_c" constructs.
2013-04-18 00:06:06 +02:00
Nicolas Goaziou 58f7e43821 ox-org.el: Fix some docstrings
* lisp/ox-org.el (org-org-identity): Fix docstring.  Tiny refactoring.
(org-org-headline, org-org-keyword): Fix docstring.
2013-04-17 22:45:07 +02:00
Achim Gratz f6bf19f898 ob-perl: fix result handling
* lisp/ob-perl.el (org-babel-perl-wrapper-method): Select output
  handle only after evaluation so that output is not mixed into
  results eavaluation.
  (org-babel-perl-evaluate): Fix the handling of results for ":results
  output" to also parse tables.  Use the same lambda construction as
  in ob-sh.el to avoid code duplication.
2013-04-17 21:40:15 +02:00
Nicolas Goaziou 99f8821995 ox-latex: Use \text command for subscript and superscript
* lisp/ox-latex.el (org-latex--script-size): Use \text command for
  subscript and superscript.  This is far superior to \mathrm, but it
  requires "amstext" package.  In particular, accented characters are
  now allowed within sub/superscript.
* lisp/org.el (org-latex-default-packages-alist): Add "amstext"
  package.
2013-04-17 20:59:41 +02:00
Nicolas Goaziou d57b9e84e1 ox-latex: Better handling of sub/superscript within sub/superscript
* lisp/ox-latex.el (org-latex--script-size): Fix error when using
  sub/superscript within sub/superscript.
2013-04-17 20:59:41 +02:00
Bastien Guerry 937b4484c6 org-agenda.el: New commands for dragging a line forward/backward
* org-agenda.el (org-agenda-drag-line-forward)
(org-agenda-drag-line-backward): New commands.
(org-agenda-mode-map): Bind the new commands to M-<down> and
M-<up> respectively.

* org.texi (Agenda commands): Add a table heading for dragging
agenda lines forward/backward.
2013-04-17 20:25:02 +02:00
Nicolas Goaziou b335a4fa34 ox-latex: Improve subscript/superscript export
* lisp/ox-latex.el (org-latex--script-size): New function.
(org-latex-subscript, org-latex-superscript): Use new function.
2013-04-17 18:43:01 +02:00
Bastien Guerry d68744f401 org.el (org-insert-heading): Fix insertion of items
* org.el (org-insert-heading): Fix insertion of items.
2013-04-17 10:10:34 +02:00
Bastien Guerry df4ed8e794 org-capture.el (org-capture-use-agenda-date): Fix docstring
* org-capture.el (org-capture-use-agenda-date): Fix docstring.
2013-04-17 07:00:59 +02:00
Bastien Guerry 4e62936ae5 org-agenda.el: (org-agenda-bulk-toggle-all): New command
* org-agenda.el (org-agenda-bulk-toggle): Fix docstring.
(org-agenda-bulk-toggle-all): New command.
(org-agenda-mode-map): Bind `org-agenda-bulk-toggle' to `M-m'
and `org-agenda-bulk-toggle-all' to `M-*'.
(org-agenda-menu): Add `org-agenda-bulk-toggle' and
`org-agenda-bulk-toggle-all'.
(org-agenda-bulk-mark, org-agenda-bulk-unmark): Jump to the
next headline, not the next line.
2013-04-16 22:02:07 +02:00
Bastien Guerry 35b9983107 org-capture.el (org-mks): Fix bug.
* org-capture.el (org-mks): Fix bug: let-bind
`case-fold-search' to nil while matching the first letter of a
multi-letters template.

Thanks to Robert Goldman for reporting this bug and providing the fix.
2013-04-16 18:27:11 +02:00
Bastien Guerry 4f89c37cea org.el (org-store-link): When a bracket link is found in a headline, use the link description or the link path
* org.el (org-store-link): When a bracket link is found in a
headline, use the link description or the link path.
2013-04-16 16:05:55 +02:00
Nicolas Goaziou 407a6acf4d ox/ox-latex: Fix docstrings
* lisp/ox-latex.el: Remove instructions since everything is documented
  in Org manual.
* lisp/ox.el (org-export-with-smart-quotes): Use LATEX instead of
  LaTeX for keywords, the latter being hard to type, somewhat
  difficult to read, and overall just pedantic.
2013-04-16 12:54:05 +02:00
Bastien Guerry 7c2b7b9eef org.el: Use user-error' instead of error'
* org.el (org-flag-drawer, org-hide-block-toggle)
(org-goto-left, org-goto-right, org-promote)
(org-paste-subtree, org-narrow-to-block, org-sort-entries)
(org-insert-link, org-offer-links-in-entry, org-open-file)
(org-refile, org-refile-get-location)
(org-refile-check-position, org-prepare-dblock, org-todo)
(org-auto-repeat-maybe, org-show-todo-tree, org-sparse-tree)
(org-occur, org-priority, org-scan-tags)
(org-get-tags-string, org-property-action, org-set-effort)
(org-entry-put, org-insert-drawer)
(org-compute-property-at-point)
(org-property-next-allowed-value, org-evaluate-time-range)
(org-closest-date, org-timestamp-change)
(org-revert-all-org-buffers, org-cycle-agenda-files)
(org-agenda-file-to-front, org-remove-file)
(org-preview-latex-fragment, org-format-latex)
(org-create-math-formula, org-create-formula-image)
(org-speed-command-help, org-check-before-invisible-edit)
(org-modifier-cursor-error, org-hidden-tree-error)
(org-mark-subtree, org-kill-line, org-first-sibling-p)
(org-up-element, org-down-element)
(org-drag-element-backward, org-drag-element-forward)
(org-unindent-buffer, org-speedbar-set-agenda-restriction):
Use `user-error' instead of `error'.
2013-04-16 12:02:35 +02:00
Bastien Guerry 320b633b6e ox-latex.el (latex): Don't force exporting with smart quotes
* ox-latex.el (latex): Don't force exporting with smart
quotes.

* ox.el (org-export-with-smart-quotes): Mention the need to
use the relevant Babel package when setting this option to
non-nil.

Before the fix, if the user used #+LANGUAGE: fr with no other
customization, the quotes would disappear from the PDF output.
That's because smart quotes were enforced, while the .tex file
needs \usepackage[french]{babel} to display the quotes.

We now don't force the smart quotes and give more explanations
in `org-export-with-smart-quotes'.
2013-04-16 11:39:41 +02:00
Bastien Guerry 7790a97cdd org-src.el (org-edit-src-turn-on-auto-save): New option
* org-src.el (org-edit-src-turn-on-auto-save): New option.
(org-edit-src-code): Use it.
(org-edit-src-auto-save-idle-delay): Enhance docstring.

* doc/org.texi (Editing source code): Document
`org-edit-src-auto-save-idle-delay' and
`org-edit-src-turn-on-auto-save'.

Thanks to Charles C. Berry for bringing this up again.
2013-04-16 10:38:01 +02:00
Bastien Guerry 8546254ce5 org-capture.el (org-mks): Make cursor invisible
* org-capture.el (org-mks): Make cursor invisible.
2013-04-16 09:23:45 +02:00
Bastien Guerry 8546ef131d org.el (org-link-expand-abbrev): Save match data before before calling the replacement function
* org.el (org-link-expand-abbrev): Save match data before
before calling the replacement function.
2013-04-16 09:15:45 +02:00
Bastien Guerry 7c466e470c org-list.el (org-sort-list): Don't move point when matching time values
* org-list.el (org-sort-list): Don't move point when matching
time values.

Thanks to Samuel Wales for reporting this bug.
2013-04-16 08:23:52 +02:00
Carsten Dominik cb658482c3 Fix typo in docstring of `org-small-year-to-year'
* lisp/org.el (org-small-year-to-year): Fix typo in docstring
2013-04-16 05:59:27 +02:00
Nicolas Goaziou 5e0c969381 Better document LATEX_HEADER_EXTRA keywords
* doc/org.texi (Header and sectioning): Add a footnote about the
  different between LATEX_HEADER_EXTRA and LATEX_HEADER.
* lisp/ox-latex.el (org-latex-classes): Be more explicit about
  LATEX_HEADER_EXTRA.
2013-04-15 23:24:53 +02:00
Bastien Guerry b019cab9de Merge branch 'master' of orgmode.org:org-mode 2013-04-15 22:57:33 +02:00
Bastien Guerry 4b236f2043 org-bibtex.el: Fix email address 2013-04-15 22:57:26 +02:00
Rick Frankel db8d3f5dcf Allow setting :HTML_CONTAINER as a per-headline property.
* lisp/ox-html.el (org-html-headline): Use (new) org-html--container
  function to set container element.
(org-html--container): Returns appropriate element for headline
container:
        1. The element set on the headline :HTML_CONTAINER property.
        2. the :html-container element (if the relative headline level
        is 1.)
        3. The default ("div").
2013-04-15 13:59:16 -04:00
Bastien Guerry 6e1a39bd6e Merge branch 'master' of orgmode.org:org-mode 2013-04-15 18:34:14 +02:00
Bastien Guerry 5e3964d5b4 org.el (org-shifttab): Show the correct number of empty headlines
* org.el (org-shifttab): Show the correct number of empty
headlines when called with a numeric prefix argument.  Enhance
docstring.

Thanks to Michael Crouch for reporting this bug and providing the fix.
2013-04-15 18:32:30 +02:00
Nicolas Goaziou 4c812675d0 ox-html: Fix invalid syntax in html attributes
* lisp/ox-html.el (org-html--build-meta-info): Fix invalid characters
  in html attributes.
2013-04-15 17:54:13 +02:00
Bastien Guerry f6d7230ca2 Merge branch 'master' of orgmode.org:org-mode 2013-04-15 10:45:03 +02:00
Bastien Guerry ab8689d261 org.el: Tiny cosmetic change. 2013-04-15 10:44:53 +02:00
Nicolas Goaziou df2807b59d ox: Remove macro filters
* lisp/ox.el (org-export-filters-alist): Remove macro filter.
(org-export-filter-macro-functions): Remove variable.

Macro filters are never called since macro expansion happens before
the export process.
2013-04-15 08:22:51 +02:00
Bastien Guerry ef4bbe5608 org.el (org-uniquify): Use `copy-sequence'
* org.el (org-uniquify): Use `copy-sequence'.

Thanks to Thomas Dye for reporting this.
2013-04-15 01:11:03 +02:00
Bastien Guerry 4d77fb7696 ox.el: Fix tiny typo. 2013-04-15 00:55:26 +02:00
Eric Schulte 06294c8dac ox-beamer: Ensure nil is not passed to regexp function
* lisp/ox-beamer.el (org-beamer--format-frame): If contents is nil, then
  replace it with an empty string.
2013-04-14 19:26:01 +02:00
Florian Beck f9555eef69 Unescape :help-echo for links
* lisp/org.el (org-activate-bracket-links): Remove escapes
from the help string.

TINYCHANGE
2013-04-14 12:20:02 +02:00
Bastien Guerry 0ffeb8709e org.el (org-adaptive-fill-function, org-fill-paragraph): Throw a useful error message
* org.el (org-adaptive-fill-function, org-fill-paragraph):
Throw a useful error message when parse an element fails in
the current buffer.

This can happen for example in a `message-mode' buffer when using
orgstruct-mode.  If you insert a line like:

SCHEDULED: <2013-04-13 Sat> is blablabla

then org-element-at-point will fail and the user will get an error
he cannot understand.
2013-04-14 11:46:45 +02:00