Commit graph

421 commits

Author SHA1 Message Date
Bastien Guerry 3013b7c5dc org-table.el: Switch back to the old default for `org-table-number-regexp'
* org-table.el (org-table-number-regexp): Allow the user to
set it to a new regexp, which allows commas as decimal mark.
The default is to not use this setting, but the one before
commit 7ff8c1, which has ben reverted.

See the discussion here:
http://thread.gmane.org/gmane.emacs.orgmode/59389
2012-08-27 18:03:05 +02:00
Bastien Guerry 4a508fdfa4 Revert "org-table: Accept comma as a decimal mark to represent numbers"
This reverts commit 7ff8c166e6.
2012-08-27 17:55:18 +02:00
Bastien Guerry 97e4d643a8 Revert "org-table.el: Minor docstring update"
This reverts commit 5d57364256.
2012-08-27 17:55:05 +02:00
Bastien Guerry 51b9ad93c9 org-table.el: Better message when interactively toggling Row/Col display
* org-table.el (org-table-toggle-coordinate-overlays): Better
message when interactively toggling.
2012-08-21 20:09:25 +02:00
Bastien Guerry 5d57364256 org-table.el: Minor docstring update
* org-table.el (org-table-number-regexp): Update the docstring
to show an example of a decimal number using the comma as a
separation mark.
2012-08-21 18:31:12 +02:00
Nicolas Goaziou 7ff8c166e6 org-table: Accept comma as a decimal mark to represent numbers
* lisp/org-table.el (org-table-number-regexp): By default, accept
  comma as a decimal mark to represent numbers.
2012-08-21 13:53:57 +02:00
Bastien Guerry 16ea0364a4 Call buffer-substring-no-properties' and remove org-no-properties'
* org-colview-xemacs.el (org-columns-display-here): Use
`buffer-substring-no-properties' and remove `org-no-properties'.

* org-colview.el (org-columns-display-here): Ditto.

* org-table.el (org-table-eval-formula): Ditto.

* org.el (org-entry-properties): Ditto.
2012-08-15 09:22:51 +02:00
Bastien Guerry 70dd1196d2 Massive code clean-up.
Delete trailing whitespaces.
Indent all sexps correctly.
Sentences end with double spaces.
2012-08-11 19:10:44 +02:00
Bastien Guerry 24c9083bd5 org-table.el: Fix bug when converting remote table references.
* org-table.el (org-table-convert-refs-to-rc): Fix bug when
converting remote table references.

Thanks to Jose E. Marchesi who provided a preliminary patch for this.
2012-08-10 11:00:15 +02:00
Bastien Guerry 0c77568f67 org-table.el (orgtbl-to-generic): Fix docstring.
* org-table.el (orgtbl-to-generic): Fix docstring.
2012-08-09 16:17:05 +02:00
Bastien Guerry a88dae9236 Fix compilation warning. 2012-08-01 16:20:22 +02:00
Bastien Guerry e3f30e12d2 Add orgtbl-to-table.el' and orgtbl-to-unicode'.
* org-table.el (orgtbl-radio-table-templates): Add a template
for org-mode.
(orgtbl-to-orgtbl): Complete and align the table created with
orgtbl-to-orgtbl, in case the user use the function for radio
tables.
(orgtbl-to-table.el): New function to export a table to
another one using the table.el format.
(orgtbl-to-unicode): New function to export a table using
unicode characters.
2012-07-31 15:40:05 +02:00
Bastien Guerry d5aa0e0d73 Rename org-indent-line-function' to org-indent-line'.
* org.el (org-mode, org-add-log-setup)
(org-get-property-block, org-entry-put)
(org-property-next-allowed-value, org-return)
(org-indent-line): Rename `org-indent-line-function' to
`org-indent-line'.

* org-timer.el (org-timer-item): Ditto.

* org-table.el (org-table-store-formulas): Ditto.

* org-clock.el (org-clock-in, org-clock-find-position): Ditto.
2012-07-11 19:11:26 +02:00
Bastien Guerry e2c2afe013 When exporting tables, use the file name extension to suggest the right conversion format.
* org-table.el (org-table-export): Use the file name extension to
suggest the right conversion format.  Also amend the docstring.
2012-07-06 20:13:34 +02:00
Bastien Guerry 43ded1398d Remove spurious line inserted by previous commit. 2012-05-10 12:43:32 +02:00
Carsten Dominik 3216210668 Merge branch 'master' of orgmode.org:org-mode 2012-05-10 12:18:49 +02:00
Carsten Dominik b25a931eef Fix bug with hline references on LHS of table formulas
* lisp/org-table.el (org-table-expand-lhs-ranges): Allow hline
references to be expanded correctly in LHS of formulas.

Based on Tobias' fix in http://thread.gmane.org/gmane.emacs.orgmode/55690
2012-05-10 12:17:51 +02:00
Bastien Guerry 8fb20b7f93 org-table.el: handle =02:34;t durations formula correctly.
* org-table.el (org-table-time-string-to-seconds): Return the
empty string if provided.
(org-table-eval-formula): When assigning a duration string,
handle it correctly -- i.e. don't make any computation on it,
except the one to insert it using the correct duration format.

Thanks to Sébastien Vauban for spotting this.
2012-05-05 16:14:33 +02:00
Bastien Guerry 3c34028497 Merge branch 'maint' 2012-05-01 19:19:16 +02:00
Bastien Guerry 0dbe17b8e0 org-table.el: Fix bug about handling a negative duration value.
* org-table.el (org-table-time-seconds-to-string): Fix bug
about handling a negative duration value.
2012-05-01 19:19:06 +02:00
Bastien Guerry 8342fdb70a org-table.el: Fix bug in ̀org-table-maybe-eval-formula'.
* org-table.el (org-table-store-formulas): Fix typo.
(org-table-maybe-eval-formula): Fix the regexp to only match
formulas, which never end with the `=' character.  If the
field only contain this character, don't eval either.

Thanks to Thomas S. Dye for reporting this.
2012-05-01 02:03:12 +02:00
Bastien Guerry 1f663e7ab3 Merge branch 'maint' 2012-05-01 01:42:17 +02:00
Bastien Guerry 3053c13d2c org-table.el: Fix bug in a free variable name.
* org-table.el (org-tbl-calc-modes): Rename from
`org-table-modes'.
(org-set-calc-mode, org-table-eval-formula): Use it.

Thanks to Mikkel Kristiansen for reporting this and
to Nick Dokos for tracking down the bug and proposing
a fix.
2012-05-01 01:41:50 +02:00
Bastien Guerry d7dfe9fd69 org-table.el: Fix `org-table-store-formulas'.
The bug was introduced by this commit:
http://orgmode.org/w/?p=org-mode.git;a=commit;h=1c203d

Thanks to Matt Lundin who reported this nasty/stupid bug.
2012-04-28 23:34:51 +02:00
Nicolas Goaziou 9743a2ca3d Merge branch 'maint' 2012-04-23 20:54:40 +02:00
Nicolas Goaziou 374c56bad3 org-table: Fix typo in a docstring
* lisp/org-table.el (org-table-number-fraction): Fix typo.
2012-04-23 20:53:51 +02:00
niels giesen 549c498bb6 org-table.el: Add defcustoms for LaTeX export of table rules :tstart, :hline and :tend
* org-table.el (orgtbl-to-generic): Add check for :skipheadrule.
When present, the :hline following the head will be skipped.  This is
necessary to avoid doubling of horizontal rules in LaTeX longtable
environments and consequent width problems.

* org-latex.el (org-export-latex-tables-tstart)
(org-export-latex-tables-hline)
(org-export-latex-tables-tend): New options.
(org-export-latex-tables): Use the new options.
2012-04-23 13:23:36 +02:00
Bastien Guerry 1c203d8d19 Match #+name/#+tblname/#+tblfm along with uppercase twins.
* org.el: Use (case-fold-search t).
(org-edit-special, org-ctrl-c-ctrl-c): Ditto.

* org-table.el:
(org-table-store-formulas, org-table-get-stored-formulas)
(org-table-fix-formulas, org-table-edit-formulas)
(org-old-auto-fill-inhibit-regexp, orgtbl-ctrl-c-ctrl-c)
(orgtbl-toggle-comment, org-table-get-remote-range): Ditto.

* org-footnote.el:
(org-footnote-goto-local-insertion-point): Ditto.

* org-exp.el: Ditto.

* org-colview.el:
(org-dblock-write:columnview, org-dblock-write:columnview):
Ditto.

* org-colview-xemacs.el:
(org-dblock-write:columnview): Ditto.

* org-clock.el (org-clocktable-write-default): Ditto.

* org-capture.el (org-capture-place-table-line): Ditto.

* ob.el (org-babel-data-names, org-babel-goto-named-src-block)
(org-babel-src-block-names)
(org-babel-where-is-src-block-result, org-babel-result-end)
(org-babel-where-is-src-block-head)
(org-babel-find-named-result, org-babel-result-names): Ditto.
2012-04-23 12:48:33 +02:00
Bastien Guerry e9dec29bb1 org-table.el: Escape some special characters when sending radio tables.
* org-table.el (orgtbl-send-table): Escape special characters.
Introduce a new parameter :no-escape to prevent escaping.

* org.texi (Radio tables): Document the :no-escape parameter.

Thanks to Alexander Willand for raising this issue.
2012-04-23 00:09:35 +02:00
Bastien Guerry d5c0af72cf Use (derived-mode-p 'org-mode) instead of (eq major-mode 'org-mode).
* org.el (org-show-hierarchy-above, org-cycle)
(org-global-cycle, org-files-list, org-store-link)
(org-link-search, org-open-file, org-display-outline-path)
(org-refile-get-location, org-update-all-dblocks)
(org-change-tag-in-region, org-entry-properties)
(org-save-all-org-buffers, org-revert-all-org-buffers)
(org-buffer-list, org-cdlatex-mode)
(org-install-agenda-files-menu, org-end-of-subtree)
(org-speedbar-set-agenda-restriction): Use (derived-mode-p
'org-mode) instead of (eq major-mode 'org-mode).

* org-timer.el (org-timer-set-timer): Ditto.

* org-table.el (orgtbl-mode, org-table-align, orgtbl-mode): Ditto.

* org-src.el (org-edit-src-exit, org-edit-src-code)
(org-edit-fixed-width-region, org-edit-src-exit): Ditto.

* org-remember.el (org-remember-handler): Ditto.

* org-mouse.el (dnd-open-file, org-mouse-insert-item): Ditto.

* org-macs.el (org-get-limited-outline-regexp): Ditto.

* org-lparse.el (org-replace-region-by): Ditto.

* org-latex.el (org-latex-to-pdf-process)
(org-replace-region-by-latex): Ditto.

* org-indent.el (org-indent-indent-buffer): Ditto.

* org-id.el (org-id-store-link, org-id-update-id-locations)
(org-id-store-link): Ditto.

* org-html.el (org-export-html-preprocess)
(org-replace-region-by-html): Ditto.

* org-footnote.el (org-footnote-normalize)
(org-footnote-goto-definition)
(org-footnote-create-definition, org-footnote-normalize): Ditto.

* org-docbook.el (org-replace-region-by-docbook): Ditto.

* org-ctags.el (find-tag): Ditto.

* org-colview.el (org-columns-redo)
(org-columns-display-here, org-columns-edit-value)
(org-columns-redo): Ditto.

* org-colview-xemacs.el (org-columns-redo)
(org-columns-display-here, org-columns-edit-value)
(org-columns-redo): Ditto.

* org-capture.el (org-capture-insert-template-here)
(org-capture, org-capture-finalize)
(org-capture-set-target-location)
(org-capture-insert-template-here): Ditto.

* org-ascii.el (org-replace-region-by-ascii):  Ditto.

* org-archive.el (org-archive-subtree): Ditto.

* org-agenda.el (org-agenda)
(org-agenda-get-restriction-and-command)
(org-agenda-get-some-entry-text, org-search-view)
(org-tags-view, org-agenda-get-day-entries)
(org-agenda-format-item, org-agenda-goto, org-agenda-kill)
(org-agenda-archive-with, org-agenda-switch-to): Ditto.
2012-04-21 00:43:16 +02:00
Bastien Guerry c836b05084 Merge branch 'hotfix' 2012-04-11 00:43:48 +02:00
Bastien Guerry 7d8c5c66e9 org-table.el: Fix bug about handling remote references as durations.
* org-table.el (org-table-eval-formula): Fix bug about
handling remote references as durations.

Thanks to Sébastien Vauban for reporting this.
2012-04-11 00:43:05 +02:00
Bastien Guerry 8ab0dedc4e Merge branch 'hotfix' 2012-04-09 20:06:21 +02:00
Bastien Guerry bf4d38b1fb org-table.el: Fix bug: make sure references to $0 are correctly handled.
* org-table.el (org-table-get-range): Fix bug: make sure
references to $0 are correctly handled.

Thanks to Nick Dokos for the suggestion.

This fixes the computation of values in this table:

| Record   |        Slope |    ConfLower |    ConfUpper |
|----------+--------------+--------------+--------------|
| GISTEMP  | 0.0173837600 | 0.0133209130 | 0.0214466060 |
| HadCrut3 | 0.0158602890 | 0.0118664610 | 0.0198541180 |

See this message/thread:
http://article.gmane.org/gmane.emacs.orgmode/54341
2012-04-09 20:04:22 +02:00
Bastien Guerry 17443083c0 org-table.el: Add two autoload cookies.
* org-table.el (org-table-recalculate-buffer-tables)
(org-table-iterate-buffer-tables): Add autoload cookie.

Thanks to Sébastien Vauban who suggested adding an autoload
cookie for `org-table-iterate-buffer-tables'.
2012-04-09 17:32:18 +02:00
Bastien Guerry cd2f395416 Add :version to org-table.el options. 2012-04-03 13:24:12 +02:00
Bastien Guerry 5651adb133 Merge branch 'hotfix-7.8.06' 2012-04-02 07:52:09 +02:00
Bastien Guerry ccd84a9f63 Fix spelling mistakes.
Thanks to Paul Eggert for spotting these.
2012-04-02 07:51:52 +02:00
Bastien Guerry 967783215b Merge branch 'hotfix-7.8.06'
Conflicts:
	lisp/org.el
2012-03-31 11:04:40 +02:00
Bastien Guerry b689cbfb6c Fix global dynamic variables in org-table.el.
Thanks to Martyn Jago for this patch.
2012-03-30 22:47:18 +02:00
Bastien Guerry 8ab92f8b55 Delete trailing whitespaces in core files. 2012-03-28 02:05:36 +02:00
Bastien Guerry 122f5fd5b5 Merge branch 'hotfix-7.8.06' 2012-03-27 23:51:00 +02:00
Bastien Guerry 8d74c84962 Use backward-delete-char' instead of delete-backward-char' to silent compiler.
* org-table.el (orgtbl-self-insert-command): Use
`backward-delete-char' instead of `delete-backward-char' as
this last command gets caught by the compiler which says to
not use it in programs.  `backward-delete-char' is just an
alias for `delete-backward-char' which is internally remapped
to `org-delete-backward-char' for optimization purpose.

* org.el (org-self-insert-command): Ditto.
2012-03-27 23:50:52 +02:00
Bastien Guerry 2a94e997f4 Revert "Use delete-char' instead of delete-backward-char'"
This reverts commit 00040e708c.

See this email by Achim Gratz:
http://comments.gmane.org/gmane.emacs.orgmode/52717
2012-03-27 23:24:33 +02:00
Bastien Guerry ecd0562c5f Fix the master branch.
I started from the 78ec8e commit then cherry-picked and squashed
commits that have been done in master since then, except the bad
commits that overwrote the tree (in master) with the tree in maint.

This commit also bumps the version number to 7.8.06.

The only "fix" that was made between 78ec8e and the previous commit
is e0072f which has been reported to break stuff.
2012-03-19 22:01:29 +01:00
Bastien Guerry 6e306f65ff Fix copyright years in maint. 2012-03-17 16:31:04 +01:00
Bastien Guerry de42649f7b Manually revert maint to e85080.
e85080 is the last correct commit in the maint branch
before releasing 7.8.04.  The 7.8.05 release should be
done from this commit.
2012-03-17 16:28:46 +01:00
Bastien Guerry 73bb18ba37 Manually revert to the Release 7.8.04 tag. 2012-03-17 15:52:24 +01:00
Bastien Guerry 38c5045725 Fix copyright years. 2012-03-17 14:36:25 +01:00
Bastien Guerry 6e534f9c61 Manually revert back to commit e85080.
This fixes a wrong merge that should not have happened:
commit 7e903a merges the master branch into the maint branch,
while we really want to keep the maint branch a bugfix-only
branch.

This commit reverts back the maint branch to its state before
merging the master branch.  From there, we will fix remaining
problems with the maint branch (e.g. copyright issues) then
release this maint branch as Org-mode 7.8.05.
2012-03-17 14:34:01 +01:00