Commit graph

12392 commits

Author SHA1 Message Date
Nicolas Goaziou 34f3260370 org-compat: Fix error on newest Emacsen (>= 25)
* lisp/org-compat.el (org-move-to-column): Ensure `remove' is called on
a list.

Reported-by: Julien Cubizolles <j.cubizolles@free.fr>
<http://permalink.gmane.org/gmane.emacs.orgmode/104703>
2016-02-02 17:49:23 +01:00
Charles Berry 4d02140130 lisp/ob-R.el: Rename graphics-file arg of org-babel-expand-body:R.
* lisp/ob-R.el: (org-babel-expand-body:R) The third arg is now
  `graphics-file' with no `&' prefix, so edebug can instrument it.
2016-02-01 19:48:49 -08:00
Nicolas Goaziou 8003ef0453 Merge branch 'maint' 2016-02-01 00:19:37 +01:00
Nicolas Goaziou 0b97a55170 org-element: Disable cache for orgstruct-mode
* lisp/org-element.el (org-element--cache-active-p):
(org-element-cache-reset): Do not activate cache outside Org buffers,
even if using "orgstruct-mode".

Reported-by: "Mark A. Hershberger" <mah@nichework.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/104648>
2016-02-01 00:17:39 +01:00
Nicolas Goaziou fed40ebf96 Merge branch 'maint' 2016-02-01 00:02:08 +01:00
Nicolas Goaziou ffb08b28cd ob-tangle: Fix :comment org behavior
* lisp/ob-tangle.el (org-babel-spec-to-string): Do not try to comment
  empty text.

Reported-by: Titus von der Malsburg <malsburg@posteo.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/104637>
2016-02-01 00:01:25 +01:00
Nicolas Goaziou 094f46c203 Merge branch 'maint' 2016-01-31 23:32:07 +01:00
Nicolas Goaziou 3aa355c037 ox-latex: Fix numbering of source blocks
* lisp/ox-latex.el (org-latex-src-block): Fix numbering reset on source
  blocks when using the listings package.

Reported-by: P-O Gustafsson <kullager@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/104650>
2016-01-31 23:30:49 +01:00
Nicolas Goaziou 7148ae780b Merge branch 'maint' 2016-01-31 23:23:13 +01:00
Nicolas Goaziou 48e046047b ox-html: Properly encode links without a description
* lisp/ox-html.el (org-html-link): Encode URI in default description
  when none is provided.

Reported-by: mail@fritzreichwald.de
<http://permalink.gmane.org/gmane.emacs.orgmode/104645>
2016-01-31 23:21:34 +01:00
Nicolas Goaziou a904245d05 Merge branch 'maint' 2016-01-31 20:58:47 +01:00
Nicolas Goaziou 2f727b0f48 ob-core: Silence byte-compiler 2016-01-31 20:57:47 +01:00
Nicolas Goaziou 06e144adef Merge branch 'maint' 2016-01-31 20:47:06 +01:00
Nicolas Goaziou 67efff2fd8 ob-tangle: Fix `org-babel-tangle-jump-to-org'
* lisp/ob-tangle.el (org-babel-tangle-jump-to-org): Find correct
  location in the Org document.

* testing/lisp/test-ob-tangle.el (ob-tangle/jump-to-org): New test.
2016-01-31 20:38:35 +01:00
Nicolas Goaziou 7d6b8f51ec ob: Fix `org-babel-update-block-body'
* lisp/ob-core.el (org-babel-update-block-body): Correctly handle block
  indentation.
(org-babel-where-is-src-block-head): Accept an optional argument in
order to avoid parsing twice the same element.

* testing/lisp/test-ob.el (org-test-ob/update-block-body): New test.
2016-01-31 20:38:35 +01:00
Nicolas Goaziou 81c0ea92f8 org-habit: Fix ++ repeaters handling
* lisp/org-habit.el (org-habit-build-graph): Fix algorithm handling "++"
  repeaters.

Reported-by: Yasushi SHOJI <yashi@atmark-techno.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/104582>
2016-01-31 00:06:29 +01:00
Michael Brand b4105b430c org-table: Fix ranges in `orgtbl-ascii-draw'
* lisp/org-table.el (orgtbl-ascii-draw): Fix float to integer
  conversion.
* testing/lisp/test-org-table.el (test-org-table/orgtbl-ascii-draw):
  Adapt test.
2016-01-30 16:30:52 +01:00
Kyle Meyer 23ca3fa100 Merge branch 'maint' 2016-01-29 00:28:48 -05:00
Kyle Meyer eb3b1046c6 org-src: Use font-lock-ensure to highlight blocks
* lisp/org-src.el (org-src-font-lock-fontify-block): Use
  org-font-lock-ensure instead of font-lock-fontify-buffer.

This replacement has previously been made (f36b19e, d81e6b5) and then reverted
(99f9999, 003a0f1) twice because source blocks were not being reliably
highlighted when font-lock-ensure was used instead of
font-lock-fontify-buffer.  This was due to a bug in font-lock-ensure
that has now been fixed (see Emacs's 21beb19 and bug#22399).

font-lock-ensure was introduced after Emacs 24.5, so this issue only
pertains to users with a developmental version of Emacs.
2016-01-29 00:28:42 -05:00
Kyle Meyer a4edee4069 org-compat: Update font-lock-ensure alias
* lisp/org-compat.el (org-font-lock-ensure): Add new alias that accepts
  the same number of arguments as font-lock-ensure does.  Use an org-
  prefix.
* lisp/org-clock.el (org-clock-get-clocktable):
* lisp/org.el (org-fontify-like-in-org-mode):
* lisp/ox-html.el (org-html-fontify-code):
* lisp/ox-odt.el (org-odt-do-format-code):
* lisp/ox-org.el (org-org-publish-to-org): Use org-font-lock-ensure.

See Emacs's bug#22399.
2016-01-29 00:28:37 -05:00
Nicolas Goaziou f8c5c4825e Merge branch 'maint' 2016-01-29 00:53:58 +01:00
Nicolas Goaziou 9ab973d0a6 org-macro: Fix expansion in narrowed buffers
* lisp/org-macro.el (org-macro-replace-all): Expand macro even outside
  narrowed part of the buffer.

* testing/lisp/test-org-macro.el (test-org/macro-replace-all): Add test.

Reported-by: Kaushal Modi <kaushal.modi@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/104562>
2016-01-29 00:52:49 +01:00
Nicolas Goaziou 13427c9029 Improve compilation checks for some back-ends
* contrib/lisp/ox-groff.el (org-groff-compile):
* lisp/ox-man.el (org-man-compile):
* lisp/ox-texinfo.el (org-texinfo-compile): Check more carefully if
  output file was produced.
2016-01-28 10:02:04 +01:00
Nicolas Goaziou c17fccf904 Merge branch 'maint' 2016-01-27 00:33:15 +01:00
Nicolas Goaziou 75ee067410 org-table: Fix table formulas editing
* lisp/org-table.el (org-table-show-reference): Do not move point
  outside the table when editing formulas.  Fix docstring.

Reported-by: Samuel Wales <samologist@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/104472>
2016-01-27 00:32:33 +01:00
Nicolas Goaziou 4ebb6cea39 ox-latex: Use cl-subseq' instead of org-sublist'
* lisp/ox-latex.el (org-latex-compile): Use `cl-subseq' instead of
  `org-sublist'.
2016-01-26 23:05:04 +01:00
Nicolas Goaziou 03cbcf41ed Merge branch 'maint' 2016-01-26 23:03:11 +01:00
Anthony Cowley a37996910e ox-latex: PDF generation timestamp check
* lisp/ox-latex.el (org-latex-compile): Improve timestamp check on HFS+
  filesystem by only considering 1-second clock resolution.

Previously, the call to (current-time) could return a timestamp with
a non-zero microsecond or picosecond fields, while the file attribute
always has zeros for these fields.  The check that the generated file is
newer than the reference timestamp only succeeded when the time to
generate the file crossed a 1-second clock interval.

TINYCHANGE
2016-01-26 23:02:21 +01:00
Nicolas Goaziou 4c2b52bd8b org-element: Do not remove TAB characters from parsed text
* lisp/org-element.el (org-element--parse-objects): Do not remove TAB
  characters from plain text.
(org-element-normalize-contents): Handle TAB characters in indentation.

* testing/lisp/test-org-element.el (test-org-element/normalize-contents):
Update test.
2016-01-26 22:53:55 +01:00
Nicolas Goaziou af1bd190e3 org-element: Small speed-up
* lisp/org-element.el (org-element--parse-objects): Add an optional
  argument to avoid walking a secondary string twice.  Make less
  consing.
(org-element--parse-elements): Make less consing.
(org-element-headline-parser):
(org-element-inlinetask-parser):
(org-element-item-parser):
(org-element-parse-secondary-string): Apply changes.
2016-01-26 22:03:25 +01:00
Nicolas Goaziou 188823e372 org-element: Fix `org-element-set-contents'
* lisp/org-element.el (org-element-set-contents): Fix return value when
  element is empty. Also make sure to always return the element.
2016-01-26 22:03:25 +01:00
Kyle Meyer 15d591ee44 Merge branch 'maint' 2016-01-26 01:17:43 -05:00
Kyle Meyer f02d15d677 ob-core: Fix comment typo from Emacs's 1203e8a 2016-01-26 01:13:51 -05:00
Stefan Monnier 12189858e8 Backport commit 1203e8a from Emacs
* lisp/ob-core.el (org-babel-check-confirm-evaluate)
(org-babel-map-src-blocks): Don't emit warnings if added vars are not used.
(*this*): Declare as dyn-bound.
(org-babel-expand-src-block, org-babel-load-in-session)
(org-babel-switch-to-session-with-code, org-babel-get-rownames):
Mark unused args.
(org-babel-combine-header-arg-lists): Remove unused var `args'.

* lisp/org-src.el (org-inhibit-startup):
Declare as dyn-bound.

lisp/org: Fix some compiler warnings
1203e8aecb7f49621af52cc13bc0e4427545dd4f
Stefan Monnier
Mon Jan 25 10:11:31 2016 -0500
2016-01-26 01:13:26 -05:00
Rafael Laboissiere 7b9f2fba66 Fix logic when activating plain links
* lisp/org.el: Activate plain link when point is outside a tag, instead
  of the other way around.

TINYCHANGE
2016-01-25 17:12:01 +01:00
Nicolas Goaziou 61db4483f8 Merge branch 'maint' 2016-01-25 13:58:28 +01:00
Nicolas Goaziou 73c59ca4ff Tiny refactoring
* lisp/org.el (org-activate-plain-links): Tiny refactoring.
2016-01-25 13:58:05 +01:00
Nicolas Goaziou b8a67993f9 Merge branch 'maint' 2016-01-25 13:57:25 +01:00
Nicolas Goaziou 9eface25da Fix (wrong-type-argument listp org-link) error
* lisp/org.el (org-activate-plain-links): `face' property doesn't not
  necessarily is a list.

Reported-by: gongzhitaao <zhitaao.gong@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/104444>
2016-01-25 13:54:47 +01:00
Kyle Meyer 01319a41a3 org-feed: Fix 034c176 merge resolution
Restore unrelated change from 528a274 (org-feed: Silence byte-compiler,
2016-01-07).
2016-01-24 18:23:42 -05:00
Kyle Meyer 034c176995 Merge branch 'maint' 2016-01-24 16:41:20 -05:00
Kyle Meyer e92a06aeb1 org-crypt: Fix comment typo from Emacs's fbce475 2016-01-24 16:37:22 -05:00
Alan Mackenzie 347191042a Backport commit fbce475 from Emacs
Expunge "allow" + infinitive without direct object from source and doc.
fbce4757a874cc43806eb41b8637538b101c3c69
Alan Mackenzie
Sun Jan 24 20:30:39 2016 +0000
2016-01-24 16:35:22 -05:00
Nicolas Goaziou 53472b9c44 Merge branch 'maint' 2016-01-24 18:23:58 +01:00
Nicolas Goaziou 8e74ea3d10 Fix plain links fontification in a narrowed buffer
* lisp/org.el (org-activate-plain-links): Fix fontification when buffer
  is narrowed and (point-min) is no longer 1.
2016-01-24 18:22:00 +01:00
Nicolas Goaziou c10ba5f3dc Merge branch 'maint' 2016-01-24 18:09:22 +01:00
Nicolas Goaziou 921da3290a Fix `org-format-latex' with $$...$$ snippets
* lisp/org.el (org-format-latex): Transform $$...$$ into \[...\] before
  processing with mathjax.
2016-01-24 18:08:23 +01:00
Achim Gratz a88e51dc3f Merge branch 'maint' 2016-01-24 12:09:34 +01:00
Achim Gratz 796f13177a lisp/org.el: correct filemode, changed in b3fbd31f17 2016-01-24 12:09:03 +01:00
Achim Gratz 750e0f91a2 Merge branch 'maint' 2016-01-24 11:25:30 +01:00
Rafael Laboissiere 860bcfbf93 Fix fontification of plain links at beginning of buffer
* lisp/org.el (org-activate-plain-links): Ensure that a valid buffer
  position is given as first argument to get-text-property, in
  particular when the plain link is at the very beginning of the buffer.

TINYCHANGE
2016-01-23 00:43:01 +01:00
Nicolas Goaziou 9d39c9a2ba Merge branch 'maint' 2016-01-22 22:59:29 +01:00
Richard Lawrence 3bf19b30f0 ox-icalendar: Fix timezone export bug
* ox-icalendar.el (org-icalendar-export-current-agenda): Correct
  argument order in call to org-icalendar--vcalendar (timezone should be
  third, description fourth).

TINYCHANGE
2016-01-22 22:58:51 +01:00
Nicolas Goaziou 58af2e01be Merge branch 'maint' 2016-01-21 10:42:58 +01:00
Nicolas Goaziou 3dcd1a345f Use org-back-to-heading' instead of outline-back-to-heading'
* lisp/org-agenda.el (org-search-view):
* lisp/org-clock.el (org-with-clock):
(org-clock-jump-to-current-clock):
* lisp/org.el (org-entry-beginning-position): Use `org-back-to-heading'
  instead of `outline-back-to-heading'.

Reported-by: Derek Feichtinger <dfeich@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/104375>
2016-01-21 10:42:03 +01:00
Kyle Meyer cb7f44f1af Fix lexical variable warning
* lisp/org.el (org-fast-tag-selection): Don't use add-to-list with
  lexical variable.

Reported-by: Vicente Vera <vicentemvp@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/104363>
2016-01-21 00:50:32 -05:00
Nicolas Goaziou d15cae7e0f Merge branch 'maint' 2016-01-21 00:54:37 +01:00
Nicolas Goaziou 0d53e5f9e8 org-colview: Fix column view editing
* lisp/org-colview.el (org-columns-next-allowed-value): Fix error when
  trying to edit a column from a headline starting at the very beginning
  of the buffer.

This patch also prepares for lexical binding.

Reported-by: "T.F. Torrey" <tftorrey@tftorrey.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/104370>
2016-01-21 00:51:13 +01:00
Charles Berry 3142d139fa ob-R.el: Trim extraneous newline from results
* lisp/ob-R.el: org-babel-R-evaluate-external-process and
  org-babel-R-evaluate-session trim the extraneous newlines from the
  end of R output.

* testing/lisp/test-ob-R.el: test-ob-R/results-file tests that
  `:results file' yields one line enclosed in square brackets for a
  result like "abc/def.ghi".

Fixes issue noted by Andreas Leha
Subject: [babel] return file from R
Archived-At: <http://permalink.gmane.org/gmane.emacs.orgmode/103658>
2016-01-19 20:10:43 -08:00
Nicolas Goaziou 2e77161519 Remove unused code related to isearch
* lisp/org.el (org-mode): Remove compatibility cruft.
(org-isearch-end, org-isearch-post-command): Remove functions.
2016-01-18 23:13:11 +01:00
Nicolas Goaziou 0f8c6b0b2e Fix last commit
* lisp/org.el (org-do-latex-and-related): Extract face from the correct
  location.
2016-01-18 00:58:34 +01:00
Nicolas Goaziou 74bb33d464 Fix fontification of properties with an underscore
* lisp/org.el (org-do-latex-and-related): Prevent properties with an
  underscore from being fontified like a subscript.
2016-01-17 23:49:28 +01:00
Nicolas Goaziou 02c9dca64c Ignore repeaters in protected areas
* lisp/org.el (org-auto-repeat-maybe): Only consider repeaters in
  regular text, not within, e.g., example blocks.

Reported-by: Karl Voit <devnull@Karl-Voit.at>
<http://permalink.gmane.org/gmane.emacs.orgmode/104260>
2016-01-17 22:21:15 +01:00
Nicolas Goaziou 457e3298de `org-font-lock-extra-keywords' is dynamically scoped
Reported-by: mc <mc@aiguphonie.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/104265>
2016-01-17 21:59:23 +01:00
Nicolas Goaziou 791e52bfdd Merge branch 'maint' 2016-01-16 15:59:05 +01:00
Nicolas Goaziou ce80a0e727 Fix memory leak in `org-agenda-prepare-buffers'
* lisp/org.el (org-agenda-prepare-buffers): Do not use
  `org-uniquify-alist' since it uses `eq' for comparison, whereas where
  are using strings as keys.

Reported-by: Vincent Emanuele <vincent.emanuele@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/104196>
2016-01-16 15:56:03 +01:00
Alan Schmitt 4fe777fdae ox-latex: Add option support to custom environment
* lisp/ox-latex.el (org-latex-src-block): make the options from
  attr_latex available to the custom environment using %o.
2016-01-16 15:09:10 +01:00
Nicolas Goaziou 1c8ed102e9 Merge branch 'maint' 2016-01-16 14:53:48 +01:00
Nicolas Goaziou 6e57a371ff Fix tags looking like plain links
* lisp/org-element.el (org-element-context): Do not look for objects
  within TODO keyword, priority cookie, comment keyword or tags.
* lisp/org.el (org-activate-tags): Fix regexp.

* testing/lisp/test-org-element.el (test-org-element/context): Add test.

Reported-by: John Kitchin <jkitchin@andrew.cmu.edu>
2016-01-16 14:50:25 +01:00
Marco Wahl 164555b46e org: Fix declaration of variable `org-state'
* lisp/org.el: The declaration of `org-state' fixes function `org-todo'.

Without the declaration the progressing of todo-states fails in some
cases with "Debugger entered--Lisp error: (void-variable org-state)".

Cf. thread http://permalink.gmane.org/gmane.emacs.orgmode/104179.
2016-01-15 11:45:41 +01:00
Nicolas Goaziou cb744d0446 Merge branch 'maint' 2016-01-14 21:33:40 +01:00
Nicolas Goaziou 671ed99d23 org-table: Fix editing multiple TBLFM lines
* lisp/org-table.el (org-table-store-formulas):
(org-table-get-stored-formulas): Add an optional argument to handle
subsequent TBLFM lines.
(org-table--fedit-source): New variable.
(org-table-edit-formulas):
(org-table-fedit-finish): Handle additional TBLFM lines.

Reported-by: Nick Dokos <ndokos@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/104158>
2016-01-14 21:27:14 +01:00
Nicolas Goaziou a8f278fedf org-table: Fix a comment
* lisp/org-table.el (org-table-end): Fix a comment.
2016-01-14 21:27:14 +01:00
Nicolas Goaziou 5a4e8d2239 org-table: Fix infloop in `org-table-current-field-formula'
* lisp/org-table.el (org-table-current-field-formula): Fix infloop when
  called from outside the table, e.g., on a TBLFM line.
2016-01-14 21:27:14 +01:00
Nicolas Goaziou e79e437c32 org-table: Fix `org-table-current-field-formula'
* lisp/org-table.el (org-table-current-field-formula): Column formulas
  are stored with a leading dollar sign.  Also raise an error when no
  field applies, unless NOERROR is non-nil.

* lisp/org-table.el (org-table-eval-formula): Remove unnecessary error.
2016-01-14 21:26:04 +01:00
Nicolas Goaziou 4e913b1c62 org-table: Fix formula editor
* lisp/org-table.el (org-table-edit-formulas):
(org-table-fedit-finish): Do not remove "$" from column formulas when
exiting the editor.
2016-01-14 11:57:09 +01:00
Nicolas Goaziou d85ff34086 Merge branch 'maint' 2016-01-14 09:41:22 +01:00
Nicolas Goaziou 7d0104f449 org-element: Fix footnote definition parsing
* lisp/org-element.el (org-element--footnote-separator): New variable.
(org-element-footnote-definition-parser): Handle footnotes with
affiliated keywords.

* testing/lisp/test-org-element.el (test-org-element/footnote-definition-parser):
Add test.
2016-01-14 09:40:43 +01:00
Nicolas Goaziou 2520fd654a Test `org-map-entries'
* lisp/org.el (org-make-tags-matcher): Small refactoring.
* testing/lisp/test-org.el (test-org/map-entries): New test.
2016-01-13 17:03:46 +01:00
Nicolas Goaziou 23f31a9b6b Silence byte-compiler
* lisp/org-datetree.el (org-datetree-find-date-create):
(org-datetree-find-iso-week-create):
(org-datetree-file-entry-under):
* lisp/org.el (calendar-check-holidays):
(org-version):
(org--setup-process-tags):
(org-assign-fast-keys):
(org-cycle-level):
(org-clone-subtree-with-time-shift):
(orgstruct++-mode):
(orgstruct-setup):
(org-contextualize-keys):
(org-insert-all-links):
(org-offer-links-in-entry):
(org-agenda-buffer-tmp-name):
(org-agenda-start-on-weekday):
(org-get-outline-path):
(org-format-outline-path):
(org-todo-yesterday):
(org-auto-repeat-maybe):
(org-add-planning-info):
(org-sparse-tree):
(org-show-set-visibility):
(org-tags-expand):
(org-change-tag-in-region):
(org-fast-tag-selection):
(org-agenda-skip-comment-trees):
(org-agenda-skip-function):
(org-property-action):
(org-set-effort):
(org-delete-property-globally):
(org-read-date-analyze):
(org-re-timestamp):
(org-calendar-holiday):
(org-duration-string-to-minutes):
(org-cdlatex-environment-indent):
(org-format-latex):
(org-create-formula-image):
(org-create-formula-image-with-dvipng):
(org-create-formula-image-with-imagemagick):
(org-edit-special):
(org-ctrl-c-ctrl-c):
(org-get-at-eol):
(org-mark-subtree):
(org--get-expected-indentation):
(org-indent-line):
(org-indent-region):
(org-adaptive-fill-function):
(org-fill-paragraph):
(org-next-block):
(org-forward-paragraph):
(org-imenu-get-tree):
(org--flyspell-object-check-p):
(org-mode-flyspell-verify): Silence byte-compiler.
2016-01-13 11:43:54 +01:00
Kyle Meyer 3365ad596d Merge branch 'maint' 2016-01-13 00:50:50 -05:00
Kyle Meyer 6c6b94e274 org-directory: Update docstring
* lisp/org.el (org-directory): Fix docstring description of where this
  variable is used.
2016-01-13 00:49:12 -05:00
Kyle Meyer 4eccbce9dc org-bibtex: Fix type error in non-file buffers
* lisp/org-bibtex.el (org-bibtex): Fix type error in cases where the
  buffer is not visiting a file.  In an indirect buffer, use the file
  name for the base buffer.
2016-01-13 00:18:42 -05:00
Kyle Meyer abb9a0f88a org-bibtex: Mark filename argument as required
* lisp/org-bibtex.el (org-bibtex): Mark FILENAME argument as required
  because, when called from Lisp, the function does not provide a
  default file name when FILENAME is nil, leading to a type error.
2016-01-13 00:16:07 -05:00
Nicolas Goaziou 8ddc7314b8 Store notes outside drawers at a correct location
* lisp/org.el (org-log-beginning): Move to an appropriate location even
  when `org-log-state-notes-insert-after-drawers' is nil and notes are
  not stored within a drawer.

Reported-by: swflint@flintfam.org (Samuel W. Flint)
<http://permalink.gmane.org/gmane.emacs.orgmode/104107>
2016-01-12 21:28:32 +01:00
Nicolas Goaziou b78a9badcd Merge branch 'maint' 2016-01-12 00:27:57 +01:00
Fernando Varesi 47c92146a9 org-clock.el: Fix column count for :formula %
* lisp/org-clock.el (org-clocktable-write-default): Count properties
columns when using special :formula %

The previous count did not consider properties columns, so the generated
formula was incorrect.
2016-01-12 00:27:27 +01:00
Nicolas Goaziou a971366910 org-capture: Fix interactive template placeholders
* lisp/org-capture.el (org-capture-fill-template): Allow spaces in
  interactive placeholders.

Reported-by: Charles Millar <millarc@verizon.net>
<http://permalink.gmane.org/gmane.emacs.orgmode/104113>
2016-01-11 23:51:54 +01:00
Marco Wahl a1b1eaf3b4 Merge branch 'maint' 2016-01-11 22:59:22 +01:00
Marco Wahl 93fe1072f6 org-agenda: Fix filter for org-habits in agenda
* lisp/org-agenda.el (org-agenda-filter-apply): Get text at bol instead
  of eol.  Note that eol can be overwritten by org-habits.
2016-01-11 22:54:09 +01:00
Nicolas Goaziou 9db78611b4 Tweak `org-auto-repeat-maybe'
* lisp/org.el (org-auto-repeat-maybe): Only clear non-repeated SCHEDULED
  information in a repeated task.

* doc/org.texi (Repeated tasks): Document behavior.

Do not clear non-repeated DEADLINE information however, as it could be
a global deadline for all occurrences of the task.  Also, this case is
taken care of by `org-agenda-skip-scheduled-if-deadline-is-shown' with
a value set to `repeated-after-deadline'.
2016-01-11 12:11:22 +01:00
Nicolas Goaziou 157f91c31c Fix `org-auto-repeat-maybe'
* lisp/org.el (org-auto-repeat-maybe): Do not remove SCHEDULED time
  stamp when encountering a time stamp without a repeater.  Also, ensure
  "REPEAT_TO_STATE" property can be inherited.  Small refactoring.

Reported-by: "Bradley M. Kuhn" <bkuhn@ebb.org>
<http://permalink.gmane.org/gmane.emacs.orgmode/104103>
2016-01-11 00:58:53 +01:00
Nicolas Goaziou e2e5fc2f58 Tiny fixes to docstrings
* lisp/org.el (org-execute-file-search-functions):
(org-after-todo-statistics-hook):
(org-sparse-tree): Fix docstrings.
2016-01-11 00:00:25 +01:00
Nicolas Goaziou ef01789804 org.el: Use dolist' instead of mapc' + `lambda'
* lisp/org.el (org-babel-do-load-languages):
(org-load-modules-maybe):
(org-mode-transpose-word-syntax-table):
(org-cycle-internal-local):
(org-remove-empty-overlays-at):
(org-reinstall-markers-in-region):
(orgstruct++-mode):
(orgstruct++-mode):
(org-offer-links-in-entry):
(org-refile-cache-clear):
(org-revert-all-org-buffers):
(org-ctrl-c-ctrl-c):
(org-in-block-p):
(org-uniquify-alist):
(org-unindent-buffer):
(org-imenu-get-tree): Use `dolist' instead of `mapc' + `lambda'.

(org-show-block-all):
(org-remove-occur-highlights):
(org-remove-inline-images):
(org-speed-command-help):
(org-require-autoloaded-modules): Use #'fun instead of 'fun for clarity.
2016-01-10 21:16:29 +01:00
Nicolas Goaziou 1f49e9fdfd org.el: Switch to lexical binding
* lisp/org.el (org-version):
(org-extract-log-state-settings):
(org-before-change-function):
(org-mode):
(org-emphasize):
(org-fontify-meta-lines-and-blocks-1):
(org-update-radio-target-regexp):
(org-unfontify-region):
(org-set-visibility-according-to-property):
(org-set-outline-overlay-data):
(org-goto-ret):
(org-insert-heading):
(org-contextualize-validate-key):
(org--links-history):
(org-insert-link):
(ido-enter-matching-directory):
(org-offer-links-in-entry):
(org-link-search):
(org-open-file):
(org-refile):
(org-add-log-note):
(org-occur-next-match):
(org-remove-occur-highlights):
(org-priority):
(org-tags-completion-function):
(org-map-entries):
(org-entry-properties):
(org-buffer-property-keys):
(org-property-values):
(org-property-previous-allowed-value):
(org-find-olp):
(calendar-setup):
(org-read-date):
(org-read-date-analyze):
(org-check-before-date):
(org-check-after-date):
(org-calendar-holiday):
(org-diary-sexp-entry):
(org-closest-date):
(org-date-to-gregorian):
(org-recenter-calendar):
(org-agenda-prepare-buffers):
(org-cdlatex-underscore-caret):
(org-cdlatex-math-modify):
(org-create-math-formula):
(org-display-inline-remove-overlay):
(org-shiftmetaup):
(org-shiftmetadown):
(org-metaleft):
(org-metaright):
(org-metaup):
(org-metadown):
(org-in-src-block-p):
(org-replace-escapes):
(org-indent-region):
(org-comment-dwim):
(org-drag-line-forward): Silence byte-compiler
2016-01-10 21:16:29 +01:00
Nicolas Goaziou a02a83793b Make `org-make-tags-matcher' lexical binding friendly
* lisp/org.el (org-make-tags-matcher): Return a function instead of
  a sexp.  Refactor code.
(org--matcher-tags-todo-only): New variable.  Replace `todo-only'
dynamic binding.
(org-scan-tags): Apply changes to `org-make-tags-matcher'.
(org-match-sparse-tree):
(org-map-entries): Use new variable.

* lisp/org-crypt.el (org-encrypt-entries):
(org-decrypt-entries): Use new variable.

* lisp/org-clock.el (org-clock-get-table-data): Apply changes to
  `org-make-tags-matcher'.

* lisp/org-agenda.el (org-tags-view): Use new variable.
2016-01-10 21:16:29 +01:00
Nicolas Goaziou fdbf441560 Obsolete org-icompleting-read' and org-completing-read-no-i'
* lisp/org.el (org-icompleting-read, org-completing-read-no-i): Obsolete
  aliases for `completing-read'
(org-iswitchb-completing-read): Remove function.
(org-sort-entries):
(org-refile-get-location):
(org-todo):
(org-deadline):
(org-occur-parameters):
(org-change-tag-in-region):
(org-fast-tag-selection):
(org-delete-property-globally):
(org-compute-property-at-point):
(org-buffer-list): Use genuine function.

* contrib/lisp/org-colview-xemacs.el (org-columns-edit-value):
(org-columns-new):
(org-insert-columns-dblock):
* contrib/lisp/org-index.el (org-index):
* contrib/lisp/ox-bibtex.el (org-bibtex-goto-citation):
* lisp/ob-core.el (org-babel-insert-header-arg):
(org-babel-goto-named-src-block):
(org-babel-goto-named-result):
(org-babel-demarcate-block):
* lisp/org-agenda.el (org-todo-list):
(org-agenda-filter-by-tag):
(org-agenda-bulk-action):
* lisp/org-attach.el (org-attach-delete-one):
(org-attach-open):
* lisp/org-bibtex.el (org-bibtex-fleshout):
(org-bibtex-create):
* lisp/org-capture.el (org-capture-fill-template):
* lisp/org-colview.el (org-columns-edit-value):
(org-columns-new):
(org-insert-columns-dblock):
* lisp/org-footnote.el (org-footnote-new):
* lisp/org-list.el (org-sort-list):
* lisp/ox-publish.el (org-publish):
* lisp/ox.el (org-export-dispatch): Use genuine function.
2016-01-10 21:16:29 +01:00
Kyle Meyer 5964b711f9 Update copyright years for master-only files 2016-01-10 12:07:40 -05:00
Kyle Meyer 6345de2d05 Merge branch 'maint' 2016-01-09 17:43:27 -05:00
Kyle Meyer 6bc48c5f41 Update copyright years 2016-01-09 17:12:03 -05:00
Nicolas Goaziou e0d3944985 Fix escaping in capture, part 2
* lisp/org-capture.el (org-capture-fill-template):
* lisp/org-feed.el (org-feed-format-entry): Fix wrong argument in
  `replace-regexp-in-string'.
2016-01-09 17:04:26 +01:00
Bastien 0468ca8529 Merge branch 'maint' 2016-01-09 08:15:46 +01:00
Bastien 7821d0b2d3 Fix copyright headers. 2016-01-09 08:15:24 +01:00
Nicolas Goaziou 42cf4cce52 org-feed: Switch to lexical binding
* lisp/org-feed.el (org-feed-update):
(org-feed-write-status): Silence byte-compiler.
2016-01-08 23:40:24 +01:00
Nicolas Goaziou e2fbaeedc1 Fix handling escaped placeholders in templates
* lisp/org-capture.el (org-capture-fill-template):
* lisp/org-feed.el (org-feed-format-entry): Fix handling escaped
  placeholders in templates.  In particular, do not rely on match data
  when `org-capture-escaped-%' is used.

Reported-by: Michael Brand <michael.ch.brand@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/104081>
2016-01-08 23:36:22 +01:00
Nicolas Goaziou da10c6ace6 Fix copyright years 2016-01-07 23:39:50 +01:00
Nicolas Goaziou 528a2741a4 org-feed: Silence byte-compiler 2016-01-07 23:38:20 +01:00
Nicolas Goaziou 910418282a Resurrect `org-log-note-marker'
* lisp/org.el (org-log-note-buffer): Remove variable.
(org-log-note-marker): New variable.
(org-log-note-effective-time): Fix docstring.
(org-add-log-setup):
(org-add-log-note):
(org-store-log-note): Use new variable.

Unlike to previous variable, this one stores the location of the entry
where the note is going to be inserted, not necessarily the location of
the note, which is computed later.
2016-01-07 23:33:27 +01:00
Nicolas Goaziou f56caace8a Fix `org-log-beginning'
* lisp/org.el (org-log-beginning): Properly locate notes when no drawer
  is used.
(org-store-log-note): Function above already moves point to the correct
location.
2016-01-07 23:13:37 +01:00
Nicolas Goaziou 1124b2fc2a org-feed: Fix `org-feed-format-entry'
* lisp/org-feed.el (org-feed-format-entry): Fix function according to
  recent changes to Org Capture library.  Small refactoring.

Reported-by: Michael Brand <michael.ch.brand@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/103941>
2016-01-07 17:32:24 +01:00
Nicolas Goaziou aa52550e4b org-capture: Fix sexp handling
* lisp/org-capture.el (org-capture-expand-embedded-elisp): Do not mark
  invalid sexp.  Renamed from `org-capture--expand-embedded-elisp'.
(org-capture-fill-template): Escape " characters for placeholders
located within sexp.  Small refactoring.
(org-capture-inside-embedded-elisp-p): Rewrite function.
2016-01-07 17:30:54 +01:00
Stefan-W. Hahn a902c830e7 Name org-tree indirect buffer just with title
* lisp/org.el (org-tree-to-indirect-buffer): Remove tags from name.

Just use org-tree title for naming an indirect org-tree buffer.  If tags
are appended the name clutters mode-line.

TINYCHANGE

Signed-off-by: Stefan-W. Hahn <stefan.hahn@s-hahn.de>
2016-01-06 22:59:54 +01:00
Nicolas Goaziou aab46486f7 Fix removal of shared drawers between clocks and notes
* lisp/org.el (org-log-note-marker): Remove variable.
(org-log-note-buffer): New variable.
(org-add-log-setup): Remove one argument.  Also use new variable.
(org-refile):
(org-todo):
(org-auto-repeat-maybe):
(org-deadline):
(org-schedule):
(org-add-note): Apply argument removal.
(org-store-log-note): Use new variable.  Compute the insertion's location
at the time the note is really inserted in the buffer.

* lisp/org-clock.el (org-clock-out): Apply argument removal.  Remove hack
  around shared drawers.

Reported-by: Olli P <kotkis@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/103958>
2016-01-06 15:50:50 +01:00
Nicolas Goaziou c6ec704dce org-clock: Fix missing clock history
* lisp/org-clock.el (org-clock-stored-history): New variable.
(org-clock-save):
(org-clock-load): Use new variable.

Reported-by: Matt Lundin <mdl@imapmail.org>
<http://permalink.gmane.org/gmane.emacs.orgmode/103972>
2016-01-06 15:07:47 +01:00
Nicolas Goaziou 5792667bde Merge branch 'maint' 2016-01-06 14:51:04 +01:00
Nicolas Goaziou 005f8b2fd1 Add missing argument
* lisp/org.el (org-set-property): Add missing argument.
2016-01-06 14:50:37 +01:00
Nicolas Goaziou 93c52908b6 Merge branch 'maint' 2016-01-06 14:46:36 +01:00
Nicolas Goaziou 22cf1bf7ed Throw an error when trying to set invalid properties
* lisp/org.el (org--valid-property-p): New function.
(org-entry-put):
(org-set-property): Use new function.

Suggested-by: Julien Cubizolles <j.cubizolles@free.fr>
<http://permalink.gmane.org/gmane.emacs.orgmode/104044>
2016-01-06 14:45:52 +01:00
Nicolas Goaziou 8e273a3d32 org-capture: Fix code typo
* lisp/org-capture.el (org-capture-fill-template): Fix `pcase'.
2016-01-05 23:59:05 +01:00
Nicolas Goaziou b5515ace2f org-capture: Fix %^T capture place-holders with end-time
Reported-by: Charles Millar <millarc@verizon.net>
<http://permalink.gmane.org/gmane.emacs.orgmode/103981>
2016-01-05 23:30:01 +01:00
Nicolas Goaziou aa3917ad47 Merge branch 'maint' 2016-01-03 20:49:18 +01:00
Nicolas Goaziou 3d4c467673 org-clock: Improve docstring
* lisp/org-clock.el (org-clock-display): Point to
  `org-clock-display-default-range'.

Reported-by: David Bremner <david@tethera.net>
<http://permalink.gmane.org/gmane.emacs.orgmode/103938>
2016-01-03 20:48:14 +01:00
Nicolas Goaziou 4b7b201c77 Merge branch 'maint' 2016-01-02 17:40:41 +01:00
Nicolas Goaziou a03175d6d9 ob-tangle: Silence byte-compiler 2016-01-02 17:40:22 +01:00
Nicolas Goaziou 5e63baf92e Merge branch 'maint' 2016-01-02 17:06:53 +01:00
Nicolas Goaziou 59f00529d4 Update copyright years 2016-01-02 17:06:30 +01:00
Nicolas Goaziou e2ac979d9e ob-tangle: Fix commented links
* lisp/ob-tangle.el (org-babel-spec-to-string):
(org-babel-tangle-collect-blocks): Fix numbering and relative path of
commented links.

* testing/lisp/test-ob-tangle.el (ob-tangle/comment-links-numbering):
  New test.

Reported-by: Tobias Müller <mllertobias@gmx.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/103861>
2016-01-02 17:05:00 +01:00
Nicolas Goaziou 8bc5d40264 Fix `org-toggle-heading'
* lisp/org.el (org-toggle-heading): Ensure partial list conversion to
  headlines do not get broken by missing newline characters.
2016-01-02 14:25:58 +01:00
Nicolas Goaziou ad4d4227f0 Merge branch 'maint' 2016-01-02 14:13:41 +01:00
Nicolas Goaziou 57b3a0f02b org-indent: Update coyright years 2016-01-02 14:12:24 +01:00
Nicolas Goaziou 4313417515 Merge branch 'maint' 2016-01-02 14:11:48 +01:00
Nicolas Goaziou 6da1d9fc32 org-indent: Fix refresh when using `org-toggle-heading'
* lisp/org-indent.el (org-indent-notify-modified-headline):
(org-indent-refresh-maybe): Ignore narrowing.  Also ignore inlinetasks.

Reported-by: Ingo Lohmar <i.lohmar@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/103919>
2016-01-02 14:10:49 +01:00
Nicolas Goaziou 3694450320 Fix copyright years 2016-01-02 13:36:44 +01:00
Nicolas Goaziou ad83f31318 org-pcomplete: Fix keyword and block completion
* lisp/org-pcomplete.el (pcomplete/org-mode/file-option): Apply removal
  of `org-element-block-name-alist'.
2016-01-02 13:35:58 +01:00
Nicolas Goaziou 7dc6748452 Fix export blocks
* lisp/org-element.el (org-element-export-block-parser): Type is always
  stored in capitals.

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

Reported-by: Suvayu Ali <fatkasuvayu+linux@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/103921>
2016-01-02 11:53:24 +01:00
Nicolas Goaziou 51194312e4 Merge branch 'maint' 2015-12-31 00:29:52 +01:00
aman 0c14fa6499 org-publish: Fix get `included-file' logic
* lisp/ox-publish.el (org-publish-cache-file-needs-publishing):
  According to the syntax of #+INCLUDE statement in *info* page,
  there's no space between search option and file path.

TINYCHANGE
2015-12-31 00:27:51 +01:00
Nicolas Goaziou 800ce62ad2 org-pcomplete: Silence byte-compiler 2015-12-29 22:52:30 +01:00
Nicolas Goaziou a67649830f org-datetree: Use lexical binding
* lisp/org-datetree.el (org-datetree-find-iso-week-create): Silence
  byte-compiler.
(org-datetree-cleanup): Small refactoring.
2015-12-29 22:45:19 +01:00
Nicolas Goaziou bc0588fee4 Fix code typo
* lisp/org-datetree.el (org-datetree-find-iso-week-create): Use
  `setq-local' instead of `org-set-local'.
2015-12-29 22:29:55 +01:00
Rüdiger Sonderfeld 3e252a4dea org-capture.el: Add support for week trees
* lisp/org-capture.el (org-capture-templates): Add
  file+weektree(+prompt) options.
  (org-capture-set-target-location): Add support for week trees.
* doc/org.texi (Template elements): Document file+weektree(+prompt)
  options.
2015-12-29 21:57:58 +01:00
Rüdiger Sonderfeld 316bc89c02 org-datetree.el: Add support for ISO week trees
* lisp/org-datetree.el (org-datetree-find-iso-date-create): New function.
(org-datetree--find-create): Support fixed text for insert.
(org-datetree-insert-line): Support fixed text for insert.
* testing/lisp/test-org-datetree.el (test-org-datetree/find-iso-date-create):
New test.

ISO week trees order dates by week and not by month.
2015-12-29 21:57:54 +01:00
Rüdiger Sonderfeld 9c382e6cf6 org-datetree.el: Code cleanup
* lisp/org-datetree.el (org-datetree--find-create): New function.
(org-datetree-find-year-create, org-datetree-find-month-create,
org-datetree-find-day-create): Removed functions
(org-datetree-find-date-create): Use `org-datetree--find-create' instead
of removed functions.  Use calendar extract functions.
(org-datetree-insert-line): Do more formatting in `format-time-string'
since we call it anyway
* testing/lisp/test-org-datetree.el (test-org-datetree/find-date-create):
  Test if new entries are put at the right place.
2015-12-29 21:57:50 +01:00
Alexey Lebedeff aca68e64bc Fix property name completion
* lisp/org-pcomplete.el (pcomplete/org-mode/prop): Add
  `ignore-malformed' argument in call to `org-buffer-property-keys'

* lisp/org.el (org-buffer-property-keys): Add support for new argument
  `ignore-malformed'.

* testing/lisp/test-org-pcomplete.el: Add new file for testing
  `pcomplete' integration.

* testing/lisp/test-org.el (test-org/buffer-property-keys): Test
  behaviour of `org-buffer-property-keys' with new `ignore-malformed'
  argument.

When property name completion is being performed, it means that we are
inside malformed property drawer that will become valid only after
successful completion. In this case in makes no sense to perform
interactive drawer repair.
2015-12-29 21:53:56 +01:00
Nicolas Goaziou 05973be297 org-footnote: Fix typo
* lisp/org-footnote.el (org-footnote--collect-references): Fix typo in
  docstring.
2015-12-29 21:38:57 +01:00
Nicolas Goaziou d210a8a578 org-footnote: Silence byte-compiler
* lisp/org-footnote.el (org-footnote-in-valid-context-p):
(org-footnote-at-definition-p): Remove last remnants of Org footnotes
relationship with foreign modes.

(org-footnote-unique-label):
(org-footnote-delete-references):
(org-footnote-delete-definitions):
(org-footnote-renumber-fn:N):
(org-footnote-normalize): Silence byte-compiler.
2015-12-29 21:36:30 +01:00
Nicolas Goaziou 02443b34b3 Fix code typo
* lisp/org.el (org-store-link-props): Fix code typo.
2015-12-29 21:28:21 +01:00
Jan Malakhovski d1f42e7f32 Factor out date-timestamp* calculations to org-store-link-props
* lisp/org.el (org-store-link-props): Rewrite function to get
  date-timestamp* calculations.
* lisp/org-gnus.el:
* lisp/org-mhe.el:
* lisp/org-rmail.el:
* contrib/lisp/org-mew.el:
* contrib/lisp/org-vm.el:
* contrib/lisp/org-wl.el: Remove date-timestamp* copy-paste.
* doc/org.texi: Fix `org-capture-templates' documentation.
2015-12-29 21:17:00 +01:00
Jan Malakhovski b82d1a47cf ob-calc: Don't leave garbage on the stack
* lisp/ob-calc.el (org-babel-calc-eval-string): Clean up the stack after
  expression evaluation.
2015-12-29 21:09:32 +01:00
Jan Malakhovski 913741876e org-clock: Fix a typo
* lisp/org-clock.el (org-clock-get-table-data): Fix a typo in docstring.
2015-12-29 21:09:29 +01:00
Sacha Chua 955bc57ded ob-sql: Don't print out the command
* lisp/ob-sql.el (org-babel-execute:sql): Don't print out the command
  in the echo area, since it could be very long.
2015-12-26 14:28:49 +01:00
Kyle Meyer 18aa8d1abc Merge branch 'maint' 2015-12-24 01:51:55 -05:00
Kyle Meyer 6d0af59744 org-agenda: Don't kill or bury non-agenda buffer
* lisp/org-agenda.el (org-agenda--quit): Fix changes introduced by
  9b1c682 and 8594aed that incorrectly assume that the agenda buffer is
  always the current buffer at the time of killing or burying.

Reported-by: David Mann <manndmd@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/103791>
2015-12-24 01:50:31 -05:00
Nicolas Goaziou 6de8c94d8d org-footnote: Remove code for footnotes outside Org documents
* lisp/org-footnote.el (org-footnote-tag-for-non-org-mode-files): Remove
  variable.
(org-footnote-create-definition): Remove code for footnotes outside Org
documents. Small refactoring.
2015-12-22 16:55:17 +01:00
Nicolas Goaziou f229ee8e34 org-footnote: Fix references collection
* lisp/org-footnote.el (org-footnote--collect-references): Include
  inline references at the beginning of the line, which are allowed,
  unlike regular references.
2015-12-22 16:55:17 +01:00
Nicolas Goaziou 8eb318f2d0 org-footnote: Update library wrt new footnote syntax
* lisp/org-footnote.el (org-footnote-re):
(org-footnote-definition-re): Do not match [1]-like constructs.

(org-footnote): Fix typo.

(org-footnote-auto-label): Do not offer to create [1]-like constructs
anymore.

(org-footnote-new): Remove reference to obsolete value in
`org-footnote-auto-label'.

(org-footnote-at-reference-p):
(org-footnote-get-next-reference):
(org-footnote-next-reference-or-definition):
(org-footnote-goto-definition):
(org-footnote-goto-previous-reference): Use new regexp.

(org-footnote-normalize-label): Remove "fn:" prefix instead of adding
it.

(org-footnote-get-definition):
(org-footnote-all-labels):
(org-footnote-unique-label): Small refactoring.

(org-footnote-create-definition):
(org-footnote-delete-definitions):

(org-footnote--clear-footnote-section):
(org-footnote--collect-references):
(org-footnote--collect-definitions):
(org-footnote--set-label):
(org-footnote-sort): New functions.

(org-footnote-auto-adjust-maybe):
(org-footnote-action): Use new functions.  Small refactoring.

(org-footnote-renumber-fn:N): Refactor code.  Handle nested footnotes.

(org-footnote-normalize): Turn footnotes into [fn:N] construct instead
of [N].
* testing/lisp/test-org-footnote.el (test-org-footnote/delete):

(test-org-footnote/goto-definition):
(test-org-footnote/normalize): Update test

(test-org-footnote/sort):
(test-org-footnote/renumber-fn:N): New tests.

(test-org-footnote/normalize-outside-org): Remove test.
2015-12-22 16:55:17 +01:00
Nicolas Goaziou deafe56554 org-element: Ignore plain footnotes
* lisp/org-element.el (org-element--set-regexps):
(org-element-footnote-definition-interpreter):
(org-element-footnote-reference-parser):
(org-element-footnote-reference-interpreter): Do not consider [1]-like
constructs as footnotes anymore.

* lisp/ox.el (org-export-expand-include-keyword):
(org-export--prepare-file-contents): Apply changes to footnotes.

* doc/org.texi (Footnotes): Remove references to plain footnotes.

* testing/lisp/test-org-element.el (test-org-element/footnote-reference-parser):
(test-org-element/footnote-reference-interpreter):
* testing/lisp/test-ox.el (test-org-export/expand-include):
(test-org-export/expand-macro):
(test-org-export/get-footnote-number):
(test-org-export/collect-footnote-definitions):
(test-org-export/footnotes):
(test-org-export/fuzzy-link): Update tests.

Since it is possible to refer unambiguously to a label without the "fn:"
prefix, the latter becomes part of the syntax and no longer part of the
label.  In particular [fn:1] and [fn:label] are labelled, respectively,
"1" and "label".
2015-12-22 16:55:17 +01:00
Sacha Chua 25eb14bc2c org-protocol: Allow key=val&key2=val2-style URLs
* lisp/org-protocol.el: Update documentation.
  (org-protocol-store-link, org-protocol-capture,
  org-protocol-open-source): Accept new-style links.
  (org-protocol-check-filename-for-protocol): Update documentation.
  (org-protocol-parse-parameters, org-protocol-assign-parameters):
  New functions.

  This allows the use of org-protocol on KDE 5 and makes org-protocol
  links more URI-like.  New-style links are of the form:
  org-protocol://store-link?title=TITLE&url=URL

* testing/lisp/test-org-protocol.el: New file.
2015-12-22 13:41:45 +01:00
Alan Schmitt 5aa12cd122 ob-ocaml.el: Keep echo to display ocaml errors
* ob-ocaml.el (org-babel-execute:ocaml): call
`org-babel-comint-with-output' with nil `remove-echo' argument.
2015-12-21 09:05:19 +01:00
Nicolas Goaziou 35bc1c8853 org-clock: Use lexical binding
* lisp/org-clock.el (org-clock-save-markers-for-cut-and-paste):
(org-clock-select-task):
(org-clock-out):
(org-clock-load): Use `dolist' instead of `mapc' + `lambda'.

(org-clock-insert-selection-line):
(org-resolve-clocks-if-idle):
(org-clock-find-position):
(org-clock-remove-overlays):
(org-dblock-write:clocktable):
(org-clocktable-steps):
(org-clock-get-table-data): Silence byte-compiler.
2015-12-20 23:04:48 +01:00
Nicolas Goaziou f090a2ae87 org-bibtex: Use lexical binding
* lisp/org-bibtex.el (org-bibtex-headline):
(org-bibtex): Silence byte-compiler.

(org-bibtex-create):
(org-bibtex-write): Use `dolist' instead of `mapc' + `lambda'.
2015-12-20 22:48:05 +01:00
Nicolas Goaziou 0e49899178 org-bbdb: Use lexical binding
* lisp/org-bbdb.el (org-bbdb-store-link):
(org-bbdb-open):
(org-bbdb-updated):
(org-bbdb-date-list): Silence byte-compiler.
2015-12-20 22:39:28 +01:00
Nicolas Goaziou 7875c3c498 org-docview: Use lexical binding
* lisp/org-docview.el (org-docview-store-link): Silence byte-compiler.
2015-12-20 22:15:41 +01:00
Nicolas Goaziou e82f48a8eb org-lint: Add checkers
* lisp/org-lint.el (org-lint-deprecated-export-blocks):
(org-lint-missing-backend-in-export-block):
(org-lint-obsolete-include-markup): New checkers.
2015-12-20 21:56:27 +01:00
Nicolas Goaziou 54318add34 Change export block syntax
* lisp/org-element.el (org-element-export-block-parser):
(org-element--current-element): Use new syntax for export blocks.
(org-element-block-name-alist): Remove.

* lisp/ox.el (org-export-register-backend):
(org-export-define-derived-backend): Remove :export-block keyword from
back-end's definition.
(org-export-expand-include-keyword): Use new syntax for include
keywords.

* lisp/ox-ascii.el (ascii):
* lisp/ox-beamer.el (beamer):
* lisp/ox-html.el (html):
* lisp/ox-latex.el (latex):
(org-latex-prefer-user-labels):
* lisp/ox-man.el (man):
* lisp/ox-md.el (md):
* lisp/ox-odt.el (odt):
* lisp/ox-texinfo.el (texinfo): Propagate changes to "ox.el".

* lisp/ob-core.el (org-babel-insert-result):
* lisp/ob-haskell.el (org-babel-haskell-export-to-lhs): Use new syntax.

* lisp/org.el (org-structure-template-alist): Use new syntax.
(org-protecting-blocks): Add "export" to protected blocks.  Remove
  back-ends blocks, which are now special blocks.
(org-fontify-meta-lines-and-blocks-1): Fontify correctly new blocks.

* lisp/org-footnote.el (org-footnote-forbidden-blocks):
* lisp/org-list.el (org-list-forbidden-blocks): Add "export" to
  forbidden blocks.  Remove back-ends blocks, which are now special
  blocks.

* contrib/lisp/ox-extra.el: Update comments.

* testing/lisp/test-org-element.el (test-org-element/export-block-parser):
(test-org-element/export-block-interpreter):
* testing/lisp/test-ob.el (test-ob/org-babel-remove-result--results-html):
(test-ob/org-babel-remove-result--results-latex):
* testing/lisp/test-ox.el (test-org-export/expand-include): Update tests.

Export blocks are explicitly marked as such at the syntax level to
disambiguate their parsing from special blocks.  The new syntax is

  #+BEGIN_EXPORT backend
  ...
  #+END_EXPORT

instead of

  #+BEGIN_backend
  ...
  #+END_backend

As a consequence, =INCLUDE= keywords syntax is modified, e.g.,

  #+INCLUDE: "file.org" HTML

becomes

  #+INCLUDE: "file.org" export html
2015-12-20 21:56:27 +01:00
Nicolas Goaziou 8c2e232b00 ob-sql: Fix `case' calls
* lisp/ob-sql.el (org-babel-execute:sql): Replace erroneous `case' call
  with `pcase'.  Small refactoring.  Keep lines within 80 characters.
2015-12-20 16:57:07 +01:00
Peter Feigl cf8bfc178d ob-sql.el: Add support for Oracle via sqlplus
* lisp/ob-sql.el: Add a database type 'oracle that uses sqlplus to
support running SQL blocks against an Oracle database.

Use with properties like this (all mandatory):
 :engine oracle :dbhost <host.com> :dbport <1521> :dbuser <username>
 :database <database> :dbpassword <secret>

TINYCHANGE
2015-12-20 16:54:21 +01:00
Thomas Alexander Gerds 73803c1cf9 org-gnus.el: change nnir group reference
* lisp/org-gnus.el (org-gnus-store-link): Articles in an nnir group
  refer to the original group.

TINYCHANGE
2015-12-18 22:42:32 +01:00
Nicolas Goaziou babcfaa4eb Merge branch 'maint' 2015-12-18 22:32:26 +01:00
Nicolas Goaziou 713fe873b7 org-table: Fix "$<" constructs in formulas
* lisp/org-table.el (org-table-recalculate): Expand "$<" without
  returning an error.  Small refactoring.

* testing/lisp/test-org-table.el (test-org-table/first-rc): New test.

Reported-by: Stefan Nobis <stefan-ml@snobis.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/103693>
2015-12-18 22:30:41 +01:00
Nicolas Goaziou 077fe86ad7 ob-latex: Properly declare :imagemagick header argument
* lisp/ob-latex.el (org-babel-header-args:latex): Declare :imagemagick.

Reported-by: Andreas Leha <andreas.leha@med.uni-goettingen.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/103654>
2015-12-17 15:34:33 +01:00
Nicolas Goaziou 0bdf4cedc5 Merge branch 'maint' 2015-12-15 00:03:57 +01:00
Thierry Banel cfb82b7c62 org-table: Fix missing dollar bug revealed by commit 16c7594
* org-table.el (orgtbl-ascii-plot): Add missing dollar in formula.
2015-12-14 23:55:17 +01:00
Nicolas Goaziou d01ed5b89b ox-html: Remove spurious # in some links
* lisp/ox-html.el (org-html-link): Remove spurious # introduced in
  8594aed.

Reported-by: Alan Schmitt <alan.schmitt@polytechnique.org>
<http://permalink.gmane.org/gmane.emacs.orgmode/103599>
2015-12-14 23:52:11 +01:00
Kyle Meyer f57778090e Update for change in letrec behavior
* lisp/ox-latex.el (org-latex--delayed-footnotes-definitions):
* lisp/ox.el (org-export--selected-trees):
(org-export--prune-tree):
(org-export--merge-external-footnote-definitions):
(org-export--footnote-reference-map): Provide nil value for binders.

Using

  (letrec ((SYMBOL)) ...)

to bind SYMBOL to nil relies on (setq SYMBOL) setting SYMBOL to nil.  As
of 5d93a89 (Byte compiler: on setq with an odd number of arguments,
generate a `signal', 2015-11-26) in the Emacs repo, setq signals an
error when given an odd number of arguments.

Reported-by: Zack Piper <zack@apertron.net>
<http://permalink.gmane.org/gmane.emacs.orgmode/103539>
<http://permalink.gmane.org/gmane.emacs.devel/196182>
2015-12-12 22:46:24 -05:00
Marco Wahl 5ca98b9213 Merge branch 'maint' 2015-12-12 19:57:22 +01:00
Marco Wahl 700b8e70f6 org-agenda: Refactoring
* lisp/org-agenda.el(org-agenda--quit): Removed an unnecessary variable.
2015-12-12 19:46:34 +01:00
Marco Wahl 9b1c682425 org-agenda: Fix quit sticky agenda
* lisp/org-agenda.el(org-agenda--quit): Removed the argument from the
  call to `bury-buffer' to let the agenda disappear.
2015-12-12 19:35:26 +01:00
Nicolas Goaziou 8594aed1d6 ox-html: Always resolve external custom-id links
* lisp/ox-html.el (org-html-link): Always resolve external custom-id links.

Suggested-by: Alan Schmitt <alan.schmitt@polytechnique.org>
<http://permalink.gmane.org/gmane.emacs.orgmode/103552>
2015-12-12 09:57:51 +01:00
Nicolas Goaziou ce4143e79d Merge branch 'maint' 2015-12-12 00:41:43 +01:00
Nicolas Goaziou 7d1a6777d0 ox: Fix uninterpreted subscript
* lisp/ox.el (org-export--remove-uninterpreted-data-1): Fix
  un-interpreted subscript containing another object.

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

Reported-by: Yasushi SHOJI <yashi@atmark-techno.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/103553>
2015-12-12 00:38:39 +01:00
Nicolas Goaziou 64aee4692a org-list: Fix sending empty lists
* lisp/org-list.el (org-list--to-generic-item): Fix sending empty lists.

* testing/lisp/test-org-list.el (test-org-list/to-generic): Add test.

Reported-by: Eric Abrahamsen <eric@ericabrahamsen.net>
<http://permalink.gmane.org/gmane.emacs.orgmode/103462>
2015-12-08 18:45:21 +01:00
Nicolas Goaziou 38fd09e29b Fix code typo
* lisp/org.el (org-get-local-variables): Fix code typo.
2015-12-06 18:35:09 +01:00
Aaron Ecay a198d81080 Revert "Fix a slowdown in footnote parsing."
This reverts commit 046310d273.
2015-12-05 15:40:36 +00:00
Aaron Ecay 046310d273 Fix a slowdown in footnote parsing.
* lisp/org-footnote.el (org-footnote-in-valid-context-p): Fix slowdown.

Apply de Morgan’s law and reorder clauses from (apparently) quickest to
slowest.  See <http://mid.gmane.org/loom.20151204T081351-244@post.gmane.org>.
2015-12-05 13:41:33 +00:00
Nicolas Goaziou d02f9d41af Ignore some local variables upon cloning
* lisp/org.el (org-unique-local-variables): New variable.
(org-get-local-variables):
(org-clone-local-variables): Use variable above.  Do not rely on an
obscure naming convention to determine if a local variable is meant to
be cloned or read.
2015-12-05 13:44:12 +01:00
Nicolas Goaziou dbaab40bda Obey to `org-inhibit-startup'
* lisp/org.el (org-mode): `org-startup-truncated' and
  `org-startup-indented' are expected to have an effect only when
  `org-inhibit-startup' is non-nil.
2015-12-05 13:36:41 +01:00
Nicolas Goaziou d6a169a82c org-capture: Fix cache in capture buffers
* lisp/org-capture.el (org-capture-steal-local-variables): Remove function.
(org-capture-fill-template): Apply removal.  Use
`org-clone-local-variables' instead.  Focus on Org specific variables.

* lisp/org.el (org-get-local-variables):
(org-clone-local-variables): Ignore internal local variables, whose
value is probably tied to their respective buffer.  In particular, this
prevents cache related variables from being copied.

* lisp/org-indent.el (org-indent--initial-marker): Renamed from
  `org-indent-initial-marker'.  Marking it as internal prevents it from
  being copied by `org-clone-local-variables' and alike.
(org-indent-mode):
(org-indent-initialize-buffer): Apply renaming.
2015-12-05 11:55:02 +01:00
Nicolas Goaziou 43009088b7 org-list: Silence byte-compiler (part 2) 2015-12-05 09:41:14 +01:00
Nicolas Goaziou 2beaeffef1 org-list: Silence byte-compiler 2015-12-05 09:38:49 +01:00
Nicolas Goaziou a682b20a46 org-capture: Use lexical binding
* lisp/org-capture.el (org-capture-is-refiling): New variable.
(org-capture-place-template): Silence byte-compiler.

* lisp/org.el (org-refile): Use new variable.
2015-12-05 09:30:17 +01:00
Nicolas Goaziou 9e1d625971 org-capture: Add missing %s placeholder
* lisp/org-capture.el (org-capture-fill-template): Add missing placeholder.
2015-12-05 09:25:06 +01:00
Nicolas Goaziou 9534b159e8 Merge branch 'maint' 2015-12-04 21:37:18 +01:00
Nicolas Goaziou 06c6ba4ac3 org-table: Fix named fields with TAB-indentation
* lisp/org-table.el (org-table-eval-formula): Properly parse named
  fields when indentation of current line ends with a TAB character.

* testing/lisp/test-org-table.el (test-org-table/tab-indent): New test.

Reported-by: Piotr Gajewski <pg7@outlook.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/103290>
2015-12-04 21:34:40 +01:00
Marco Wahl a426abffa5 org-inlinetask: Fix folding inlinetask children
* org-inlinetask.el(org-inlinetask-goto-end): Position point just at the
  end.  Do not forward-line.

Fixes org-cycle for state CHILDREN when the children are inlinetasks
which have immediate neigbors.
2015-12-04 19:54:21 +01:00
Marco Wahl ca7d6f9366 org-colview: Fix column view editing
* lisp/org-colview.el (org-columns-edit-value): Setting some values for
  postponed evaluation more directly as before.  Catchword:
  lexical-binding.
2015-12-04 12:37:42 +01:00
Nicolas Goaziou 5c13a6b765 org-capture: Expand interactive placeholders last
* lisp/org-capture.el (org-capture-templates): Update docstring.
(org-capture-fill-template): Expand interactive placeholders when the
template is otherwise completely filled.

This restores the previous behaviour for template's expansion.
2015-12-03 23:27:07 +01:00
Nicolas Goaziou 11291ffcd0 org-list: Radio lists use Org Export library
* lisp/org-list.el (org-list-to-lisp): New function.
(org-list-parse-list): Mark function obsolete.

(org-list-send-list):
(org-list-to-generic):
(org-list-make-subtree): Use new function.

(org-list-item-trim-br): Remove function.

(org-list-to-generic): Use Org Export library.
(org-list--depth):
(org-list--trailing-newlines):
(org-list--generic-eval):
(org-list--to-generic-plain-list):
(org-list--to-generic-item): New functions.

(org-list-to-latex):
(org-list-to-html):
(org-list-to-texinfo): Apply changes.  Allow parameters.
(org-list-to-subtree): Apply changes.

* lisp/org.el (org-toggle-heading):
* lisp/ob-core.el (org-babel-insert-result): Apply changes.

* doc/org.texi (Radio lists): Update documentation.

* testing/lisp/test-org-list.el (test-org-list/to-generic): New test.
2015-12-03 09:54:49 +01:00
Nicolas Goaziou a5977a2740 ox: Tiny refactoring
* lisp/ox.el (org-export--smart-quote-status): Tiny refactoring.
2015-12-02 23:27:28 +01:00
Nicolas Goaziou b49f2e0b75 org-capture: Fix bd3a2cb (part 2)
* lisp/org-capture.el (org-capture-fill-template): Allow more than one
  word when filling %{prompt} place holders.

Reported-by: Eric S Fraga <e.fraga@ucl.ac.uk>
<http://permalink.gmane.org/gmane.emacs.orgmode/103251>
2015-12-02 22:22:24 +01:00
Ruben Maher 6b2c38bb71 ox-html.el: Add lang attribute to html tag
* lisp/ox-html.el (org-html-template): Add lang attribute to exported
  html tag.  Some features of the CSS Text Module (Level 3) require this
  attribute to be present (for example, so that the browser knows how to
  hyphenate the text). For more info, please take a look here:
  https://drafts.csswg.org/css-text-3/#languages

TINYCHANGE
2015-12-01 23:34:27 +01:00
Ruben Maher eeee60da70 ox-html.el: Remove superflous whitespace
* lisp/ox-html.el: Remove superfluous whitespace from meta tags, put
  there by `org-html--buld-meta-info' and `org-html--build-head'.
  `org-html-close-tag' already inserts a space, so it is not necessary
  to add another.  Previously these affected tags would look like
  <meta  name="generator" content="Org-mode" />.

TINYCHANGE
2015-12-01 23:34:23 +01:00
Nicolas Goaziou fb32b28057 org-capture: Fix bd3a2cb
* lisp/org-capture.el (org-capture-fill-template): Fix regexp and type
  for KEY.

Reported-by: Eric S Fraga <e.fraga@ucl.ac.uk>
<http://permalink.gmane.org/gmane.emacs.orgmode/103214>
2015-12-01 23:20:44 +01:00
Alan Schmitt b2eb53f27d ox-latex: Make org-latex-custom-lang-environments a defcustom
* ox-latex.el (org-latex-custom-lang-environments): Change from defvar
  into a defcustom.
2015-12-01 09:16:06 +01:00
Nicolas Goaziou 18f0835840 Merge branch 'maint' 2015-11-30 16:09:19 +01:00
Nicolas Goaziou 54c5847385 org-footnote: Fix error on 32 bits system
* lisp/org-footnote.el (org-footnote-new): Use a value in the 32-bit range.

Reported-by: Sam Halliday <sam.halliday@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/103184>
2015-11-30 16:08:00 +01:00
Alan Schmitt 2aa80849da ox-latex: Extend custom-lang-environments
* ox-latex.el (org-latex-custom-lang-environments): Extend the
  documentation string.
* ox-latex.el (org-latex-src-block): Allow a custom language environment
  to be a format string to be directly inserted.
2015-11-30 12:59:12 +01:00
Nicolas Goaziou 4dd06b2cdf ox-publish.el: Fix :preparation-function and :completion-function
* lisp/ox-publish.el (org-publish-projects): Do not use `run-hooks' in
  a lexical binding environment.

Reported-by: Julien Cubizolles <j.cubizolles@free.fr>
<http://permalink.gmane.org/gmane.emacs.orgmode/103124>
2015-11-29 22:38:56 +01:00
Nicolas Goaziou 813d04f8d4 org-capture: Silence byte-compiler
* lisp/org-capture.el (org-capture-fill-template): Silence
  byte-compiler.
2015-11-29 22:01:30 +01:00
Nicolas Goaziou bd3a2cbf2f org-capture: Prevent recursive evaluation of %(...) placeholders
* lisp/org-capture.el (org-capture-templates): Improve docstring.
(org-capture-fill-template): Prevent recursive evaluation of %(...)
placeholders.  Fix escaping of % character in templates.
* testing/lisp/test-org-capture.el: New file.

Reported-by: Thomas Preindl <thomas.preindl@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/103018>
2015-11-29 16:58:14 +01:00
Nicolas Goaziou bd79085be0 Merge branch 'maint' 2015-11-26 22:57:21 +01:00
Nicolas Goaziou d85ddfba0d org-table: Fix c651e150cc
* lisp/org-table.el (org-table-get-stored-formulas): Correctly detect
  named fields in formulas' LHS.
* testing/lisp/test-org-table.el (test-org-table/named-field):
(test-org-table/named-column): New tests.

Reported-by: "Stefan-W. Hahn" <stefan.hahn@s-hahn.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/103119>
2015-11-26 22:56:06 +01:00
Nicolas Goaziou 1f55456115 ob-lob: Small refactoring
* lisp/ob-lob.el (org-babel-lob-get-info): Refactor code.  Use parser to
  eschew false positives.
2015-11-26 15:13:22 +01:00
Nicolas Goaziou e103ad8ae1 Merge branch 'maint' 2015-11-26 14:23:01 +01:00
Nicolas Goaziou b0a436cb8e org-agenda: Write only currently visible items
* lisp/org-agenda.el (org-agenda-write): Fix arguments passed to
  `org-agenda-remove-marked-text' to properly remove entries with
  `invisible' property set to `org-filtered'.
* lisp/ox-icalendar.el (org-icalendar-export-current-agenda): Always
  include TODO entries in the output.  The motivation is that a user not
  filtering out TODO or DONE items in the current agenda probably wants
  them in the output.

Reported-by: "sgeorgii ." <sgeorgii@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/102998>
2015-11-26 14:20:42 +01:00
Nicolas Goaziou 12c118b43d org-agenda: Fix f2d5083
* lisp/org-agenda.el (org-agenda-filter-make-matcher-tag-exp): Fix code
  typo in last commit.  Fix docstring.
2015-11-26 11:18:56 +01:00
Gustav Wikstrom f2d508347e org-agenda: Filter empty tags
* lisp/org-agenda.el (org-agenda-filter-make-matcher-tag-exp): Deal with
  the case when the user provided an empty string to filter or exclude
  rows from the agenda.

This is done in order to fix a problem reported in emacs-orgmode mailing
list 2015-11-25 02:50 with subject "[O] [RFC] [PATCH] Changes to Tag
groups - allow nesting and regexps".
2015-11-26 09:18:22 +01:00
Nicolas Goaziou 50359f705a Merge branch 'maint' 2015-11-23 23:23:06 +01:00
Nicolas Goaziou 16c7594a0f org-table: Fix `org-table-eval-formula'
* lisp/org-table.el (org-table-get-formula):
(org-table-store-formulas): Column formulas references are stored along
with their dollar-sign since "Fix `org-table-get-range' with column
formulas". Update functions accordingly.

Reported-by: John Hendy <jw.hendy@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/103056>
2015-11-23 23:19:14 +01:00
Nicolas Goaziou 3e68159c3a Merge branch 'maint' 2015-11-23 12:10:57 +01:00
Nick Gunn 773e0e9c72 ox-publish: Handle includes with searches
* lisp/ox-publish.el (org-publish-cache-file-needs-publishing): Ignore
  any link search suffix on an include so that the path represents
  a valid file during the publishing check.

TINYCHANGE
2015-11-23 10:53:42 +01:00
Nicolas Goaziou 522ec9a224 Merge branch 'maint' 2015-11-18 23:37:39 +01:00
Nicolas Goaziou d537a371be org-colview: Fix skip-empty-rows without ITEM
* lisp/org-colview.el (org-columns-capture-view): Obey to
  skip-empty-rows even when "ITEM" doesn't belong to current title.

Reported-by: Joon Ro <joon.ro@outlook.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/102924>
2015-11-18 23:36:23 +01:00
Kyle Meyer 1aaa0817b6 Merge branch 'maint' 2015-11-17 21:33:53 -05:00
Paul Eggert 31459201ae Backport commit ac16149 from Emacs
Fix docstring quoting problems with ‘ '’
ac16149ba470ae8a625d42a61adbb6e84254c675
Paul Eggert
Tue Nov 17 15:29:35 2015 -0800
2015-11-17 21:30:57 -05:00
Nicolas Goaziou b5cb6a3873 org-archive: Fix "symbol as value is void: time"
* lisp/org-archive.el (org-archive-subtree): Fix "symbol as value is
  void: time".  Small refactoring.
2015-11-18 00:17:35 +01:00
Nicolas Goaziou 5e0efebef8 Merge branch 'maint' 2015-11-14 09:29:37 +01:00
Hiroshi Saito d452176885 org-feed.el: Load the xml library before substituting a guid XML element
* lisp/org-feed.el (org-feed-parse-rss-feed): Load the xml library
before calling `xml-substitute-special`.

TINYCHANGE
2015-11-14 09:29:21 +01:00
Nicolas Goaziou b48da39ed4 org-id: Use lexical binding
* lisp/org-id.el (org-id-get-with-outline-drilling): Remove unused
  optional argument.
2015-11-14 00:05:50 +01:00
Nicolas Goaziou 8bbb789757 org-habit: Use lexical binding
* lisp/org-habit.el (org-habit-insert-consistency-graphs): Silence
  byte-compiler.
2015-11-14 00:03:51 +01:00
Nicolas Goaziou 3090bb29c8 org-archive: Silence byte-compiler 2015-11-13 23:59:33 +01:00
Nicolas Goaziou 3c49de4380 org-timer: Use lexical binding
* lisp/org-timer.el (org-timer-set-timer): Silence byte-compiler.
2015-11-13 23:58:38 +01:00
Nicolas Goaziou 403249a6ab org-attach: Use lexical binding
* lisp/org-attach.el (org-attach-dir): Silence byte-compiler.
2015-11-13 23:51:28 +01:00
Nicolas Goaziou 4e1f550224 org-archive: Use lexical binding
* lisp/org-archive.el (org-all-archive-files): Refactor code.
(org-archive-subtree):
(org-archive-all-done):
(org-archive-all-old): Silence byte-compiler.
2015-11-13 23:47:06 +01:00
Nicolas Goaziou f416ee1a24 Silence byte-compiler 2015-11-13 23:29:04 +01:00
Nicolas Goaziou 37810b7177 Remove outdated compatibility code 2015-11-13 23:25:57 +01:00
Nicolas Goaziou cfbd2b516b org-ctags: Silence byte-compiler
* lisp/org-ctags.el (y-or-n-minibuffer): Remove function.
(org-ctags-find-tag):
(org-ctags-find-tag-interactive): Use `xref-find-definitions' instead of
`find-tag'.
2015-11-13 23:21:26 +01:00
Nicolas Goaziou 7f937b3cea Silence byte-compiler 2015-11-13 23:13:41 +01:00
Nicolas Goaziou 39813c4d93 Merge branch 'maint' 2015-11-12 23:26:02 +01:00
Nicolas Goaziou c651e150cc org-table: Fix `org-table-get-range' with column formulas
* lisp/org-table.el (org-table-get-stored-formulas): Store complete
  column formulas including the "$" sign.  Remove interactive status.
(org-table-get-range): Handle nicely "$n..$m" ranges.  Apply
changes to `org-table-get-stored-formulas'.  Rename some bindings for
clarity.
(org-table-expand-lhs-ranges): Ignore column formalas.
(org-table-remote-reference-indirection): Refactor function.

Reported-by: Junpeng Qiu <qjpchmail@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/102861>
2015-11-12 23:24:18 +01:00
Nicolas Goaziou bd921f0858 Merge branch 'maint' 2015-11-12 11:29:55 +01:00
Nicolas Goaziou 53a4209003 ox: Fix comments removal
* lisp/ox.el (org-export--delete-comments): Preserve document's
  structure when removing comment lines or comment blocks.

* testing/lisp/test-ox.el (test-org-export/comments): New test.

Reported-by: Samuel Wales <samologist@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/102860>
2015-11-12 11:28:13 +01:00
Nicolas Goaziou f0a48b9064 Merge branch 'maint' 2015-11-11 01:28:54 +01:00
Nicolas Goaziou 7bd20d0c6e org-table: Fix code typo
* lisp/org-table.el (org-table-analyze): Fix code typo introduced in
  5702908.
2015-11-11 01:28:27 +01:00
Nicolas Goaziou 64a602e822 Merge branch 'maint' 2015-11-11 00:41:06 +01:00
Nicolas Goaziou 57029084b5 org-table: Fix bug with "$>" reference
* lisp/org-table.el (org-table-analyze): Fix incorrect replacement for
  "$>" reference when the table ends on a hline.
* testing/lisp/test-org-table.el (test-org-table/end-on-hline): New
  test.
2015-11-11 00:37:57 +01:00
Nicolas Goaziou fe04055b3d org-src: Silence byte-compiler
* lisp/org-src.el (org-edit-inline-src-code): Remove unused binding.
2015-11-10 23:54:41 +01:00
Nicolas Goaziou b5b08a7f52 ox: Look for export and noexport tags in FILETAGS
* lisp/ox.el (org-export--selected-trees):
(org-export--skip-p): Check also FILETAGS.
* lisp/ox.el (org-export-get-tags): Also report export and noexport
  tags.

Reported-by: Michael Welle <mwe012008@gmx.net>
<http://permalink.gmane.org/gmane.emacs.orgmode/102754>
2015-11-10 23:38:04 +01:00
Nicolas Goaziou c993007eb6 ox-publish: Fix publishing bug
* lisp/ox-publish.el (org-publish--collect-references): Ignore
  non-element.
2015-11-10 18:14:46 +01:00
Nicolas Goaziou 6c1f63b6a6 org-src: Allow to edit remotely inline src blocks
* lisp/org-src.el (org-edit-inline-src-code): New function.
(org-src--contents-area): Handle inline src blocks.

* lisp/org.el (org-edit-special): When on an inline src block, edit it.
2015-11-08 20:55:31 +01:00