Commit Graph

11896 Commits

Author SHA1 Message Date
Nicolas Goaziou 919d0cdb76 Fix "org-remove-if: Wrong type argument: number-or-marker-p, nil"
* lisp/org.el (org-remove-latex-fragment-image-overlays): Remove
  overlays not associated to a buffer.

Reported-by: Rainer M Krug <Rainer@krugs.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/101645>
2015-10-01 21:42:15 +02:00
Nicolas Goaziou 278804b8bf Merge branch 'maint' 2015-10-01 13:52:03 +02:00
Nicolas Goaziou 7273473e6b ox-icalendar: Fix a docstring
* lisp/ox-icalendar.el (org-icalendar-exclude-tags): Fix docstring.

Reported-by: james@jamestechnotes.com
<http://permalink.gmane.org/gmane.emacs.orgmode/101631>
2015-10-01 13:51:13 +02:00
Nicolas Goaziou b66fd12f4f Merge branch 'maint' 2015-09-30 13:56:11 +02:00
Hiroshi Saito 115c4bd5a7 org-feed.el: Substitute a guid XML element
* lisp/org-feed.el (org-feed-parse-rss-feed): Substitute a guid XML
element with `xml-substitute-special'.

TINYCHANGE
2015-09-30 13:55:23 +02:00
Rasmus 679adcaa64 ox-latex: Fix typo in 1e4b7e4bec
* ox-latex.el (org-latex--remove-packages): Fix typo.
2015-09-29 19:39:01 +02:00
Rasmus f6187deca5 ox-latex: Small refactor
* ox-latex.el (org-latex-compile): Use format-spec.
2015-09-27 23:49:32 +02:00
Rasmus 74da3bc10f ox-latex: Support arbitrary bibtex-like program
* ox-latex.el (org-latex-bib-compiler): New defcustom.
  (org-latex-pdf-process): Update docstring.
  (org-latex-compile): Use new defcustom.
* org.texi (@LaTeX{} and PDF export): Add documentation.
2015-09-27 23:49:32 +02:00
Rasmus 1e4b7e4bec ox-latex: Support changable TeX compilers
* org.el (org-latex-default-packages-alist): Only use inputenc
and fontenc in pdftex.
* ox-latex.el (latex): Add :latex-compiler.
(org-latex-compiler): New defcustom.
(org-latex-compilers): New defconst.
(org-latex--remove-packages): New function.
(org-latex-template): Use new function and variables.
(org-latex-pdf-process): Update to use %latex shorthand.
(org-latex-compile): Check and use intended compiler.
* org.texi (@LaTeX{} and PDF export): Document changes.
* ORG-NEWS: Add entry.

Adds #+latex_compiler: keyword.

Note, rubber is dropped from `org-latex-pdf-process' since it does not
allow arbitrary latex commands.

Suggested-by: Suvayu Ali <fatkasuvayu+linux@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/98921>
2015-09-27 23:49:32 +02:00
Nicolas Goaziou 6f2579b4fc Merge branch 'maint' 2015-09-26 00:14:36 +02:00
Nicolas Goaziou fd8a18151a Fix file uri
* lisp/ox.el (org-export-file-uri): Properly expand file uri.

* lisp/org-element.el (org-element-link-parser): Start path with "//"
  when referring to a remote file.

* testing/lisp/test-ox.el (test-org-export/file-uri): Add test.

Reported-by: AW <alexander.willand@t-online.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/101471>
2015-09-26 00:11:42 +02:00
Nicolas Goaziou fe182cf0d7 Merge branch 'maint' 2015-09-24 10:27:47 +02:00
Nicolas Goaziou e68bc78ae4 ox-md: Fix docstring
* lisp/ox-md.el (org-md-separate-elements): Fix docstring.
2015-09-24 10:27:24 +02:00
Nicolas Goaziou d4aa7692bd Merge branch 'maint' 2015-09-24 10:19:38 +02:00
Richard Hansen 11bba63dc3 fix SETUPFILE pathname expansion with subdirectories
* lisp/org-macro.el (org-macro--collect-macros): cd to the directory
containing the SETUPFILE before recursing so that relative pathnames
in the SETUPFILE are expanded properly.

* lisp/org.el (org--setup-collect-keywords): cd to the directory
containing the SETUPFILE before recursing so that relative pathnames
in the SETUPFILE are expanded properly.

* lisp/ox.el (org-export--get-inbuffer-options,
org-export--list-bound-variables): cd to the directory containing the
SETUPFILE before recursing so that relative pathnames in the SETUPFILE
are expanded properly.

If /path/to/foo.org contains:

    #+SETUPFILE: settings/beamer.org

and /path/to/settings/beamer.org contains:

    #+SETUPFILE: common.org

then we want to read /path/to/settings/common.org, not
/path/to/common.org.

TINYCHANGE
2015-09-24 10:16:04 +02:00
Nicolas Goaziou e553ef2248 Make `org-show-children' interactive
* lisp/org.el (org-show-children): Make it a command.

Reported-by: Tokuya Kameshima <kametoku@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/101347>
2015-09-24 00:01:39 +02:00
Nicolas Goaziou 85035e4ce2 Revert "Fix a docstring"
This reverts commit e57a9ff926.
2015-09-24 00:00:57 +02:00
Nicolas Goaziou 905f022d97 Merge branch 'maint' 2015-09-23 23:00:09 +02:00
Nicolas Goaziou 2e1b93db41 org-table: Fix radio tables
* lisp/org-table.el (orgtbl-to-generic): Strip text properties from
  output.

Reported-by: "Charles C. Berry" <ccberry@ucsd.edu>
<http://permalink.gmane.org/gmane.emacs.orgmode/101425>
2015-09-23 22:58:25 +02:00
Nicolas Goaziou 256fefa9d7 Merge branch 'maint' 2015-09-22 21:33:55 +02:00
Nicolas Goaziou 3e1bccc4a5 ox-md: Fix blank lines insertion in sub-lists
* lisp/ox-md.el (org-md-separate-elements): In a list, when a sub-list
  is followed by another element, make sure it is surrounded by blank
  lines.

Reported-by: dbitouze@wanadoo.fr (Denis Bitouzé)
<http://permalink.gmane.org/gmane.emacs.orgmode/101113>
2015-09-22 21:32:07 +02:00
Nicolas Goaziou e57a9ff926 Fix a docstring
* lisp/org.el (org-show-children): Fix docstring.
2015-09-22 21:25:58 +02:00
Nicolas Goaziou b8c2102c09 Merge branch 'maint' 2015-09-22 21:23:41 +02:00
Nicolas Goaziou 304e5d33f5 Fix end time shifting past midnight
* lisp/org.el (org-modify-ts-extra): Properly wrap time after 23:59.

This can still generate wrong timestamps, e.g.

  <2015-09-21 Mo 23:00-23:55> => <2015-09-21 Mo 23:05-00:00>

but at least, the error is predictable.

Reported-by: Detlef Steuer <detlef.steuer@gmx.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/101350>
2015-09-22 21:15:09 +02:00
Kyle Meyer 5e9bdbfac6 Merge branch 'maint' 2015-09-22 01:01:47 -04:00
Paul Eggert cc0d491739 Backport commit ab11a1c from Emacs master branch
* lisp/ob-latex.el (convert-pdf):
* lisp/org-crypt.el (org-crypt-check-auto-save):
* lisp/ox-man.el (org-man-compile):
* lisp/ox-odt.el (org-odt--export-wrap):
* lisp/ox-texinfo.el (org-texinfo-compile):
Use %s to avoid translating quotes of file names etc. in diagnostics.

Use %s to format strings instead of splicing them
ab11a1cf27ebe3791df45cccde3c851affd184dd
Paul Eggert
Sun Sep 20 09:42:05 2015 -0700
2015-09-22 00:20:57 -04:00
Kyle Meyer 975e165b64 org-timer: Match paused timer value to docstring
* lisp/org-timer.el (org-timer-pause-or-continue):
(org-timer-mode-line-string):
(org-timer-set-mode-line): Use `paused' rather than `pause'.
(org-timer-countdown-timer): Quote `paused' as symbol.
2015-09-22 00:20:57 -04:00
Kyle Meyer e3c2d211c1 org-timer: Remove two progn's
* lisp/org-timer.el (org-timer-pause-or-continue): Remove unnecessary
  progn.
(org-timer-set-timer): Reverse condition to remove progn.
2015-09-22 00:20:57 -04:00
Kyle Meyer 5362f63fad Merge branch 'maint' 2015-09-21 18:46:41 -04:00
Kyle Meyer fbf4fa8cc7 Partially revert backport of commit 284c470
Revert cases in the last backport that converted "\[" in strings to "[",
which results in an error when eval-defun is called on them.
2015-09-21 18:38:39 -04:00
Paul Eggert c86a10b0bc Backport commit 284c470 from Emacs master branch
Backslash cleanup in Elisp source files
284c470ef752967fcd8bae6a450dc138462b1e49
Paul Eggert
Thu Sep 17 16:09:39 2015 -0700
2015-09-21 18:38:39 -04:00
Paul Eggert 41e9733d2f Backport commit 753fbfb from Emacs master branch
* lisp/org-bibtex.el (org-bibtex-fields):
* lisp/org-docview.el (org-docview-export):
* lisp/org-entities.el (org-entities):
* lisp/ox-icalendar.el (org-icalendar-cleanup-string):
Fix typo by replacing ‘\’ with ‘\\’ in a string literal.
For example, to get the regular expression ‘\.’ use the string
literal "\\.", not "\." (which is equivalent to ".").

Fix several backslash typos in Elisp strings
753fbfbef484272bcde5214f75fb0846ee3f33df
Paul Eggert
Thu Sep 17 12:39:54 2015 -0700
2015-09-21 18:38:39 -04:00
Kyle Meyer 0839dc4322 Protect remaining apostrophes in docstrings
Protect apostrophes not covered by the last backport.  Convert
expressions like '(...)  to \\='(...)  and symbols written as 'name to
`name'.  (In addition to ensuring the correct display, the latter also
improves consistency with many Org docstrings.)

If these aren't protected, Emacs 25 may display them as curved quotes in
the help buffer, depending on the value of text-quoting-style.
2015-09-21 18:38:39 -04:00
Kyle Meyer 077810e521 Modify quote-related backport
These changes are in line with the changes proposed on the mailing list,
but many of those changes weren't necessary because they had already
been reverted in the Emacs repo.

<http://permalink.gmane.org/gmane.emacs.orgmode/100896/>
2015-09-21 18:38:39 -04:00
Kyle Meyer d77a52a502 Backport quote-related commits from Emacs
These changes are the combination of the commits below (in order
applied).  Unlike other backports, these are applied in one commit
because they are closely related and because some of the later commits
reverse changes in earlier commits.  Changes to message and help quote
display for Emacs 25 seem to be here to stay.  The quote protections are
required to ensure grave accents and apostrophes are displayed as
intended in Emacs 25, and they should not affect earlier versions.

  Quoting fixes in lisp/org
  6cd2629bd1b3ce77d29ac28e29237c94a4197116
  Paul Eggert
  Mon Aug 31 00:29:40 2015 -0700

  More-conservative ‘format’ quote restyling
  fbb5531fa11d13854b274d28ccd329c9b6652cfc
  Paul Eggert
  Sun Aug 23 22:39:06 2015 -0700

  Prefer directed to neutral quotes
  875a5d0ead827d3da32ecbd30e739a29f07bbc87
  Paul Eggert
  Mon Aug 24 23:57:25 2015 -0700

  Escape ` and ' in doc
  19532d147b431a4fe34f088d6de07891c48e2c5c
  Paul Eggert
  Tue Sep 1 18:23:21 2015 -0700

  Fix some more docstring etc. quoting problems
  26bd978d87dfbf9baa115cd961a67d42b416c4bf
  Paul Eggert
  Thu Sep 3 15:32:54 2015 -0700

  Go back to grave quoting in source-code docstrings etc.
  6afef3f6ca2f3009c722b84e249903b7f807b044
  Paul Eggert
  Mon Sep 7 16:09:27 2015 -0700
2015-09-21 18:38:18 -04:00
Kyle Meyer 0cf9f17c55 Use substitute-command-keys more
* lisp/ob-core.el (org-confirm-babel-evaluate):
(org-babel-no-eval-on-ctrl-c-ctrl-c):
(org-babel-hash-at-point):
* lisp/org-agenda.el (org-agenda-log-mode-items):
(org-agenda-auto-exclude-function):
(org-search-view):
(org-todo-list):
(org-tags-view):
(org-agenda-log-mode):
(org-agenda-show-the-flagging-note):
* lisp/org-clock.el (org-clock-out-when-done):
* lisp/org-id.el (org-id-link-to-org-use-id):
* lisp/org-table.el (org-table-allow-automatic-line-recalculation):
(org-table-edit-formulas):
* lisp/org.el (org-support-shift-select):
(org-remove-highlights-with-change):
(org-refile-use-cache):
(org-use-fast-todo-selection):
(org-time-stamp-rounding-minutes):
(org-agenda-text-search-extra-files):
(org-cycle):
(org-ctrl-c-ctrl-c): Use substitute-command-keys.
2015-09-21 18:33:45 -04:00
Kyle Meyer f16ae0dcb7 org-agenda: Remove old binding from docstring
* lisp/org-agenda.el (org-agenda-kill-all-agenda-buffers): Remove
  reference to stale key binding.

This binding was removed in 39c7630 (Clean up local variable stuff and
document sticky agenda buffers, 2012-03-10).
2015-09-21 18:33:36 -04:00
Nicolas Goaziou 9ecec6613f Merge branch 'maint' 2015-09-20 23:00:00 +02:00
Nicolas Goaziou a7c8d20ac9 ox-md: Fix ID and custom ID links export
* lisp/ox-md.el (org-md-link): Use custom ID when referring to
  a headline.  Also fix default description for custom ID links.

Reported-by: dbitouze@wanadoo.fr (Denis Bitouzé)
<http://permalink.gmane.org/gmane.emacs.orgmode/101344>
2015-09-20 22:58:56 +02:00
Nicolas Goaziou d70a0b6251 ox-md: Fix TOC's internal links
* lisp/ox-md.el (org-md-headline): Use CUSTOM-ID when available.

TOC is generated using HTML export back-end, which links to headlines
through their custom ID, when available.  By anchoring that custom ID,
we make sure these links are not broken.

Reported-by: dbitouze@wanadoo.fr (Denis Bitouzé)
<http://permalink.gmane.org/gmane.emacs.orgmode/101344>
2015-09-20 22:58:56 +02:00
Nicolas Goaziou 52338e8737 Merge branch 'maint' 2015-09-19 16:36:54 +02:00
Nicolas Goaziou 54a65250a8 org-table: Silence byte-compiler 2015-09-19 16:36:26 +02:00
Nicolas Goaziou cc72db1fe6 Merge branch 'maint' 2015-09-19 13:32:40 +02:00
Eric Abrahamsen 1ae9741eab org-agenda.el: Fix org-agenda-with-point-at-orig-entry
* lisp/org-agenda.el (org-agenda-with-point-at-orig-entry): Add missing
  comma in the backquote template.
2015-09-19 13:31:06 +02:00
Nicolas Goaziou 333edc7dd8 Merge branch 'maint' 2015-09-19 13:28:41 +02:00
Nicolas Goaziou 6d2ab40719 org-table: Fix radio tables containing macros
* lisp/org-table.el (orgtbl-to-generic): Export macros as-is, even if
  they are undefined.
* testing/lisp/test-org-table.el (test-org-table/to-generic): Add test.

Radio tables are now using a minimal set-up for export.  In particular,
no macro is expanded, and no Babel code is executed.  If any of these is
needed, use `org-export-string-as' or `org-export-region-as' instead.

Reported-by: Mark Edgington <edgimar@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/100621>
2015-09-19 13:25:12 +02:00
Nicolas Goaziou 670cc5f924 Merge branch 'maint' 2015-09-19 00:04:04 +02:00
Nicolas Goaziou c290921a0d ox-odt: Prevent internal links to target table of contents
* lisp/ox-odt.el (org-odt-toc): Ignore targets, links and footnote
  references from table of contents.

Reported-by: dbitouze@wanadoo.fr (Denis Bitouzé)
<http://permalink.gmane.org/gmane.emacs.orgmode/101040>
2015-09-18 23:58:51 +02:00
Nicolas Goaziou ea7ac0e412 org-entities: New "vbar" entity
* lisp/org-entities.el (org-entities): Add "vbar".

Suggested-by: Denis Bitouzé <dbitouze-39ZsbGIQGT5GWvitb5QawA@public.gmane.org>
<http://permalink.gmane.org/gmane.emacs.orgmode/101163>
2015-09-16 14:56:52 +02:00
Nicolas Goaziou 169db5f0d9 org-lint: Fix wrong-number-of-arguments error
* lisp/org-lint.el (org-lint-invalid-macro-argument-and-template):
  Handle macros without any placeholder.

Reported-by: Thomas S. Dye <tsd@tsdye.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/101207>
2015-09-16 14:36:29 +02:00
Rasmus 204ac9fd67 org.el: Remove fixltx2e LaTeX dependency
* org.el (org-latex-default-packages-alist): Remove fixltx2e.

fixltx2e is obsolete.  See LaTeX News 22 for details:
<http://latex-project.org/ltnews/ltnews22.pdf>
2015-09-13 18:12:59 +02:00
Nicolas Goaziou 8c85c99052 Merge branch 'maint' 2015-09-10 17:56:37 +02:00
Nicolas Goaziou bc322fc57d org-element: Fix short caption parsing
* lisp/org-element.el (org-element--collect-affiliated-keywords): Fix
  short caption parsing.

Reported-by: Suvayu Ali <fatkasuvayu+linux@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/101025>
2015-09-10 17:55:26 +02:00
Nicolas Goaziou f91968bc38 Merge branch 'maint' 2015-09-10 14:29:19 +02:00
Marco Wahl 0b71022c8c org-agenda: simplify one expression (refactoring)
* lisp/org-agenda.el (org-agenda-filter-by-category): replace '(and
  cat)' with the equivalent 'cat'.
2015-09-10 13:54:28 +02:00
Marco Wahl a4375e81c0 org-agenda,org.texi: Fix doc about category filter
* lisp/org-agenda.el (org-agenda-filter-by-category): Documentation of
  the effect of the prefix argument.

* doc/org.texi (Filtering/limiting agenda items): Documentation about
  the effect of the prefix argument when filtering by category.
2015-09-10 13:41:21 +02:00
Nicolas Goaziou ba104f3483 Merge branch 'maint' 2015-09-10 11:13:47 +02:00
Nicolas Goaziou 62dc515ae5 ob-tangle: Fix commenting links at column 0
* lisp/ob-tangle.el (org-babel-spec-to-string): Ignore invisible
  characters when commenting in destination file.

* testing/lisp/test-ob-tangle.el (ob-tangle/comment-links-at-left-margin):
New test.

Reported-by: Rainer M Krug <Rainer@krugs.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/101002>
2015-09-10 11:12:20 +02:00
Nicolas Goaziou 66a2119ae6 Merge branch 'maint' 2015-09-10 09:37:39 +02:00
Nicolas Goaziou f051d663ab ox: Ignore statistics cookies with stat:nil
* lisp/ox.el (org-export--prune-tree): Fix bug preventing pruning within
  secondary strings.

* testing/lisp/test-ox.el (test-org-export/handle-options): Update test.

Reported-by: Thomas S. Dye <tsd@tsdye.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/100999>
2015-09-10 09:32:58 +02:00
Nicolas Goaziou a34a334582 Merge branch 'maint' 2015-09-09 22:51:31 +02:00
Nicolas Goaziou c708fc0bb8 ox: Fix OPTION keyword parsing
* lisp/ox.el (org-export--parse-option-keyword): Handle multiple
  properties referring to the same option item.

* testing/lisp/test-ox.el (test-org-export/parse-option-keyword): Add
  test.
2015-09-09 22:50:08 +02:00
Nicolas Goaziou b293f75e78 Merge branch 'maint' 2015-09-09 16:16:27 +02:00
Nicolas Goaziou 2c8b0399ca Merge branch 'maint' of orgmode.org:org-mode into maint 2015-09-09 16:15:23 +02:00
Nicolas Goaziou b6c473b47f ox-md: Fix 790bd64
* lisp/ox-md.el (org-md-link): Add missing "#".
2015-09-09 16:14:01 +02:00
Kyle Meyer 70f5908155 Merge branch 'maint' 2015-09-09 09:55:45 -04:00
Kyle Meyer 85e0c1ce75 Fix tangling in indirect buffers
* lisp/ob-tangle.el (org-babel-tangle-single-block): Get file name from
  base buffer.
(org-babel-tangle): Use file name from attribute list returned by
org-babel-tangle-single-block.

Reported-by: Rainer M Krug <Rainer@krugs.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/100845>
2015-09-09 09:54:18 -04:00
Nicolas Goaziou 88f755ca64 Merge branch 'maint' 2015-09-09 14:31:46 +02:00
Nicolas Goaziou 5adb8bcfa2 ox-odt: Tiny fix
* lisp/ox-odt.el (org-odt-link): No need to handle nil values for fuzzy
  links.
2015-09-09 14:30:41 +02:00
Nicolas Goaziou 89483bc873 ox: Fix a docstring
* lisp/ox.el (org-export-resolve-fuzzy-link): Return value cannot be
  nil.
2015-09-09 14:30:25 +02:00
Nicolas Goaziou 56ebac4092 Merge branch 'maint' 2015-09-09 14:08:34 +02:00
Nicolas Goaziou 790bd6458b ox-md: Fix fuzzy link export
* lisp/ox-md.el (org-md-link): Fix fuzzy link export.
2015-09-09 14:04:36 +02:00
Nicolas Goaziou c3c285f959 Merge branch 'maint' 2015-09-07 21:21:46 +02:00
Nicolas Goaziou 9600ce5f96 org-entities: Fix "infin" entity
* lisp/org-entities.el (org-entities): Fix infin entity in LaTeX.

Suggested-by: Leandro Facchinetti <me@leafac.com>
2015-09-07 21:19:29 +02:00
Nicolas Goaziou 40cc8623f1 Merge branch 'maint' 2015-09-07 19:13:05 +02:00
Nicolas Goaziou 333211ff01 Merge branch 'maint' of orgmode.org:org-mode into maint 2015-09-07 19:12:20 +02:00
Nicolas Goaziou a6514e995b ox: Do not check footnote validity when including files
* lisp/ox.el (org-export--update-footnote-label): Remove function.
(org-export--prepare-file-contents): Do not error when a footnote
definition cannot be found.

In particular, it should not throw an error when a footnote is not
defined outside of export scope.

Reported-by: Leonard Randall <leonard.a.randall@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/100924>
2015-09-07 19:09:17 +02:00
Bastien daea0c7ce4 Merge branch 'maint' 2015-09-07 16:59:58 +02:00
Bastien aff6142b81 org.el: Enhance docstrings
* org.el (org-demote-subtree, org-do-demote)
(org-fix-position-after-promote): Enhance docstrings.
2015-09-07 16:59:13 +02:00
Nicolas Goaziou 4ca3d3bbe2 Merge branch 'maint' 2015-09-06 22:17:30 +02:00
Nicolas Goaziou 366dc4e369 ox: Change internal tag for included footnotes
* lisp/ox.el (org-export--update-footnote-label):
(org-export--prepare-file-contents): Use a new naming scheme for
internal footnotes, less likely to introduce collisions.

The previous one introduced a collision between [1] and [fn:1].
2015-09-06 22:14:47 +02:00
Nicolas Goaziou a7394224aa ox: Fix footnotes in included files
* lisp/ox.el (org-export--prepare-file-contents): Do not error when
  including multiple footnotes with the same label.

* testing/lisp/test-ox.el (test-org-export/expand-include): Update test.

Reported-by: Leonard Randall <leonard.a.randall@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/100906>
2015-09-06 21:54:57 +02:00
Nicolas Goaziou d854c18c4e Merge branch 'maint' 2015-09-04 21:31:28 +02:00
Nicolas Goaziou a2662dc365 Fix property drawer regexp
* lisp/org.el (org-property-drawer-re): Make sure regexp doesn't expand
  past other drawers.
2015-09-04 21:29:55 +02:00
Nicolas Goaziou b5fe5b88db Merge branch 'maint' 2015-09-03 23:08:44 +02:00
Nicolas Goaziou b0f6c3c251 Fix indentation when altering planning info
* lisp/org.el (org-add-planning-info): Do not remove too much
  indentation when removing a planning line.
* testing/lisp/test-org.el: Add tests.

Reported-by: George McNinch <gmcninch@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/100819>
2015-09-03 23:03:28 +02:00
Kyle Meyer 7ab1874a93 Add Babel support for Stan
* lisp/ob-stan.el: New file.
* lisp/org.el (org-babel-load-languages): Add Stan.
2015-09-03 00:30:09 -04:00
Nicolas Goaziou a2d0cd922e Merge branch 'maint' 2015-09-02 21:32:12 +02:00
Nicolas Goaziou 980aef2dfb ox-html: Fix links with ampersands
* lisp/ox-html.el (org-html-link): Escape ampersands and other special
  characters in anchor once and only once.

Reported-by: "Greedwolf DSS" <passchaos@163.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/100797>
2015-09-02 21:30:59 +02:00
Nicolas Goaziou a6165748cf Merge branch 'maint' 2015-09-02 21:05:46 +02:00
Nicolas Goaziou d66d6f55e0 ox: Fix smart inner quotes
* lisp/ox.el (org-export--smart-quote-status): Fix inner smart quotes.
* testing/lisp/test-ox.el (test-org-export/activate-smart-quotes): Add
  tests.

Reported-by: "T.F. Torrey" <tftorrey@tftorrey.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/100779>
2015-09-02 21:02:41 +02:00
Nicolas Goaziou 258966a15d Merge branch 'maint' 2015-09-01 21:34:06 +02:00
Nicolas Goaziou 7c49b7a66c org-element: Fix cache bug
* lisp/org-element.el (org-element-cache-reset): Avoid using
  `org-element--cache-active-p'.
(org-element--cache-active-p): Check cache is properly initialized.
2015-09-01 21:32:47 +02:00
Nicolas Goaziou 410ea62fc8 Merge branch 'maint' 2015-09-01 10:32:26 +02:00
Nicolas Goaziou 2d62c0e173 org-clock: Fix `org-clock-remove-empty-clock-drawer'
* lisp/org-clock.el (org-clock-drawer-name): New function.
(org-clock-find-position): Use new function.
(org-clock-remove-empty-clock-drawer): Remove drawer actually used for
clocks, which may be different from the one used for storing notes.
Also, consider that headlines could use different drawer names in the
same tree.
2015-09-01 10:29:33 +02:00
Nicolas Goaziou 2e13d33baa Merge branch 'maint' 2015-08-26 22:23:23 +02:00
Nicolas Goaziou af0704b4d5 Fix column view display when editing a property
* lisp/org.el (org-insert-property-drawer): Ensure insertion of new
  property drawer happens in current entry so as to not mess with next's
  overlays.

Reported-by: Dale <dale@codefu.org>
<http://permalink.gmane.org/gmane.emacs.orgmode/100508>
2015-08-26 22:18:21 +02:00
Rasmus c160ae204e ox-html: Fix center block class
* ox-html.el (org-html-center-block): Correct class.

Reported-by: j_l_domenech@yahoo.com
<http://permalink.gmane.org/gmane.emacs.bugs/105805>
2015-08-26 01:19:12 +02:00
Rasmus 6ddde6132b ox-html: Fix center block class
* ox-html.el (org-html-center-block): Correct class.

Reported-by: j_l_domenech@yahoo.com
<http://permalink.gmane.org/gmane.emacs.bugs/105805>
2015-08-26 01:16:46 +02:00
Nicolas Goaziou 45abec0b59 Merge branch 'maint' 2015-08-25 15:04:59 +02:00
Nicolas Goaziou 88f7da8db3 org-indent: Remove extra column in indentation
* lisp/org-indent.el (org-indent-set-line-properties): Fix virtual
  indentation computation.

Reported-by: Eric S Fraga <e.fraga@ucl.ac.uk>
<http://permalink.gmane.org/gmane.emacs.orgmode/100483>
2015-08-25 15:03:59 +02:00
Nicolas Goaziou bed2caf56f Merge branch 'maint' 2015-08-25 14:46:38 +02:00
Nicolas Goaziou 48f009bc9f ox: Fix uninterpreted data in captions
* lisp/ox.el (org-export--remove-uninterpreted-data-1): Handle
  uninterpreted data in captions.

* testing/lisp/test-ox.el (test-org-export/uninterpreted): Add tests.

Reported-by: Johannes Rainer <johannes.rainer@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/100476>
2015-08-25 14:44:20 +02:00
Nicolas Goaziou ac2de241c8 Merge branch 'maint' 2015-08-24 22:50:48 +02:00
Matt Lundin 06966b9403 Fix agenda follow mode to work with included diary
* lisp/org-agenda.el (org-agenda-goto): Fix function to work with
  non-Org buffers.  Otherwise `org-agenda-follow-mode' does not work
  correctly with included diary entries (e.g., it errors out while the
  cursor is still in the diary buffer).

Follow mode does not work with diary entries in the agenda.  It calls
`org-agenda-goto', which expects to be in an Org mode buffer but does not
test to make sure that it is in an Org buffer.  As a result, it errors
out midway through and leaves the cursor stranded in the diary buffer.
2015-08-24 22:49:11 +02:00
Nikolai Weibull 1fd103293c Allow inserting diary entries last in date tree
* org-agenda.el (org-agenda-insert-diary-strategy): Add new value
  'date-tree-last.
  (org-agenda-insert-diary-make-new-entry): Handle
  `org-agenda-insert-diary-strategy' set to 'date-tree-last.

To allow for diary entries to be entered in time order in the date tree,
add a new value to `org-agenda-insert-diary-strategy' that allows for
this.  The code for handling this value, 'date-tree-last, is a bit
tricky, as we need to keep track of whether the date-tree already had
one or more entries for the given date.
2015-08-24 22:38:15 +02:00
Kyle Meyer 5bfdfc5df7 Merge branch 'maint' 2015-08-24 00:12:43 -04:00
Kyle Meyer 4ef2c0e439 org-footnote-action: Handle nil context
* lisp/org-footnote.el (org-footnote-action): Check whether context is
  non-nil before trying to move to the end of the element.
2015-08-24 00:10:54 -04:00
Nicolas Goaziou cf6d936701 Merge branch 'maint' 2015-08-23 23:51:07 +02:00
Nicolas Goaziou cd1d623b85 ox: Fix inheritance for EXPORT_... properties
* lisp/ox.el (org-export--get-subtree-options):
(org-export-output-file-name): Let user control inheritance for these
properties instead of hard-coding (an inconsistent) behavior.

Reported-by: Eric Abrahamsen <eric@ericabrahamsen.net>
<http://permalink.gmane.org/gmane.emacs.orgmode/100373>
2015-08-23 23:50:49 +02:00
Nicolas Goaziou 4bc8008e8b Merge branch 'maint' 2015-08-23 23:44:18 +02:00
Nicolas Goaziou 6626dfb30b ob: Fix RESULTS indentation
* lisp/ob-core.el (org-babel-parse-src-block-match): Compute indentation
  taking into consideration tab width.
(org-babel-where-is-src-block-result): Do not assume indentation
consists of white space characters only.

* testing/lisp/test-ob.el (test-ob/preserve-results-indentation): Add
  test.

Reported-by: Jarmo Hurri <jarmo.hurri@iki.fi>
<http://permalink.gmane.org/gmane.emacs.orgmode/100403>
2015-08-23 23:41:56 +02:00
Nicolas Goaziou 4f8d40dc33 Merge branch 'maint' 2015-08-23 22:46:29 +02:00
Nicolas Goaziou 9c5588377f Fix COMMENT fontification
* lisp/org.el (org-set-font-lock-defaults): Fix regexp.

Reported-by: Martin Carlé <mc@aiguphonie.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/100404>
2015-08-23 22:45:27 +02:00
Nicolas Goaziou 9a792523d6 Merge branch 'maint' 2015-08-23 09:44:45 +02:00
Nikolai Weibull 983170c0bc Redo Agenda in more cases even in sticky mode
* org-agenda.el (org-agenda-maybe-redo): Test for
org-agenda-this-buffer-name as well.

The Agenda buffer will have a different name if it’s in sticky mode,
but some commands that alter the agenda should still redo it, for
example, org-agenda-remove-restriction-lock, just like
org-agenda-filter-by-category does.
2015-08-23 09:44:13 +02:00
Kyle Meyer 8b8476e995 Merge branch 'maint' 2015-08-22 16:52:07 -04:00
Kyle Meyer 0712154a0b Backport commit c1cacb0 from Emacs master branch
* lisp/org-gnus.el (org-gnus-no-new-news):
Prefer (substitute-command-keys "`\\[foo-command]'")
to "`M-x foo-command'" in docstrings and the like.

Avoid hard-coding "M-x command" in docstrings
c1cacb09948928287bfc32745f2a92604d3291c4
Paul Eggert
Fri Aug 21 14:09:47 2015 -0700
2015-08-22 16:51:38 -04:00
Nicolas Goaziou 6615d57cce Merge branch 'maint' 2015-08-22 21:43:28 +02:00
Nicolas Goaziou 949fc352cb org-datetree: Fix DATE_TREE search
* lisp/org-datetree.el (org-datetree-find-date-create): Ignore case and
  discard false positives (e.g., a fake property in an example block).

* testing/lisp/test-org-datetree.el: New file.
2015-08-22 21:40:54 +02:00
Nicolas Goaziou 77c8fff219 Merge branch 'maint' 2015-08-22 00:59:16 +02:00
Nicolas Goaziou 3a6c9f5f06 org-capture: Fix bindings in header line
* lisp/org-capture.el (org-capture-mode): Display currently used
  bindings in header line.
2015-08-22 00:54:14 +02:00
Nicolas Goaziou e4cb441915 Merge branch 'maint' 2015-08-22 00:28:20 +02:00
Nicolas Goaziou e1ac95736c org-datetree: Fix datetree capture
* lisp/org-datetree.el (org-datetree-add-timestamp): Clarify docstring.
(org-datetree-insert-line): Leave point on new entry.
2015-08-22 00:25:04 +02:00
Nicolas Goaziou 2316925ecb Revert "org-capture: Fix datetree capture"
This reverts commit a834a5939f.
2015-08-21 23:48:36 +02:00
Nicolas Goaziou 1e62fefeee Merge branch 'maint' 2015-08-21 23:33:13 +02:00
Nicolas Goaziou a834a5939f org-capture: Fix datetree capture
* lisp/org-capture.el (org-capture-set-target-location): Fix
  file+datetree capture with non-nil `org-datetree-add-timestamp.

Reported-by: Gregor Zattler <telegraph@gmx.net>
<http://permalink.gmane.org/gmane.emacs.orgmode/100300>
2015-08-21 23:31:23 +02:00
Rasmus dbf2c95774 Revert "Merge branch 'maint'"
This reverts commit cadb9f3603, reversing
changes made to f6be2b5aa3.
2015-08-21 22:26:11 +02:00
Rasmus a53620d841 Revert "org.el: Update Version and Package-Requires header"
This reverts commit 97d43ff681.
2015-08-21 22:26:00 +02:00
Rasmus 6d3c988561 Revert "org.el: Add version header"
This reverts commit 182552ee75.
2015-08-21 22:23:42 +02:00
Nicolas Goaziou 93fc10a141 Merge branch 'maint' 2015-08-21 14:46:55 +02:00
Nicolas Goaziou 56cd178cae org-indent: Fix indentation in inline tasks
* lisp/org-indent.el (org-indent-add-properties): Indent inline tasks'
  contents according to current outline level, not inlinetask's.  This
  is consistent with hard indentation, using `org-indent-line'.
2015-08-21 14:44:26 +02:00
Nicolas Goaziou a8a60cc7f7 Merge branch 'maint' 2015-08-21 14:08:14 +02:00
Nicolas Goaziou 183348cda5 Fix typo
* lisp/org.el (org-open-at-point): Fix typo.

Reported-by: Sergei Nosov <sergei.nosov@gmail.com>
2015-08-21 14:07:26 +02:00
Nicolas Goaziou 5f217e6fd5 Merge branch 'maint' 2015-08-21 13:59:10 +02:00
Nicolas Goaziou daa8e23175 Fix expansion of archived trees
* lisp/org.el (org-hide-archived-subtrees): Do not assume BEG is at
  beginning of line.  This matters when function is called with point in
  the middle of an archived headline.

Reported-by: Hymie! <hymie@lactose.homelinux.net>
<http://permalink.gmane.org/gmane.emacs.orgmode/100291>
2015-08-21 13:56:50 +02:00
Nicolas Goaziou fa0876fe2e Merge branch 'maint' 2015-08-20 21:09:38 +02:00
Nicolas Goaziou 1272458926 Merge branch 'fix-indent' into maint 2015-08-20 21:04:32 +02:00
Nicolas Goaziou 41b7c46519 Merge branch 'maint' 2015-08-20 14:05:27 +02:00
Nicolas Goaziou a72c58178d Fix f4d7646
* lisp/org.el (org-deadline):
(org-schedule): Remove spurious argument.
2015-08-20 14:02:39 +02:00
Nicolas Goaziou 4e74897153 org-indent: Fix indentation with proportional font
* lisp/org-indent.el (org-indent-max):
(org-indent-max-levels):
(org-indent-strings):
(org-indent-stars): Remove unused variables.

(org-indent-initialize): Remove function.

(org-indent-boundary-char): Remove unnecessary comment.  Do not rely on
function above.

(org-indent): Make sure characters used for virtual indentation are
invisible since they are not necessarily white spaces.

(org-indent-set-line-properties): Fix indentation with proportional
font, i.e., do not use only white spaces to indent.
(org-indent-add-properties): Apply changes above.

Reported-by: Jakub Szypulka <jakub@szypulka.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/100252>
2015-08-20 13:58:00 +02:00
Nicolas Goaziou 5269279bf4 Merge branch 'maint' 2015-08-19 16:51:29 +02:00
Nicolas Goaziou f9f35bc79b ox-latex: Allow nil for `org-latex-hyperref-template'
* lisp/ox-latex.el (org-latex-hyperref-template): Allow nil value.  Make
  `org-latex-with-hyperref' an obsolete alias for the variable.

<http://permalink.gmane.org/gmane.emacs.orgmode/100222>
2015-08-19 16:51:07 +02:00
Nicolas Goaziou aa7dfd54de Revert "ox-latex.el: Resurrect `org-latex-with-hyperref'"
This reverts commit 6f41105bd9.
2015-08-19 16:45:01 +02:00
Nicolas Goaziou 016d84fe8f Merge branch 'maint' 2015-08-19 16:24:55 +02:00
Nicolas Goaziou eb62138ed0 Fix 93b73bd
* lisp/org-element.el (org-element-link-parser): Fix 93b73bd.
2015-08-19 16:24:34 +02:00
Nicolas Goaziou ad685348fd Merge branch 'maint' 2015-08-19 16:09:13 +02:00
Nicolas Goaziou f4d76465be Fix new time logging upon rescheduling
* lisp/org.el (org-deadline):
(org-schedule): Properly store new time so it is accessible using "%s"
in `org-log-note-headings'.

Reported-by: Malcolm Purvis <malcolm@purvis.id.au>
<http://permalink.gmane.org/gmane.emacs.orgmode/100211>
2015-08-19 16:07:22 +02:00
Nicolas Goaziou 3733658bb5 Merge branch 'maint' 2015-08-19 15:23:47 +02:00
Nicolas Goaziou 93b73bd303 Fix translated link
* lisp/org-element.el (org-element-link-parser): Call
  `org-link-translation-function' if required.
(org-element-link-interpreter): Build link from type and path instead of
simply pasting raw value.

* lisp/org.el (org-translate-link): Call parser to extract proper path
  and type.

* testing/lisp/test-org-element.el (test-org-element/link-interpreter):
  Add test.

Reported-by: Sergei Nosov <sergei.nosov@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/100227>
2015-08-19 15:22:22 +02:00