Commit Graph

17326 Commits

Author SHA1 Message Date
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
Ruben Maher eccd704aea ox.el: Remove docstring for nonexistent argument
* lisp/ox.el (org-export-output-file-name): Remove docstring for
  nonexistent argument VISIBLE-ONLY.
2015-07-25 14:17:49 +02:00
Paul Sexton c923bf3630 Updated org-drill to version 2.4.7. 2015-07-24 18:35:44 -04:00
Nicolas Goaziou bf37cd09b1 org-table: Do not trim output of radio tables
* lisp/org-table.el (orgtbl-to-generic): Leading and trailing spaces
  could be significant, so do not trim result.  However, remove the
  final newline character.

Reported-by: lom pik <lompikvoila@gmail.com> <>
<http://permalink.gmane.org/gmane.emacs.orgmode/99171>
2015-07-23 00:34:02 +02:00
Nicolas Goaziou 6e1d7bc8fe Fix `org-beginning-of-line'
* lisp/org.el (org-beginning-of-line): Prevent an error when buffer
  contains only a single star.

* testing/lisp/test-org.el (test-org/beginning-of-line): Add tests.
2015-07-22 09:39:07 +02:00
Nicolas Goaziou 7037eb591e org-mime: Fix a docstring
* contrib/lisp/org-mime.el (org-mime-htmlize): Fix docstring.
2015-07-22 09:36:06 +02:00
Matt Price b9a9f5aa22 org-mime.el: Fix org-mime-htmlize
* org-mime.el (org-mime-htmlize): Make argument optional.
2015-07-21 15:04:07 +02:00
Nicolas Goaziou 985420eceb Speed improvement for `org-goto'
* lisp/org.el (org-goto-local-search-headings): Do not rely on
  `org-context' just to check if point is on a headline but not on its
  tags.

Reported-by: Gregor Zattler <telegraph@gmx.net> <w>
<http://permalink.gmane.org/gmane.emacs.orgmode/99111>
2015-07-20 11:40:44 +02:00
Rasmus 216a53d6cc ox-html: Better customize for org-html-viewport
* ox-html.el (org-html-viewport): Allow disabling via customize.
2015-07-20 10:40:26 +02:00
Nicolas Goaziou d6e6016ba6 test-org-clock: Fix failing test (again)
* testing/lisp/test-org-clock.el (test-org-clock/clocktable): Update
  test.
(test-org-clock/clocktable1, test-org-clock/clocktable2,
test-org-clock/clocktable-until-now): Merge tests into the previous one.
2015-07-18 18:58:12 +02:00
Nicolas Goaziou cf5cb15743 org-colview: Do not silently modify buffer
* lisp/org-colview.el (org-columns-display-here): Do not modify buffer
  silently.  Small refactoring.

Reported-by: Nicolas Richard <youngfrog@members.fsf.org>
<http://permalink.gmane.org/gmane.emacs.orgmode/98992>
2015-07-18 09:39:23 +02:00
Nicolas Goaziou f6b5178156 test-org-clock: Fix failing test
* testing/lisp/test-org-clock.el (test-org-clock/clocktable): Fix
  clocktable creation.

(test-org-clock/clocktable1):
(test-org-clock/clocktable2):
(test-org-clock/clocktable-until-now): Update tests.
2015-07-18 00:39:43 +02:00
Rasmus a985538093 ox-koma-letter: Add closing special heading
* ox-koma-letter.el (org-koma-letter-special-tags-in-letter):
  Add closing.
  (org-koma-letter-template): Potentially take closing value
  from closing spcical heading.
  (org-koma-letter--build-settings): Potentially take signature
  value from closing special heading.
  (org-koma-letter-closing):
  (org-koma-letter-signature): Update docstring.

Suggested-by: Suvayu Ali <fatkasuvayu+linux@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/99028>
2015-07-16 22:09:53 +02:00
Kyle Meyer ed6349d28c org-closest-date: Don't accept canceled repeater
* lisp/org.el (org-time-string-to-absolute): Don't pass a canceled
  repeater to org-closest-date.
  (org-closest-date): Raise an error when passed a canceled repeater.

Prevent arith-error from occurring when a canceled repeater is passed to
org-closest-date.
2015-07-16 11:44:02 +02:00
Rasmus 20795fd1c4 org-entities: Add frowny
* org-entities.el (org-entities): Add frowny.
2015-07-13 11:40:29 +02:00
Rasmus 77ab3c90d5 org-entities: Change smile and frown
* org-entities.el (org-entities): Reinterpret smile and frown entities.

See: https://en.wikipedia.org/wiki/Cap_product,
     https://en.wikipedia.org/wiki/Cup_product
2015-07-13 11:40:29 +02:00
Rasmus 9b0849b2ef Update ORG-NEWS wrt. ox-latex package removals 2015-07-13 11:40:11 +02:00
Rasmus 788d15e469 org.el: Remove wasysym LaTeX dependency 2015-07-13 11:36:25 +02:00
Rasmus 10b424dd63 org.el: Remove marvosym LaTeX dependency
* org.el (org-latex-default-packages-alist): Remove marvosym.
* org-entities.el (org-entities): \EUR is now replaced with
  \texteuro.  Remove EURdig, EURhv, EURcr, EURtm.
2015-07-13 11:36:25 +02:00
Rasmus 384bc2d200 org.el: Remove default LaTeX tolerance
* org.el (org-latex-default-packages-alist): Remove fixed tolerance.
2015-07-13 11:36:25 +02:00
Rasmus fd990a81e3 ox-html: Change footpara wrapper
* ox-html.el (org-html-footnote-section): Wrap footnote definitions
  content in a div rather than a p.  p is a bad element to use for a
  wrapper as it can neither contain other p elements nor tables.
  (org-html-style-default): Change .footpara to inline display style.

Reported-by: OSiUX <xuiso@osiux.com.ar>
<http://permalink.gmane.org/gmane.emacs.orgmode/98984>
2015-07-13 11:36:25 +02:00
Marco Wahl 4baf015ab4 contrib/lisp/org-eww: Update copyright years 2015-07-11 12:11:22 +02:00
Marco Wahl 9132a79ec9 contrib/org-eww: Quote leading stars at kill
* contrib/lisp/org-eww.el (org-eww-copy-for-org-mode): Lines starting
  with '*' get quoted at special kill.

This allows yanking content containing lines starting with a '*' without
changing the outline structure.
2015-07-11 12:01:02 +02:00
Nicolas Goaziou 120dcd1d13 org-table: Fix table alignment
* lisp/org-table.el (org-table-align): Refactor function fix wrong
  alignment bug.
* lisp/org-compat.el (org-format-transports-properties-p): Remove
  variable.
* testing/lisp/test-org.el (test-org/fill-paragraph): Fix test

Reported-by: William Denton <wtd@pobox.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/98901>
2015-07-09 17:53:33 +02:00
Matt Price 22c652599c ox-deck: parse checkboxes properly
*ox-deck.el
Previously, list items with checkboxes would not build properly. This
trivial and clumsy patch fixes that.
2015-07-08 12:38:16 +02:00
Rasmus be019c4339 Autoload orgtbl-exp-regexp
* org-table.el (orgtbl-exp-regexp): Add autoload cookie.

Reported-by: Robert Klein <roklein@roklein.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/98887>
2015-07-07 14:42:31 +02:00
Nicolas Goaziou c76fef6b9d org-clock: Add `untilnow' time block
* lisp/org-clock.el (org-clock-special-range): Handle `untilnow'
  range.
(org-clock--oldest-date): New variable.
(org-clock-display-default-range): Add `untilnow' as valid range.  Use
new variable.
(org-clock-display): Offer `untilnow' as a possible range.

* doc/org.texi (The clock table): Document `untilnow'

* testing/lisp/test-org-clock.el (test-org-clock-clocktable-contents-at-point): Fix test
when called interactively.
(test-org-clock/clocktable):
(test-org-clock/clocktable1): Update tests.
(test-org-clock/clocktable-until-now): New test.

* etc/ORG-NEWS (title): Document new feature.

Suggested-by: Sébastien Vauban
2015-07-04 14:31:34 +02:00
Marco Wahl 5a3ab2a7fd Fix message text in `org-toggle-sticky-agenda'
* org-agenda.el (org-toggle-sticky-agenda): Dropped the irritating 'was'
  from the message.
2015-07-04 09:37:16 +02:00
Nicolas Goaziou 747fefe2b0 Update keywords for defcustom `org-latex-default-packages-alist'
* lisp/org.el (org-latex-default-packages-alist): Update keywords to
  reflect changes to default value in
  5e03133c47.
2015-07-03 21:20:53 +02:00
Nicolas Goaziou 048f0e1a82 ob-shell: Add missing "sh" to "shell" conversions
* lisp/ob-shell.el (org-babel-default-header-args:shell): Renamed from
`org-babel-default-header-args:sh'.
(org-babel-variable-assignments:shell): Renamed from
`org-babel-variable-assignments:sh'.
(org-babel-prep-session:shell): Renamed from
`org-babel-prep-session:sh'.  Apply renaming.
(org-babel-load-session:shell): Renamed from
`org-babel-load-session:sh'.  Apply renaming.

(org-babel-execute:shell): Apply renaming.

Reported-by: Sebastien Vauban
<http://permalink.gmane.org/gmane.emacs.orgmode/98859>
2015-07-03 16:17:11 +02:00
Nicolas Goaziou 188bae903f Fix property inheritance with extended values
* lisp/org.el (org-property--local-values): New function.
(org-entry-get): Use new function.  Ignore global values when there is
no inheritance.
(org-entry-get-with-inheritance): Fix extended values, which do not
stop anymore inheritance search.

* testing/lisp/test-org.el (test-org/entry-get): Add tests.
2015-07-03 15:34:47 +02:00
Rasmus 5e03133c47 Remove float from org-latex-default-packages-alist 2015-07-03 13:42:21 +01:00