Mercurial > emacs
comparison lisp/org/org-table.el @ 100448:cea079b68b76
2008-12-16 Carsten Dominik <carsten.dominik@gmail.com>
* org.el (org-refile): Avoid refiling to within the region to be
refiled.
* org-export-latex.el (org-export-latex-special-chars): Replace
special characters also in tables.
* org-agenda.el (org-agenda-change-all-lines): New argument
FORCE-TAGS.
(org-agenda-set-tags): Cet the new tags and pas them to
`org-format-agenda-item'.
2008-12-16 Carsten Dominik <carsten.dominik@gmail.com>
* org-export-latex.el (org-export-latex-classes): Add longable as
a default package to all classes.
(org-export-latex-tables): Handle the longtable attribute and the
align attribute.
* org-table.el (orgtbl-to-generic): Handle tables that start with
a hline.
* org-export-latex.el (org-export-latex-emphasis-alist): Switch to
\verb for colde-like snippets.
(org-export-as-latex): Fix issues with region export.
* org.el (org-up-heading-safe): Speed up function by using a
direct regexp search.
(org-olpa): New variable.
(org-get-outline-path): Speed-up path constructions in cases where
this is possible because the entire hierarchy is scanned anyway.
(org-refile-get-location): Don't compare the truenames of files,
this is too slow.
(org-goto-max-level): New option.
(org-goto): Use `org-goto-max-level'.
2008-12-16 Tassilo Horn <tassilo@member.fsf.org>
* org-gnus.el (org-gnus-article-link, org-gnus-article-link):
Strip angle brackets from message-ids in the former and don't do
it in the latter.
(org-gnus-follow-link): Open summary reliable, even if the last
messages were deleted, and handle empty groups, too.
2008-12-16 Carsten Dominik <carsten.dominik@gmail.com>
* org-export-latex.el (org-export-latex-emphasis-alist): Use \verb
instead of \texttt for the =...= and ~===~ emphasis environments.
(org-export-as-latex): Remove any old :org-license-to-kill text
properties.
(org-export-as-latex): Pass RBEG to `org-export-latex-first-lines'.
(org-export-latex-make-header): Add some hard space after the
table of contents.
(org-export-latex-first-lines): Accept RBEG argument. Mark
exported text so that it will be excuded in further steps.
* org-table.el (org-table-get-specials): Make @0 reference the
last line in a table.
(org-table-recalculate): Improve docstring.
2008-12-16 Carsten Dominik <carsten.dominik@gmail.com>
* org.el (org-log-done): Fix docstring.
2008-12-16 Carsten Dominik <carsten.dominik@gmail.com>
* org-exp.el (org-export-html-format-image): Fix bugs.
* org-export-latex.el (org-export-latex-tables)
(org-export-latex-links): Implement attribute, label, and caption
handling.
* org-exp.el (org-export-html-style-default): Add style
definitions for the figure div.
(org-export-preprocess-string, org-export-as-html): Implement
attribute, label, and caption handling.
(org-export-attach-captions-and-attributes): New function.
(org-export-html-format-image): New function.
(org-format-org-table-html): Implement attribute, label, and
caption handling.
* org.el (org-find-text-property-in-string): New function.
(org-extract-attributes): Use the property org-attr instead of
org-attrobutes, because this property is now set with the #+ATTR
lines.
2008-12-16 Carsten Dominik <carsten.dominik@gmail.com>
* org-compat.el (org-substring-no-properties): Fix for XEmacs, for
the case that FROM is nil.
* org.el (org-before-first-heading-p): New function.
2008-12-16 Carsten Dominik <carsten.dominik@gmail.com>
* org-exp.el (org-export-as-html): Do not add a space before
enforces line breaks.
(org-export-as-html): Close paragraph before blockquote and verse
tags.
2008-12-16 Carsten Dominik <carsten.dominik@gmail.com>
* org-id.el (org-id-locations-file): Wrap file name with
`convert-standard-filename'.
(org-id-files): New variable.
(org-id-use-hash): New option.
(org-id-update-id-locations): Also search in all files current
listed in `org-id-files'. Convert the resulting alist to a hash
if the user customation says so.
(org-id-locations-save): Handle he case if `org-id-locations' is a
hash.
(org-id-locations-load): Convert the alist to a hash.
(org-id-add-location): Handle the hast case.
(kill-emacs-hook): Make sure id locations are saved when Emacs is
exited.
(org-id-hash-to-alist, org-id-alist-to-hash)
(org-id-paste-tracker): New functions.
author | Carsten Dominik <dominik@science.uva.nl> |
---|---|
date | Tue, 16 Dec 2008 13:28:37 +0000 |
parents | c851df8e004e |
children | ba23e35d3eaf |
comparison
equal
deleted
inserted
replaced
100447:f84c0729a0e9 | 100448:cea079b68b76 |
---|---|
3 ;; Copyright (C) 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. | 3 ;; Copyright (C) 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. |
4 | 4 |
5 ;; Author: Carsten Dominik <carsten at orgmode dot org> | 5 ;; Author: Carsten Dominik <carsten at orgmode dot org> |
6 ;; Keywords: outlines, hypermedia, calendar, wp | 6 ;; Keywords: outlines, hypermedia, calendar, wp |
7 ;; Homepage: http://orgmode.org | 7 ;; Homepage: http://orgmode.org |
8 ;; Version: 6.14 | 8 ;; Version: 6.15a |
9 ;; | 9 ;; |
10 ;; This file is part of GNU Emacs. | 10 ;; This file is part of GNU Emacs. |
11 ;; | 11 ;; |
12 ;; GNU Emacs is free software: you can redistribute it and/or modify | 12 ;; GNU Emacs is free software: you can redistribute it and/or modify |
13 ;; it under the terms of the GNU General Public License as published by | 13 ;; it under the terms of the GNU General Public License as published by |
1895 (push (if (match-end 1) 'hline 'dline) types) | 1895 (push (if (match-end 1) 'hline 'dline) types) |
1896 (if (match-end 1) (push l hlines) (push l dlines)) | 1896 (if (match-end 1) (push l hlines) (push l dlines)) |
1897 (beginning-of-line 2) | 1897 (beginning-of-line 2) |
1898 (setq l (1+ l))) | 1898 (setq l (1+ l))) |
1899 (setq org-table-current-line-types (apply 'vector (nreverse types)) | 1899 (setq org-table-current-line-types (apply 'vector (nreverse types)) |
1900 org-table-dlines (apply 'vector (cons nil (nreverse dlines))) | 1900 org-table-dlines (apply 'vector (cons (car dlines) |
1901 (nreverse dlines))) | |
1901 org-table-hlines (apply 'vector (cons nil (nreverse hlines))))))) | 1902 org-table-hlines (apply 'vector (cons nil (nreverse hlines))))))) |
1902 | 1903 |
1903 (defun org-table-maybe-eval-formula () | 1904 (defun org-table-maybe-eval-formula () |
1904 "Check if the current field starts with \"=\" or \":=\". | 1905 "Check if the current field starts with \"=\" or \":=\". |
1905 If yes, store the formula and apply it." | 1906 If yes, store the formula and apply it." |
2358 elements | 2359 elements |
2359 ",") "]")))) | 2360 ",") "]")))) |
2360 | 2361 |
2361 (defun org-table-recalculate (&optional all noalign) | 2362 (defun org-table-recalculate (&optional all noalign) |
2362 "Recalculate the current table line by applying all stored formulas. | 2363 "Recalculate the current table line by applying all stored formulas. |
2363 With prefix arg ALL, do this for all lines in the table." | 2364 With prefix arg ALL, do this for all lines in the table. |
2365 With the prefix argument ALL is `(16)' (a double `C-c C-u' prefix), or if | |
2366 it is the symbol `iterate', recompute the table until it no longer changes. | |
2367 If NOALIGN is not nil, do not re-align the table after the computations | |
2368 are done. This is typically used internally to save time, if it is | |
2369 known that the table will be realigned a little later anyway." | |
2364 (interactive "P") | 2370 (interactive "P") |
2365 (or (memq this-command org-recalc-commands) | 2371 (or (memq this-command org-recalc-commands) |
2366 (setq org-recalc-commands (cons this-command org-recalc-commands))) | 2372 (setq org-recalc-commands (cons this-command org-recalc-commands))) |
2367 (unless (org-at-table-p) (error "Not at a table")) | 2373 (unless (org-at-table-p) (error "Not at a table")) |
2368 (if (equal all '(16)) | 2374 (if (or (eq all 'iterate) (equal all '(16))) |
2369 (org-table-iterate) | 2375 (org-table-iterate) |
2370 (org-table-get-specials) | 2376 (org-table-get-specials) |
2371 (let* ((eqlist (sort (org-table-get-stored-formulas) | 2377 (let* ((eqlist (sort (org-table-get-stored-formulas) |
2372 (lambda (a b) (string< (car a) (car b))))) | 2378 (lambda (a b) (string< (car a) (car b))))) |
2373 (inhibit-redisplay (not debug-on-error)) | 2379 (inhibit-redisplay (not debug-on-error)) |
3863 (let ((tstart (orgtbl-eval-str (plist-get params :tstart)))) | 3869 (let ((tstart (orgtbl-eval-str (plist-get params :tstart)))) |
3864 (if tstart (push tstart *orgtbl-rtn*))))) | 3870 (if tstart (push tstart *orgtbl-rtn*))))) |
3865 | 3871 |
3866 ;; Do we have a heading section? If so, format it and handle the | 3872 ;; Do we have a heading section? If so, format it and handle the |
3867 ;; trailing hline. | 3873 ;; trailing hline. |
3868 (if (and (not splicep) (listp (car *orgtbl-table*)) | 3874 (if (and (not splicep) |
3869 (memq 'hline *orgtbl-table*)) | 3875 (or (consp (car *orgtbl-table*)) |
3876 (consp (nth 1 *orgtbl-table*))) | |
3877 (memq 'hline (cdr *orgtbl-table*))) | |
3870 (progn | 3878 (progn |
3879 (when (eq 'hline (car *orgtbl-table*)) | |
3880 ;; there is a hline before the first data line | |
3881 (and hline (push hline *orgtbl-rtn*)) | |
3882 (pop *orgtbl-table*)) | |
3871 (let* ((*orgtbl-lstart* (or (plist-get params :hlstart) | 3883 (let* ((*orgtbl-lstart* (or (plist-get params :hlstart) |
3872 *orgtbl-lstart*)) | 3884 *orgtbl-lstart*)) |
3873 (*orgtbl-llstart* (or (plist-get params :hllstart) | 3885 (*orgtbl-llstart* (or (plist-get params :hllstart) |
3874 *orgtbl-llstart*)) | 3886 *orgtbl-llstart*)) |
3875 (*orgtbl-lend* (or (plist-get params :hlend) *orgtbl-lend*)) | 3887 (*orgtbl-lend* (or (plist-get params :hlend) *orgtbl-lend*)) |