Commit Graph

19105 Commits

Author SHA1 Message Date
Nicolas Goaziou 51227cff94 Fix C-c C-c on inline tasks
* lisp/org.el (org-ctrl-c-ctrl-c): Properly recognize inlinetasks as
  a valid context.
2016-12-15 14:24:01 +01:00
Nicolas Goaziou 7856018d78 org-macs: Tiny refactoring
* lisp/org-macs.el (org-match-line): Use (beginning-of-line) instead
  of (goto-char (point-at-bol)).
2016-12-15 00:02:58 +01:00
Nicolas Goaziou 22a4896bf8 org-info: Fix docstrings
* lisp/org-info.el (org-info-other-documents):
(org-info-map-html-url): Fix docstrings.

Suggested-by: Chunyang Xu <mail@xuchunyang.me>
2016-12-14 21:37:03 +01:00
Nicolas Goaziou b5cebbc412 ox-beamer: Fix target export
* lisp/ox-beamer.el (beamer): Let "latex" export-back-end handle
  targets.
2016-12-14 13:15:48 +01:00
Nicolas Goaziou 1c95729788 ox: Fix internal references when using `org-export-(data-)with-backend'
* lisp/ox.el (org-export-data-with-backend):
(org-export-with-backend): Preserve internal references once the local
back-end has been applied.

* testing/lisp/test-ox.el (test-org-export/get-reference): Add tests.
2016-12-13 22:11:41 +01:00
Nicolas Goaziou 64a2f6e22d ox-latex: Fix typo
* lisp/ox-latex.el (org-latex--text-markup): Fix typo.
2016-12-13 14:15:07 +01:00
Nicolas Goaziou 8fec3d5f03 ox-latex: Fix links with special characters
* lisp/ox-latex.el (org-latex--protect-text): Properly escape special
  characters.
(org-latex--text-markup): Adapt to change above.
(org-latex-inline-src-block): Follow `org-latex-text-markup-alist'
specifications.
(org-latex-link): Escape forbidden characters in URL.
2016-12-13 13:46:38 +01:00
Nicolas Goaziou e491ab31c6 ox-latex: Fix nested sub/super-scripts
* lisp/ox-latex.el (org-latex--wrap-latex-math-block): Prevent merging
  multiple sub/super-scripts at the same level.  Nested scripts are
  allowed.
2016-12-13 09:13:22 +01:00
Nicolas Goaziou f747ee43bd ox-beamer: Fix last commit
* lisp/ox-beamer.el (org-beamer-link): Fix commit
  5c28ea6aad.
2016-12-13 09:06:48 +01:00
Nicolas Goaziou b09d161873 org.texi: Fix some @xref usage
* doc/org.texi (Literal examples): @xref is expected to be followed by
  punctuation.
2016-12-12 21:24:45 +01:00
Nicolas Goaziou 5c28ea6aad ox-beamer: Fix Beamer internal links
* lisp/ox-beamer.el (org-beamer-link): Generate a label compatible
  with "latex" back-end.  Reduce code duplication with "ox-latex.el".

Reported-by: Eric S Fraga <e.fraga@ucl.ac.uk>
<http://permalink.gmane.org/gmane.emacs.orgmode/110771>
2016-12-12 21:01:02 +01:00
Nicolas Goaziou d777418ac6 org-colview: Fix `org-agenda-overriding-columns-format'
* lisp/org-colview.el (org-columns--collect-values): Change signature.
(org-agenda-columns): Apply signature change.

When calling `org-agenda-columns' compiled columns format is set
locally to Agenda buffer, but `org-columns--collect-values' is called
from source buffers.  Therefore, it uses default format instead of the
compiled one.

Reported-by: Christian Prothmann <ckprothmann@yahoo.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/110748>
2016-12-11 01:34:55 +01:00
Nicolas Goaziou 00ea6a286c ob-tangle: Fix last commit
* lisp/ob-tangle.el (org-babel-tangle-single-block):
  `org-babel-expand-noweb-references' specifically needs to be run in
  the Org document so as to resolve references.
* testing/lisp/test-ob-tangle.el (ob-tangle/continued-code-blocks-w-noweb-ref):
  Make sure a failing test doesn't leave a file behind it.
2016-12-10 00:59:08 +01:00
Nicolas Goaziou 7b148e2d0e ob-tangle: Respect buffer local variables
* lisp/ob-tangle.el (org-babel-spec-to-string): Move some processing...
(org-babel-tangle-single-block): ... there.  This function is called
with the Org buffer as its original buffer whereas the previous one is
not.

This is a follow-up to 026fb75, which was reverted.

Reported-by: David Dynerman <emperordali@block-party.net>
<http://permalink.gmane.org/gmane.emacs.orgmode/110670>
2016-12-10 00:20:38 +01:00
Nicolas Goaziou 04799d8e39 Revert "ob-tangle: Respect buffer local variables"
This reverts commit 026fb75ddb.
2016-12-10 00:19:45 +01:00
Nicolas Goaziou e32aca36a4 Simplify matching headlines in `org-link-search'
* lisp/org.el (org-link-search): Simplify matching headlines.
2016-12-08 22:40:18 +01:00
Paul Eggert b7cb9b54d5 Backport commit eeecac7 from Emacs
Fix minor quoting problems in doc strings
eeecac7ab9d1f8c3a29cffe4586e5fd2414dd671
Paul Eggert
Wed Dec 7 11:31:16 2016 -0800
2016-12-07 22:33:31 -05:00
Nicolas Goaziou 3c64f06617 Allow coderef on otherwise empty lines
* lisp/org-src.el (org-src-coderef-regexp): Update regexp.
* lisp/ox.el (org-export-resolve-coderef): Use function above.

Reported-by: D M German <dmg@turingmachine.org>
<http://permalink.gmane.org/gmane.emacs.orgmode/110656>
2016-12-07 23:11:10 +01:00
Nicolas Goaziou c797cc0f87 ox-latex: Do not generate nested sub/superscripts
* lisp/ox-latex.el (org-latex--wrap-latex-math-block): Do not wrap
  consecutive sub or super-scripts within the same block.

Reported-by: Scott Otterson <scotto@sharpleaf.org>
<http://permalink.gmane.org/gmane.emacs.orgmode/110589>
2016-12-07 00:45:52 +01:00
Nicolas Goaziou 6ed3fc8010 Fix SCHEDULED removal when repeating a task
* lisp/org.el (org-auto-repeat-maybe): Fix bug where repeating a task
  containing a timestamp without a repeater would remove the scheduled
  date.

Reported-by: 毛晓伟 <maoweirm@126.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/110633>
2016-12-07 00:10:29 +01:00
Lambda Coder b4978e271b doc/org.texi: Editorial revisions to the manual
Chapters edited in this revision:
* From Working with source code chapter to end of manual
2016-12-04 00:42:29 +01:00
Nicolas Goaziou 026fb75ddb ob-tangle: Respect buffer local variables
* lisp/ob-tangle.el (org-babel-tangle): Make sure buffer local
  variables from Org document are taken into consideration in tangled
  document.

Reported-by: David Dynerman <emperordali@block-party.net>
<http://permalink.gmane.org/gmane.emacs.orgmode/110577>
2016-12-03 23:55:28 +01:00
Nicolas Goaziou e72485336f org-agenda: Fix face for past scheduled time stamps
* lisp/org-agenda.el (org-agenda-get-scheduled): Fix face.
2016-12-02 23:24:38 +01:00
Nicolas Goaziou 9950252f34 org-agenda: Fix repeats with nil `org-agenda-repeating-timestamp-show-all'
* lisp/org-agenda.el (org-agenda-get-timestamps):
(org-agenda-get-deadlines):
(org-agenda-get-scheduled): When
`org-agenda-repeating-timestamp-show-all' is nil, only display repeat
before and repeat after today (or only repeat at today if those
coincide).  Also, computations of warnings are done with last repeat
before today instead of base date.
2016-12-02 13:01:22 +01:00
Nicolas Goaziou 6d5e207c7d org-agenda: Small refactoring
* lisp/org-agenda.el (org-agenda-deadline-face): Small refactoring.
2016-12-02 13:01:22 +01:00
Nicolas Goaziou e336f39ce7 Fix dpi calculation when previewing LaTeX snippets
* lisp/org.el (org--get-display-dpi): Fix docstring.
(org-create-formula-image): Use function above.

Reported-by: Scott Otterson <scotto@sharpleaf.org>
<http://permalink.gmane.org/gmane.emacs.orgmode/110526>
2016-11-30 21:55:45 +01:00
Nicolas Goaziou c3146209ec org-agenda: Fix priority for deadlines
* lisp/org-agenda.el (org-agenda-get-deadlines): Fix priority
  computation.

Reported-by: Matt Lundin <mdl@imapmail.org>
<http://permalink.gmane.org/gmane.emacs.orgmode/110519>
2016-11-30 00:16:56 +01:00
Nicolas Goaziou ba06303016 org-agenda: Fix time of day presence
* lisp/org-agenda.el (org-agenda-get-deadlines): Small refactoring.
(org-agenda-get-scheduled): Do no insert a time of day when current
entry is only a reminder of a previously scheduled task.

Reported-by: Matt Lundin <mdl@imapmail.org>
<http://permalink.gmane.org/gmane.emacs.orgmode/110517>
2016-11-29 23:55:15 +01:00
Lixin Chin f5916c4fbb Relax the match criteria for MathML header line
* lisp/org.el (org-create-math-formula): Allow the xmlns attribute to
  be preceded by any other mathml header attribute.

The problem here was that the match criteria for MathML assumed that
the xmlns attribute is the first listed in the top level MathML <math>
element.  Some LaTeX -> MathML converters (e.g., pandoc) will add
attributes before xmlns, which is still valid MathML.
2016-11-29 09:28:06 +01:00
Lixin Chin 73694b21d7 ox-odt.el: Fix LaTeX formulae in opendocument exports
* lisp/ox-odt.el (org-odt--translate-latex-fragments): Apply signature
  change for `org-format-latex'.

Commit a24f339f58 changed the signature
for `org-format-latex' (lisp/org.el) to add `beg' and `end' optional
parameters.  This led to an error in ox-odt.el when exporting an
odt document containing LaTeX formulae.
2016-11-29 09:24:11 +01:00
Kyle Meyer 6983f8e8bf Issue user-error when trying to drag before first element
* lisp/org.el (org-drag-element-backward):
(org-drag-element-forward): Check that org-element-at-point returns a
non-nil value to avoid a type-error when called before first element.

* testing/lisp/test-org.el (test-org/drag-element-backward):
(test-org/drag-element-forward): Add test for when point is before
first element.  Adjust existing should-error calls to specify
user-error.
2016-11-28 18:40:43 -05:00
Nicolas Goaziou 9299efa351 org-agenda: Fix deadlines
* lisp/org-agenda.el (org-agenda-get-deadlines): Fix deadlines
  display.  Also improve priority adjustment.
2016-11-28 01:35:21 +01:00
Nicolas Goaziou 6907766913 org-agenda: Fix docstrings
* lisp/org-agenda.el (org-agenda-skip-scheduled-if-done): Tiny rewording.
(org-agenda-skip-deadline-if-done): Fix typo.
2016-11-27 23:45:35 +01:00
Nicolas Goaziou abbf497b84 org-agenda: Fix done scheduled display
* lisp/org-agenda.el (org-agenda-get-scheduled): Skip done scheduled
  unconditionally whenever the base date is not the one currently
  considered.
2016-11-27 23:43:00 +01:00
Nicolas Goaziou 4b99ed5eb0 org-agenda: Fix repeated time stamps
* lisp/org-agenda.el (org-agenda-get-timestamps): Properly handle
  repeated time stamps.  Refactor code.  Improve docstring.
2016-11-27 23:09:23 +01:00
Nicolas Goaziou 2998a139c4 Tiny fix
* lisp/org.el (org-at-clock-log-p): Use `beginning-of-line' instead of
  `move-beginning-of-line'.
2016-11-27 23:09:15 +01:00
Nicolas Goaziou 7fc980f75e Tiny docstring fix
* lisp/org.el (org-compile-file): Fix docstring.
2016-11-27 12:20:01 +01:00
Nicolas Goaziou 289363d510 Fix LaTeX preview
* lisp/org.el (org-compile-file): Introduce new %O placeholder.
(org-preview-latex-process-alist): Use it.

* lisp/ox-latex.el (org-latex-pdf-process):
* lisp/ox-man.el (org-man-pdf-process):
* lisp/ox-texinfo.el (org-texinfo-info-process): Document it.

Reported-by: Scott Otterson <scotto@sharpleaf.org>
<http://permalink.gmane.org/gmane.emacs.orgmode/110464>
2016-11-27 12:07:11 +01:00
Nicolas Goaziou ee7721f795 org-clock: Fix clock tables with file list scope
* lisp/org-clock.el (org-dblock-write:clocktable): Handle scope as
  a list of files.

Reported-by: Nikolay Kudryavtsev <nikolay.kudryavtsev@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/110452>
2016-11-26 00:15:44 +01:00
Nicolas Goaziou b77ef877ab org-agenda: Fix "no-catch --cl-block-nil--"
* lisp/org-agenda.el (org-agenda-get-category-icon): Use `cl-dolist'
  instead of `dolist'.

Reported-by: Karl Voit <devnull@Karl-Voit.at>
<http://permalink.gmane.org/gmane.emacs.orgmode/110443>
2016-11-25 17:49:13 +01:00
Nicolas Goaziou 2e35a59763 ox-latex: Fix error when compiling in a different than source file
* lisp/ox-latex.el (org-latex-compile): List logfiles with their full
  name instead of relative ones.

Reported-by: Éric Würbel <eric.wurbel@univ-amu.fr>
<http://permalink.gmane.org/gmane.emacs.orgmode/110402>
2016-11-25 12:22:54 +01:00
Nicolas Goaziou 26828778c6 org-agenda: Fix previous commit
* lisp/org-agenda.el (org-agenda-get-timestamps):
(org-agenda-get-deadlines): Apply `org-agenda--timestamp-to-absolute'
signature change.
2016-11-25 02:07:54 +01:00
Nicolas Goaziou 69ec6258b6 org-agenda: Fix scheduled dates display
* lisp/org.el (org-time-string-to-absolute): Change signature.
* lisp/org-agenda.el (org-agenda-get-scheduled): Fix various glitches
  in scheduled dates display.  Also fix such dates when
  `org-agenda-repeating-timestamp-show-all' is nil.  Apply signature
  change.

Reported-by: Samuel Wales <samologist@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/110116>
2016-11-25 01:51:42 +01:00
Nicolas Goaziou 0dd024aa92 ob-js: Fix error when code block ends with a comment
* lisp/ob-js.el (org-babel-js-function-wrapper): Isolate body within
  wrapper.

Reported-by: Compro Prasad <comproprasad@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/110390>
2016-11-21 23:21:23 +01:00
Nicolas Goaziou 0bdf18befd test-ob: Fix failing test on MacOS
* testing/lisp/test-ob.el (test-ob/indented-cached-org-bracket-link):
  Use `expand-file-name' to prevent introducing "//" patterns in file
  name.

Reported-by: David Talmage <david.talmage@shoutpoint.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/110285>
2016-11-20 09:36:42 +01:00
Nicolas Goaziou 1319a3be44 ox-html: Fix %d placeholder in pre/postamble string
* lisp/ox-html.el (org-html-format-spec): Correctly apply
  `org-html-metadata-timestamp-format' on %d placeholder.

Reported-by: Pavel Panchekha <me@pavpanchekha.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/110374>
2016-11-19 23:17:32 +01:00
Nicolas Goaziou c3c33841eb Merge branch 'maint' of orgmode.org:org-mode into maint 2016-11-19 23:08:33 +01:00
Nicolas Goaziou 9e2dc98eef Fix error when exporting body only of an empty buffer
* lisp/ox.el (org-export-filter-apply-functions): Return empty string
  instead of nil when a filter returns the empty string.

* testing/lisp/test-ox.el (test-org-export/export-scope): Add test.
(test-org-export/filter-apply-functions): New test.

Reported-by: "Stefan-W. Hahn" <stefan.hahn@s-hahn.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/110371>
2016-11-19 23:08:12 +01:00
Eli Zaretskii d31c8ef17c Backport commit 5b0cddd from Emacs
* doc/orgcard.tex: Change "GNU Emacs" to "this document" in copyright
notices.  (Bug#24520)

More fixes in copyright notices in etc/refcards/
5b0cddd91535025bbf0c69d17e2d4e470dd350c5
Eli Zaretskii
Tue Nov 15 19:01:07 2016 +0200
2016-11-19 16:50:27 -05:00
Eli Zaretskii 68760e703e Backport commit f994c20 from Emacs
* doc/orgcard.tex: Update the copyright blurb.  (Bug#24520)

Update copyright text in refcards
f994c2046588b168c1a4a900879cdffaf9d02f01
Eli Zaretskii
Sun Nov 13 18:20:59 2016 +0200
2016-11-19 16:49:19 -05:00