Commit Graph

10627 Commits

Author SHA1 Message Date
Nicolas Goaziou 0feec82c63 ox-ascii: Fix error preventing export
* lisp/ox-ascii.el (org-ascii-filter-paragraph-spacing): Fix "concat:
  Wrong type argument: wholenump, auto" error.

Thanks to Xebar Saram for reporting the bug and to Eric Abrahamsen for
finding it out.
http://permalink.gmane.org/gmane.emacs.orgmode/89096
2014-08-03 21:41:37 +02:00
Nicolas Goaziou 381ad4b33a Small refactoring
* lisp/org.el (org-fill-paragraph): Avoid calling
  `fill-region-as-paragraph' if BEG is equal to END.
2014-08-03 09:57:37 +02:00
Nicolas Goaziou d649b792c0 Small refactoring
* lisp/org.el (org-fill-paragraph): Small refactoring.
2014-08-02 23:16:05 +02:00
Nicolas Goaziou cbb82d0c6e Speed up paragraph filling
* lisp/org.el (org-fill-paragraph): Do not parse objects in whole
  paragraph if none looks like a line break.
2014-08-02 22:49:24 +02:00
Nicolas Goaziou 604b93892c ox: Title fallbacks to nil instead of file name
* lisp/ox.el (org-export--get-inbuffer-options):
(org-export-as): Remove title default value handling.
(org-export--get-buffer-attributes): Remove unnecessary property.

* doc/org.texi (Document title):
(Export settings):
* doc/orgguide.texi (Export options): Update documentation.

* testing/lisp/test-ox.el (test-org-export/set-title): Update tests
  according to new specifications.
2014-08-02 21:14:22 +02:00
Nicolas Goaziou 6ba05e3200 ox-html: Fix missing <span> block around section number
* lisp/ox-html.el (org-html-headline): Add <span> element around
  section number.

http://permalink.gmane.org/gmane.emacs.orgmode/89369
2014-08-02 15:36:42 +02:00
Moritz Kiefer 91eee36742 ox-latex.el: Add page number of link when exporting to latex
* lisp/ox-latex.el (org-latex--inline-image): Use page
number (:search-option) of pdf links as page option in
includegraphics.

TINYCHANGE
2014-08-02 10:24:41 +02:00
Bastien Guerry 296d82a383 New alias `org-toggle-latex-fragment' for `org-preview-latex-fragment'
* org.el (org-ellipsis, org-remove-highlights-with-change):
Enhance docstring.
(org-preview-latex-fragment): Make obsolete.  Alias to the new
name `org-toggle-latex-fragment'.
(org-mode, org-mode-map): Use `org-toggle-latex-fragment'.
2014-08-01 13:52:32 +02:00
Nicolas Goaziou cdb85242d6 Fix block hiding
* lisp/org.el (org-hide-block-toggle): Correctly find boundaries of
  the block at point.  Fix `off' argument behavior.  Allow to hide
  a block when at any affiliated keyword.

* testing/lisp/test-org.el (test-org/hide-block-toggle): New test.

Thanks to Andrea Rossetti for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/89324
2014-08-01 10:50:36 +02:00
Nicolas Richard 350fdfd676 ox: Signal an error if keyword is unknown while defining backends
* lisp/ox.el (org-export-define-backend):
(org-export-define-derived-backend): Signal an error if keyword is
unknown.
2014-07-31 12:22:00 +02:00
Nicolas Goaziou 5ec0468e0a Merge branch 'maint'
Conflicts:
	lisp/org-element.el
2014-07-31 12:19:40 +02:00
Nicolas Goaziou f5065b2ff6 org-element: Fix docstring
* lisp/org-element.el (org-element-headline-parser): Add missing
  `:post-blank' property in docstring.
2014-07-31 12:17:35 +02:00
Nicolas Goaziou cc7d757571 ox-html: Fix missing section number in ids
* lisp/ox-html.el (org-html-headline): Fix missing section number in
  div ids.

Thanks to Matt Lundin for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/89291
2014-07-31 10:59:58 +02:00
Matt Lundin 282d8c86e7 Fix broken links in html publishing
* lisp/ox-html.el: Fix incorrect property name in :options-alist of
  html backend definition.
2014-07-30 09:57:18 +02:00
Bastien Guerry 3b6f386795 Merge branch 'maint' 2014-07-29 23:28:34 +02:00
Achim Gratz 60bfafcb0c org.el (org-refresh-category-properties): Enhance regexp
* org.el (org-refresh-category-properties): Enhance regexp.
2014-07-29 23:28:08 +02:00
Matt Lundin a40f568f19 Protect open buffers when publishing sitemap
* lisp/ox-publish.el: (org-publish-find-title) (org-publish-find-date)
  Make sure to call org-export-get-environment in copy of buffer if
  emacs is already visiting. Otherwise, #+bind variables meant for
  export can be set in live buffers.

This patch also optimizes the above functions by inhibiting
org-startup on buffers emacs visits temporarily.
2014-07-29 23:20:19 +02:00
Matt Lundin dc4942442c Fix docstring of org-agenda-inhibit-startup
* lisp/org.el: org-agenda-inhibit-startup: fix docstring to reflect
  default value
2014-07-29 23:19:10 +02:00
Bastien Guerry 2558de0ab3 Merge branch 'master' of orgmode.org:org-mode 2014-07-29 23:18:49 +02:00
Achim Gratz ec231c5db2 Fix 600d3bb56b
* lisp/org-table.el: The reference has been saved in `formrpl', not
  `repl'.
2014-07-29 21:35:43 +02:00
York Zhao 12d5d5f775 org-table.el (org-table-eval-formula): Fix variable name typo 2014-07-29 19:27:57 +02:00
Bastien Guerry 8d8dfacfc6 Fix code typo in 3af4949a 2014-07-29 16:56:44 +02:00
Nicolas Goaziou c9ca0b6df8 ox-html: Use options instead of hard-coded variables
* contrib/lisp/ox-s5.el (org-s5--format-toc-headline): Apply signature
  change.

* lisp/ox-md.el (org-md-headline): Apply signature change.

* lisp/ox-html.el (org-html-format-drawer-function,
  org-html-publish-to-html): Small reformatting.

(org-html-infojs-install-script, org-html--build-meta-info,
org-html--build-mathjax-config, org-html-format-spec,
org-html--build-pre/postamble, org-html-template, org-html-toc,
org-html--format-toc-headline, org-html-list-of-listings,
org-html-list-of-tables, org-html-bold, org-html-drawer,
org-html-headline, org-html-inlinetask, org-html-italic,
org-html-checkbox, org-html-inline-image-p, org-html-link,
org-html-section, org-html-strike-through, org-html-table-cell,
org-html-table-row, org-html-underline, org-html-verbatim,
org-html-final-function, org-html-export-to-html): Do not use
hard-coded variable names.

(org-html-format-headline-function,
org-html-format-inlinetask-function): Change default value.  Require
an additional argument.

(org-html-format-footnote-reference,
org-html-format-footnotes-section,
org-html-format-footnote-definition, org-html-format-headline,
org-html-format-headline--wrap, org-html-format-section): Remove
functions.

(org-html-footnote-section, org-html-footnote-reference): Apply
function removal.  Do not use hard-coded variable names.

(org-html--anchor, org-html--todo, org-html--tags): Change signature.
Do not use hard-coded variable names.

(org-html-radio-target, org-html-target): Apply signature change.

(org-html-format-headline-default-function,
org-html-format-inlinetask-default-function): New functions.
2014-07-29 15:45:18 +02:00
Nicolas Goaziou 3c22bb19e0 ox-odt: Use options instead of hard-coded variables
* lisp/ox-odt.el (org-odt-styles-dir,
  org-odt-create-custom-styles-for-srcblocks, org-odt-table-styles,
  org-odt-get-table-cell-styles): Fix docstring.
(org-odt-format-headline-function,
org-odt-format-inlinetask-function): Change default value.

(org-odt-template, org-odt-drawer, org-odt-format-headline--wrap,
org-odt-inlinetask, org-odt--enumerate, org-odt--image-size,
org-odt--enumerable-image-p, org-odt--enumerable-latex-image-p,
org-odt--enumerable-formula-p, org-odt-link, org-odt-table-style-spec,
org-odt-timestamp): Use option instead of hard-coded variables.

(org-odt-format-headline): Remove function.

(org-odt-do-format-code): Change signature.  Use options instead of
hard-coded variables.
(org-odt-fixed-width, org-odt-latex-environment,
org-odt-link--inline-image, org-odt-format-code): Apply signature
change.

(org-odt-format-headline-default-function,
org-odt-format-inlinetask-default-function): New functions.

(org-odt-link--inline-image): Fix indentation.
2014-07-29 15:45:18 +02:00
Nicolas Goaziou 0540dccadd Use options instead of hard-coded variables
* lisp/ox-beamer.el (org-beamer--format-frame,
  org-beamer--format-block, org-beamer-template): Use options instead
  of hard-coded variables.

* lisp/ox-man.el (org-man-inline-src-block, org-man-src-block,
  org-man-table, org-man-table-cell): Use options instead of
  hard-coded variables.

* lisp/ox-md.el (org-md-headline): Use options instead of hard-coded
  variables.

* lisp/ox-texinfo.el (org-texinfo-format-headline-function,
  org-texinfo-format-inlinetask-function): Change default value.
(org-texinfo--text-markup, org-texinfo--format-menu): Change signature
(org-texinfo--build-menu, org-texinfo-bold, org-texinfo-code,
org-texinfo-comment, org-texinfo-italic, org-texinfo-verbatim): Apply
signature change.

(org-texinfo-template, org-texinfo-clock, org-texinfo-drawer,
org-texinfo-link, org-texinfo-plain-list, org-texinfo-planning,
org-texinfo-table, org-texinfo-table-cell, org-texinfo-timestamp): Use
options instead of variable names.

(org-texinfo-format-headline-default-function,
org-texinfo-format-inlinetask-default-function): New functions.
(org-texinfo-headline, org-texinfo-inlinetask): Use new functions.
2014-07-29 15:45:18 +02:00
Nicolas Goaziou fd448cb1e2 Remove some options associated to variables
* lisp/ox-html.el: Remove options.

* lisp/ox-icalendar.el: Remove options.

* lisp/ox-latex.el (org-latex-guess-inputenc, org-latex-compile,
  org-latex--collect-warnings): Use full variable name instead of an
  option.

* lisp/ox-man.el: Remove options.

* lisp/ox-odt.el: Remove options.

* lisp/ox-texinfo.el: Remove options.

* doc/org.texi (Publishing options): Update documentation accordingly.

These variables are meant to be used outside (or on the fringe) of the
export process, where information channel is not available.

remove
2014-07-29 15:45:18 +02:00
Nicolas Goaziou 011df55c70 ox-latex: Use options instead of hard-coded variables
* lisp/ox-latex.el (org-latex-format-inlinetask-function): Change
  default value.
(org-latex-guess-inputenc, org-latex--text-markup, org-latex-template,
org-latex-clock, org-latex-drawer, org-latex-footnote-reference,
org-latex-headline, org-latex-inline-src-block, org-latex-keyword,
org-latex--inline-image, org-latex-link, org-latex-planning,
org-latex-src-block, org-latex-table, org-latex--org-table,
org-latex--table, org-latex--math-table, org-latex-table-cell,
org-latex-table-row, org-latex-timestamp, org-latex-compile,
org-latex--collect-warnings): Use options instead of hard-coded
variables.

(org-latex-format-inlinetask-default-function): New function.
(org-latex-inlinetask): Use new function.

(org-latex--text-markup): Change signature.
(org-latex-bold, org-latex-code, org-latex-italic,
org-latex-strike-through, org-latex-underline, org-latex-verbatim):
Apply signature change.
2014-07-29 15:45:18 +02:00
Bastien Guerry 06aa1b615c org.el (org-yank): Small docstring enhancement
* org.el (org-yank): Small docstring enhancement.
2014-07-29 15:35:39 +02:00
Malcolm Purvis 3af4949a07 org.el (org-refresh-category-properties): Regexp enhancement
* org.el (org-refresh-category-properties): Regexp enhancement.

TINYCHANGE
2014-07-29 15:22:54 +02:00
Bastien Guerry a98a6afe56 Merge branch 'maint' 2014-07-29 15:21:31 +02:00
Matt Lundin 507244d56b Remove unnecessary invocations of org-mode
* lisp/ox-publish.el: (org-publish-find-title) (org-publish-find-date)
  Fix unnecessary invocations of org-mode with
  org-inhibit-startup.

The functions above call org-mode with org-inhibit-startup in org
buffers that are already open. The result is that these open buffers
lose some crucial local variables during publishing. For instance,
an open buffer will lose its dir-local-variables-alist setting
during publishing. There is no need to call org-mode here, because
org-mode is a) either already initialized in the buffer or b)
initialized via earlier call to find-file-no-select.

This looks to me like a relic of some past time when these functions were
called in temporary buffers that contained copies of the file's contents.
2014-07-29 15:21:21 +02:00
Bastien Guerry 2dbb338ad3 Merge branch 'maint' 2014-07-28 19:23:04 +02:00
Bastien Guerry 812a889657 org-agenda.el (org-agenda-prepare): Reset preset filters
* org-agenda.el (org-agenda-prepare): Reset preset filters
when using sticky agendas.

Thanks to Thomas Morgan for reporting this.
2014-07-28 19:22:53 +02:00
Bastien Guerry f8b42e8ebe Don't use an overlay for src blocks backgrounds
* org-faces.el (org-block-background): Delete.

* org.el (org-fontify-meta-lines-and-blocks-1): Don't use an
overlay for the block background.
(org-in-src-block-p): Check against the `src-block' text
property, not against an overlay.

The overlay was introduced here:
http://orgmode.org/cgit.cgi/org-mode.git/commit/?id=27d98d879
and fixed here
http://orgmode.org/cgit.cgi/org-mode.git/commit/?id=69811ff44

But (1) it makes fontification slowler, (2) it makes
`org-in-src-block-p' slower and it prevents correct ps-printing
of Org buffers.

If we want to use a different background color, we need another
solution than using overlays.
2014-07-28 18:54:00 +02:00
Bastien Guerry 98295a8a25 Remove useless declaration 2014-07-28 18:29:24 +02:00
Bastien Guerry e56ea43008 Merge branch 'maint'
Conflicts:
	lisp/org-agenda.el
2014-07-28 18:22:29 +02:00
Bastien Guerry 6efe8eacf0 org-agenda.el (org-agenda-get-sexps): Don't add tags as text properties
* org-agenda.el (org-agenda-get-sexps): Don't add tags as text
properties.

Thanks to Raimund Berger for reporting this.
2014-07-28 18:21:58 +02:00
Bastien Guerry 7f21cfc658 Merge branch 'maint' 2014-07-28 18:08:44 +02:00
Bastien Guerry 1387694888 org-capture.el (org-capture-fill-template): Small fix
* org-capture.el (org-capture-fill-template): Take
`org-extend-today-until' into account when setting the format
time string.
2014-07-28 18:08:34 +02:00
Bastien Guerry 63160e9aab org-clock.el: Various improvements
* org-clock.el (org-clock-display-default-range): New option.
(org-clock-display): Use the new option.
(org-clock-sum-custom): New parameters `range' and `propname'.
(org-clock-special-range): Allow to enter a special range
through the calendar.
2014-07-28 17:43:15 +02:00
Bastien Guerry e8b51c0ce5 org.el (org-self-insert-command): Use `yas-expand'
* org.el (org-self-insert-command): Use `yas-expand' as
yas/expand is obsolete since Yasnippet 0.8.

Thanks to Craig Tanis for reporting this.
2014-07-28 17:28:54 +02:00
Nikolai Weibull 5512bedee6 org-agenda.el (org-agenda-insert-diary-make-new-entry): Fix ordering
* org-agenda.el (org-agenda-insert-diary-make-new-entry):
Fix ordering.

TINYCHANGE
2014-07-28 16:22:04 +02:00
Nicolas Richard 3d7a9f8517 Make org-get-limited-outline-regexp usable outside of org.
This allows org-narrow-to-subtree to function in Outline mode.

* lisp/org-macs.el (org-get-limited-outline-regexp): Use
  outline-regexp instead of org-outline-regexp when not in Org mode.
2014-07-28 16:14:39 +02:00
Bastien Guerry 2cd70ef915 org.el (org-set-font-lock-defaults): Highlight COMMENT
* org.el (org-set-font-lock-defaults): Highlight COMMENT in
headlines with `org-special-keyword'.
2014-07-28 16:03:05 +02:00
Bastien Guerry 31c7e3f065 org.el (org-comment-dwim): Fix docstring location
* org.el (org-comment-dwim): Fix docstring location.
2014-07-28 16:00:23 +02:00
Bastien Guerry c259952b9e Merge branch 'master' of orgmode.org:org-mode 2014-07-28 15:41:14 +02:00
Bastien Guerry 8b7b2f6600 org.el (org-open-at-point): Also open links in comment blocks
* org.el (org-open-at-point): Also open links in comment blocks.
2014-07-28 15:40:49 +02:00
Nicolas Goaziou b459972435 Merge branch 'maint' 2014-07-28 15:27:02 +02:00
Nicolas Goaziou d83bf0e800 ox-latex: Fix defcustoms
* lisp/ox-latex.el (org-latex-table-scientific-notation): Set
  appropriate value.
(org-latex-listings-options): Fix docstring.
2014-07-28 15:25:50 +02:00
Bastien Guerry 44aaaad8c0 ox-html.el (org-html-fontify-code): Possibly deactivate fci-mode
* ox-html.el (org-html-fontify-code): Possibly deactivate fci-mode.

Thanks to Kaushal for suggesting this.
2014-07-28 11:07:03 +02:00