Commit Graph

12030 Commits

Author SHA1 Message Date
Nicolas Goaziou e8f4488f43 ox-beamer: Obey to `org-latex-prefer-user-labels'
* lisp/ox-beamer.el (org-beamer--get-label): Obey to
  `org-latex-prefer-user-labels'.

Suggested-by: Fabrice Popineau <fabrice.popineau@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/101894>
2015-10-15 10:33:27 +02:00
Nicolas Goaziou 96681fcb68 Merge branch 'maint' 2015-10-15 00:05:38 +02:00
Nicolas Goaziou a36c15494e org-clock: Fix quarterly clock reports
* lisp/org-clock.el (org-clock-special-range): Properly set Q according
  to block specification.

Reported-by: "L.C. Karssen" <lennart@karssen.org>
<http://permalink.gmane.org/gmane.emacs.orgmode/101899>
2015-10-15 00:03:36 +02:00
Nicolas Goaziou 606b5fdd87 ox-publish: Fix void-variable project-plist
* lisp/ox-publish.el (org-publish-projects): Fix bug introduced in
  346d227.
2015-10-14 12:39:07 +02:00
Nicolas Goaziou fa61cb4079 Merge branch 'maint' 2015-10-13 23:57:48 +02:00
Nicolas Goaziou 1c7dca9692 ox-beamer: Fix againframe command
* lisp/ox-beamer.el (org-beamer-headline): Make sure any fuzzy reference
  provided for an againframe ends up pointing to a headline.
2015-10-13 23:51:17 +02:00
Nicolas Goaziou 5565645f75 Merge branch 'maint' 2015-10-13 21:44:13 +02:00
Jan Seeger d183c59e46 org-capture: Reverse capture finalize and refile, hack buffer killing
* org-capture.el (org-capture-refile): Call finalize first, then
  refile. If the capture buffer needs to be killed afterwards, kill
  after refiling.

Refiling before finalizing led to an incorrect cursor position during
refile.  Since adjusting the buffer position and bounds for the refiled
entry is difficult, I reverted the `org-capture-refile' function to its
original order of finalizing and then refiling.  However, this leads to
a bug with killing the buffer on capture, described in
<http://permalink.gmane.org/gmane.emacs.orgmode/78027/>.  To work around
this, now the :kill-buffer flag is cleared before calling finalize, and
the capture buffer is killed after `org-refile' is called.

TINYCHANGE
2015-10-13 21:42:47 +02:00
Nicolas Goaziou 346d227228 ox-publish: Call preparation function earlier
* lisp/ox-publish.el (org-publish-projects): Call preparation function
  earlier in the process, before files constituting the project are
  collected.

Suggested-by: Arun Isaac <theroarofthedragon@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/101858>
2015-10-13 21:39:02 +02:00
Nick Dokos 75f91f0bb7 Allow early-warning anniversaries in agenda.
* lisp/org-bbdb.el (org-bbdb-anniversaries-future, org-bbdb-date-list): New functions.

* doc/org.texi: Document the usage of `org-bbdb-anniversaries-future'.

* etc/ORG-NEWS: Feature description.

Feature requested by Julien Cubizolles:

http://thread.gmane.org/gmane.emacs.orgmode/99344
2015-10-13 09:00:16 -04:00
Nicolas Goaziou 94f6b8e124 Merge branch 'maint' 2015-10-11 23:56:57 +02:00
Nicolas Goaziou c0c16b88fa ob-clojure: Silence byte-compiler 2015-10-11 23:56:35 +02:00
Nicolas Goaziou a898059dea Merge branch 'maint' 2015-10-11 23:32:07 +02:00
Feng Zhou 4eccd7c7b5 ob-clojure: Cider API change
* lisp/ob-clojure.el (org-babel-execute:clojure): Apply Cider API
  change.

TINYCHANGE
2015-10-11 23:31:23 +02:00
Nicolas Goaziou 50a18201c7 org-src: Preserve tab characters unrelated to indentation
* lisp/org-src.el (org-edit-src-code): Always preserve tabs not related
  to indentation.

* testing/lisp/test-org-src.el (test-org-src/preserve-tabs): New test.
2015-10-08 18:57:30 +02:00
Nicolas Goaziou 348890f79b org-element: Remove now useless function
* lisp/org-element.el (org-element-remove-indentation): Mark as
  an obsolete replacement for `org-remove-indentation'.
(org-element-example-block-parser):
(org-element-example-block-interpreter):
(org-element-src-block-parser):
* lisp/ox.el (org-export-unravel-code): Apply obsolescence.
2015-10-08 16:25:29 +02:00
Nicolas Goaziou 44cb8b1656 Remove maximum indentation without untabifying
* lisp/org.el (org-remove-indentation):
(org-do-remove-indentation): Change algorithm so as not to untabify
string or buffer.

Only <tab> characters used for indentation may be removed.

Reported-by: "Charles C. Berry" <ccberry@ucsd.edu>
<http://permalink.gmane.org/gmane.emacs.orgmode/101768>
2015-10-08 16:15:17 +02:00
Rasmus 718fee3049 ox-beamer: Support #+LATEX_COMPILER
* ox-beamer.el (org-beamer-template): Insert compiler and remove
  unused packages.
2015-10-04 15:54:28 +02:00
Rasmus 002499b26b ox-latex: Small refactor
* ox-latex.el (org-latex--make-preamble): Renamed
org-latex--make-header.
(org-latex--insert-compiler): New function.
(org-latex-template):
* ox-koma-letter.el: Use new function.
2015-10-04 15:54:28 +02:00
Rasmus bb51d25def ox-beamer: Remove numbers in template comments
* ox-beamer.el (org-beamer-template): Remove numbering of
  comments as it creates dependency between comments.
2015-10-04 15:54:28 +02:00
Rasmus 45b01819e0 Improve docstrings regarding latex_compiler
* org.el (org-latex-default-packages-alist):
* ox-latex.el (org-latex-compiler, org-latex-compilers)
  (org-latex-compiler-file-string, org-latex-bib-compiler)
  (org-latex--remove-packages): Improve docstring wrt. latex_compiler.
2015-10-04 15:54:21 +02:00
Kyle Meyer 984b1ff0ab Merge branch 'maint' 2015-10-04 02:46:23 -04:00
Kyle Meyer 00dacdcc50 Clean up spacing to pass Emacs's pre-commit check
This is in preparation for syncing with the Emacs repo.
2015-10-04 02:31:29 -04:00
Kyle Meyer e802936f4b Pass LIMIT argument to org-looking-back
* lisp/org-mouse.el (org-mouse-insert-item):
(org-mouse-context-menu):
* lisp/org-pcomplete.el (org-thing-at-point):
* lisp/org.el (org-read-date-minibuffer-local-map):
(org-timestamp-change): Provide LIMIT argument to org-looking-back.
* lisp/org.el (org-read-date-minibuffer-local-map):
(org-insert-heading): Replace looking-back with org-looking-back.

As of Emacs 25, the LIMIT argument to looking-back is advertised as a
required argument.
2015-10-04 02:31:29 -04:00
Kyle Meyer ef3ea9d02d Use prefix for outline functions
* lisp/ob-lilypond.el (org-babel-lilypond-mark-error-line):
* lisp/org-agenda.el (org-agenda-goto):
(org-agenda-show-and-scroll-up):
(org-agenda-show-1):
* lisp/org-archive.el (org-archive-subtree):
(org-archive-to-archive-sibling):
(org-toggle-archive-tag):
* lisp/org-capture.el:
(org-capture-place-template):
* lisp/org-colview.el:
(org-columns-eval):
* lisp/org-crypt.el (org-encrypt-entry):
* lisp/org-feed.el (org-feed-update):
* lisp/org-mouse.el (org-mouse-popup-global-menu):
* lisp/org.el (org-cycle):
(org-cycle-internal-global):
(org-cycle-internal-local):
(org-global-cycle):
(org-set-startup-visibility):
(org-set-visibility-according-to-property):
(org-overview):
(org-content):
(org-clean-visibility-after-subtree-move):
(org-set-outline-overlay-data):
(org-tree-to-indirect-buffer):
(org-move-subtree-down):
(org-paste-subtree):
(org-sort-entries):
(orgstruct-setup):
(org-show-set-visibility):
(org-mode-map):
(org-check-before-invisible-edit):
(org-kill-note-or-show-branches):
(org-org-menu):
(org-yank-generic):
* lisp/ox-org.el (org-org-publish-to-org): Use prefix for outline
  functions.
* lisp/org-compat.el: Add compatibility functions for outline functions
  that are under the "outline-" prefix as of Emacs 25.
2015-10-04 02:31:16 -04:00
Kyle Meyer c8f2eec425 Merge branch 'maint' 2015-10-03 18:09:56 -04:00
Kyle Meyer 2c349cc65a ob-tangle: Check that publishing directory exists
* lisp/ob-tangle.el (org-babel-tangle-publish): Create publishing
  directory if it doesn't exist.

Reported-by: Arun Isaac <theroarofthedragon@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/101697>
2015-10-03 18:08:52 -04:00
Nicolas Goaziou c2a0bfe580 Merge branch 'maint' 2015-10-03 09:22:41 +02:00
Nicolas Goaziou ee3d9363c5 ox: Change misleading keys in `org-export-smart-quotes-alist'
* lisp/ox.el (org-export-smart-quotes-alist):
(org-export--smart-quote-status): Change misleading quote names.

Due to the new smart quotes algorithm, "..." are always primary quotes,
even though they may be translated as single quotes.  Conversely, '...'
are secondary quotes and may not be translated to single quotes.
2015-10-03 09:19:21 +02:00
Kyle Meyer 24b05a5f54 Merge branch 'maint' 2015-10-02 23:21:59 -04:00
Kyle Meyer 36233d976d ob-tangle: Expand paths for publishing
* lisp/ob-tangle.el (org-babel-tangle-file): Return expanded file name.

Reported-by:  Arun Isaac <theroarofthedragon@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/101290>
2015-10-02 23:19:57 -04:00
Nicolas Goaziou 0c591f327d Merge branch 'maint' 2015-10-01 21:56:29 +02:00
Nicolas Goaziou 609e1e28fb Fix "undefined symbol 'org-export-create-backend"
* lisp/org-table.el (orgtbl-to-generic): Make sure "ox.el" is loaded
  before converting a radio table.

Reported-by: Dave Marquardt <davemarq@linux.vnet.ibm.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/101642>
2015-10-01 21:55:13 +02:00
Nicolas Goaziou a6350c4245 Merge branch 'maint' 2015-10-01 21:43:54 +02:00
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
Nicolas Goaziou c5cbc6936e Merge branch 'maint' 2015-08-19 11:15:52 +02:00
Nicolas Goaziou 1abc4887a2 Fix `org-entry-properties' with default priority
* lisp/org.el (org-entry-properties): When no priority is explicitly
  set, report `org-default-priority' instead.

* testing/lisp/test-org.el (test-org/entry-properties): Update test.
2015-08-19 11:12:43 +02:00
Nicolas Goaziou cf31ea1660 ox-html: Rename `org-html-html5-fancy-p' to `org-html--html5-fancy-p'
* lisp/ox-html.el (org-html--html5-fancy-p): Renamed from
  `org-html-html5-fancy-p'.  Add docstring.
(org-html--wrap-image):
(org-html-template):
(org-html-toc):
(org-html-special-block): Apply renaming.

As an internal function, it should follow the convention of double
hyphens in its name.
2015-08-19 11:07:06 +02:00
Bastien c9872990ed Merge branch 'maint' 2015-08-18 19:24:27 +02:00
Bastien 6f41105bd9 ox-latex.el: Resurrect `org-latex-with-hyperref'
* ox-latex.el (latex): Resurrect :latex-hyperref-p.
(org-latex-with-hyperref): Resurrect.
(org-latex-template): Use :latex-hyperref-p.

* org.texi (Beamer specific export settings)
(@LaTeX{} specific export settings): Mention both
`org-latex-hyperref-template' and `org-latex-with-hyperref'.

Thanks to Scott Randby for raising this issue.
2015-08-18 19:23:34 +02:00
Bastien afa64d6f10 Merge branch 'maint' 2015-08-18 17:59:09 +02:00
Eric Abrahamsen f149060678 Add function to better guard html5 exports
* lisp/ox-html.el (org-html-html5-fancy-p): New function to check
  that we are exporting to HTML5 and that the user has requested
  fancy elements.
  (org-html--wrap-image, org-html-template, org-html-toc)
  (org-html-special-block): Use the new function.
2015-08-18 17:59:01 +02:00
Bastien 34c458929a Merge branch 'maint' 2015-08-18 11:53:54 +02:00
Bastien 682bb962f3 org.el (org-occur): Match timestamps at the end of a headline
* org.el (org-occur): Workaround to match timestamps at the
end of a headline.
2015-08-18 11:53:45 +02:00
Bastien af7ea548b0 Merge branch 'maint' 2015-08-17 20:43:03 +02:00
Bastien a03cd64994 Fix c6d9a4ec
* org.el (org-check-before-date, org-check-after-date): Save
match data.
2015-08-17 20:42:50 +02:00
Nicolas Goaziou 40b4ef3345 org-element: Use pcase instead of case
* lisp/org-element.el (org-element--set-regexps):
(org-element-copy):
(org-element-item-interpreter):
(org-element-latex-fragment-parser):
(org-element-timestamp-parser):
(org-element-timestamp-interpreter):
(org-element--next-mode):
(org-element--object-lex):
(org-element--cache-find):
(org-element--cache-after-change): Use pcase instead of case.
2015-08-17 10:58:57 +02:00
Nicolas Goaziou 7b6bd0b858 Merge branch 'maint' 2015-08-16 19:31:01 +02:00
Nicolas Goaziou 17a225621c ox-odt: Small refactoring
* lisp/ox-odt.el (org-odt-footnote-reference): Small refactoring.
2015-08-16 19:30:39 +02:00
Bastien 86170ff501 Merge branch 'maint' 2015-08-16 16:02:20 +02:00
Bastien 55544780e2 ox-html.el (org-html-use-unicode-chars): Delete.
* ox-html.el (org-html-use-unicode-chars): Delete.
(html, org-html-final-function): Update.

* org.texi (Publishing options): Don't mention
`org-html-use-unicode-chars'.

Thanks to Vladimir Alexiev for raising this.
2015-08-16 16:01:57 +02:00
Bastien da83bf584d Merge branch 'maint' 2015-08-16 15:15:09 +02:00
Bastien c27c101fa3 org.el: Fix `org-comment-string' fontification
* org.el (org-set-font-lock-defaults): Don't fontify
`org-comment-string' when not in a headline.
2015-08-16 15:14:27 +02:00
Nicolas Goaziou 25b02e7cc8 Merge branch 'maint' 2015-08-15 23:50:27 +02:00
Nicolas Goaziou 8d00cd8966 ox-odt: Fix footnote export
* lisp/ox-odt.el (org-odt-footnote-reference): Only inline footnotes are
  to be wrapped within a paragraph.

Reported-by: Gerald Wildgruber <Gerald.Wildgruber@unibas.ch> <>
<http://permalink.gmane.org/gmane.emacs.orgmode/100084>
2015-08-15 23:46:55 +02:00
Nicolas Goaziou 80a6262ca1 Silence byte-compiler
* lisp/ox.el (org-export-backend):
(org-export-define-backend):
(org-export-define-derived-backend):
(org-export--get-subtree-options):
(org-export--get-inbuffer-options):
(org-export--collect-headline-numbering):
(org-export--selected-trees):
(org-export--skip-p):
(org-export--delete-comments):
(org-export--remove-uninterpreted-data-1):
(org-export--merge-external-footnote-definitions):
(org-export-insert-default-template):
(org-export-expand-include-keyword):
(org-export--inclusion-absolute-lines):
(org-export-collect-footnote-definitions):
(org-export-get-footnote-number):
(org-export-get-reference):
(org-export-get-ordinal):
(org-export-unravel-code):
(org-export-format-code):
(org-export-format-code-default):
(org-export-table-has-header-p):
(org-export-table-row-group):
(org-export-table-cell-alignment):
(org-export-table-row-number):
(org-export-table-dimensions):
(org-export-table-cell-address):
(org-export-get-table-cell-at):
(org-export--smart-quote-status):
(org-export-get-previous-element):
(org-export-get-next-element):
(org-export-dispatch):
(org-export--dispatch-ui):
(org-export--dispatch-action): Silence byte-compiler.
2015-08-15 00:33:11 +02:00
Nicolas Goaziou d47f03ca24 ox: Activate lexical binding
* lisp/ox.el (org-export-define-backend):
(org-export-define-derived-backend): Remove unused argument.

(org-export--get-inbuffer-options):
(org-export--list-bound-variables):
(org-export--selected-trees):
(org-export-transcoder):
(org-export--prune-tree):
(org-export--merge-external-footnote-definitions):
(org-export--footnote-reference-map):
(org-export-get-alt-title):
(org-export-get-node-property):
(org-export-table-row-is-special-p):
(org-export-table-dimensions):
(org-export-stack-refresh): Refactor code.

* testing/lisp/test-ox.el (org-test-default-backend):
(test-org-export/with-backend):
(test-org-export/footnote-first-reference-p): Comply to lexical binding.
2015-08-15 00:11:20 +02:00
Nicolas Goaziou 425f4a8e60 org-element: Activate lexical binding
* lisp/org-element.el (org-element-section-parser):
(org-element-planning-interpreter):
(org-element-table-row-parser):
(org-element-timestamp-interpreter): Silence byte-compiler.  Tiny
refactoring.

(org-element--parse-objects): Tiny refactoring.

(org-element-interpret-data): Refactor code.
(org-element--interpret-data-1): Remove function.

(org-element-center-block-interpreter):
(org-element-item-parser):
(org-element-plain-list-interpreter):
(org-element-property-drawer-interpreter):
(org-element-quote-block-interpreter):
(org-element-section-interpreter):
(org-element-babel-call-interpreter):
(org-element-clock-interpreter):
(org-element-comment-interpreter):
(org-element-comment-block-interpreter):
(org-element-diary-sexp-interpreter):
(org-element-example-block-interpreter):
(org-element-export-block-interpreter):
(org-element-fixed-width-interpreter):
(org-element-horizontal-rule-interpreter):
(org-element-keyword-interpreter):
(org-element-latex-environment-interpreter):
(org-element-node-property-interpreter):
(org-element-paragraph-interpreter):
(org-element-src-block-interpreter):
(org-element-verse-block-interpreter):
(org-element-bold-interpreter):
(org-element-code-interpreter):
(org-element-entity-interpreter):
(org-element-export-snippet-interpreter):
(org-element-inline-babel-call-interpreter):
(org-element-inline-src-block-interpreter):
(org-element-italic-interpreter):
(org-element-latex-fragment-interpreter):
(org-element-line-break-interpreter):
(org-element-link-parser):
(org-element-macro-interpreter):
(org-element-radio-target-interpreter):
(org-element-statistics-cookie-interpreter):
(org-element-strike-through-interpreter):
(org-element-table-cell-interpreter):
(org-element-target-interpreter):
(org-element-underline-interpreter):
(org-element-verbatim-interpreter):
(org-element-map):
(org-element-normalize-contents): Silence byte-compiler.
2015-08-14 23:10:08 +02:00
Nicolas Goaziou b9b500afd9 Merge branch 'maint' 2015-08-14 22:36:51 +02:00
Philip 453492ca95 org.el: Fix recursive regexp backtracking
* org.el (org-link-search): Avoid recursive regexp backtracking behavior
when following search links.

<http://article.gmane.org/gmane.emacs.orgmode/100010>

TINYCHANGE
2015-08-14 22:33:08 +02:00
Nicolas Goaziou fc7ce0777d org-lint: Fix compilation error
* lisp/org-lint.el (org-lint-wrong-include-link-parameter): Remove
  spurious argument.
2015-08-14 18:19:05 +02:00
Nicolas Goaziou eb3b31c80b Implement Org linting
* lisp/org-lint.el: New file.

* doc/org.texi (Org syntax):
* etc/ORG-NEWS:  Document new feature.
2015-08-14 18:16:31 +02:00
Nicolas Goaziou 2498f996ea Merge branch 'maint' 2015-08-14 16:49:14 +02:00
Nicolas Goaziou 6539b0d3f9 org-footnote: Fix remote editing of empty definitions
* lisp/org-src.el (org-edit-footnote-reference): Fix remote editing of
  empty definitions.
2015-08-14 16:48:41 +02:00
Nicolas Goaziou 67fe03bcd7 Remove `org-list-empty-line-terminates-plain-lists'
* lisp/org-list.el (org-list-empty-line-terminates-plain-lists): Remove
  variable.
(org-list-end-re):
(org-list-separating-blank-lines-number):
* lisp/org.el (org-blank-before-new-entry): Adapt to change above.

* testing/lisp/test-org-element.el (test-org-element/at-point):
* testing/lisp/test-org-list.el (test-org-list/move-item-down):
(test-org-list/move-item-up):
(test-org-list/insert-item): Update tests.

This variable is not useful: plain lists can always be terminated with
two blank lines.
2015-08-14 16:34:37 +02:00
Nicolas Goaziou 10cb9d7323 Merge branch 'maint' 2015-08-14 16:23:07 +02:00
Nicolas Goaziou 6a0454e4f0 org-footnote: Fix consistency between footnotes and links
* lisp/org-footnote.el (org-footnote-action): Mimic `org-open-at-point'
  behavior for consistency.
2015-08-14 16:22:13 +02:00
Nicolas Goaziou 65ded0c7ed org-footnote: Fix f8c4102cc6
* lisp/org-footnote.el (org-footnote-new): Fix
  f8c4102cc6.

* testing/lisp/test-org-footnote.el (test-org-footnote/new): Add test.
2015-08-14 16:17:18 +02:00
Nicolas Goaziou 8500501984 org-footnote: Fix location after moving to definition
* lisp/org-footnote.el (org-footnote-goto-definition): Move to location
  appropriate for further editing.
* testing/lisp/test-org-footnote.el (test-org-footnote/delete): Update
  test.
2015-08-14 16:15:09 +02:00
Rasmus 97d43ff681 org.el: Update Version and Package-Requires header 2015-08-14 02:05:30 +02:00
Rasmus cadb9f3603 Merge branch 'maint' 2015-08-14 02:04:49 +02:00
Nicolas Goaziou f6be2b5aa3 Merge branch 'maint' 2015-08-14 02:04:13 +02:00
Rasmus 182552ee75 org.el: Add version header
* org.el: Add version header.
* README_maintainer: Mention Version header.
2015-08-14 02:03:54 +02:00
Matt Lundin a3eeddefce Fix completion when selecting more than one tag
* lisp/org.el (org-fast-tag-selection): Make sure to set local variable
  buffer-tags to actual buffer-tags before pushing selected tag to the
  list; otherwise, the subsequent completion list will be limited to the
  one selected tag.
2015-08-14 01:58:49 +02:00
Nicolas Goaziou d7c6d92166 Merge branch 'maint' 2015-08-14 01:07:52 +02:00
Nicolas Goaziou f8c4102cc6 org-footnote: Fix positioning when inserting footnotes
* lisp/org-footnote.el (org-footnote-new): Fix point when a new footnote
  triggers sorting.

Reported-by: Gerald Wildgruber <Gerald.Wildgruber@unibas.ch>
<http://permalink.gmane.org/gmane.emacs.orgmode/99997>
2015-08-14 01:05:40 +02:00
Nicolas Goaziou 4ddfa565c9 Merge branch 'maint' 2015-08-14 00:19:39 +02:00
Nicolas Goaziou 719a201c3b org-src: Fix remote editing
* lisp/org-src.el (org-src--contents-area): Make sure buffer is widened
  before extracting contents of area.
2015-08-14 00:17:47 +02:00
Nicolas Goaziou e1e3cf0189 Merge branch 'maint' 2015-08-13 22:53:27 +02:00
Tom Hinton 0500bd09e2 Fix clock in when org-clock-into-drawer is integer
* org-clock.el (org-clock-jump-to-current-clock): Fixed a bug wherein
  `org-clock-jump-to-current-clock' did not work if
  `org-clock-into-drawer' was not either a string or nil.

TINYCHANGE
2015-08-13 22:51:09 +02:00
Nicolas Goaziou 2f2f266c24 Merge branch 'maint' 2015-08-13 22:33:29 +02:00
Nicolas Goaziou db314d8ad0 Fix table detection in non-Org buffers
* lisp/org.el (org-at-table-p): Allow local tables without full valid
  syntax when current buffer is not in Org mode.

Reported-by: Benjamin Slade <slade@jnanam.net>
<http://permalink.gmane.org/gmane.emacs.orgmode/99982>
2015-08-13 22:31:36 +02:00
Kyle Meyer db4b0e7b9e Merge branch 'maint' 2015-08-12 23:31:55 -04:00
Archenoth 81a6372947 ob-ruby: Fix double-escaping
* lisp/ob-ruby.el (org-babel-ruby-evaluate): Remove second call to
  `org-babel-ruby-table-or-string'.

<http://permalink.gmane.org/gmane.emacs.orgmode/99888>

TINYCHANGE
2015-08-12 22:55:54 -04:00
Nicolas Goaziou 4bb5306f2d Merge branch 'maint' 2015-08-13 02:44:02 +02:00
Nicolas Goaziou 4dc79cbe9d Fix splitting headlines with RET
* lisp/org.el (org-return): Make sure to keep headline from being
  invalidated by restricting positions where it can be split.

* testing/lisp/test-org.el (test-org/return): Add test.
2015-08-13 02:42:08 +02:00
Alexey Lebedeff 997a9a45d9 Make `org-return' follow links in headings again
* org.el (org-return): Check for links first when
  `org-return-follows-link' is non-nil, before inserting any newlines.

* testing/lisp/test-org.el (test-org/return): Add test.

This patch restores order in which `org-return' perform actions (which
was changed in a7e62499f2).

TINYCHANGE
2015-08-13 02:25:17 +02:00
Nicolas Goaziou 128c132c60 Merge branch 'maint' 2015-08-12 14:53:56 +02:00
Nicolas Goaziou 1e268ad334 org-colview: Fix column view area
* lisp/org-colview.el (org-columns-goto-top-level): Actually move point.
(org-columns): Adapt to change above.

Reported-by: Johan Sandblom <js@ndblom.se>
<http://permalink.gmane.org/gmane.emacs.orgmode/99892>
2015-08-12 14:49:02 +02:00
Nicolas Goaziou 252029b10b Merge branch 'maint' 2015-08-12 01:13:38 +02:00
Nicolas Goaziou 0359f7550a org-colview: Fix typo in a docstring
* lisp/org-colview.el (org-columns--value): Fix typo.
2015-08-12 01:12:43 +02:00
Nicolas Goaziou 3add787abd Merge branch 'maint' 2015-08-11 19:12:49 +02:00
Nicolas Goaziou 6116c72975 Fix column view sums
* lisp/org.el (org-entry-properties): Remove need for `org-summaries'
  property.

* lisp/org-colview.el (org-columns--value): New function.
(org-columns):
(org-agenda-columns): Use new functions.

Reported-by: Johan Sandblom <js@ndblom.se>
<http://permalink.gmane.org/gmane.emacs.orgmode/99865>
2015-08-11 19:12:17 +02:00
Nicolas Goaziou 05994dc775 Merge branch 'maint' 2015-08-11 14:46:14 +02:00
Nicolas Goaziou e8253c57f1 org-agenda: Fix slowdown introduced in 570b193
* lisp/org-agenda.el (org-agenda-dim-blocked-tasks): Do not check
multiple times the same entry.

Reported-by: Matt Lundin <mdl@imapmail.org>
<http://permalink.gmane.org/gmane.emacs.orgmode/99842>
2015-08-11 14:42:34 +02:00
Nicolas Goaziou 4a7b2c5072 Merge branch 'maint' 2015-08-11 14:13:46 +02:00
Nicolas Goaziou 9bb87f49f7 org-list: Fix "Invalid search bound" error
* lisp/org-list.el (org-update-checkbox-count): Fix "Invalid search
  bound" error.

Reported-by: Rasmus <rasmus@gmx.us>
<http://permalink.gmane.org/gmane.emacs.orgmode/99837>
2015-08-11 14:11:15 +02:00
Nicolas Goaziou a0c634ba3c Merge branch 'maint' 2015-08-10 23:24:06 +02:00
Nicolas Goaziou ac0661189e org-list: Fix statistics updating with cookie in sublist
* lisp/org-list.el (org-update-checkbox-count): Properly update
  statistics cookies in a sublist.

* testing/lisp/test-org-list.el (test-org-list/update-checkbox-count):
Add test.

Reported-by: Gerald Wildgruber <Gerald.Wildgruber@unibas.ch>
<http://permalink.gmane.org/gmane.emacs.orgmode/99792>
2015-08-10 23:23:39 +02:00
Nicolas Goaziou e658b07c8a Merge branch 'maint' 2015-08-10 22:36:02 +02:00
Nicolas Goaziou aa98f7c79a Edit proper timestamp when on a time range
* lisp/org.el (org-time-stamp): Offer appropriate default value
  depending on position of point in a time range.

Reported-by: Christoph LANGE <math.semantic.web@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/99783>
2015-08-10 22:32:24 +02:00