Commit Graph

19233 Commits

Author SHA1 Message Date
Nicolas Goaziou 92ee4d06a2 org-capture: Fix escaping characters in template embedded S-exps
* lisp/org-capture.el (org-capture-fill-template): Escape backslash
  characters in %i contents when those are inserted within a S-exp.
  Also prevent adding any prefix to %i contents spanning over multiple
  lines when they are inserted within a S-exp.

* testing/lisp/test-org-capture.el (test-org-capture/fill-template):
  Add tests.

Reported-by: Samuel Wales <samologist@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/112232>
2017-03-14 09:03:59 +01:00
Nicolas Goaziou ad19484676 Revert "ox-ascii: Remove useless brackets in sub/super script"
This reverts commit 5b4215eb16.
2017-03-11 11:21:26 +01:00
Nicolas Goaziou a3747baef9 org-agenda: Fix infloop in `org-find-top-headline'
* lisp/org-agenda.el (org-find-top-headline): Prevent infloop when top
  headline has not level 1.

Reported-by: Adrian Bradd <adrian.bradd@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/112623>
2017-03-11 11:20:35 +01:00
Nicolas Goaziou 4cb6abe3b7 ox-md: Fix internal links
* lisp/ox-md.el (org-md-headline): Add an anchor when a link is
  referring to the headline.
(org-md--headline-referred-p): New function.
2017-03-10 18:52:06 +01:00
Nicolas Goaziou 5b4215eb16 ox-ascii: Remove useless brackets in sub/super script
* lisp/ox-ascii.el (org-ascii-subscript):
(org-ascii-superscript): Only use brackets when there are multiple
words.
2017-03-08 12:28:28 +01:00
Nicolas Goaziou 2eda74285e Fix LaTeX and Beamer publishing processes
* lisp/ox-beamer.el (org-beamer-publish-to-pdf):
* lisp/ox-latex.el (org-latex-publish-to-pdf): Set default directory
  prior to compiling the generated tex file.

Reported-by: Robert Klein <roklein@roklein.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/112388>
2017-03-08 09:33:09 +01:00
Nicolas Goaziou 64a5f9a596 ox-html: Fix verse blocks
* lisp/ox-html.el (org-html-verse-block): Add missing line break at
  the end of each line in verse environments.

Reported-by: Skip Collins <skip.collins@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/112537>
2017-03-08 00:12:55 +01:00
Marco Wahl 4108f52f36 test-org-list.el: Fix visibility tests
* testing/lisp/test-org-list.el (test-org-list/move-item-down):
  Replace several calls of `org-invisible-p2' with calls on a lower
  level.
2017-03-07 16:37:25 +01:00
Marc Ihm 1a70061e3f ox-confluence: Handle checkboxes and inactive timestamps correctly
* contrib/lisp/ox-confluence.el (org-confluence-timestamp): New
  function.
(org-confluence-headline): Use new function.
(org-confluence-table-cell): Add missing space.

Fix handling of square brackets from timestamps and checkboxes; avoid
invalid confluence markup for empty table headers.
2017-03-05 18:37:48 +01:00
Nicolas Goaziou 8dfab7be23 Fix failing tests
* testing/lisp/test-ob.el (test-ob/org-babel-insert-result): Fix
  failing tests.

Reported-by: "Charles C. Berry" <ccberry@ucsd.edu>
<http://permalink.gmane.org/gmane.emacs.orgmode/112475>
2017-03-05 18:05:02 +01:00
Th. Rikl 57fbe524e4 org.texi: Document alternatives to M-TAB
* doc/org.texi (Drawers):
(Editing and debugging formulas):
(Export settings):
(Completion): Document alternatives to M-TAB

(Built-in table editor): Change <TAB> into TAB.

TINYCHANGE
2017-03-02 21:58:06 +01:00
Nicolas Goaziou a4eb60931a ob-core: Properly escape Org syntax when inserting results
* lisp/ob-core.el (org-babel-examplify-region): Escape Org syntax
  before wrapping it.

* testing/lisp/test-ob.el (test-ob/org-babel-insert-result): Add test.
  Renamed from `test-ob/org-babel-insert-result--improper-lists'.

Reported-by: D M German <dmg@turingmachine.org>
2017-03-01 22:19:04 +01:00
Nicolas Goaziou e1fa353e0a org-protocol: Fix library name
* lisp/org-protocol.el (org-protocol-create-for-org): Use `ox-publish'
  instead of outdated `org-publish'.  Improve warning message.

Reported-by: Jonas Bernoulli <jonasbernoulli@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/112386>
2017-02-28 13:37:48 +01:00
Kyle Meyer a29525d657 org-agenda-menu: Correct key for fortnight view
* lisp/org-agenda.el (org-agenda-menu): Correct key for fortnight
  view.

Reported-by: J. David Boyd <dboyd2@mmm.com>
2017-02-27 11:11:20 -05:00
Nicolas Goaziou c7c9477260 org.texi: Fix example
* doc/org.texi (noweb-ref): Update Babel parameter syntax in example.
2017-02-23 19:15:22 +01:00
Anders Johansson 4084337dbe org.el: Make faces org-quote and org-verse be appended
* lisp/org.el (org-fontify-quote-and-verse-blocks): Append faces.  Use
  `add-face-text-property'.

This means fontification of emphasis, links etc. is kept in quote and
verse blocks even with org-fontify-quote-and-verse-blocks non-nil.

TINYCHANGE
2017-02-23 14:17:56 +01:00
Nicolas Goaziou da80e6c6ab org-capture: Tiny refactoring
* lisp/org-capture.el (org-capture-refile): Tiny refactoring.
2017-02-23 12:59:24 +01:00
Bastien df506794db org-capture: Fix commit 7d7c38 2017-02-21 15:41:15 +01:00
Nicolas Goaziou 7d7c38c6b1 org-capture: Fix `org-capture-refile'
* lisp/org-capture.el (org-capture-refile): Preserve location of point
  when refiling.

* testing/lisp/test-org-capture.el (test-org-capture/refile): New
  test.

Reported-by: Liu Hui <liuhui1610@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/112202>
2017-02-19 15:37:12 +01:00
Axel Kielhorn c5ab7958b7 org-clock: Add german translation.
* lisp/org-clocl.el (org-clock-clocktable-language-setup): German
  translations added.

Axel Kielhorn <org-mode@axelkielhorn.de>
TINYCHANGE
2017-02-19 09:39:06 +01:00
Nicolas Goaziou 70872885be org-src: Fix typo in code comment
* lisp/org-src.el (org-edit-src-save): Fix typo.
2017-02-18 14:56:41 +01:00
Nicolas Goaziou 326894046c org-clock: Fix number of columns with :compact parameter
* lisp/org-clock.el (org-clocktable-write-default): Fix number of
  columns with :compact parameter.

Reported-by: Stefan Nobis <stefan-ml@snobis.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/112217>
2017-02-18 14:22:50 +01:00
Nicolas Goaziou bf601016dc Properly save source blocks with `save-some-buffers'
* lisp/org-src.el (org-src-mode-configure-edit-buffer): Set
  `write-contents-functions' so that saving a remote editing buffer
  always call `org-edit-src-save'.
(org-edit-src-save): Return a non-nil value explicitly.

Reported-by: Thibault Polge <thibault@thb.lt>
<http://permalink.gmane.org/gmane.emacs.orgmode/112201>
2017-02-17 22:32:50 +01:00
Nicolas Goaziou 7ca2e027a6 org-clock: Fix error when using unknown language
* lisp/org-clock.el (org-clocktable-write-default): Be careful
  that (nth 4 lwords) and (nth 5 lwords) can be nil, if :lang as an
  unknown value.
2017-02-17 14:34:19 +01:00
Nicolas Goaziou 013c0af8b0 org-lint: Add checker for empty headlines with tags
* lisp/org-lint.el (org-lint--checkers): Add checker.
(org-lint-empty-headline-with-tags): New function.

* testing/lisp/test-org-lint.el (test-org-lint/empty-headline-with-tags):
  New test.
2017-02-17 13:23:26 +01:00
Fabrice Popineau b5a67ebddd Fix file:// uri handling for windows-nt and cygwin
* lisp/org-element.el (org-element-link-parser):
  Handle drive names in uri like file:///c:/dir/file

* lisp/ox.el (org-export-file-uri):
  Handle drive names in uri like file:///c:/dir/file

* testing/lisp/test-ox.el (test-org-export/file-uri):
  Generate the right uri to be tested against link exporter.
2017-02-17 08:36:00 +01:00
Nicolas Goaziou b897ab7223 org-clock: Fix regression in Clock table
* lisp/org-clock.el (org-clocktable-write-default): Do not raise an
  error when :maxlevel is 0.  Small refactoring.

* testing/lisp/test-org-clock.el (test-org-clock/clocktable): Split
into ...
(test-org-clock/clocktable/ranges):
(test-org-clock/clocktable/tags):
(test-org-clock/clocktable/scope):
(test-org-clock/clocktable/maxlevel):
(test-org-clock/clocktable/formula): ... these.  Add tests.

This fixes regression introduced in ccf832e83.

Reported-by: Christoph LANGE <math.semantic.web@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/112091>
2017-02-13 21:28:59 +01:00
Nicolas Goaziou 990fd09ca8 Fix some tests
* testing/lisp/test-org-element (test-org-element/link-parser): Remove
  a test.
* testing/lisp/test-org-pcomplete (test-org-pcomplete/keyword):
* testing/lisp/test-ox.el (test-org-export/file-uri): Fix tests.
2017-02-13 17:21:24 +01:00
Nicolas Goaziou d347d85a15 org-element: Fix `org-element-insert-before'
* lisp/org-element.el (org-element-insert-before): Do not call
  `reverse' as contents might use `eq' objects.

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

Reported-by: Justin Kirby <justinkirby@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/112065>
2017-02-13 16:29:54 +01:00
Stefan-W. Hahn fe97948e89 org-table: Move table column with leaving text-properties untouched
* lisp/org-table.el (org-table-move-column): Use `transpose-regions'.

Moving org-table rows is implemented with delete-region and insert which
preserve text-properties. Moving org-table columns is implemented
with replace-string, which removes text-properties.

My proposal is to use transpose-regions in org-table-move-column which
will preserve text-properties when moving columns in org-tables.
2017-02-13 15:37:53 +01:00
Marco Wahl b5b44f918d Merge branch 'improve-org-eww' into maint 2017-02-12 09:08:52 +01:00
Marco Wahl 9c824217ad org-eww: Fix copy of form-elements
* lisp/org-eww.el (org-eww-copy-for-org-mode): New behavior: Just add
  link-title when link-location is not a string.  This fixes copying
  from www.indeed.co.uk.

Reported and a suggestion of a fix by Andrea.
<http://permalink.gmane.org/gmane.emacs.orgmode/112052>.
2017-02-12 09:00:56 +01:00
Kyle Meyer e50cd98f93 orgcard: Update export section
* doc/orgcard.tex (Export and Publishing): Correct stale bindings.
  Add asynchronous, body, and subtree bindings.

This section now includes all bindings listed in
(info "(org)The Export Dispatcher").

Reported-by: Charles C. Berry <ccberry@ucsd.edu>
<https://lists.gnu.org/archive/html/emacs-orgmode/2017-02/msg00200.html>
2017-02-11 17:39:13 -05:00
Nicolas Goaziou 91d82f7a87 Silence byte-compiler 2017-02-11 18:37:32 +01:00
Nicolas Goaziou 9070b97f0e Fix header in LaTeX snippets
* lisp/ox-latex.el (org-latex-make-preamble): Add optional argument.
* lisp/org.el (org-create-formula-image): Use it.

Reported-by: plus <ctre@users.sourceforge.net>
<http://permalink.gmane.org/gmane.emacs.orgmode/112015>
2017-02-11 02:35:00 +01:00
Kyle Meyer fd565d6e63 orgcard: Remove another timeline entry
* doc/orgcard.tex (Filtering and Sparse Trees): Don't mention timeline
  because this feature will be removed in version 9.1.

90f87cb98 removed the org-timeline reference in the "Agenda Views"
section but missed this one.

As a bonus, this fixes a column formatting issue in the
orgcard_letter.pdf output (orgcard.pdf was not affected) that was
caused by an extra line added in 4340cc78f.

Reported-by: David Talmage <david.talmage@shoutpoint.com>
<http://lists.gnu.org/archive/html/emacs-orgmode/2017-02/msg00193.html>
2017-02-09 12:58:04 -05:00
Kyle Meyer 90f87cb98a orgcard.tex: Remove timeline reference
* doc/orgcard.tex: Don't mention timeline because this feature will be
  removed in version 9.1.
2017-02-08 21:43:38 -05:00
Kaushal Modi 4340cc78f7 Update few bindings' descriptions based on org 9.0.4
* doc/orgcard.tex: Update descriptions for M-UP/DOWN and M-S-UP/DOWN
  bindings for structural editing.  Removed the C-c C-q binding
  description in the Tables/Regions section as it sets org tags as
  usual, does not fill paragraph.
2017-02-08 21:40:40 -05:00
Nicolas Goaziou ccf832e831 org-clock: Fix clock percent
* lisp/org-clock.el (org-clocktable-write-default): Fix percent computation.
(org-clock-time%): Remove function.

* testing/lisp/test-org-clock.el (test-org-clock/clocktable): Update
  test.

As a consequence of this patch, a ":formula %" doesn't generate
a TBLFM line anymore.
2017-02-07 16:52:30 +01:00
Sebastien Le Maguer 3dc4fa9d9d ox-bibtex: Take key with spaces or non-alphabetic characters into account
* ox-bibtex.el (org-bibtex-process-bib-files): Solve a bug in which
ox-bibtex was not considering enterily keys like "Author et&bsp; al.,
1999" as valid.

TINYCHANGE
2017-02-05 09:21:55 +01:00
Nicolas Goaziou 83cea90599 org-clock: Do not associate a note to removed zero time CLOCKs
* lisp/org-clock.el (org-clock-out): When a zero time CLOCK is
  removed, do not offer to add a note for it.
2017-02-03 22:51:56 +01:00
Nicolas Goaziou 9eda09eab4 Notes associated to CLOCKs are located after the clock
* lisp/org.el (org-store-log-note): Make sure a note added after
  clocking out is inserted right after the CLOCK line.

Reported-by: Jorge Morais Neto <jorge13515@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/111795>
2017-02-03 22:46:15 +01:00
Nicolas Goaziou 6da9d0a416 Fix indentation of some elements
* lisp/org.el (org--get-expected-indentation): Tiny refactoring.
(org-indent-line): Ignore LaTex environments.
(org-indent-region): Better handling for export blocks, LaTeX
environments and example blocks.

* testing/lisp/test-org.el (test-org/indent-line):
(test-org/indent-region): Add tests.
2017-02-03 22:03:25 +01:00
Nicolas Goaziou 37bd3586e9 Fix repeating entries without a TODO keyword
* lisp/org.el (org-auto-repeat-maybe): Allow repeating entries without
  a TODO keyword.
2017-02-02 14:17:04 +01:00
Nicolas Goaziou 32972979c7 org-agenda: Fix scheduled and deadline S-exp entries display
* lisp/org-agenda.el (org-agenda-get-deadlines):
(org-agenda-get-scheduled): Properly handle S-exp entries.

Reported-by: Ken Mankoff <mankoff@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/111805>
2017-02-01 22:36:29 +01:00
Nicolas Goaziou 73330079c0 org-table: Fix error with `org-table-get-field' at bob
* lisp/org-table.el (org-table-get-field): Do not return
  `beginning-of-buffer' error when called at beginning of buffer.

* testing/lisp/test-org-table.el (test-org-table/get-field): New test.
2017-02-01 20:56:38 +01:00
Nicolas Goaziou 76c08ea77b Replace org-set-local by setq-local in the documentation
* contrib/orgmanual.org (Conflicts): Update yasnippet instructions.

* doc/org.texi (Packages that conflict with Org mode): Update
  yasnippet instructions

TINYCHANGE
2017-02-01 15:42:04 +01:00
Nicolas Goaziou 426bce6a83 org-capture: Small fix
* lisp/org-capture.el (org-mks): Find entries with full prefix, not
last pressed key.

This fixes a bug introduced in 8194e7b09.

Reported-by: Charles Millar <millarc@verizon.net>
<http://permalink.gmane.org/gmane.emacs.orgmode/111779>
2017-01-31 22:50:09 +01:00
Lixin Chin caa54d2e98 ox-latex.el: Wrap 'minted' src blocks in a 'listing' environment
* lisp/ox-latex.el (org-latex-src-block): Make source highlighting
  using the 'minted' syntax highlighting package behave the same as
  using the 'listings' syntax highlighting package.

The source block should be floating if a caption is provided, or if
':float t' is provided in an '#+ATTR_LATEX:' block.  Previously, the
source block would only be floating if ':float multicolumn' was
provided.  This now matches the Org mode documentation for source
blocks.

TINYCHANGE
2017-01-31 09:01:42 +01:00
Nicolas Goaziou 8194e7b09d org-capture: Fix freeze when capture templates are ill-defined
* lisp/org-capture.el (org-mks): Do not freeze when there is a missing
  step in the key hierarchy.  Fix docstring.  Refactor code for clarity.

Reported-by: Roland Everaert <reveatwork@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/111716>
2017-01-30 23:36:52 +01:00