Commit Graph

11944 Commits

Author SHA1 Message Date
Nicolas Goaziou 486d947761 Merge branch 'maint' 2015-10-18 09:28:30 +02:00
Nicolas Goaziou 8e4650c887 ox-ascii: Fix code typo
* lisp/ox-ascii.el (org-ascii--describe-links): Fix code typo introduced
  in d6a718a.
2015-10-18 09:27:28 +02:00
Nicolas Goaziou bf91460d39 Merge branch 'maint' 2015-10-18 01:41:21 +02:00
Nicolas Goaziou f01b3fadbc org-clock: Fix clock drawer creation
* lisp/org-clock.el (org-clock-find-position): Create clock drawer when
  a drawer is missing, even though requested, but some clocks are
  already present in the entry.

Reported-by: Nikolay Kudryavtsev <nikolay.kudryavtsev@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/101973>
2015-10-18 01:39:36 +02:00
Nicolas Goaziou 158e40f58d Merge branch 'maint' 2015-10-18 00:03:36 +02:00
Nicolas Goaziou d6a718a93f ox-ascii: Fix external id links
* lisp/ox-ascii.el (org-ascii--describe-links): Fix export when id link
  targets an external file.

Reported-by: Samuel Wales <samologist@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/101978>
2015-10-18 00:02:31 +02:00
Nicolas Goaziou b369da2339 org-agenda: Fix last commit
* lisp/org-agenda.el (org-agenda-get-deadlines):
(org-agenda-get-scheduled): Fix last commit.
2015-10-17 21:57:53 +02:00
Nicolas Goaziou 005aa06ed5 org-agenda: Skip SCHEDULED and DEADLINE false positives
* lisp/org-agenda.el (org-agenda-get-deadlines):
(org-agenda-get-scheduled): Check point is really on a planning line
before proceeding.
2015-10-17 15:49:45 +02:00
Nicolas Goaziou 59761024b1 ox: Add an option to ignore broken links
* lisp/ox.el (org-export-with-broken-links): New variable.
(org-export-options-alist): Add new OPTIONS item.
(org-link-broken): New error type.
(org-export-resolve-coderef):
(org-export-resolve-fuzzy-link):
(org-export-resolve-id-link): Raise appropriate error symbol when a link
cannot be resolved.
(org-export-data): Handle new error type.

* doc/org.texi (Export settings): Document new feature.

* testing/lisp/test-ox.el (test-org-export/resolve-id-link):
(test-org-export/resolve-fuzzy-link):
(test-org-export/resolve-coderef): Update tests.
2015-10-17 14:42:07 +02:00
Nicolas Goaziou 707fbc3778 Merge branch 'maint' 2015-10-16 23:20:57 +02:00
Nicolas Goaziou 9de1ee1b6f org-element: Fix parsing of planning in inline tasks
* lisp/org-element.el (org-element--next-mode): Line following an
  inlinetask can be a planning.
* testing/lisp/test-org-element.el (test-org-element/inlinetask-parser):
  Update test.

Reported-by: Gregor Zattler <telegraph@gmx.net>
<http://permalink.gmane.org/gmane.emacs.orgmode/101958>
2015-10-16 23:19:06 +02:00
Nicolas Goaziou fcb75f322a Merge branch 'maint' 2015-10-16 22:53:22 +02:00
Nicolas Goaziou 0ee8ba3e0d ox-beamer: Fix labels
* lisp/ox-beamer.el (org-beamer--get-label): Remove protective braces
  when extracting label from options.
(org-beamer--format-frame): Protect label with braces if it contains
colons.

Based off a patch from Fabrice
Popineau (<http://permalink.gmane.org/gmane.emacs.orgmode/101933>).
2015-10-16 22:38:14 +02:00
Nicolas Goaziou a427098b57 Change `org-agenda-repeating-timestamp-show-all' targets
* lisp/org.el (org-closest-date): Rewrite function with less arguments.
  Improve readability.
(org-time-string-to-absolute): Apply changes to `org-closest-date'.
Improve docstring.

* testing/lisp/test-org.el (test-org/closest-date): New test.

This change implies specific repeaters (i.e., ".+" and "++") are no
longer treated the same as regular one (i.e. "+") wrt
`org-agenda-repeating-timestamp-show-all'.  Indeed, only the latter
represents multiple dates.  The former represent another date only when
TODO state changes, which could then skip some occurrences.

This fixes issue raised at
<http://permalink.gmane.org/gmane.emacs.orgmode/101884> and
<http://article.gmane.org/gmane.emacs.orgmode/26154>.
2015-10-16 18:18:49 +02:00
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