Commit Graph

17562 Commits

Author SHA1 Message Date
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
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
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 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 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
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 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
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
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 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 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 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 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 73a5c27cc1 Fix table editing with an active region
* lisp/org.el (org-self-insert-command): Do not call
  `backward-delete-char' since it possibly deletes active region.
  Simplify code.

This fixes bug#21838.
2015-11-05 23:18:13 +01:00
Nicolas Goaziou 5e22dcd622 Fix bug#21818
* lisp/org.el (org-insert-link): Redisplay after inserting link.

Reported-by: Emanuel Evans <mail@emanuel.industries>
<http://permalink.gmane.org/gmane.emacs.orgmode/102591>
2015-11-05 13:45:12 +01:00
Kyle Meyer 59d706219b org-format-outline-path: Ignore nil path elements
* lisp/org.el (org-format-outline-path): Ignore nil path elements.
* testing/lisp/test-org.el (test-org/format-outline-path): Add test.

The PATH argument shouldn't contain a nil item.  However, this didn't
fail before 1c74002, and helm-get-org-candidates-in-file relies on this
behavior, so prevent it from failing now.

Reported-by: Simon Thum <simon.thum@gmx.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/102411>
2015-10-31 12:47:17 -04:00
Kyle Meyer 1ec47568f4 org-format-outline-path: Cosmetic fix
* lisp/org.el (org-format-outline-path): Change loop counter.

The old version gives the same result when combined with the other for
clause, but it reads as though the intention is to reach
(length path) rather than (1- (length path)).
2015-10-31 12:35:13 -04:00
Aaron Ecay 54d3032cdc babel: fix header arg duplication
* lisp/ob-core.el (org-babel-process-params): Make idempotent.
* testing/lisp/test-ob.el (ob/process-params-no-duplicates): New test.
2015-10-29 19:10:08 +00:00
Kyle Meyer 1c740023f7 Rewrite org-format-outline-path
* lisp/org.el (org-format-outline-path): Avoid out-of-range error when
  the length of PREFIX is greater than the value given for WIDTH.
  Prevent result from extending beyond WIDTH.  Simplify code.
* testing/lisp/test-org.el (test-org/format-outline-path): Add tests.

Reported-by: Simon Thum <simon.thum@gmx.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/102241>
2015-10-28 01:26:16 -04:00
Marco Wahl 3efb519ff5 doc/org.texi: Add index for Archive mode 2015-10-27 10:14:10 +01:00
Nicolas Goaziou 541aa0f62d org-clock: Fix clocking in
* lisp/org-clock.el (org-clock-find-position): Correctly position cursor
  on the correct headline.

Reported-by: Jan Malakhovski <oxij@oxij.org>
<http://permalink.gmane.org/gmane.emacs.orgmode/102170>
2015-10-25 15:51:53 +01:00
Nicolas Goaziou 9277e63352 ob-core: Fix "wrong-type-argument stringp nil"
* lisp/ob-core.el (org-babel-merge-params): Tolerate empty :exports
  parameter.

Reported-by: Rainer M Krug <Rainer@krugs.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/102005>
2015-10-24 11:37:46 +02:00
Kyle Meyer 8c763ab08c Restore behavior of '.' in org-read-date
* lisp/org.el (org-read-date-minibuffer-local-map): Fix period behavior
  broken by e802936.

Reported-by: Matt Lundin <mdl@imapmail.org>
<http://permalink.gmane.org/gmane.emacs.orgmode/102071>
2015-10-23 11:15:44 -04:00
Nicolas Goaziou 4e864643bd Fix `org-return-follows-link' on links with emphasis
* lisp/org.el (org-return): Properly follow links when description is
  emphasized.  Also tolerate links and timestamps in otherwise forbidden
  areas (e.g., comments, node properties...), much like
  `org-open-at-point'.

* testing/lisp/test-org.el (test-org/return): Add tests.

Reported-by: Samuel Wales <samologist@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/101977>
2015-10-18 09:48:54 +02:00
Nicolas Goaziou 8e4650c887 ox-ascii: Fix code typo
* lisp/ox-ascii.el (org-ascii--describe-links): Fix code typo introduced
  in d6a718a.
2015-10-18 09:27:28 +02:00
Nicolas Goaziou f01b3fadbc org-clock: Fix clock drawer creation
* lisp/org-clock.el (org-clock-find-position): Create clock drawer when
  a drawer is missing, even though requested, but some clocks are
  already present in the entry.

Reported-by: Nikolay Kudryavtsev <nikolay.kudryavtsev@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/101973>
2015-10-18 01:39:36 +02:00
Nicolas Goaziou d6a718a93f ox-ascii: Fix external id links
* lisp/ox-ascii.el (org-ascii--describe-links): Fix export when id link
  targets an external file.

Reported-by: Samuel Wales <samologist@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/101978>
2015-10-18 00:02:31 +02:00
Nicolas Goaziou 9de1ee1b6f org-element: Fix parsing of planning in inline tasks
* lisp/org-element.el (org-element--next-mode): Line following an
  inlinetask can be a planning.
* testing/lisp/test-org-element.el (test-org-element/inlinetask-parser):
  Update test.

Reported-by: Gregor Zattler <telegraph@gmx.net>
<http://permalink.gmane.org/gmane.emacs.orgmode/101958>
2015-10-16 23:19:06 +02:00
Nicolas Goaziou 0ee8ba3e0d ox-beamer: Fix labels
* lisp/ox-beamer.el (org-beamer--get-label): Remove protective braces
  when extracting label from options.
(org-beamer--format-frame): Protect label with braces if it contains
colons.

Based off a patch from Fabrice
Popineau (<http://permalink.gmane.org/gmane.emacs.orgmode/101933>).
2015-10-16 22:38:14 +02:00
Michael O'Connor 843be85c1d org.texi, orgguide.texi: Fix spelling of Sean Astin's name
* doc/org.texi: Fix a typo of Sean Astin's name as Sean Austin.

* doc/orgguide.texi: Fix a typo of Sean Astin's name as Sean Austin.

TINYCHANGE
2015-10-16 22:16:37 +02:00
Nicolas Goaziou a36c15494e org-clock: Fix quarterly clock reports
* lisp/org-clock.el (org-clock-special-range): Properly set Q according
  to block specification.

Reported-by: "L.C. Karssen" <lennart@karssen.org>
<http://permalink.gmane.org/gmane.emacs.orgmode/101899>
2015-10-15 00:03:36 +02:00
Nicolas Goaziou 1c7dca9692 ox-beamer: Fix againframe command
* lisp/ox-beamer.el (org-beamer-headline): Make sure any fuzzy reference
  provided for an againframe ends up pointing to a headline.
2015-10-13 23:51:17 +02:00
Jan Seeger d183c59e46 org-capture: Reverse capture finalize and refile, hack buffer killing
* org-capture.el (org-capture-refile): Call finalize first, then
  refile. If the capture buffer needs to be killed afterwards, kill
  after refiling.

Refiling before finalizing led to an incorrect cursor position during
refile.  Since adjusting the buffer position and bounds for the refiled
entry is difficult, I reverted the `org-capture-refile' function to its
original order of finalizing and then refiling.  However, this leads to
a bug with killing the buffer on capture, described in
<http://permalink.gmane.org/gmane.emacs.orgmode/78027/>.  To work around
this, now the :kill-buffer flag is cleared before calling finalize, and
the capture buffer is killed after `org-refile' is called.

TINYCHANGE
2015-10-13 21:42:47 +02:00
Nicolas Goaziou c0c16b88fa ob-clojure: Silence byte-compiler 2015-10-11 23:56:35 +02:00
Feng Zhou 4eccd7c7b5 ob-clojure: Cider API change
* lisp/ob-clojure.el (org-babel-execute:clojure): Apply Cider API
  change.

TINYCHANGE
2015-10-11 23:31:23 +02:00
Kyle Meyer 00dacdcc50 Clean up spacing to pass Emacs's pre-commit check
This is in preparation for syncing with the Emacs repo.
2015-10-04 02:31:29 -04:00
Kyle Meyer e802936f4b Pass LIMIT argument to org-looking-back
* lisp/org-mouse.el (org-mouse-insert-item):
(org-mouse-context-menu):
* lisp/org-pcomplete.el (org-thing-at-point):
* lisp/org.el (org-read-date-minibuffer-local-map):
(org-timestamp-change): Provide LIMIT argument to org-looking-back.
* lisp/org.el (org-read-date-minibuffer-local-map):
(org-insert-heading): Replace looking-back with org-looking-back.

As of Emacs 25, the LIMIT argument to looking-back is advertised as a
required argument.
2015-10-04 02:31:29 -04:00
Kyle Meyer ef3ea9d02d Use prefix for outline functions
* lisp/ob-lilypond.el (org-babel-lilypond-mark-error-line):
* lisp/org-agenda.el (org-agenda-goto):
(org-agenda-show-and-scroll-up):
(org-agenda-show-1):
* lisp/org-archive.el (org-archive-subtree):
(org-archive-to-archive-sibling):
(org-toggle-archive-tag):
* lisp/org-capture.el:
(org-capture-place-template):
* lisp/org-colview.el:
(org-columns-eval):
* lisp/org-crypt.el (org-encrypt-entry):
* lisp/org-feed.el (org-feed-update):
* lisp/org-mouse.el (org-mouse-popup-global-menu):
* lisp/org.el (org-cycle):
(org-cycle-internal-global):
(org-cycle-internal-local):
(org-global-cycle):
(org-set-startup-visibility):
(org-set-visibility-according-to-property):
(org-overview):
(org-content):
(org-clean-visibility-after-subtree-move):
(org-set-outline-overlay-data):
(org-tree-to-indirect-buffer):
(org-move-subtree-down):
(org-paste-subtree):
(org-sort-entries):
(orgstruct-setup):
(org-show-set-visibility):
(org-mode-map):
(org-check-before-invisible-edit):
(org-kill-note-or-show-branches):
(org-org-menu):
(org-yank-generic):
* lisp/ox-org.el (org-org-publish-to-org): Use prefix for outline
  functions.
* lisp/org-compat.el: Add compatibility functions for outline functions
  that are under the "outline-" prefix as of Emacs 25.
2015-10-04 02:31:16 -04:00
Kyle Meyer 2c349cc65a ob-tangle: Check that publishing directory exists
* lisp/ob-tangle.el (org-babel-tangle-publish): Create publishing
  directory if it doesn't exist.

Reported-by: Arun Isaac <theroarofthedragon@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/101697>
2015-10-03 18:08:52 -04:00
Nicolas Goaziou ee3d9363c5 ox: Change misleading keys in `org-export-smart-quotes-alist'
* lisp/ox.el (org-export-smart-quotes-alist):
(org-export--smart-quote-status): Change misleading quote names.

Due to the new smart quotes algorithm, "..." are always primary quotes,
even though they may be translated as single quotes.  Conversely, '...'
are secondary quotes and may not be translated to single quotes.
2015-10-03 09:19:21 +02:00
Kyle Meyer 36233d976d ob-tangle: Expand paths for publishing
* lisp/ob-tangle.el (org-babel-tangle-file): Return expanded file name.

Reported-by:  Arun Isaac <theroarofthedragon@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/101290>
2015-10-02 23:19:57 -04:00
Nicolas Goaziou 609e1e28fb Fix "undefined symbol 'org-export-create-backend"
* lisp/org-table.el (orgtbl-to-generic): Make sure "ox.el" is loaded
  before converting a radio table.

Reported-by: Dave Marquardt <davemarq@linux.vnet.ibm.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/101642>
2015-10-01 21:55:13 +02:00
Nicolas Goaziou 919d0cdb76 Fix "org-remove-if: Wrong type argument: number-or-marker-p, nil"
* lisp/org.el (org-remove-latex-fragment-image-overlays): Remove
  overlays not associated to a buffer.

Reported-by: Rainer M Krug <Rainer@krugs.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/101645>
2015-10-01 21:42:15 +02:00
Nicolas Goaziou 7273473e6b ox-icalendar: Fix a docstring
* lisp/ox-icalendar.el (org-icalendar-exclude-tags): Fix docstring.

Reported-by: james@jamestechnotes.com
<http://permalink.gmane.org/gmane.emacs.orgmode/101631>
2015-10-01 13:51:13 +02:00
Hiroshi Saito 115c4bd5a7 org-feed.el: Substitute a guid XML element
* lisp/org-feed.el (org-feed-parse-rss-feed): Substitute a guid XML
element with `xml-substitute-special'.

TINYCHANGE
2015-09-30 13:55:23 +02:00
Nicolas Goaziou fd8a18151a Fix file uri
* lisp/ox.el (org-export-file-uri): Properly expand file uri.

* lisp/org-element.el (org-element-link-parser): Start path with "//"
  when referring to a remote file.

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

Reported-by: AW <alexander.willand@t-online.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/101471>
2015-09-26 00:11:42 +02:00
Nicolas Goaziou e68bc78ae4 ox-md: Fix docstring
* lisp/ox-md.el (org-md-separate-elements): Fix docstring.
2015-09-24 10:27:24 +02:00
Richard Hansen 11bba63dc3 fix SETUPFILE pathname expansion with subdirectories
* lisp/org-macro.el (org-macro--collect-macros): cd to the directory
containing the SETUPFILE before recursing so that relative pathnames
in the SETUPFILE are expanded properly.

* lisp/org.el (org--setup-collect-keywords): cd to the directory
containing the SETUPFILE before recursing so that relative pathnames
in the SETUPFILE are expanded properly.

* lisp/ox.el (org-export--get-inbuffer-options,
org-export--list-bound-variables): cd to the directory containing the
SETUPFILE before recursing so that relative pathnames in the SETUPFILE
are expanded properly.

If /path/to/foo.org contains:

    #+SETUPFILE: settings/beamer.org

and /path/to/settings/beamer.org contains:

    #+SETUPFILE: common.org

then we want to read /path/to/settings/common.org, not
/path/to/common.org.

TINYCHANGE
2015-09-24 10:16:04 +02:00
Nicolas Goaziou 2e1b93db41 org-table: Fix radio tables
* lisp/org-table.el (orgtbl-to-generic): Strip text properties from
  output.

Reported-by: "Charles C. Berry" <ccberry@ucsd.edu>
<http://permalink.gmane.org/gmane.emacs.orgmode/101425>
2015-09-23 22:58:25 +02:00
Nicolas Goaziou 3e1bccc4a5 ox-md: Fix blank lines insertion in sub-lists
* lisp/ox-md.el (org-md-separate-elements): In a list, when a sub-list
  is followed by another element, make sure it is surrounded by blank
  lines.

Reported-by: dbitouze@wanadoo.fr (Denis Bitouzé)
<http://permalink.gmane.org/gmane.emacs.orgmode/101113>
2015-09-22 21:32:07 +02:00