Commit Graph

18482 Commits

Author SHA1 Message Date
Nicolas Goaziou 96cfef229d ox: Small refactoring
* lisp/ox.el (org-export-get-loc): Refactor code.  Speed-up processing
  when the element doesn't require line numbering.
* testing/lisp/test-ox.el (test-org-gen-loc-list): Reformat code.
2016-05-24 21:40:43 +02:00
Brian Carlson af8e3d84ee ox: Provide offset to [+-]n in SRC/EXAMPLE export
* lisp/org-element.el (org-element-example-block-parser): Use cons cell
  for :number-lines specifying offset in addition to type (new/continue).
  ('continue . offset) for :number-lines will add this offset count to
  the last line number. ('new . offset) for :number-lines will reset the
  line number counting starting at offset
(org-element-src-block-parser): same for SRC block as EXAMPLE block

* lisp/ox-html.el (org-html-format-code):
* lisp/ox-latex.el (org-latex-src-block):
* lisp/ox-odt.el (org-odt-format-code):
* lisp/ox.el (org-export-resolve-coderef):
(org-export-get-loc):
(org-export-format-code-default):
* contrib/lisp/ox-groff.el (org-groff-src-block): Use new cons cell
  for :number-lines.

* testing/lisp/test-ox.el  (ert-deftest test-org-export/get-loc): Tests for
changes
(test-org-gen-loc-list): Helper function for `test-org-export/get-loc'.
2016-05-24 21:40:35 +02:00
Feng Shu 6826ccdebc Latex previewing: imagemagick use pdflatex by default
* org.el (org-preview-latex-process-alist): Use "pdflatex" instead of
  "latex".
2016-05-24 19:27:29 +02:00
Trevor Murphy c20f51ccc0 Place `org-clock-heading' outside clock time
* org-clock.el (org-clock-get-clock-string): When `org-clock-effort'
  is nil, arrange the format string components separately, similar to
  how they are arranged when o-c-e is not-nil.
2016-05-23 22:46:54 +02:00
Rasmus 58f5def625 ox-latex.el: Format-spec checks Polyglossia
* ox-latex.el (org-latex--format-spec): Also check Polyglossia language.
2016-05-23 09:00:54 +02:00
Rasmus 42bc27b473 Merge branch 'maint' 2016-05-23 08:59:29 +02:00
Rasmus 8c968a9697 ox-latex: Detect languages irrespective of case
* ox-latex.el (org-latex-guess-babel-language):
* ox-latex.el (org-latex--format-spec): Detect languages correctly
  irrespective of case.
2016-05-23 08:45:54 +02:00
Nicolas Goaziou 3c729c7c0b Merge branch 'maint' 2016-05-23 01:20:17 +02:00
Nicolas Goaziou 6105643903 org-table: Fix 4914f89
* lisp/org-table.el (orgtbl-setup): Fix improper key binding
  specification.

Reported-by: Alex <agrambot@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/107287>
2016-05-23 01:19:29 +02:00
Nicolas Goaziou dba7652445 Merge branch 'maint' 2016-05-23 01:17:23 +02:00
Nicolas Goaziou f311921ad3 org-list: Fix `org-list-send-list' in LaTeX buffers
* lisp/org-list.el (org-list-send-list): Find correct translator.

Reported-by: Charles Millar <millarc@verizon.net>
<http://permalink.gmane.org/gmane.emacs.orgmode/107290>
2016-05-23 01:12:51 +02:00
Rasmus 9a7bf6d649 Merge branch 'maint' 2016-05-22 15:31:27 +02:00
Rasmus d07fafed4a ox-html: Find preamble-spec case-insensitively
* ox-html.el (org-html--build-pre/postamble): Find the spec based on the
  language case-insensitively.

Note that the default org-html-preamble-format and
org-export-default-language are incompatible.
2016-05-22 15:30:11 +02:00
Nicolas Goaziou 2ed5e64a74 Merge branch 'maint' 2016-05-21 14:41:38 +02:00
Nicolas Goaziou 4914f89644 org-table: Fix DEL using orgtbl minor mode in prog derived mode
* lisp/org-table.el (orgtbl-setup): Hijack DEL key.  We also hijack
  `delete-backward-char' but major modes derived from `prog-mode'
  usually bypass it.

Reported-by: Alex G <agrambot@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/107232>
2016-05-21 14:39:26 +02:00
Feng Shu bf93e166be Use dvisvgm to preview latex formulas
* ox-html.el (org-html-with-latex): Add dvisvgm support.
(org-html-with-latex): Add dvisvgm support.
(org-html-format-latex): "ltxpng" -> "ltximg".
(org-html-latex-environment): Add dvisvgm support.
(org-html-latex-fragment): Add dvisvgm support.

* org.el (org-preview-latex-default-process): New variable.
(org-latex-create-formula-image-program): Rename it to `org-preview-latex-default-process'.
(org-latex-preview-ltximg-directory): Rename it to `org-preview-latex-image-directory'.
(org-preview-latex-image-directory): New variable.
(org--format-latex-make-overlay): Add optional image-type, which used to deal with svg.
(org-toggle-latex-fragment): "org-ltxpng" -> "org-ltximg".
(org-format-latex): Add dvisvgm support.
(org-create-formula-image): Big refactor, merge dvipng and imagemagick
backend's feature.  Add dvisvgm feature.
(org-preview-latex-process-alist): Add new variable, which used to set
latex preview processes.
(org-create-formula-image-with-dvipng):
(org-create-formula-image-with-imagemagick): Useless, removed.

* org.texi (@LaTeX{} fragments):
(Previewing @LaTeX{} fragments):
(Math formatting in HTML export):
(Working with @LaTeX{} math snippets): Add dvisvgm information.
2016-05-21 10:50:38 +02:00
Nicolas Goaziou a5f83857c1 Merge branch 'maint' 2016-05-20 23:05:59 +02:00
Nicolas Goaziou 1d2f52f487 org-table: Fix orgtbl-self-insert-command on white spaces
* lisp/org-table.el (orgtbl-self-insert-command): Properly overwrite
  white spaces when there is room for it.  This is on par with what
  `org-self-insert-command' does in Org tables.

Reported-by: Alex <agrambot@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/107112>
2016-05-20 23:03:18 +02:00
Nicolas Goaziou e234643d92 Fix `org-open-at-point-global'
* lisp/org.el (org-open-at-point-global): Handle any external link
  looking like an Org link or time-stamp.

Reported-by: Uwe Brauer <oub@mat.ucm.es>
<http://permalink.gmane.org/gmane.emacs.orgmode/107220>
2016-05-20 22:04:11 +02:00
Nicolas Goaziou 0a98500363 Fix `org-open-at-point' tests
* testing/lisp/test-org.el (test-org/open-at-point-in-keyword):
(test-org/open-at-point-in-property):
(test-org/open-at-point-in-comment):
(test-org/open-at-point/inline-image): Simplify tests so as to not rely
on info.

(test-org/open-at-point/info): Remove test as it fails on the build bot.
2016-05-20 21:59:50 +02:00
Nicolas Goaziou 2d846210eb Implement conditional case-fold search in org-occur
* lisp/org.el (org-occur-case-fold-search): New variable.
(org-occur): Use new variable.

* testing/lisp/test-org.el (test-org/occur): Add tests.
2016-05-20 14:04:04 +02:00
Nicolas Goaziou 11e2df8091 ob-exp: Small speed-up
* lisp/ob-exp.el (org-babel-exp-src-block): Refer to block position
  instead of line.

`org-current-line' is costly in large buffers.
2016-05-20 13:41:16 +02:00
Nicolas Goaziou a02fe8e8e3 orgmanual: Fix ALT_TITLE property 2016-05-19 22:25:23 +02:00
Nicolas Goaziou deea3517df orgmanual: Add GFDL 2016-05-19 22:20:18 +02:00
Nicolas Goaziou 8fb99605a0 orgmanual: Use special blocks instead of wrapper macros 2016-05-19 20:41:37 +02:00
Nicolas Goaziou 8eb582b951 ox-texinfo: Allow :options attribute on special blocks
* lisp/ox-texinfo.el (org-texinfo-special-block): Handle :options
  attribute.
* doc/org.texi (Texinfo specific attributes): Add special block section.
2016-05-19 19:15:55 +02:00
Nicolas Goaziou ebb4ba41fd orgmanual: Move macro definitions in a dedicated section 2016-05-19 18:20:31 +02:00
Nicolas Goaziou b8a5356dbb orgmanual: Remove unnecessary code macro 2016-05-19 18:14:37 +02:00
Nicolas Goaziou bdc4b68334 orgmanual: Remove unnecessary header 2016-05-19 18:12:37 +02:00
Nicolas Goaziou f0b5f9ff89 orgmanual: Use double space convention in Texinfo 2016-05-19 18:11:46 +02:00
Nicolas Goaziou afd138f08a orgmanual: Fix badly converted index macros 2016-05-19 18:01:45 +02:00
Nicolas Goaziou 553a74004a orgmanual: Export to info without failure
Also remove the need for "org-version.inc".
2016-05-19 17:53:42 +02:00
Nicolas Goaziou 2fdb8efcb0 Merge branch 'maint' 2016-05-19 10:37:08 +02:00
Nicolas Goaziou 920cfbd921 org-agenda: Fix agenda filter by empty tag string
* lisp/org-agenda.el (org-agenda-filter-make-matcher-tag-exp): Handle
  empty tag strings.

Reported-by: Eric Abrahamsen <eric@ericabrahamsen.net>
<http://permalink.gmane.org/gmane.emacs.orgmode/107121>
2016-05-19 10:31:27 +02:00
Nicolas Goaziou ea1147a479 Add `org-compile-file' and `org-file-newer-than-p'
* lisp/org.el (org-compile-file):
(org-file-newer-than-p): New functions.

* lisp/ox-latex.el (org-latex-compile): Use new functions.

* lisp/ox-man.el (org-man-compile): Use new functions.
(org-man-collect-errors): Remove it.

* lisp/ox-texinfo.el (org-texinfo-compile): Use new functions.
(org-texinfo-collect-errors): Remove function as it is not accurate
enough (e.g., it doesn't handle internationalization).
2016-05-19 09:44:05 +02:00
Kyle Meyer 14f853dceb ox-publish: Correct docstring typo
* lisp/ox-publish.el (org-publish-project-alist): Correct typo in
  docstring.
2016-05-18 22:05:41 -04:00
Kyle Meyer 4efae4f1ff Adjust function declaration changes from 291938d
* lisp/org-macro.el (org-with-wide-buffer): Remove unnecessary
declaration.
(vc-call): Signal that FN is not a defun.  Match arguments.
2016-05-18 22:05:36 -04:00
Rasmus 291938d0b0 org-macro.el: Allow modification-time from vc.el
* org-macro.el (org-macro--vc-modified-time): New function.
* org-macro.el (org-macro-initialize-templates): Add support for new
  function.
* doc/org.texi (Macro replacement): Document new behavior.
* etc/ORG-NEWS: Mention new behavior.
2016-05-18 21:39:37 +02:00
Rasmus 44ad9ff3e4 ox-publish.el: Document `:recursive'
* ox-publish.el (org-publish-project-alist): Document `:recursive'.
2016-05-18 12:00:17 +02:00
Nicolas Goaziou 55e346c5f9 orgmanual: Pacify linter 2016-05-17 01:04:15 +02:00
Nicolas Goaziou da95b4b354 orgmanual: Use dedicated index keywords 2016-05-17 00:54:34 +02:00
Nicolas Goaziou a3efd2cb8b orgmanual: Fix comments
Use # instead of #+comment:.
2016-05-17 00:54:34 +02:00
Nicolas Goaziou 47b4a47547 contrib: Add Org manual
* contrib/orgmanual.org: New file.
2016-05-16 23:54:45 +02:00
Nicolas Goaziou ad766435dc Merge branch 'maint' 2016-05-16 11:21:05 +02:00
Phil Hudson 5fc351ab78 org-capture: Support all capture template target-file variants in Customize
* lisp/org-capture.el (`org-capture-templates'): Adjust the
  `org-capture-templates' defcustom template to support specifying the capture
  target file using either a literal pathname, a function, a variable or a
  form, as documented.  Previously the Customize UI supported specifying only a
  literal pathname.
  (org-capture-templates): Clarify the documentation for the `function' method
  for setting up the capture target.

* doc/org.texi (Template elements): Clarify the `function' method for setting up
  the capture target.
2016-05-16 11:17:26 +02:00
Kyle Meyer d1fb75bc17 ob-comint: Remove unnecessary function declarations
These aren't needed because tramp is explicitly loaded.
2016-05-15 19:57:17 -04:00
Kyle Meyer d38e91867c Fix remaining declare-function issues on master
* lisp/org-list.el (org-export-create-backend):
Indicate that FN is not a defun.
* lisp/org-list.el (org-export-create-backend):
(org-export-data-with-backend):
(org-export-get-backend):
(org-export-get-environment):
(org-export-get-next-element):
(org-export-with-backend):
Correct source file name.
* lisp/org.el (calendar-check-holidays):
(org-agenda-format-item):
Correct argument list.
2016-05-15 19:16:30 -04:00
Kyle Meyer 4925d5be7b Merge branch 'maint' 2016-05-15 19:00:30 -04:00
Kyle Meyer 19cf68da90 Fix remaining declare-function issues
* lisp/ob-shell.el (org-babel-comint-in-buffer):
(org-babel-comint-with-output):
* lisp/org-table.el (org-export-create-backend):
* lisp/org.el (org-babel-do-in-edit-buffer): Indicate that FN is not a
defun.
* lisp/ob-tangle.el (org-string-nw-p):
* lisp/org-table.el (org-export-create-backend):
(org-export-data-with-backend):
(org-export-filter-apply-functions):
(org-export-first-sibling-p):
(org-export-get-backend):
(org-export-get-environment):
(org-export-install-filters):
(org-export-table-has-special-column-p):
(org-export-table-row-is-special-p): Correct source file name.
* lisp/ob-R.el (ess-wait-for-process):
* lisp/org-clock.el (calendar-iso-to-absolute):
* lisp/org-list.el (org-previous-line-empty-p):
* lisp/org-pcomplete.el (org-entry-properties):
* lisp/org-table.el (org-export-data-with-backend):
(org-export-get-environment):
* lisp/org.el (org-element-interpret-data): Correct argument list.
2016-05-15 18:59:20 -04:00
Kyle Meyer e712f17822 org-compat: Quiet font-lock-fontify-buffer warning
* lisp/org-compat.el (org-font-lock-ensure): Quiet byte compiler warning
  about font-lock-fontify-buffer.
2016-05-15 18:59:19 -04:00