Commit Graph

17522 Commits

Author SHA1 Message Date
Paul Eggert 3a81c7ee6f Backport commit 0c856a2 from Emacs master branch
* lisp/ob-core.el (org-babel-check-evaluate)
(org-babel-confirm-evaluate):
* lisp/ob-fortran.el (org-babel-fortran-var-to-fortran):
* lisp/ox-latex.el (org-latex-compile):
* lisp/ox-man.el (org-man-compile):
* lisp/ox-odt.el (org-odt-template):
* lisp/ox-texinfo.el (org-texinfo-compile):
Change (message (format ...)) to (message ...), and likewise
for ‘error’.  This lessens the probability of confusion when the
output of ‘format’ contains ‘%’.

Fix some confusion with ‘format’
0c856a2c459016f1f9cce173f5b2b49be36e3452
Paul Eggert
Wed Aug 5 19:07:28 2015 -0700
2015-08-05 23:29:43 -04:00
Kyle Meyer 003a0f1069 org-src: Use font-lock-fontify-buffer for blocks
* lisp/org-src.el (org-src-font-lock-fontify-block): Use
  font-lock-fontify-buffer because font-lock-ensure does not display
  source block fonts.

When font-lock-fontify-buffer was originally replaced by
font-lock-ensure, source block fonts were not being displayed, so
99f9999 reverted this change.  However, a backport (d81e6b5) from the
Emacs repo, which was merged to master in 0d0d0ad, reverted this again.

Reported-by: Kaushal Modi <kaushal.modi@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/99495>
2015-08-04 23:50:59 -04:00
Paul Eggert ff92583e42 Backport commit eb0f65b from Emacs master branch
Don't overflow if computing approximate percentage
eb0f65b4fbbea60100b53cb40a1d7138d47ad0d2
Paul Eggert
Fri Jul 31 10:13:38 2015 -0700

* lisp/org-list.el (org-update-checkbox-count):
* lisp/org.el (org-table-map-tables)
(org-update-parent-todo-statistics):
Prefer (floor (* 100.0 NUMERATOR) DENOMINATOR) when calculating
progress-report percentages and the like.  This avoids problems
if (* 100 NUMERATOR) would overflow.
* lisp/org-colview.el (org-nofm-to-completion):
Prefer (round (* 100.0 NUMERATOR) DENOMINATOR) to a
more-complicated and less-accurate approximation.
2015-08-04 22:58:47 -04:00
Bastien 74e35a9154 doc/orgguide.texi: uncomment the license 2015-08-05 01:44:41 +02:00
Bastien 55656c8eb1 etc/ORG-NEWS: Slightly reformat entries 2015-08-05 01:13:31 +02:00
Bastien 0d0d0ad56e Merge branch 'backport-master'
Conflicts:
	lisp/org-table.el
2015-08-05 01:01:46 +02:00
Bastien 49ef9d02a2 org.texi (Library of Babel): Tiny fix
* org.texi (Library of Babel): Tiny fix.

Thanks to Charles Millar for reporting this.
2015-08-05 00:58:24 +02:00
Mitchel Humpherys 99425a46dd contrib: rip out org-jira
Its changelog says it's abandoned, it doesn't really do anything, and it
clashes with [1].  Rip it out.

[1] https://github.com/baohaojun/org-jira
2015-08-05 00:46:43 +02:00
Bastien f246576081 org.el (org-split-string): Tiny refactoring
* org.el (org-split-string): Tiny refactoring.

Thanks to Marcin Borkowski for raising this.
2015-08-04 23:29:37 +02:00
Bastien 306f872554 etc/ORG-NEWS: add some more news 2015-08-04 22:03:34 +02:00
Bastien c6a3749758 org-timer.el (org-timer-set-timer): Don't choke at wrong type
* org-timer.el (org-timer-set-timer): Don't choke at wrong
type for `org-timer-default-timer'.
2015-08-04 22:03:02 +02:00
Bastien 9111c21a75 org.el (org-latex-to-mathml-convert-command): Tiny docstring fix
* org.el (org-latex-to-mathml-convert-command): Tiny docstring fix.
2015-08-04 21:32:30 +02:00
Bastien ed0f7aab68 etc/ORG-NEWS: Cosmetic fixes
etc/ORG-NEWS: Cosmetic fixes
2015-08-04 21:30:12 +02:00
Bastien 79e502cc45 etc/ORG-NEWS: add `org-insert-heading' change
etc/ORG-NEWS: add `org-insert-heading' change
2015-08-04 21:24:36 +02:00
Nicolas Goaziou 6ee775383b Merge branch 'master' of orgmode.org:org-mode 2015-08-04 19:43:36 +02:00
Nicolas Goaziou 6164413f38 ORG-NEWS: Signal signature change
* etc/ORG-NEWS: Signal signature change introduced in
  b4d85b47a9.
2015-08-04 19:41:52 +02:00
Rasmus af35955781 Fix typo in 6db0b0cd43 2015-08-04 19:19:52 +02:00
Rasmus 6db0b0cd43 ox-html: Respect local values when formatting code
* ox-html.el (org-html-fontify-code): Use local value of
  org-html-htmlize-output-type parent and org-html-htmlize-font-prefix
  parent.

Reported-by: Eric S Fraga <e.fraga@ucl.ac.uk>
<http://permalink.gmane.org/gmane.emacs.orgmode/99450>
2015-08-04 17:55:37 +02:00
Nicolas Goaziou f63d76872c Fix links with newline characters
* lisp/org-element.el (org-element-link-parser): Correctly parse links
  with newline characters.

* lisp/org.el (org-make-link-regexps): Allow newline characters within
  angle links.
(org-activate-angle-links): Support multiline angle links.

* testing/lisp/test-org-element.el (test-org-element/link-parser):
  Update tests.

As a rule of thumb, any newline character and all surrounding
whitespaces are treated as a single space in a bracket link.  They are
removed in angle links.
2015-08-04 16:40:25 +02:00
Nicolas Goaziou 02532389f4 Fix priority for fuzzy searches
* lisp/org.el (org-link-search): If fuzzy search is not starred, prefer
  targets and named elements over headlines.
2015-08-04 14:41:51 +02:00
Nicolas Goaziou 776449fd7d Prevent duplicating calls to `org-link-search'
* lisp/org.el (org-open-at-point): Do not call twice `org-link-search'
  when destination is not accessible within the current narrowed part of
  the buffer.
2015-08-04 14:32:55 +02:00
Nicolas Goaziou b4d85b47a9 Remove spurious argument to `org-link-search'
* lisp/org.el (org-link-search): Remove TYPE argument, used to force
  `org-occur' or `org-do-occur' on fuzzy search.  Instead, enclose string
  within forward slashes.

* lisp/org-macro.el (org-macro-initialize-templates):
* lisp/ob-exp.el (org-link-search): Apply signature change.
2015-08-04 14:10:44 +02:00
Nicolas Goaziou 271ecd090a Small refactoring
* lisp/org.el (org-set-tags): Small refactoring.
2015-08-04 11:01:33 +02:00
Nicolas Goaziou a70604eb63 org-table: Fix computation with backwards ranges
* lisp/org-table.el (org-table-get-range): Use correct values to extract
  range.  This is important when range is defined backwards (e.g.,
  @-I..@-II).

Reported-by: Sebastien Vauban
<http://permalink.gmane.org/gmane.emacs.orgmode/99430>
2015-08-03 22:58:39 +02:00
Nicolas Goaziou a3b2b7473e Repair radio target search
* lisp/org.el (org-open-at-point): Find radio targets again.
(org-search-radio-target): New function.

* testing/lisp/test-org.el (test-org/open-at-point/radio-target): New
  test.
2015-08-03 02:59:13 +02:00
Nicolas Goaziou e50033d494 Prevent fuzzy links from matching themselves
* lisp/org.el (org-open-at-point):
(org-link-search): Prevent fuzzy links from matching themselves.
2015-08-03 02:20:06 +02:00
Nicolas Goaziou cfe5bc97f8 Fix link search
* lisp/org.el (org-open-link-marker): Remove variable.
(org-open-at-point): Apply removal.
(org-link-search): Sanitize function.  Fix issue with internal link
encoding.
(org-search-not-self): Remove function.

* lisp/ox.el (org-export--inclusion-absolute-lines): Ensure INCLUDE
  keywords with locations can find named elements and targets.

* testing/lisp/test-org.el (test-org/return):
(test-org/coderef):
(test-org/custom-id): Update tests.
(test-org/fuzzy-links): Add tests.

Reported-by: Ivanov Dmitry <usr345@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/99340>
2015-08-03 01:06:32 +02:00
Nicolas Goaziou 8094d01a68 org-table: Simplify `org-table-sort-lines'
* lisp/org-table.el (org-table-sort-lines): Rely on `sort-subr'.
  Refactor code.
(org-table--do-sort): Remove function.

* testing/lisp/test-org-table.el (test-org-table/sort-lines): Fix test.
2015-08-02 18:01:15 +02:00
Nicolas Goaziou 14d07c0e7d org-table: Improve tables' speed in large buffers
* lisp/org-table.el (org-table-auto-recalculate-regexp):
(org-table-recalculate-regexp):
(org-table-calculate-mark-regexp):
(org-table-column-names):
(org-table-column-name-regexp):
(org-table-local-parameters):
(org-table-named-field-locations):
(org-table-current-line-types):
(org-table-current-begin-pos):
(org-table-current-ncol):
(org-table-dlines):
(org-table-hlines): Improve docstrings.

(org-table-current-begin-line): Remove variable.

(org-table-save-field): New macro.

(org-table-get-specials): Remove function.
(org-table-analyze): New function, renamed from
`org-table-get-specials'.

(org-table-find-row-type): Remove function.
(org-table--row-type): New function, renamed from
`org-table-find-row-type'.

(org-table-align): Use new macro.

(org-table-field-info):
(org-table-insert-column):
(org-table-delete-column):
(org-table-move-column):
(org-table-sort-lines):
(org-table-paste-rectangle):
(org-table-wrap-region):
(org-table-current-field-formula):
(org-table-get-formula):
(org-table-maybe-recalculate-line):
(org-table-eval-formula):
(org-table-get-range):
(org-table--descriptor-line):
(org-table-recalculate):
(org-table-expand-lhs-ranges):
(org-table-edit-formulas):
(org-table-show-reference):
(org-table-get-remote-range): Apply changes above.  Refactor code.

(org-table-check-inside-data-field):
(org-table-current-column):
(org-table-current-dline):
(org-table-line-to-dline):
(org-table-copy-region):
(org-table-rotate-recalc-marks):
(org-table-fedit-post-command):
(org-table-fedit-convert-buffer):
(org-table-highlight-rectangle): Refactor code.

(org-table-goto-field): New function.

* lisp/org-capture.el (org-capture-place-table-line): Apply change made
  to table internals.

The point of this commit is to remove dependency on `org-current-line'
and `org-goto-line', which are both expensive in large buffers.  Now,
lines are relative to the beginning of the current table instead of
global (i.e., relative to the beginning of the buffer).
2015-08-02 18:01:12 +02:00
Nicolas Goaziou 8344f29dac org-table: Speed-up `org-table-{begin,end}'
* lisp/org-table.el (org-table-border-regexp): Improve docstring.
(org-table-begin):
(org-table-end): Assume point is in a table already.  In this case,
using parser is not necessary anymore.
2015-08-02 17:56:13 +02:00
Nicolas Goaziou 57883f7957 Fix org-at-TBLFM-p
* lisp/org.el (org-at-TBLFM-p): Make sure match is case-insensitive.
  Improve speed in the general case.
2015-08-02 17:56:12 +02:00
Nicolas Goaziou 84d5986cdf org-table: Fix code comments 2015-08-02 17:56:12 +02:00
Nicolas Goaziou 00170d401f org-table: Remove outdated functions
* lisp/org-table.el (org-table-colgroup-line-p,
  org-table-cookie-line-p): Remove functions.

* etc/ORG-NEWS: Signal removal.

These functions were used in the pre Org 8.0, specifically in HTML
export back-end.  They are no longer accurate since they tolerate some
HTML entities whereas Org syntax doesn't.
2015-08-02 17:55:55 +02:00
Nicolas Goaziou 4117e398e6 ox-latex: Tiny refactoring
* lisp/ox-latex.el (org-latex-guess-polyglossia-language): Tiny
  reactoring.
2015-08-02 09:50:45 +02:00
Rasmus 8d3bc7875f ox-latex: New function to generate header
* ox-latex.el (org-latex--make-header): New function.
  (org-latex-template): Use new function.
* ox-koma-letter.el (org-koma-letter-template): Use new function.
2015-07-31 14:12:50 +02:00
Rasmus 309f15887a Add notes on Polyglossia support
* ox-latex.el (org-latex-classes): Update docstring.
* ORG-NEWS: Update.
2015-07-31 14:12:35 +02:00
Rasmus 3f03986bb2 ox-latex: Add polyglossia support
* ox-latex.el (org-latex-guess-polyglossia-language): New function.
  (org-latex-polyglossia-language-alist): New defconst.
  (org-latex-template): Apply new function.
* ox-koma-letter.el (org-koma-letter-template): Apply new function.

Suggested-by: Suvayu Ali <fatkasuvayu+linux@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/98921>
2015-07-29 18:17:36 +02:00
Oleh Krehel 00142f4edf lisp/org.el (org-set-tags): Simplify further
* lisp/org.el (org-set-tags): Use let* for c0 p0 c1 rpl di tc;
Restructure so that no check on c0 is needed; Don't return a useless
tags var from cond; Change and into an equivalent when.
2015-07-28 15:16:49 +02:00
Oleh Krehel ceae5d651b lisp/org.el (org-set-tags): Simplify the code
* lisp/org.el (org-set-tags): Prefer let* to multi-variable setq,
move c0 p0 c1 rpl di tc variables to a narrower let scope.
2015-07-28 15:06:25 +02:00
tsdye ee945acf98 org.texi: ob-languages and multiple sessions support 2015-07-27 10:18:32 +02:00
Kyle Meyer 6f9184a294 Merge branch 'maint' into backport-master 2015-07-26 23:56:50 -04:00
Paul Eggert fa1a61c2ef Backport commit 85aa6ed from Emacs master branch
Use \r rather than ^M in string literals
85aa6ede9fe1b8165a99a4046dd8262ec93a02d5
Paul Eggert
Sat May 30 09:44:38 2015 -0700
2015-07-26 23:29:32 -04:00
Paul Eggert 6df6806311 Backport commit dfc2ef1 from Emacs master branch
Fix minor quoting problems in doc strings
dfc2ef11a84d33eab916ff87b8537f8e28c05c92
Paul Eggert
Thu May 28 00:22:03 2015 -0700
2015-07-26 23:29:31 -04:00
Paul Eggert 6b04312e85 Backport commit 96794d2 from Emacs master branch
Don't quote nil and t in doc strings
96794d2f97cd064e4c2bf4f71459b42558cc8c79
Paul Eggert
Thu May 21 10:06:44 2015 -0700
2015-07-26 23:29:31 -04:00
Paul Eggert 9dcbe163cc Backport commit 9d35bb8 from Emacs master branch
* lisp/org-compat.el (org-number-sequence):
* lisp/org.el (org-remove-highlights-with-change)
(org-structure-template-alist):
* lisp/ox-html.el (org-html-link-org-files-as-html):
Fix minor quoting problems in doc strings, e.g., missing quote,
``x'' where `x' was meant, etc.

Fix minor quoting problems in doc strings
9d35bb8d6518bb913ab08bace2af08963c003177
Paul Eggert
Tue May 19 15:01:16 2015 -0700
2015-07-26 23:29:31 -04:00
Paul Eggert 9347da11bf Backport commit 08782a2 from Emacs master branch
Prefer plain characters to Texinfo circumlocutions
08782a2ea95dec5662954a1de353a7da699ac339
Paul Eggert
Fri May 1 12:58:53 2015 -0700
2015-07-26 23:29:31 -04:00
Paul Eggert d3df9d203b Backport commit c33d89c from Emacs master branch
* doc/docstyle.texi: New file, which specifies treatment for
grave accent and apostrophe, as well as the document encoding.
* doc/org.texi: Use it instead of '@documentencoding UTF-8', to lessen the need for
global changes like this in the future.

Fix single-quoting style in PDF manuals
c33d89cc644f995510b13b951e4201879de2b6f8
Paul Eggert
Fri May 1 12:06:38 2015 -0700
2015-07-26 23:29:31 -04:00
Paul Eggert 961cf22823 Backport commit 279558f from Emacs master branch
Minor quoting etc. fixes to misc manuals
279558f472246dd19864f4175cb1d6061bc1ed92
Paul Eggert
2015-07-26 23:29:31 -04:00
Stefan Monnier c6164293fc Backport commit c9a75a4 from Emacs master branch
* lisp/org.el (org-insert-heading, org-sort-entries):
* lisp/org-mouse.el (org-mouse-end-headline)
(org-mouse-context-menu):
* lisp/org-clock.el (org-clock-cancel):
Add explicit second arg to looking-back.

Fix byte-compiler warnings about looking-back.
c9a75a4030a556d700fd95222ec0bf4c1a9f67b5
Stefan Monnier
Mon Apr 20 21:55:00 2015 -0400
2015-07-26 23:29:31 -04:00
Paul Eggert 0cec91d039 Backport commit b884ff3 from Emacs master branch
Spelling fix for 'hfy-optimizations'
b884ff380dc341ca8dc8fcfe4357110e191216ce
Paul Eggert
Sun Apr 5 23:43:22 2015 -0700
2015-07-26 23:29:31 -04:00