Commit Graph

11421 Commits

Author SHA1 Message Date
Nicolas Goaziou 5e63d35ace ox-texinfo: Change output for links to targets with no description
* lisp/ox-texinfo.el (org-texinfo-link): Change output for links to
  targets with no description.

See <http://permalink.gmane.org/gmane.emacs.orgmode/98007>.
2015-05-30 13:52:26 +02:00
Nicolas Goaziou 82b4b8a98c ox-texinfo: Refer to "Top" instead of "top"
* lisp/ox-texinfo.el (org-texinfo-link): Refer to "Top" instead of
  "top".
2015-05-30 12:29:50 +02:00
Nicolas Goaziou 0194425d52 ox-texinfo: Fix link to headlines
* lisp/ox-texinfo.el (org-texinfo-link): Reverse behaviour whether
  headline is numbered or not.
2015-05-30 12:20:10 +02:00
Nicolas Goaziou d00dcd09ca org: Fix typo
* lisp/org.el (org-not-done-heading-regexp): Fix a typo and make
  variable buffer-local, as expected.

Reported-by: Alexander Borkowski <alex-b@opus-b.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/97996>
2015-05-30 00:06:54 +02:00
Rasmus 4b2536d750 org.el: Add documentation for grffile
* org.el (org-latex-default-packages-alist): Add documentation for
  grffile.
2015-05-29 12:43:52 +02:00
Rasmus 56c5382684 org.el: Add grffile to default latex packages
* org.el (org-latex-default-packages-alist): Add grffile for files
  with spaces and periods.

Reported-by: Vaidheeswaran C <vaidheeswaran.chinnaraju@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/97846>
2015-05-29 11:54:46 +02:00
Nicolas Goaziou bb15b3937b ox-texinfo: Fix generated label
* lisp/ox-texinfo.el (org-texinfo-src-block):
(org-texinfo-table): Use `org-export-get-reference' to build internal
labels.
2015-05-29 11:43:28 +02:00
Nicolas Goaziou 1bd26e2d81 ox-texinfo: Put Texinfo output into `compilation-mode'
* lisp/ox-texinfo.el (org-texinfo-compile): Put Texinfo output into
  `compilation-mode'.

Suggested-by: Vaidheeswaran C <vaidheeswaran.chinnaraju@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/97961>
2015-05-29 11:31:01 +02:00
Nicolas Goaziou 0ed99a4c8c ox-texinfo: Fix labelled images without caption
* lisp/ox-texinfo.el (org-texinfo--inline-image): Add an @anchor for
  labelled images without a caption.

Reported-by: Vaidheeswaran C <vaidheeswaran.chinnaraju@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/97961>
2015-05-29 11:27:10 +02:00
Nicolas Goaziou a33acf6191 org-src: Fix indentation rampage when editing src blocks
* lisp/org-src.el (org-edit-src-code): Do not add indentation at every
  edit when `org-src-preserve-indentation' is non-nil.

Function taking care of indentation cannot check
`org-src--preserve-indentation' since the variable is buffer-local and
indentation happens in a temporary buffer.

Reported-by: Rainer M Krug <Rainer@krugs.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/97927>
2015-05-29 09:55:56 +02:00
Nicolas Goaziou 317886f53d ob-latex: Define LaTeX-specific headers
* lisp/ob-latex.el (org-babel-header-args:latex): New variable.

Reported-by: Andreas Leha <andreas.leha@med.uni-goettingen.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/97905>
2015-05-27 12:23:59 +02:00
Bjarte Johansen 041ca4b6f4 ob-core: Do not return results on writing to file
* ob-core (org-babel-result-cond): Add "file" as a param that returns
  a scalar result.

When writing the result to file we do not need to first convert the
data to a table since it is just converted back when
org-babel-execute-src-block serializes the result to file.
2015-05-26 23:54:53 +02:00
Nicolas Goaziou 3062753e16 org-src: Change ambiguous variable name
* lisp/org-src.el (org-src--preserve-indentation): New variable.
(org-src--contents-for-write-back):
(org-src--edit-element):
(org-edit-src-code): Use new change.

Before this change `org-src-preserve-indentation' was both a defcustom
and an internal local variable.  Both uses are now separated.
2015-05-26 21:47:05 +02:00
Nicolas Goaziou e8ab947544 ob-lilypond: Fix a few variables
* lisp/ob-lilypond.el (org-babel-lilypond-ly-command):
(org-babel-lilypond-pdf-command):
(org-babel-lilypond-midi-command): Turn into a defvar.  Improve
docstring.
(org-babel-lilypond-gen-png):
(org-babel-lilypond-gen-svg):
(org-babel-lilypond-gen-html):
(org-babel-lilypond-gen-pdf):
(org-babel-lilypond-use-eps):
(org-babel-lilypond-arrange-mode): Improve docstring.
2015-05-26 21:37:04 +02:00
Nicolas Goaziou 59da320b30 org-src: Fix auto-save feature
* lisp/org-src.el (org-src-mode): Do not stop auto save feature when
  current buffer is no longer an edit buffer.

Reported-by: Andreas Leha <andreas.leha@med.uni-goettingen.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/97892>
2015-05-26 17:06:53 +02:00
Nicolas Goaziou a714c3a118 Fix visibility with `org-cycle-separator-lines' at -1
* lisp/org.el (org-cycle-show-empty-lines): Fix visibility cycling
  with `org-cycle-separator-lines' set to -1.

Reported-by: Michael Crouch <creidieki@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/97879>
2015-05-26 16:29:08 +02:00
Bjarte Johansen b6934e3471 ob-core: Fix indented cached result returning nil
Fix a problem where a source block would return nil oif the result was
cached and it was indented.

* lisp/ob-core.el (org-babel-execute-src-block): Move point to the the
 first character of the result instead of the beginning of the line.

* testing/lisp/test-ob.el
 (test-org-babel/indented-cached-org-bracket-link): Added test to
 to see if the indented cached result returns what it should return.
2015-05-26 10:19:42 +02:00
Nicolas Goaziou 4049c680fb ox-texinfo: Handle listings with captions and list of listings
* lisp/ox-texinfo.el (org-texinfo-keyword): Handle "#+TOC: listings".
(org-texinfo-src-block): Wrap listings with captions within @float.
2015-05-26 10:03:59 +02:00
Nicolas Goaziou e36139ea02 ox-texinfo: Handle tables with captions and list of tables
* lisp/ox-texinfo.el (org-texinfo-table): Wrap captionned tables
  within a @float command.
(org-texinfo-keyword): Handle "#+TOC: tables".
2015-05-26 10:03:53 +02:00
Nicolas Goaziou deb4fe7838 ox-texinfo.el: Refactor caption code
* lisp/ox-texinfo.el (org-texinfo--wrap-float): New function.
(org-texinfo--inline-image): Use new function.
2015-05-26 09:41:02 +02:00
Nicolas Goaziou 20a3b61865 ox-texinfo: Rename an internal function
* lisp/ox-texinfo.el (org-texinfo--filter-section-blank-lines):
  Renamed from `org-texinfo-filter-section-blank-lines'.
(texinfo): Apply renaming.
2015-05-26 09:22:53 +02:00
Nicolas Goaziou 6ba3e60a68 ox-texinfo: Improve caption handling
* lisp/ox-texinfo.el (org-texinfo--inline-image): Apply appropriate
  restrictions if caption is meant to be also used in list of floats.
2015-05-26 09:18:00 +02:00
Nicolas Goaziou 5b3d47cf56 org-src: Fix error when editing footnote references
* lisp/org-src.el (org-src--contents-area): Define BEG and END.
2015-05-26 01:17:34 +02:00
Nicolas Goaziou bc3cf21659 ox-texinfo: Handle @image
* lisp/ox-texinfo.el (org-texinfo-inline-image-rules): New variable.
(org-texinfo--inline-image): New function.
(org-texinfo-link): Use new function.

* doc/org.texi (Texinfo specific attributes):
* etc/ORG-NEWS:  Document new feature.
2015-05-26 01:14:24 +02:00
Nicolas Goaziou f1f6eb1140 ox-texinfo: Offer to open produced file from dispatcher
* lisp/ox-texinfo.el (texinfo): Offer to open produced file from
  dispatcher.

File is opened through `org-open-file' since texinfo back-end can
output multiple formats.
2015-05-25 23:55:00 +02:00
Kyle Meyer e50472d926 org-src: Fix reference to free variable
* lisp/org-src.el (org-src--contents-area): Replace a let with let*.
2015-05-23 21:52:06 +02:00
Nicolas Goaziou 71641bc3a0 org-src: Fix escaping in remote editing
* lisp/org-src.el (org-src--contents-area): Include contents to be
  inserted in the edit buffer in return value.
(org-src--edit-element): Apply change above.

Reported-by: Kyle Meyer <kyle@kyleam.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/97784>
2015-05-22 20:59:31 +02:00
Nicolas Goaziou 275bb10d76 ob-core: Register :file-ext as allowed header argument
* lisp/ob-core.el (org-babel-common-header-args-w-values):
  Allow :file-ext.

Reported-by: Rainer M Krug <Rainer@krugs.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/97786>
2015-05-22 18:53:38 +02:00
Rasmus 8ddb844d27 org.el: Fix bug in af6fdf3071
* org.el (org-return): Fix bug when headline title is empty.
2015-05-21 00:45:24 +02:00
Rasmus 248266e560 org.el: New function org-delete-indentation
* org.el (org-delete-indentation): New function.
  (org-mode-map): Bind org-delete-indentation to M-^.
* test-org.el (test-org-delete-indentation): Test org-delete-indentation.
* ORG-NEWS: Add entry on org-delete-indentation.
2015-05-21 00:28:41 +02:00
Rasmus af6fdf3071 org.el: RET breaks headline text
* org.el (org-return): RET breaks headline text.
* test-org.el (test-org/return): Test org-return on headline text.
* ORG-NEWS: Add entry on new org-return behavior.
2015-05-21 00:21:34 +02:00
Marco Wahl 6ba251d473 Fix two typos
* lisp/org.el: Fix in documentation of variable
  org-outline-path-complete-in-steps.
2015-05-20 11:16:14 +02:00
Bastien 7e5249c9fd Merge branch 'maint'
Conflicts:
	lisp/org-list.el
2015-05-20 08:00:54 +02:00
Stefan Monnier 42228a99ca lisp/org-{macs, list}.el: Fix lexical warnings
* lisp/org-{macs,list}.el: Fix lexical warnings

    * lisp/org-list.el (org-list-struct): Remove unused var `ind'.
    (org-list-get-next-item, org-list-get-prev-item)
    (org-list-get-children): Mark unused arg `struct'.
    (org-list-use-alpha-bul-p): Remove unused var `bul'.
    (org-toggle-checkbox): Mark unused var.
    (org-update-checkbox-count): Remove unused var `box-num'.
    (org-adapt-indentation): Declare.
    (org-list-parse-list): Declare var instead of adding a dummy duplicate.
    (org-list-send-list): Remove unused var `txt'.
    (org-list-to-latex, org-list-to-texinfo): Mark unused arg `params'.
    (org-list-to-subtree): Add prefix to dyn-bind var, and declare them.

    * lisp/org-macs.el: Use `declare'.
    (org-with-limited-levels): Declare dyn-bound vars.
2015-05-20 07:57:20 +02:00
Nicolas Goaziou c8bfd52f5f ob-R: Allow more :results values
* lisp/ob-R.el (org-babel-header-args:R): Allow "drawer" and "none",
  since they are supported in `org-babel-common-header-args-w-values'.

Reported-by: Andreas Leha <andreas.leha@med.uni-goettingen.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/97683>
2015-05-19 23:22:11 +02:00
Nicolas Goaziou de8302c65a Fix `org-next-block'
* lisp/org.el (org-next-block): Preserve match data, as specified in
  the docstring.

Reported-by: Andreas Leha <andreas.leha@med.uni-goettingen.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/97707>
2015-05-19 23:12:17 +02:00
Nicolas Goaziou ed74e5bb9b ob-core: Allow never-export as :eval value
* lisp/ob-core.el (org-babel-common-header-args-w-values): Allow
  "never-export" as :eval value.
2015-05-19 15:38:08 +02:00
Nicolas Goaziou f7173d551d org-inlinetask: Fix visibility toggling
* lisp/org-inlinetask.el (org-inlinetask-toggle-visibility): Fix
  visibility toggling when starting with a link.

Reported-by: Anders Johansson <mejlaandersj@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/97603>
2015-05-17 19:22:12 +02:00
Erik Hetzner 6d88ee5ff0 org-attach.el: Fix check for git annex
* lisp/org-attach.el (org-attach-commit): Check for .git/annex dir in
addition to annex dir in root git dir to ensure that git annex is used

TINYCHANGE
2015-05-17 10:20:58 +02:00
Rasmus 00dc3b1b72 ox-html: Less generic names for table aligns.
* ox-html.el (org-html-style-default):
  (org-html-table-cell, org-html-table): Prefix left, right, center classes.
* test-org-table.el (test-org-table/to-html): Change classes.

Reported-by: Matt Price <moptop99@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/97431>
2015-05-15 13:17:10 +02:00
Nicolas Goaziou fe0f30e022 org-element: Tiny refactoring
* lisp/org-element.el (org-element-link-parser): Use `string-to-char'
  instead of (aref STRING 0).
2015-05-13 12:37:53 +02:00
Nicolas Goaziou 0e7062678e Improve docstrings
* lisp/org.el (org-metaleft):
(org-metaright): Improve docstrings.

Suggested-by: Alain Cochard <Alain.Cochard@unistra.fr>
<http://permalink.gmane.org/gmane.emacs.orgmode/97509>
2015-05-13 12:35:24 +02:00
Nicolas Goaziou d0fab8bb6f ox: Tiny refactoring
* lisp/ox.el (org-export-resolve-fuzzy-link): Use `string-to-char'
  instead of (aref STRING 0).
2015-05-11 01:33:24 +02:00
Nicolas Goaziou f653495419 ox: Tiny refactoring
* lisp/ox.el (org-export-expand-include-keyword):
(org-export--prepare-file-contents):
(org-export-with-backend): Wrap line of code within 80 columns.
(org-export--inclusion-absolute-lines): Remove unecessary `format'
call for error message.
2015-05-11 01:30:45 +02:00
Nicolas Goaziou c0dec9a8bc org-table: Fix durations extracted from node properties
* lisp/org-table.el (org-table-formula-substitute-names): Convert
  durations when needed.  Refactor code.

* testing/lisp/test-org-table.el (test-org-table/duration): New test.

Reported-by: Daniele Pizzolli <dan@toel.it>
<http://permalink.gmane.org/gmane.emacs.orgmode/97252>
2015-05-11 01:20:37 +02:00
Nicolas Goaziou fa5f8c8f90 Allow optional argument to {{{property}}} for remote entries
* lisp/org-macro.el (org-macro-initialize-templates): "property"
  template accepts an optional argument, as a search option to grab
  properties from other headlines.

* doc/org.texi (Macro replacement): Document new feature.  Improve
  documentation.
(An example): Update documentation.

* testing/lisp/test-org-macro.el (test-org/macro-replace-all): Add
  tests.
2015-05-10 11:48:13 +02:00
Nicolas Goaziou ecc8b9f3db org-macro: Fix incomplete docstring
* lisp/org-macro.el (org-macro-replace-all): Document missing KEYWORDS
  optional argument.
2015-05-10 10:05:46 +02:00
Titus von der Malsburg 6779f8f424 Fix detection of latex fragments
* org-element.el (org-element-latex-fragment-parser):
* org.el (org-latex-regexps): Fix the detection of latex
  fragments.  Uses syntax tables to detect whitespaces and punctuation
  marks following the final $ sign.

In order to qualify as a math delimiter, the final $ sign of a LaTeX
fragment has to be followed by a whitespace or punctuation mark but the
regexp used in the previous code matched only a small number of
punctuation marks and therefore missed some latex fragments.
2015-05-09 09:36:53 +02:00
Nicolas Goaziou b27e630bab org-capture: Fix "org-find-olp: Wrong type argument: stringp, nil"
* lisp/org-capture.el (org-capture-expand-file): Empyt string defaults
  to `org-default-notes-file'.
* lisp/org.el (org-default-notes-file): Do not fallback on
`remember-data-file' since "org-capture.el" is not based off
"remember.el" anymore.

Reported-by: Florian Lindner <mailinglists@xgm.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/97448>
2015-05-08 11:32:35 +02:00
Nicolas Goaziou 6ac8db9dba Fix TBLFM line handling
* lisp/org-table.el (org-table-TBLFM-begin-regexp): Take into
  consideration that table lines are not required to end with "|".
(org-table-calc-current-TBLFM): Properly clean markers at the end of
the process.
(org-table-TBLFM-begin): Small refactoring.
* lisp/org.el (org-at-TBLFM-p): Prevent false positives.

Suggested-by: Oleg Sivokon <olegsivokon@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/97461>
2015-05-08 10:46:07 +02:00